33006 lines
1.2 MiB
33006 lines
1.2 MiB
{
|
|
"id": "1f9234cd646180dcbe5b1a4005ae4198",
|
|
"_format": "hh-sol-build-info-1",
|
|
"solcVersion": "0.8.26",
|
|
"solcLongVersion": "0.8.26+commit.8a97fa7a",
|
|
"input": {
|
|
"language": "Solidity",
|
|
"sources": {
|
|
"contracts/rewards/RewardsDistributor.sol": {
|
|
"content": "// SPDX-License-Identifier: BUSL-1.1\r\npragma solidity ^0.8.10;\r\n\r\nimport {IScaledBalanceToken} from '@aave/core-v3/contracts/interfaces/IScaledBalanceToken.sol';\r\nimport {IERC20Detailed} from '@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol';\r\nimport {SafeCast} from '@aave/core-v3/contracts/dependencies/openzeppelin/contracts/SafeCast.sol';\r\nimport {IRewardsDistributor} from './interfaces/IRewardsDistributor.sol';\r\nimport {RewardsDataTypes} from './libraries/RewardsDataTypes.sol';\r\n\r\n/**\r\n * @title RewardsDistributor\r\n * @notice Accounting contract to manage multiple staking distributions with multiple rewards\r\n * @author Aave\r\n **/\r\nabstract contract RewardsDistributor is IRewardsDistributor {\r\n using SafeCast for uint256;\r\n\r\n // Manager of incentives\r\n address public immutable EMISSION_MANAGER;\r\n // Deprecated: This storage slot is kept for backwards compatibility purposes.\r\n address internal _emissionManager;\r\n\r\n // Map of rewarded asset addresses and their data (assetAddress => assetData)\r\n mapping(address => RewardsDataTypes.AssetData) internal _assets;\r\n\r\n // Map of reward assets (rewardAddress => enabled)\r\n mapping(address => bool) internal _isRewardEnabled;\r\n\r\n // Rewards list\r\n address[] internal _rewardsList;\r\n\r\n // Assets list\r\n address[] internal _assetsList;\r\n\r\n modifier onlyEmissionManager() {\r\n require(msg.sender == EMISSION_MANAGER, 'ONLY_EMISSION_MANAGER');\r\n _;\r\n }\r\n\r\n constructor(address emissionManager) {\r\n EMISSION_MANAGER = emissionManager;\r\n }\r\n\r\n /// @inheritdoc IRewardsDistributor\r\n function getRewardsData(\r\n address asset,\r\n address reward\r\n ) public view override returns (uint256, uint256, uint256, uint256) {\r\n return (\r\n _assets[asset].rewards[reward].index,\r\n _assets[asset].rewards[reward].emissionPerSecond,\r\n _assets[asset].rewards[reward].lastUpdateTimestamp,\r\n _assets[asset].rewards[reward].distributionEnd\r\n );\r\n }\r\n\r\n /// @inheritdoc IRewardsDistributor\r\n function getAssetIndex(\r\n address asset,\r\n address reward\r\n ) external view override returns (uint256, uint256) {\r\n RewardsDataTypes.RewardData storage rewardData = _assets[asset].rewards[reward];\r\n return\r\n _getAssetIndex(\r\n rewardData,\r\n IScaledBalanceToken(asset).scaledTotalSupply(),\r\n 10 ** _assets[asset].decimals\r\n );\r\n }\r\n\r\n /// @inheritdoc IRewardsDistributor\r\n function getDistributionEnd(\r\n address asset,\r\n address reward\r\n ) external view override returns (uint256) {\r\n return _assets[asset].rewards[reward].distributionEnd;\r\n }\r\n\r\n /// @inheritdoc IRewardsDistributor\r\n function getRewardsByAsset(address asset) external view override returns (address[] memory) {\r\n uint128 rewardsCount = _assets[asset].availableRewardsCount;\r\n address[] memory availableRewards = new address[](rewardsCount);\r\n\r\n for (uint128 i = 0; i < rewardsCount; i++) {\r\n availableRewards[i] = _assets[asset].availableRewards[i];\r\n }\r\n return availableRewards;\r\n }\r\n\r\n /// @inheritdoc IRewardsDistributor\r\n function getRewardsList() external view override returns (address[] memory) {\r\n return _rewardsList;\r\n }\r\n\r\n /// @inheritdoc IRewardsDistributor\r\n function getUserAssetIndex(\r\n address user,\r\n address asset,\r\n address reward\r\n ) public view override returns (uint256) {\r\n return _assets[asset].rewards[reward].usersData[user].index;\r\n }\r\n\r\n /// @inheritdoc IRewardsDistributor\r\n function getUserAccruedRewards(\r\n address user,\r\n address reward\r\n ) external view override returns (uint256) {\r\n uint256 totalAccrued;\r\n for (uint256 i = 0; i < _assetsList.length; i++) {\r\n totalAccrued += _assets[_assetsList[i]].rewards[reward].usersData[user].accrued;\r\n }\r\n\r\n return totalAccrued;\r\n }\r\n\r\n /// @inheritdoc IRewardsDistributor\r\n function getUserRewards(\r\n address[] calldata assets,\r\n address user,\r\n address reward\r\n ) external view override returns (uint256) {\r\n return _getUserReward(user, reward, _getUserAssetBalances(assets, user));\r\n }\r\n\r\n /// @inheritdoc IRewardsDistributor\r\n function getAllUserRewards(\r\n address[] calldata assets,\r\n address user\r\n )\r\n external\r\n view\r\n override\r\n returns (address[] memory rewardsList, uint256[] memory unclaimedAmounts)\r\n {\r\n RewardsDataTypes.UserAssetBalance[] memory userAssetBalances = _getUserAssetBalances(\r\n assets,\r\n user\r\n );\r\n rewardsList = new address[](_rewardsList.length);\r\n unclaimedAmounts = new uint256[](rewardsList.length);\r\n\r\n // Add unrealized rewards from user to unclaimedRewards\r\n for (uint256 i = 0; i < userAssetBalances.length; i++) {\r\n for (uint256 r = 0; r < rewardsList.length; r++) {\r\n rewardsList[r] = _rewardsList[r];\r\n unclaimedAmounts[r] += _assets[userAssetBalances[i].asset]\r\n .rewards[rewardsList[r]]\r\n .usersData[user]\r\n .accrued;\r\n\r\n if (userAssetBalances[i].userBalance == 0) {\r\n continue;\r\n }\r\n unclaimedAmounts[r] += _getPendingRewards(user, rewardsList[r], userAssetBalances[i]);\r\n }\r\n }\r\n return (rewardsList, unclaimedAmounts);\r\n }\r\n\r\n /// @inheritdoc IRewardsDistributor\r\n function setDistributionEnd(\r\n address asset,\r\n address reward,\r\n uint32 newDistributionEnd\r\n ) external override onlyEmissionManager {\r\n uint256 oldDistributionEnd = _assets[asset].rewards[reward].distributionEnd;\r\n _assets[asset].rewards[reward].distributionEnd = newDistributionEnd;\r\n\r\n emit AssetConfigUpdated(\r\n asset,\r\n reward,\r\n _assets[asset].rewards[reward].emissionPerSecond,\r\n _assets[asset].rewards[reward].emissionPerSecond,\r\n oldDistributionEnd,\r\n newDistributionEnd,\r\n _assets[asset].rewards[reward].index\r\n );\r\n }\r\n\r\n /// @inheritdoc IRewardsDistributor\r\n function setEmissionPerSecond(\r\n address asset,\r\n address[] calldata rewards,\r\n uint88[] calldata newEmissionsPerSecond\r\n ) external override onlyEmissionManager {\r\n require(rewards.length == newEmissionsPerSecond.length, 'INVALID_INPUT');\r\n for (uint256 i = 0; i < rewards.length; i++) {\r\n RewardsDataTypes.AssetData storage assetConfig = _assets[asset];\r\n RewardsDataTypes.RewardData storage rewardConfig = _assets[asset].rewards[rewards[i]];\r\n uint256 decimals = assetConfig.decimals;\r\n require(\r\n decimals != 0 && rewardConfig.lastUpdateTimestamp != 0,\r\n 'DISTRIBUTION_DOES_NOT_EXIST'\r\n );\r\n\r\n (uint256 newIndex, ) = _updateRewardData(\r\n rewardConfig,\r\n IScaledBalanceToken(asset).scaledTotalSupply(),\r\n 10 ** decimals\r\n );\r\n\r\n uint256 oldEmissionPerSecond = rewardConfig.emissionPerSecond;\r\n rewardConfig.emissionPerSecond = newEmissionsPerSecond[i];\r\n\r\n emit AssetConfigUpdated(\r\n asset,\r\n rewards[i],\r\n oldEmissionPerSecond,\r\n newEmissionsPerSecond[i],\r\n rewardConfig.distributionEnd,\r\n rewardConfig.distributionEnd,\r\n newIndex\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * @dev Configure the _assets for a specific emission\r\n * @param rewardsInput The array of each asset configuration\r\n **/\r\n function _configureAssets(RewardsDataTypes.RewardsConfigInput[] memory rewardsInput) internal {\r\n for (uint256 i = 0; i < rewardsInput.length; i++) {\r\n if (_assets[rewardsInput[i].asset].decimals == 0) {\r\n //never initialized before, adding to the list of assets\r\n _assetsList.push(rewardsInput[i].asset);\r\n }\r\n\r\n uint256 decimals = _assets[rewardsInput[i].asset].decimals = IERC20Detailed(\r\n rewardsInput[i].asset\r\n ).decimals();\r\n\r\n RewardsDataTypes.RewardData storage rewardConfig = _assets[rewardsInput[i].asset].rewards[\r\n rewardsInput[i].reward\r\n ];\r\n\r\n // Add reward address to asset available rewards if latestUpdateTimestamp is zero\r\n if (rewardConfig.lastUpdateTimestamp == 0) {\r\n _assets[rewardsInput[i].asset].availableRewards[\r\n _assets[rewardsInput[i].asset].availableRewardsCount\r\n ] = rewardsInput[i].reward;\r\n _assets[rewardsInput[i].asset].availableRewardsCount++;\r\n }\r\n\r\n // Add reward address to global rewards list if still not enabled\r\n if (_isRewardEnabled[rewardsInput[i].reward] == false) {\r\n _isRewardEnabled[rewardsInput[i].reward] = true;\r\n _rewardsList.push(rewardsInput[i].reward);\r\n }\r\n\r\n // Due emissions is still zero, updates only latestUpdateTimestamp\r\n (uint256 newIndex, ) = _updateRewardData(\r\n rewardConfig,\r\n rewardsInput[i].totalSupply,\r\n 10 ** decimals\r\n );\r\n\r\n // Configure emission and distribution end of the reward per asset\r\n uint88 oldEmissionsPerSecond = rewardConfig.emissionPerSecond;\r\n uint32 oldDistributionEnd = rewardConfig.distributionEnd;\r\n rewardConfig.emissionPerSecond = rewardsInput[i].emissionPerSecond;\r\n rewardConfig.distributionEnd = rewardsInput[i].distributionEnd;\r\n\r\n emit AssetConfigUpdated(\r\n rewardsInput[i].asset,\r\n rewardsInput[i].reward,\r\n oldEmissionsPerSecond,\r\n rewardsInput[i].emissionPerSecond,\r\n oldDistributionEnd,\r\n rewardsInput[i].distributionEnd,\r\n newIndex\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * @dev Updates the state of the distribution for the specified reward\r\n * @param rewardData Storage pointer to the distribution reward config\r\n * @param totalSupply Current total of underlying assets for this distribution\r\n * @param assetUnit One unit of asset (10**decimals)\r\n * @return The new distribution index\r\n * @return True if the index was updated, false otherwise\r\n **/\r\n function _updateRewardData(\r\n RewardsDataTypes.RewardData storage rewardData,\r\n uint256 totalSupply,\r\n uint256 assetUnit\r\n ) internal returns (uint256, bool) {\r\n (uint256 oldIndex, uint256 newIndex) = _getAssetIndex(rewardData, totalSupply, assetUnit);\r\n bool indexUpdated;\r\n if (newIndex != oldIndex) {\r\n require(newIndex <= type(uint104).max, 'INDEX_OVERFLOW');\r\n indexUpdated = true;\r\n\r\n //optimization: storing one after another saves one SSTORE\r\n rewardData.index = uint104(newIndex);\r\n rewardData.lastUpdateTimestamp = block.timestamp.toUint32();\r\n } else {\r\n rewardData.lastUpdateTimestamp = block.timestamp.toUint32();\r\n }\r\n\r\n return (newIndex, indexUpdated);\r\n }\r\n\r\n /**\r\n * @dev Updates the state of the distribution for the specific user\r\n * @param rewardData Storage pointer to the distribution reward config\r\n * @param user The address of the user\r\n * @param userBalance The user balance of the asset\r\n * @param newAssetIndex The new index of the asset distribution\r\n * @param assetUnit One unit of asset (10**decimals)\r\n * @return The rewards accrued since the last update\r\n **/\r\n function _updateUserData(\r\n RewardsDataTypes.RewardData storage rewardData,\r\n address user,\r\n uint256 userBalance,\r\n uint256 newAssetIndex,\r\n uint256 assetUnit\r\n ) internal returns (uint256, bool) {\r\n uint256 userIndex = rewardData.usersData[user].index;\r\n uint256 rewardsAccrued;\r\n bool dataUpdated;\r\n if ((dataUpdated = userIndex != newAssetIndex)) {\r\n // already checked for overflow in _updateRewardData\r\n rewardData.usersData[user].index = uint104(newAssetIndex);\r\n if (userBalance != 0) {\r\n rewardsAccrued = _getRewards(userBalance, newAssetIndex, userIndex, assetUnit);\r\n\r\n rewardData.usersData[user].accrued += rewardsAccrued.toUint128();\r\n }\r\n }\r\n return (rewardsAccrued, dataUpdated);\r\n }\r\n\r\n /**\r\n * @dev Iterates and accrues all the rewards for asset of the specific user\r\n * @param asset The address of the reference asset of the distribution\r\n * @param user The user address\r\n * @param userBalance The current user asset balance\r\n * @param totalSupply Total supply of the asset\r\n **/\r\n function _updateData(\r\n address asset,\r\n address user,\r\n uint256 userBalance,\r\n uint256 totalSupply\r\n ) internal {\r\n uint256 assetUnit;\r\n uint256 numAvailableRewards = _assets[asset].availableRewardsCount;\r\n unchecked {\r\n assetUnit = 10 ** _assets[asset].decimals;\r\n }\r\n\r\n if (numAvailableRewards == 0) {\r\n return;\r\n }\r\n unchecked {\r\n for (uint128 r = 0; r < numAvailableRewards; r++) {\r\n address reward = _assets[asset].availableRewards[r];\r\n RewardsDataTypes.RewardData storage rewardData = _assets[asset].rewards[reward];\r\n\r\n (uint256 newAssetIndex, bool rewardDataUpdated) = _updateRewardData(\r\n rewardData,\r\n totalSupply,\r\n assetUnit\r\n );\r\n\r\n (uint256 rewardsAccrued, bool userDataUpdated) = _updateUserData(\r\n rewardData,\r\n user,\r\n userBalance,\r\n newAssetIndex,\r\n assetUnit\r\n );\r\n\r\n if (rewardDataUpdated || userDataUpdated) {\r\n emit Accrued(asset, reward, user, newAssetIndex, newAssetIndex, rewardsAccrued);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @dev Accrues all the rewards of the assets specified in the userAssetBalances list\r\n * @param user The address of the user\r\n * @param userAssetBalances List of structs with the user balance and total supply of a set of assets\r\n **/\r\n function _updateDataMultiple(\r\n address user,\r\n RewardsDataTypes.UserAssetBalance[] memory userAssetBalances\r\n ) internal {\r\n for (uint256 i = 0; i < userAssetBalances.length; i++) {\r\n _updateData(\r\n userAssetBalances[i].asset,\r\n user,\r\n userAssetBalances[i].userBalance,\r\n userAssetBalances[i].totalSupply\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * @dev Return the accrued unclaimed amount of a reward from a user over a list of distribution\r\n * @param user The address of the user\r\n * @param reward The address of the reward token\r\n * @param userAssetBalances List of structs with the user balance and total supply of a set of assets\r\n * @return unclaimedRewards The accrued rewards for the user until the moment\r\n **/\r\n function _getUserReward(\r\n address user,\r\n address reward,\r\n RewardsDataTypes.UserAssetBalance[] memory userAssetBalances\r\n ) internal view returns (uint256 unclaimedRewards) {\r\n // Add unrealized rewards\r\n for (uint256 i = 0; i < userAssetBalances.length; i++) {\r\n if (userAssetBalances[i].userBalance == 0) {\r\n unclaimedRewards += _assets[userAssetBalances[i].asset]\r\n .rewards[reward]\r\n .usersData[user]\r\n .accrued;\r\n } else {\r\n unclaimedRewards +=\r\n _getPendingRewards(user, reward, userAssetBalances[i]) +\r\n _assets[userAssetBalances[i].asset].rewards[reward].usersData[user].accrued;\r\n }\r\n }\r\n\r\n return unclaimedRewards;\r\n }\r\n\r\n /**\r\n * @dev Calculates the pending (not yet accrued) rewards since the last user action\r\n * @param user The address of the user\r\n * @param reward The address of the reward token\r\n * @param userAssetBalance struct with the user balance and total supply of the incentivized asset\r\n * @return The pending rewards for the user since the last user action\r\n **/\r\n function _getPendingRewards(\r\n address user,\r\n address reward,\r\n RewardsDataTypes.UserAssetBalance memory userAssetBalance\r\n ) internal view returns (uint256) {\r\n RewardsDataTypes.RewardData storage rewardData = _assets[userAssetBalance.asset].rewards[\r\n reward\r\n ];\r\n uint256 assetUnit = 10 ** _assets[userAssetBalance.asset].decimals;\r\n (, uint256 nextIndex) = _getAssetIndex(rewardData, userAssetBalance.totalSupply, assetUnit);\r\n\r\n return\r\n _getRewards(\r\n userAssetBalance.userBalance,\r\n nextIndex,\r\n rewardData.usersData[user].index,\r\n assetUnit\r\n );\r\n }\r\n\r\n /**\r\n * @dev Internal function for the calculation of user's rewards on a distribution\r\n * @param userBalance Balance of the user asset on a distribution\r\n * @param reserveIndex Current index of the distribution\r\n * @param userIndex Index stored for the user, representation his staking moment\r\n * @param assetUnit One unit of asset (10**decimals)\r\n * @return The rewards\r\n **/\r\n function _getRewards(\r\n uint256 userBalance,\r\n uint256 reserveIndex,\r\n uint256 userIndex,\r\n uint256 assetUnit\r\n ) internal pure returns (uint256) {\r\n uint256 result = userBalance * (reserveIndex - userIndex);\r\n assembly {\r\n result := div(result, assetUnit)\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * @dev Calculates the next value of an specific distribution index, with validations\r\n * @param rewardData Storage pointer to the distribution reward config\r\n * @param totalSupply of the asset being rewarded\r\n * @param assetUnit One unit of asset (10**decimals)\r\n * @return The new index.\r\n **/\r\n function _getAssetIndex(\r\n RewardsDataTypes.RewardData storage rewardData,\r\n uint256 totalSupply,\r\n uint256 assetUnit\r\n ) internal view returns (uint256, uint256) {\r\n uint256 oldIndex = rewardData.index;\r\n uint256 distributionEnd = rewardData.distributionEnd;\r\n uint256 emissionPerSecond = rewardData.emissionPerSecond;\r\n uint256 lastUpdateTimestamp = rewardData.lastUpdateTimestamp;\r\n\r\n if (\r\n emissionPerSecond == 0 ||\r\n totalSupply == 0 ||\r\n lastUpdateTimestamp == block.timestamp ||\r\n lastUpdateTimestamp >= distributionEnd\r\n ) {\r\n return (oldIndex, oldIndex);\r\n }\r\n\r\n uint256 currentTimestamp = block.timestamp > distributionEnd\r\n ? distributionEnd\r\n : block.timestamp;\r\n uint256 timeDelta = currentTimestamp - lastUpdateTimestamp;\r\n uint256 firstTerm = emissionPerSecond * timeDelta * assetUnit;\r\n assembly {\r\n firstTerm := div(firstTerm, totalSupply)\r\n }\r\n return (oldIndex, (firstTerm + oldIndex));\r\n }\r\n\r\n /**\r\n * @dev Get user balances and total supply of all the assets specified by the assets parameter\r\n * @param assets List of assets to retrieve user balance and total supply\r\n * @param user Address of the user\r\n * @return userAssetBalances contains a list of structs with user balance and total supply of the given assets\r\n */\r\n function _getUserAssetBalances(\r\n address[] calldata assets,\r\n address user\r\n ) internal view virtual returns (RewardsDataTypes.UserAssetBalance[] memory userAssetBalances);\r\n\r\n /// @inheritdoc IRewardsDistributor\r\n function getAssetDecimals(address asset) external view returns (uint8) {\r\n return _assets[asset].decimals;\r\n }\r\n\r\n /// @inheritdoc IRewardsDistributor\r\n function getEmissionManager() external view returns (address) {\r\n return EMISSION_MANAGER;\r\n }\r\n}\r\n"
|
|
},
|
|
"contracts/rewards/libraries/RewardsDataTypes.sol": {
|
|
"content": "// SPDX-License-Identifier: AGPL-3.0\r\npragma solidity ^0.8.10;\r\n\r\nimport {ITransferStrategyBase} from '../interfaces/ITransferStrategyBase.sol';\r\nimport {IEACAggregatorProxy} from '../../misc/interfaces/IEACAggregatorProxy.sol';\r\n\r\nlibrary RewardsDataTypes {\r\n struct RewardsConfigInput {\r\n uint88 emissionPerSecond;\r\n uint256 totalSupply;\r\n uint32 distributionEnd;\r\n address asset;\r\n address reward;\r\n ITransferStrategyBase transferStrategy;\r\n IEACAggregatorProxy rewardOracle;\r\n }\r\n\r\n struct UserAssetBalance {\r\n address asset;\r\n uint256 userBalance;\r\n uint256 totalSupply;\r\n }\r\n\r\n struct UserData {\r\n // Liquidity index of the reward distribution for the user\r\n uint104 index;\r\n // Amount of accrued rewards for the user since last user index update\r\n uint128 accrued;\r\n }\r\n\r\n struct RewardData {\r\n // Liquidity index of the reward distribution\r\n uint104 index;\r\n // Amount of reward tokens distributed per second\r\n uint88 emissionPerSecond;\r\n // Timestamp of the last reward index update\r\n uint32 lastUpdateTimestamp;\r\n // The end of the distribution of rewards (in seconds)\r\n uint32 distributionEnd;\r\n // Map of user addresses and their rewards data (userAddress => userData)\r\n mapping(address => UserData) usersData;\r\n }\r\n\r\n struct AssetData {\r\n // Map of reward token addresses and their data (rewardTokenAddress => rewardData)\r\n mapping(address => RewardData) rewards;\r\n // List of reward token addresses for the asset\r\n mapping(uint128 => address) availableRewards;\r\n // Count of reward tokens for the asset\r\n uint128 availableRewardsCount;\r\n // Number of decimals of the asset\r\n uint8 decimals;\r\n }\r\n}\r\n"
|
|
},
|
|
"contracts/rewards/interfaces/IRewardsDistributor.sol": {
|
|
"content": "// SPDX-License-Identifier: AGPL-3.0\r\npragma solidity ^0.8.10;\r\n\r\n/**\r\n * @title IRewardsDistributor\r\n * @author Aave\r\n * @notice Defines the basic interface for a Rewards Distributor.\r\n */\r\ninterface IRewardsDistributor {\r\n /**\r\n * @dev Emitted when the configuration of the rewards of an asset is updated.\r\n * @param asset The address of the incentivized asset\r\n * @param reward The address of the reward token\r\n * @param oldEmission The old emissions per second value of the reward distribution\r\n * @param newEmission The new emissions per second value of the reward distribution\r\n * @param oldDistributionEnd The old end timestamp of the reward distribution\r\n * @param newDistributionEnd The new end timestamp of the reward distribution\r\n * @param assetIndex The index of the asset distribution\r\n */\r\n event AssetConfigUpdated(\r\n address indexed asset,\r\n address indexed reward,\r\n uint256 oldEmission,\r\n uint256 newEmission,\r\n uint256 oldDistributionEnd,\r\n uint256 newDistributionEnd,\r\n uint256 assetIndex\r\n );\r\n\r\n /**\r\n * @dev Emitted when rewards of an asset are accrued on behalf of a user.\r\n * @param asset The address of the incentivized asset\r\n * @param reward The address of the reward token\r\n * @param user The address of the user that rewards are accrued on behalf of\r\n * @param assetIndex The index of the asset distribution\r\n * @param userIndex The index of the asset distribution on behalf of the user\r\n * @param rewardsAccrued The amount of rewards accrued\r\n */\r\n event Accrued(\r\n address indexed asset,\r\n address indexed reward,\r\n address indexed user,\r\n uint256 assetIndex,\r\n uint256 userIndex,\r\n uint256 rewardsAccrued\r\n );\r\n\r\n /**\r\n * @dev Sets the end date for the distribution\r\n * @param asset The asset to incentivize\r\n * @param reward The reward token that incentives the asset\r\n * @param newDistributionEnd The end date of the incentivization, in unix time format\r\n **/\r\n function setDistributionEnd(address asset, address reward, uint32 newDistributionEnd) external;\r\n\r\n /**\r\n * @dev Sets the emission per second of a set of reward distributions\r\n * @param asset The asset is being incentivized\r\n * @param rewards List of reward addresses are being distributed\r\n * @param newEmissionsPerSecond List of new reward emissions per second\r\n */\r\n function setEmissionPerSecond(\r\n address asset,\r\n address[] calldata rewards,\r\n uint88[] calldata newEmissionsPerSecond\r\n ) external;\r\n\r\n /**\r\n * @dev Gets the end date for the distribution\r\n * @param asset The incentivized asset\r\n * @param reward The reward token of the incentivized asset\r\n * @return The timestamp with the end of the distribution, in unix time format\r\n **/\r\n function getDistributionEnd(address asset, address reward) external view returns (uint256);\r\n\r\n /**\r\n * @dev Returns the index of a user on a reward distribution\r\n * @param user Address of the user\r\n * @param asset The incentivized asset\r\n * @param reward The reward token of the incentivized asset\r\n * @return The current user asset index, not including new distributions\r\n **/\r\n function getUserAssetIndex(\r\n address user,\r\n address asset,\r\n address reward\r\n ) external view returns (uint256);\r\n\r\n /**\r\n * @dev Returns the configuration of the distribution reward for a certain asset\r\n * @param asset The incentivized asset\r\n * @param reward The reward token of the incentivized asset\r\n * @return The index of the asset distribution\r\n * @return The emission per second of the reward distribution\r\n * @return The timestamp of the last update of the index\r\n * @return The timestamp of the distribution end\r\n **/\r\n function getRewardsData(\r\n address asset,\r\n address reward\r\n ) external view returns (uint256, uint256, uint256, uint256);\r\n\r\n /**\r\n * @dev Calculates the next value of an specific distribution index, with validations.\r\n * @param asset The incentivized asset\r\n * @param reward The reward token of the incentivized asset\r\n * @return The old index of the asset distribution\r\n * @return The new index of the asset distribution\r\n **/\r\n function getAssetIndex(address asset, address reward) external view returns (uint256, uint256);\r\n\r\n /**\r\n * @dev Returns the list of available reward token addresses of an incentivized asset\r\n * @param asset The incentivized asset\r\n * @return List of rewards addresses of the input asset\r\n **/\r\n function getRewardsByAsset(address asset) external view returns (address[] memory);\r\n\r\n /**\r\n * @dev Returns the list of available reward addresses\r\n * @return List of rewards supported in this contract\r\n **/\r\n function getRewardsList() external view returns (address[] memory);\r\n\r\n /**\r\n * @dev Returns the accrued rewards balance of a user, not including virtually accrued rewards since last distribution.\r\n * @param user The address of the user\r\n * @param reward The address of the reward token\r\n * @return Unclaimed rewards, not including new distributions\r\n **/\r\n function getUserAccruedRewards(address user, address reward) external view returns (uint256);\r\n\r\n /**\r\n * @dev Returns a single rewards balance of a user, including virtually accrued and unrealized claimable rewards.\r\n * @param assets List of incentivized assets to check eligible distributions\r\n * @param user The address of the user\r\n * @param reward The address of the reward token\r\n * @return The rewards amount\r\n **/\r\n function getUserRewards(\r\n address[] calldata assets,\r\n address user,\r\n address reward\r\n ) external view returns (uint256);\r\n\r\n /**\r\n * @dev Returns a list all rewards of a user, including already accrued and unrealized claimable rewards\r\n * @param assets List of incentivized assets to check eligible distributions\r\n * @param user The address of the user\r\n * @return The list of reward addresses\r\n * @return The list of unclaimed amount of rewards\r\n **/\r\n function getAllUserRewards(\r\n address[] calldata assets,\r\n address user\r\n ) external view returns (address[] memory, uint256[] memory);\r\n\r\n /**\r\n * @dev Returns the decimals of an asset to calculate the distribution delta\r\n * @param asset The address to retrieve decimals\r\n * @return The decimals of an underlying asset\r\n */\r\n function getAssetDecimals(address asset) external view returns (uint8);\r\n\r\n /**\r\n * @dev Returns the address of the emission manager\r\n * @return The address of the EmissionManager\r\n */\r\n function EMISSION_MANAGER() external view returns (address);\r\n\r\n /**\r\n * @dev Returns the address of the emission manager.\r\n * Deprecated: This getter is maintained for compatibility purposes. Use the `EMISSION_MANAGER()` function instead.\r\n * @return The address of the EmissionManager\r\n */\r\n function getEmissionManager() external view returns (address);\r\n}\r\n"
|
|
},
|
|
"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/SafeCast.sol": {
|
|
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol)\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 SafeCast {\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 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 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 <= type(uint128).max, \"SafeCast: value doesn't fit in 128 bits\");\n return uint128(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 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 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 <= type(uint64).max, \"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 <= type(uint32).max, \"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 <= 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 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 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(\n value >= type(int128).min && value <= type(int128).max,\n \"SafeCast: value doesn't fit in 128 bits\"\n );\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(\n value >= type(int64).min && value <= type(int64).max,\n \"SafeCast: value doesn't fit in 64 bits\"\n );\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(\n value >= type(int32).min && value <= type(int32).max,\n \"SafeCast: value doesn't fit in 32 bits\"\n );\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(\n value >= type(int16).min && value <= type(int16).max,\n \"SafeCast: value doesn't fit in 16 bits\"\n );\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(\n value >= type(int8).min && value <= type(int8).max,\n \"SafeCast: value doesn't fit in 8 bits\"\n );\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 // 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"
|
|
},
|
|
"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol": {
|
|
"content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.8.0;\n\nimport {IERC20} from './IERC20.sol';\n\ninterface IERC20Detailed is IERC20 {\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"
|
|
},
|
|
"@aave/core-v3/contracts/interfaces/IScaledBalanceToken.sol": {
|
|
"content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.8.0;\n\n/**\n * @title IScaledBalanceToken\n * @author Aave\n * @notice Defines the basic interface for a scaled-balance token.\n */\ninterface IScaledBalanceToken {\n /**\n * @dev Emitted after the mint action\n * @param caller The address performing the mint\n * @param onBehalfOf The address of the user that will receive the minted tokens\n * @param value The scaled-up amount being minted (based on user entered amount and balance increase from interest)\n * @param balanceIncrease The increase in scaled-up balance since the last action of 'onBehalfOf'\n * @param index The next liquidity index of the reserve\n */\n event Mint(\n address indexed caller,\n address indexed onBehalfOf,\n uint256 value,\n uint256 balanceIncrease,\n uint256 index\n );\n\n /**\n * @dev Emitted after the burn action\n * @dev If the burn function does not involve a transfer of the underlying asset, the target defaults to zero address\n * @param from The address from which the tokens will be burned\n * @param target The address that will receive the underlying, if any\n * @param value The scaled-up amount being burned (user entered amount - balance increase from interest)\n * @param balanceIncrease The increase in scaled-up balance since the last action of 'from'\n * @param index The next liquidity index of the reserve\n */\n event Burn(\n address indexed from,\n address indexed target,\n uint256 value,\n uint256 balanceIncrease,\n uint256 index\n );\n\n /**\n * @notice Returns the scaled balance of the user.\n * @dev The scaled balance is the sum of all the updated stored balance divided by the reserve's liquidity index\n * at the moment of the update\n * @param user The user whose balance is calculated\n * @return The scaled balance of the user\n */\n function scaledBalanceOf(address user) external view returns (uint256);\n\n /**\n * @notice Returns the scaled balance of the user and the scaled total supply.\n * @param user The address of the user\n * @return The scaled balance of the user\n * @return The scaled total supply\n */\n function getScaledUserBalanceAndSupply(address user) external view returns (uint256, uint256);\n\n /**\n * @notice Returns the scaled total supply of the scaled balance token. Represents sum(debt/index)\n * @return The scaled total supply\n */\n function scaledTotalSupply() external view returns (uint256);\n\n /**\n * @notice Returns last index interest was accrued to the user's balance\n * @param user The address of the user\n * @return The last index interest was accrued to the user's balance, expressed in ray\n */\n function getPreviousIndex(address user) external view returns (uint256);\n}\n"
|
|
},
|
|
"contracts/misc/interfaces/IEACAggregatorProxy.sol": {
|
|
"content": "// SPDX-License-Identifier: AGPL-3.0\r\npragma solidity ^0.8.10;\r\n\r\ninterface IEACAggregatorProxy {\r\n function decimals() external view returns (uint8);\r\n\r\n function latestAnswer() external view returns (int256);\r\n\r\n function latestTimestamp() external view returns (uint256);\r\n\r\n function latestRound() external view returns (uint256);\r\n\r\n function getAnswer(uint256 roundId) external view returns (int256);\r\n\r\n function getTimestamp(uint256 roundId) external view returns (uint256);\r\n\r\n event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 timestamp);\r\n event NewRound(uint256 indexed roundId, address indexed startedBy);\r\n}\r\n"
|
|
},
|
|
"contracts/rewards/interfaces/ITransferStrategyBase.sol": {
|
|
"content": "// SPDX-License-Identifier: AGPL-3.0\r\npragma solidity ^0.8.10;\r\n\r\ninterface ITransferStrategyBase {\r\n event EmergencyWithdrawal(\r\n address indexed caller,\r\n address indexed token,\r\n address indexed to,\r\n uint256 amount\r\n );\r\n\r\n /**\r\n * @dev Perform custom transfer logic via delegate call from source contract to a TransferStrategy implementation\r\n * @param to Account to transfer rewards\r\n * @param reward Address of the reward token\r\n * @param amount Amount to transfer to the \"to\" address parameter\r\n * @return Returns true bool if transfer logic succeeds\r\n */\r\n function performTransfer(address to, address reward, uint256 amount) external returns (bool);\r\n\r\n /**\r\n * @return Returns the address of the Incentives Controller\r\n */\r\n function getIncentivesController() external view returns (address);\r\n\r\n /**\r\n * @return Returns the address of the Rewards admin\r\n */\r\n function getRewardsAdmin() external view returns (address);\r\n\r\n /**\r\n * @dev Perform an emergency token withdrawal only callable by the Rewards admin\r\n * @param token Address of the token to withdraw funds from this contract\r\n * @param to Address of the recipient of the withdrawal\r\n * @param amount Amount of the withdrawal\r\n */\r\n function emergencyWithdrawal(address token, address to, uint256 amount) external;\r\n}\r\n"
|
|
},
|
|
"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol": {
|
|
"content": "// SPDX-License-Identifier: AGPL-3.0\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 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"
|
|
}
|
|
},
|
|
"settings": {
|
|
"optimizer": {
|
|
"enabled": false,
|
|
"runs": 200
|
|
},
|
|
"outputSelection": {
|
|
"*": {
|
|
"": [
|
|
"ast"
|
|
],
|
|
"*": [
|
|
"abi",
|
|
"metadata",
|
|
"devdoc",
|
|
"userdoc",
|
|
"storageLayout",
|
|
"evm.legacyAssembly",
|
|
"evm.bytecode",
|
|
"evm.deployedBytecode",
|
|
"evm.methodIdentifiers",
|
|
"evm.gasEstimates",
|
|
"evm.assembly"
|
|
]
|
|
}
|
|
},
|
|
"remappings": []
|
|
}
|
|
},
|
|
"output": {
|
|
"contracts": {
|
|
"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol": {
|
|
"IERC20": {
|
|
"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": [],
|
|
"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"
|
|
}
|
|
],
|
|
"devdoc": {
|
|
"details": "Interface of the ERC20 standard as defined in the EIP.",
|
|
"events": {
|
|
"Approval(address,address,uint256)": {
|
|
"details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance."
|
|
},
|
|
"Transfer(address,address,uint256)": {
|
|
"details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero."
|
|
}
|
|
},
|
|
"kind": "dev",
|
|
"methods": {
|
|
"allowance(address,address)": {
|
|
"details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called."
|
|
},
|
|
"approve(address,uint256)": {
|
|
"details": "Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event."
|
|
},
|
|
"balanceOf(address)": {
|
|
"details": "Returns the amount of tokens owned by `account`."
|
|
},
|
|
"totalSupply()": {
|
|
"details": "Returns the amount of tokens in existence."
|
|
},
|
|
"transfer(address,uint256)": {
|
|
"details": "Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."
|
|
},
|
|
"transferFrom(address,address,uint256)": {
|
|
"details": "Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."
|
|
}
|
|
},
|
|
"version": 1
|
|
},
|
|
"evm": {
|
|
"assembly": "",
|
|
"bytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"deployedBytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"immutableReferences": {},
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"gasEstimates": null,
|
|
"legacyAssembly": null,
|
|
"methodIdentifiers": {
|
|
"allowance(address,address)": "dd62ed3e",
|
|
"approve(address,uint256)": "095ea7b3",
|
|
"balanceOf(address)": "70a08231",
|
|
"totalSupply()": "18160ddd",
|
|
"transfer(address,uint256)": "a9059cbb",
|
|
"transferFrom(address,address,uint256)": "23b872dd"
|
|
}
|
|
},
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"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\":[],\"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\"}],\"devdoc\":{\"details\":\"Interface of the ERC20 standard as defined in the EIP.\",\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the amount of tokens owned by `account`.\"},\"totalSupply()\":{\"details\":\"Returns the amount of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol\":\"IERC20\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol\":{\"keccak256\":\"0xf57d62241e553696a1324d225663ba2e1a51db0a51ca236d0c1b009d89b6284c\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://d327db93b636790909aa137124f30a856ac1631cb79c476aa188f9627fda8d03\",\"dweb:/ipfs/QmaxpmEoBFioeNYmpxJemyZ7aYF2nX1NKW1XDqREm7i6es\"]}},\"version\":1}",
|
|
"storageLayout": {
|
|
"storage": [],
|
|
"types": null
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {},
|
|
"version": 1
|
|
}
|
|
}
|
|
},
|
|
"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol": {
|
|
"IERC20Detailed": {
|
|
"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": [],
|
|
"name": "decimals",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "",
|
|
"type": "uint8"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "name",
|
|
"outputs": [
|
|
{
|
|
"internalType": "string",
|
|
"name": "",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"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"
|
|
}
|
|
],
|
|
"devdoc": {
|
|
"events": {
|
|
"Approval(address,address,uint256)": {
|
|
"details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance."
|
|
},
|
|
"Transfer(address,address,uint256)": {
|
|
"details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero."
|
|
}
|
|
},
|
|
"kind": "dev",
|
|
"methods": {
|
|
"allowance(address,address)": {
|
|
"details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called."
|
|
},
|
|
"approve(address,uint256)": {
|
|
"details": "Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event."
|
|
},
|
|
"balanceOf(address)": {
|
|
"details": "Returns the amount of tokens owned by `account`."
|
|
},
|
|
"totalSupply()": {
|
|
"details": "Returns the amount of tokens in existence."
|
|
},
|
|
"transfer(address,uint256)": {
|
|
"details": "Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."
|
|
},
|
|
"transferFrom(address,address,uint256)": {
|
|
"details": "Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."
|
|
}
|
|
},
|
|
"version": 1
|
|
},
|
|
"evm": {
|
|
"assembly": "",
|
|
"bytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"deployedBytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"immutableReferences": {},
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"gasEstimates": null,
|
|
"legacyAssembly": null,
|
|
"methodIdentifiers": {
|
|
"allowance(address,address)": "dd62ed3e",
|
|
"approve(address,uint256)": "095ea7b3",
|
|
"balanceOf(address)": "70a08231",
|
|
"decimals()": "313ce567",
|
|
"name()": "06fdde03",
|
|
"symbol()": "95d89b41",
|
|
"totalSupply()": "18160ddd",
|
|
"transfer(address,uint256)": "a9059cbb",
|
|
"transferFrom(address,address,uint256)": "23b872dd"
|
|
}
|
|
},
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"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\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"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\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the amount of tokens owned by `account`.\"},\"totalSupply()\":{\"details\":\"Returns the amount of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol\":\"IERC20Detailed\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol\":{\"keccak256\":\"0xf57d62241e553696a1324d225663ba2e1a51db0a51ca236d0c1b009d89b6284c\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://d327db93b636790909aa137124f30a856ac1631cb79c476aa188f9627fda8d03\",\"dweb:/ipfs/QmaxpmEoBFioeNYmpxJemyZ7aYF2nX1NKW1XDqREm7i6es\"]},\"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol\":{\"keccak256\":\"0x9365cd885dc1ed7aed1364ae4dedf8e4660100cba0437061013f64c5002b385a\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://ddc639d67c82e15f76b08588e8ad2ee87eaff6bb9cba5c0e5b08e242c3c4ac00\",\"dweb:/ipfs/QmY1D9WcH3nmg2VVfqSUkEX6Zrkmkmx8oi2pJAvw5BABi7\"]}},\"version\":1}",
|
|
"storageLayout": {
|
|
"storage": [],
|
|
"types": null
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {},
|
|
"version": 1
|
|
}
|
|
}
|
|
},
|
|
"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/SafeCast.sol": {
|
|
"SafeCast": {
|
|
"abi": [],
|
|
"devdoc": {
|
|
"details": "Wrappers over Solidity's uintXX/intXX casting operators with added overflow checks. Downcasting from uint256/int256 in Solidity does not revert on overflow. This can easily result in undesired exploitation or bugs, since developers usually assume that overflows raise errors. `SafeCast` restores this intuition by reverting the transaction when such an operation overflows. Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always. Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing all math on `uint256` and `int256` and then downcasting.",
|
|
"kind": "dev",
|
|
"methods": {},
|
|
"version": 1
|
|
},
|
|
"evm": {
|
|
"assembly": " /* \"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/SafeCast.sol\":826:7436 library SafeCast {... */\n dataSize(sub_0)\n dataOffset(sub_0)\n 0x0b\n dup3\n dup3\n dup3\n codecopy\n dup1\n mload\n 0x00\n byte\n 0x73\n eq\n tag_1\n jumpi\n mstore(0x00, 0x4e487b7100000000000000000000000000000000000000000000000000000000)\n mstore(0x04, 0x00)\n revert(0x00, 0x24)\ntag_1:\n mstore(0x00, address)\n 0x73\n dup2\n mstore8\n dup3\n dup2\n return\nstop\n\nsub_0: assembly {\n /* \"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/SafeCast.sol\":826:7436 library SafeCast {... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa2646970667358221220d928c899d77145ddc534f6f303350d9d1d7688a7d2c3ff8bf014d2f3998e00c464736f6c634300081a0033\n}\n",
|
|
"bytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"linkReferences": {},
|
|
"object": "6055604b600b8282823980515f1a607314603f577f4e487b71000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f80fdfea2646970667358221220d928c899d77145ddc534f6f303350d9d1d7688a7d2c3ff8bf014d2f3998e00c464736f6c634300081a0033",
|
|
"opcodes": "PUSH1 0x55 PUSH1 0x4B PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x3F JUMPI PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xD9 0x28 0xC8 SWAP10 0xD7 PUSH18 0x45DDC534F6F303350D9D1D7688A7D2C3FF8B CREATE EQ 0xD2 RETURN SWAP10 DUP15 STOP 0xC4 PUSH5 0x736F6C6343 STOP ADDMOD BYTE STOP CALLER ",
|
|
"sourceMap": "826:6610:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
|
|
},
|
|
"deployedBytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"immutableReferences": {},
|
|
"linkReferences": {},
|
|
"object": "730000000000000000000000000000000000000000301460806040525f80fdfea2646970667358221220d928c899d77145ddc534f6f303350d9d1d7688a7d2c3ff8bf014d2f3998e00c464736f6c634300081a0033",
|
|
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xD9 0x28 0xC8 SWAP10 0xD7 PUSH18 0x45DDC534F6F303350D9D1D7688A7D2C3FF8B CREATE EQ 0xD2 RETURN SWAP10 DUP15 STOP 0xC4 PUSH5 0x736F6C6343 STOP ADDMOD BYTE STOP CALLER ",
|
|
"sourceMap": "826:6610:2:-:0;;;;;;;;"
|
|
},
|
|
"gasEstimates": {
|
|
"creation": {
|
|
"codeDepositCost": "17000",
|
|
"executionCost": "92",
|
|
"totalCost": "17092"
|
|
},
|
|
"internal": {
|
|
"toInt128(int256)": "infinite",
|
|
"toInt16(int256)": "infinite",
|
|
"toInt256(uint256)": "infinite",
|
|
"toInt32(int256)": "infinite",
|
|
"toInt64(int256)": "infinite",
|
|
"toInt8(int256)": "infinite",
|
|
"toUint128(uint256)": "infinite",
|
|
"toUint16(uint256)": "infinite",
|
|
"toUint224(uint256)": "infinite",
|
|
"toUint256(int256)": "infinite",
|
|
"toUint32(uint256)": "infinite",
|
|
"toUint64(uint256)": "infinite",
|
|
"toUint8(uint256)": "infinite",
|
|
"toUint96(uint256)": "infinite"
|
|
}
|
|
},
|
|
"legacyAssembly": {
|
|
".code": [
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "PUSH #[$]",
|
|
"source": 2,
|
|
"value": "0000000000000000000000000000000000000000000000000000000000000000"
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "PUSH [$]",
|
|
"source": 2,
|
|
"value": "0000000000000000000000000000000000000000000000000000000000000000"
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "PUSH",
|
|
"source": 2,
|
|
"value": "B"
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "DUP3",
|
|
"source": 2
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "DUP3",
|
|
"source": 2
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "DUP3",
|
|
"source": 2
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "CODECOPY",
|
|
"source": 2
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "DUP1",
|
|
"source": 2
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "MLOAD",
|
|
"source": 2
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "PUSH",
|
|
"source": 2,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "BYTE",
|
|
"source": 2
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "PUSH",
|
|
"source": 2,
|
|
"value": "73"
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "EQ",
|
|
"source": 2
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "PUSH [tag]",
|
|
"source": 2,
|
|
"value": "1"
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "JUMPI",
|
|
"source": 2
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "PUSH",
|
|
"source": 2,
|
|
"value": "4E487B7100000000000000000000000000000000000000000000000000000000"
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "PUSH",
|
|
"source": 2,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "MSTORE",
|
|
"source": 2
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "PUSH",
|
|
"source": 2,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "PUSH",
|
|
"source": 2,
|
|
"value": "4"
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "MSTORE",
|
|
"source": 2
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "PUSH",
|
|
"source": 2,
|
|
"value": "24"
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "PUSH",
|
|
"source": 2,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "REVERT",
|
|
"source": 2
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "tag",
|
|
"source": 2,
|
|
"value": "1"
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "JUMPDEST",
|
|
"source": 2
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "ADDRESS",
|
|
"source": 2
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "PUSH",
|
|
"source": 2,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "MSTORE",
|
|
"source": 2
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "PUSH",
|
|
"source": 2,
|
|
"value": "73"
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "DUP2",
|
|
"source": 2
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "MSTORE8",
|
|
"source": 2
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "DUP3",
|
|
"source": 2
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "DUP2",
|
|
"source": 2
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "RETURN",
|
|
"source": 2
|
|
}
|
|
],
|
|
".data": {
|
|
"0": {
|
|
".auxdata": "a2646970667358221220d928c899d77145ddc534f6f303350d9d1d7688a7d2c3ff8bf014d2f3998e00c464736f6c634300081a0033",
|
|
".code": [
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "PUSHDEPLOYADDRESS",
|
|
"source": 2
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "ADDRESS",
|
|
"source": 2
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "EQ",
|
|
"source": 2
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "PUSH",
|
|
"source": 2,
|
|
"value": "80"
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "PUSH",
|
|
"source": 2,
|
|
"value": "40"
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "MSTORE",
|
|
"source": 2
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "PUSH",
|
|
"source": 2,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "DUP1",
|
|
"source": 2
|
|
},
|
|
{
|
|
"begin": 826,
|
|
"end": 7436,
|
|
"name": "REVERT",
|
|
"source": 2
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"sourceList": [
|
|
"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol",
|
|
"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol",
|
|
"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/SafeCast.sol",
|
|
"@aave/core-v3/contracts/interfaces/IScaledBalanceToken.sol",
|
|
"contracts/misc/interfaces/IEACAggregatorProxy.sol",
|
|
"contracts/rewards/RewardsDistributor.sol",
|
|
"contracts/rewards/interfaces/IRewardsDistributor.sol",
|
|
"contracts/rewards/interfaces/ITransferStrategyBase.sol",
|
|
"contracts/rewards/libraries/RewardsDataTypes.sol",
|
|
"#utility.yul"
|
|
]
|
|
},
|
|
"methodIdentifiers": {}
|
|
},
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Wrappers over Solidity's uintXX/intXX casting operators with added overflow checks. Downcasting from uint256/int256 in Solidity does not revert on overflow. This can easily result in undesired exploitation or bugs, since developers usually assume that overflows raise errors. `SafeCast` restores this intuition by reverting the transaction when such an operation overflows. Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always. Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing all math on `uint256` and `int256` and then downcasting.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/SafeCast.sol\":\"SafeCast\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/SafeCast.sol\":{\"keccak256\":\"0x36824ad8ec8a12aa21938a05f971e21d23c7e84ae3b3a19b0643c5ebb873166e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4cf1652c12eb8727a9c039cbfa4be91aeff36d373f66301fc009d62816d4adbd\",\"dweb:/ipfs/QmX8QsPDKmEp6HohCwWo1yAmkc18btXaPCoTc4Wc4ZqPhL\"]}},\"version\":1}",
|
|
"storageLayout": {
|
|
"storage": [],
|
|
"types": null
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {},
|
|
"version": 1
|
|
}
|
|
}
|
|
},
|
|
"@aave/core-v3/contracts/interfaces/IScaledBalanceToken.sol": {
|
|
"IScaledBalanceToken": {
|
|
"abi": [
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "from",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "target",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "value",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "balanceIncrease",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "index",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Burn",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "caller",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "onBehalfOf",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "value",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "balanceIncrease",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "index",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Mint",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "user",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getPreviousIndex",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "user",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getScaledUserBalanceAndSupply",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "user",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "scaledBalanceOf",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "scaledTotalSupply",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"devdoc": {
|
|
"author": "Aave",
|
|
"events": {
|
|
"Burn(address,address,uint256,uint256,uint256)": {
|
|
"details": "Emitted after the burn actionIf the burn function does not involve a transfer of the underlying asset, the target defaults to zero address",
|
|
"params": {
|
|
"balanceIncrease": "The increase in scaled-up balance since the last action of 'from'",
|
|
"from": "The address from which the tokens will be burned",
|
|
"index": "The next liquidity index of the reserve",
|
|
"target": "The address that will receive the underlying, if any",
|
|
"value": "The scaled-up amount being burned (user entered amount - balance increase from interest)"
|
|
}
|
|
},
|
|
"Mint(address,address,uint256,uint256,uint256)": {
|
|
"details": "Emitted after the mint action",
|
|
"params": {
|
|
"balanceIncrease": "The increase in scaled-up balance since the last action of 'onBehalfOf'",
|
|
"caller": "The address performing the mint",
|
|
"index": "The next liquidity index of the reserve",
|
|
"onBehalfOf": "The address of the user that will receive the minted tokens",
|
|
"value": "The scaled-up amount being minted (based on user entered amount and balance increase from interest)"
|
|
}
|
|
}
|
|
},
|
|
"kind": "dev",
|
|
"methods": {
|
|
"getPreviousIndex(address)": {
|
|
"params": {
|
|
"user": "The address of the user"
|
|
},
|
|
"returns": {
|
|
"_0": "The last index interest was accrued to the user's balance, expressed in ray"
|
|
}
|
|
},
|
|
"getScaledUserBalanceAndSupply(address)": {
|
|
"params": {
|
|
"user": "The address of the user"
|
|
},
|
|
"returns": {
|
|
"_0": "The scaled balance of the user",
|
|
"_1": "The scaled total supply"
|
|
}
|
|
},
|
|
"scaledBalanceOf(address)": {
|
|
"details": "The scaled balance is the sum of all the updated stored balance divided by the reserve's liquidity index at the moment of the update",
|
|
"params": {
|
|
"user": "The user whose balance is calculated"
|
|
},
|
|
"returns": {
|
|
"_0": "The scaled balance of the user"
|
|
}
|
|
},
|
|
"scaledTotalSupply()": {
|
|
"returns": {
|
|
"_0": "The scaled total supply"
|
|
}
|
|
}
|
|
},
|
|
"title": "IScaledBalanceToken",
|
|
"version": 1
|
|
},
|
|
"evm": {
|
|
"assembly": "",
|
|
"bytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"deployedBytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"immutableReferences": {},
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"gasEstimates": null,
|
|
"legacyAssembly": null,
|
|
"methodIdentifiers": {
|
|
"getPreviousIndex(address)": "e0753986",
|
|
"getScaledUserBalanceAndSupply(address)": "0afbcdc9",
|
|
"scaledBalanceOf(address)": "1da24f3e",
|
|
"scaledTotalSupply()": "b1bf962d"
|
|
}
|
|
},
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"balanceIncrease\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"onBehalfOf\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"balanceIncrease\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getPreviousIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getScaledUserBalanceAndSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"scaledBalanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"scaledTotalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Aave\",\"events\":{\"Burn(address,address,uint256,uint256,uint256)\":{\"details\":\"Emitted after the burn actionIf the burn function does not involve a transfer of the underlying asset, the target defaults to zero address\",\"params\":{\"balanceIncrease\":\"The increase in scaled-up balance since the last action of 'from'\",\"from\":\"The address from which the tokens will be burned\",\"index\":\"The next liquidity index of the reserve\",\"target\":\"The address that will receive the underlying, if any\",\"value\":\"The scaled-up amount being burned (user entered amount - balance increase from interest)\"}},\"Mint(address,address,uint256,uint256,uint256)\":{\"details\":\"Emitted after the mint action\",\"params\":{\"balanceIncrease\":\"The increase in scaled-up balance since the last action of 'onBehalfOf'\",\"caller\":\"The address performing the mint\",\"index\":\"The next liquidity index of the reserve\",\"onBehalfOf\":\"The address of the user that will receive the minted tokens\",\"value\":\"The scaled-up amount being minted (based on user entered amount and balance increase from interest)\"}}},\"kind\":\"dev\",\"methods\":{\"getPreviousIndex(address)\":{\"params\":{\"user\":\"The address of the user\"},\"returns\":{\"_0\":\"The last index interest was accrued to the user's balance, expressed in ray\"}},\"getScaledUserBalanceAndSupply(address)\":{\"params\":{\"user\":\"The address of the user\"},\"returns\":{\"_0\":\"The scaled balance of the user\",\"_1\":\"The scaled total supply\"}},\"scaledBalanceOf(address)\":{\"details\":\"The scaled balance is the sum of all the updated stored balance divided by the reserve's liquidity index at the moment of the update\",\"params\":{\"user\":\"The user whose balance is calculated\"},\"returns\":{\"_0\":\"The scaled balance of the user\"}},\"scaledTotalSupply()\":{\"returns\":{\"_0\":\"The scaled total supply\"}}},\"title\":\"IScaledBalanceToken\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"getPreviousIndex(address)\":{\"notice\":\"Returns last index interest was accrued to the user's balance\"},\"getScaledUserBalanceAndSupply(address)\":{\"notice\":\"Returns the scaled balance of the user and the scaled total supply.\"},\"scaledBalanceOf(address)\":{\"notice\":\"Returns the scaled balance of the user.\"},\"scaledTotalSupply()\":{\"notice\":\"Returns the scaled total supply of the scaled balance token. Represents sum(debt/index)\"}},\"notice\":\"Defines the basic interface for a scaled-balance token.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"@aave/core-v3/contracts/interfaces/IScaledBalanceToken.sol\":\"IScaledBalanceToken\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@aave/core-v3/contracts/interfaces/IScaledBalanceToken.sol\":{\"keccak256\":\"0x72b3ea433cd3386f369f1643a154bf233ec60c02acd02c32088a97556207d2e4\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://a5907c61cf65126001feebd94c7a869eff95045106d97e21bf7f0d3de22caf9d\",\"dweb:/ipfs/QmPARkA7YpsBtd1F3JgszZREJk6TAkqRLBkjWZUadCu3sM\"]}},\"version\":1}",
|
|
"storageLayout": {
|
|
"storage": [],
|
|
"types": null
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {
|
|
"getPreviousIndex(address)": {
|
|
"notice": "Returns last index interest was accrued to the user's balance"
|
|
},
|
|
"getScaledUserBalanceAndSupply(address)": {
|
|
"notice": "Returns the scaled balance of the user and the scaled total supply."
|
|
},
|
|
"scaledBalanceOf(address)": {
|
|
"notice": "Returns the scaled balance of the user."
|
|
},
|
|
"scaledTotalSupply()": {
|
|
"notice": "Returns the scaled total supply of the scaled balance token. Represents sum(debt/index)"
|
|
}
|
|
},
|
|
"notice": "Defines the basic interface for a scaled-balance token.",
|
|
"version": 1
|
|
}
|
|
}
|
|
},
|
|
"contracts/misc/interfaces/IEACAggregatorProxy.sol": {
|
|
"IEACAggregatorProxy": {
|
|
"abi": [
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "int256",
|
|
"name": "current",
|
|
"type": "int256"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "uint256",
|
|
"name": "roundId",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "timestamp",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "AnswerUpdated",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "uint256",
|
|
"name": "roundId",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "startedBy",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "NewRound",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "decimals",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "",
|
|
"type": "uint8"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "roundId",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "getAnswer",
|
|
"outputs": [
|
|
{
|
|
"internalType": "int256",
|
|
"name": "",
|
|
"type": "int256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "roundId",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "getTimestamp",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "latestAnswer",
|
|
"outputs": [
|
|
{
|
|
"internalType": "int256",
|
|
"name": "",
|
|
"type": "int256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "latestRound",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "latestTimestamp",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"devdoc": {
|
|
"kind": "dev",
|
|
"methods": {},
|
|
"version": 1
|
|
},
|
|
"evm": {
|
|
"assembly": "",
|
|
"bytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"deployedBytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"immutableReferences": {},
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"gasEstimates": null,
|
|
"legacyAssembly": null,
|
|
"methodIdentifiers": {
|
|
"decimals()": "313ce567",
|
|
"getAnswer(uint256)": "b5ab58dc",
|
|
"getTimestamp(uint256)": "b633620c",
|
|
"latestAnswer()": "50d25bcd",
|
|
"latestRound()": "668a0f02",
|
|
"latestTimestamp()": "8205bf6a"
|
|
}
|
|
},
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"int256\",\"name\":\"current\",\"type\":\"int256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"roundId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"AnswerUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"roundId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"startedBy\",\"type\":\"address\"}],\"name\":\"NewRound\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"roundId\",\"type\":\"uint256\"}],\"name\":\"getAnswer\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"roundId\",\"type\":\"uint256\"}],\"name\":\"getTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestAnswer\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestRound\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/misc/interfaces/IEACAggregatorProxy.sol\":\"IEACAggregatorProxy\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/misc/interfaces/IEACAggregatorProxy.sol\":{\"keccak256\":\"0x637d15b86eae9f1e00697bf9aca057e9aee13968055c74fbca955ea52f7f682e\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://2ccbf668f63fa23f903abaaba8e8196e4847b82d1b8b076a6a147299c104a375\",\"dweb:/ipfs/QmXvgciSMm1ByuAZi9bN2ZRm52UtC2BGqLo8gXsUHA6Zns\"]}},\"version\":1}",
|
|
"storageLayout": {
|
|
"storage": [],
|
|
"types": null
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {},
|
|
"version": 1
|
|
}
|
|
}
|
|
},
|
|
"contracts/rewards/RewardsDistributor.sol": {
|
|
"RewardsDistributor": {
|
|
"abi": [
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "asset",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "reward",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "user",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "assetIndex",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "userIndex",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "rewardsAccrued",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Accrued",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "asset",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "reward",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "oldEmission",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "newEmission",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "oldDistributionEnd",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "newDistributionEnd",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "assetIndex",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "AssetConfigUpdated",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "EMISSION_MANAGER",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address[]",
|
|
"name": "assets",
|
|
"type": "address[]"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "user",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getAllUserRewards",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address[]",
|
|
"name": "rewardsList",
|
|
"type": "address[]"
|
|
},
|
|
{
|
|
"internalType": "uint256[]",
|
|
"name": "unclaimedAmounts",
|
|
"type": "uint256[]"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "asset",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getAssetDecimals",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "",
|
|
"type": "uint8"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "asset",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "reward",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getAssetIndex",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "asset",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "reward",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getDistributionEnd",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "getEmissionManager",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "asset",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getRewardsByAsset",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address[]",
|
|
"name": "",
|
|
"type": "address[]"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "asset",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "reward",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getRewardsData",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "getRewardsList",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address[]",
|
|
"name": "",
|
|
"type": "address[]"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "user",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "reward",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getUserAccruedRewards",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "user",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "asset",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "reward",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getUserAssetIndex",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address[]",
|
|
"name": "assets",
|
|
"type": "address[]"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "user",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "reward",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getUserRewards",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "asset",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "reward",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint32",
|
|
"name": "newDistributionEnd",
|
|
"type": "uint32"
|
|
}
|
|
],
|
|
"name": "setDistributionEnd",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "asset",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address[]",
|
|
"name": "rewards",
|
|
"type": "address[]"
|
|
},
|
|
{
|
|
"internalType": "uint88[]",
|
|
"name": "newEmissionsPerSecond",
|
|
"type": "uint88[]"
|
|
}
|
|
],
|
|
"name": "setEmissionPerSecond",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"devdoc": {
|
|
"author": "Aave*",
|
|
"events": {
|
|
"Accrued(address,address,address,uint256,uint256,uint256)": {
|
|
"details": "Emitted when rewards of an asset are accrued on behalf of a user.",
|
|
"params": {
|
|
"asset": "The address of the incentivized asset",
|
|
"assetIndex": "The index of the asset distribution",
|
|
"reward": "The address of the reward token",
|
|
"rewardsAccrued": "The amount of rewards accrued",
|
|
"user": "The address of the user that rewards are accrued on behalf of",
|
|
"userIndex": "The index of the asset distribution on behalf of the user"
|
|
}
|
|
},
|
|
"AssetConfigUpdated(address,address,uint256,uint256,uint256,uint256,uint256)": {
|
|
"details": "Emitted when the configuration of the rewards of an asset is updated.",
|
|
"params": {
|
|
"asset": "The address of the incentivized asset",
|
|
"assetIndex": "The index of the asset distribution",
|
|
"newDistributionEnd": "The new end timestamp of the reward distribution",
|
|
"newEmission": "The new emissions per second value of the reward distribution",
|
|
"oldDistributionEnd": "The old end timestamp of the reward distribution",
|
|
"oldEmission": "The old emissions per second value of the reward distribution",
|
|
"reward": "The address of the reward token"
|
|
}
|
|
}
|
|
},
|
|
"kind": "dev",
|
|
"methods": {
|
|
"getAllUserRewards(address[],address)": {
|
|
"details": "Returns a list all rewards of a user, including already accrued and unrealized claimable rewards",
|
|
"params": {
|
|
"assets": "List of incentivized assets to check eligible distributions",
|
|
"user": "The address of the user"
|
|
},
|
|
"returns": {
|
|
"rewardsList": "The list of reward addresses",
|
|
"unclaimedAmounts": "The list of unclaimed amount of rewards*"
|
|
}
|
|
},
|
|
"getAssetDecimals(address)": {
|
|
"details": "Returns the decimals of an asset to calculate the distribution delta",
|
|
"params": {
|
|
"asset": "The address to retrieve decimals"
|
|
},
|
|
"returns": {
|
|
"_0": "The decimals of an underlying asset"
|
|
}
|
|
},
|
|
"getAssetIndex(address,address)": {
|
|
"details": "Calculates the next value of an specific distribution index, with validations.",
|
|
"params": {
|
|
"asset": "The incentivized asset",
|
|
"reward": "The reward token of the incentivized asset"
|
|
},
|
|
"returns": {
|
|
"_0": "The old index of the asset distribution",
|
|
"_1": "The new index of the asset distribution*"
|
|
}
|
|
},
|
|
"getDistributionEnd(address,address)": {
|
|
"details": "Gets the end date for the distribution",
|
|
"params": {
|
|
"asset": "The incentivized asset",
|
|
"reward": "The reward token of the incentivized asset"
|
|
},
|
|
"returns": {
|
|
"_0": "The timestamp with the end of the distribution, in unix time format*"
|
|
}
|
|
},
|
|
"getEmissionManager()": {
|
|
"details": "Returns the address of the emission manager. Deprecated: This getter is maintained for compatibility purposes. Use the `EMISSION_MANAGER()` function instead.",
|
|
"returns": {
|
|
"_0": "The address of the EmissionManager"
|
|
}
|
|
},
|
|
"getRewardsByAsset(address)": {
|
|
"details": "Returns the list of available reward token addresses of an incentivized asset",
|
|
"params": {
|
|
"asset": "The incentivized asset"
|
|
},
|
|
"returns": {
|
|
"_0": "List of rewards addresses of the input asset*"
|
|
}
|
|
},
|
|
"getRewardsData(address,address)": {
|
|
"details": "Returns the configuration of the distribution reward for a certain asset",
|
|
"params": {
|
|
"asset": "The incentivized asset",
|
|
"reward": "The reward token of the incentivized asset"
|
|
},
|
|
"returns": {
|
|
"_0": "The index of the asset distribution",
|
|
"_1": "The emission per second of the reward distribution",
|
|
"_2": "The timestamp of the last update of the index",
|
|
"_3": "The timestamp of the distribution end*"
|
|
}
|
|
},
|
|
"getRewardsList()": {
|
|
"details": "Returns the list of available reward addresses",
|
|
"returns": {
|
|
"_0": "List of rewards supported in this contract*"
|
|
}
|
|
},
|
|
"getUserAccruedRewards(address,address)": {
|
|
"details": "Returns the accrued rewards balance of a user, not including virtually accrued rewards since last distribution.",
|
|
"params": {
|
|
"reward": "The address of the reward token",
|
|
"user": "The address of the user"
|
|
},
|
|
"returns": {
|
|
"_0": "Unclaimed rewards, not including new distributions*"
|
|
}
|
|
},
|
|
"getUserAssetIndex(address,address,address)": {
|
|
"details": "Returns the index of a user on a reward distribution",
|
|
"params": {
|
|
"asset": "The incentivized asset",
|
|
"reward": "The reward token of the incentivized asset",
|
|
"user": "Address of the user"
|
|
},
|
|
"returns": {
|
|
"_0": "The current user asset index, not including new distributions*"
|
|
}
|
|
},
|
|
"getUserRewards(address[],address,address)": {
|
|
"details": "Returns a single rewards balance of a user, including virtually accrued and unrealized claimable rewards.",
|
|
"params": {
|
|
"assets": "List of incentivized assets to check eligible distributions",
|
|
"reward": "The address of the reward token",
|
|
"user": "The address of the user"
|
|
},
|
|
"returns": {
|
|
"_0": "The rewards amount*"
|
|
}
|
|
},
|
|
"setDistributionEnd(address,address,uint32)": {
|
|
"details": "Sets the end date for the distribution",
|
|
"params": {
|
|
"asset": "The asset to incentivize",
|
|
"newDistributionEnd": "The end date of the incentivization, in unix time format*",
|
|
"reward": "The reward token that incentives the asset"
|
|
}
|
|
},
|
|
"setEmissionPerSecond(address,address[],uint88[])": {
|
|
"details": "Sets the emission per second of a set of reward distributions",
|
|
"params": {
|
|
"asset": "The asset is being incentivized",
|
|
"newEmissionsPerSecond": "List of new reward emissions per second",
|
|
"rewards": "List of reward addresses are being distributed"
|
|
}
|
|
}
|
|
},
|
|
"stateVariables": {
|
|
"EMISSION_MANAGER": {
|
|
"details": "Returns the address of the emission manager",
|
|
"return": "The address of the EmissionManager",
|
|
"returns": {
|
|
"_0": "The address of the EmissionManager"
|
|
}
|
|
}
|
|
},
|
|
"title": "RewardsDistributor",
|
|
"version": 1
|
|
},
|
|
"evm": {
|
|
"assembly": "",
|
|
"bytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"deployedBytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"immutableReferences": {},
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"gasEstimates": null,
|
|
"legacyAssembly": null,
|
|
"methodIdentifiers": {
|
|
"EMISSION_MANAGER()": "cbcbb507",
|
|
"getAllUserRewards(address[],address)": "4c0369c3",
|
|
"getAssetDecimals(address)": "9efd6f72",
|
|
"getAssetIndex(address,address)": "886fe70b",
|
|
"getDistributionEnd(address,address)": "1b839c77",
|
|
"getEmissionManager()": "92074b08",
|
|
"getRewardsByAsset(address)": "6657732f",
|
|
"getRewardsData(address,address)": "7eff4ba8",
|
|
"getRewardsList()": "b45ac1a9",
|
|
"getUserAccruedRewards(address,address)": "b022418c",
|
|
"getUserAssetIndex(address,address,address)": "533f542a",
|
|
"getUserRewards(address[],address,address)": "70674ab9",
|
|
"setDistributionEnd(address,address,uint32)": "c5a7b538",
|
|
"setEmissionPerSecond(address,address[],uint88[])": "f996868b"
|
|
}
|
|
},
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"reward\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assetIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"userIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"rewardsAccrued\",\"type\":\"uint256\"}],\"name\":\"Accrued\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"reward\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldEmission\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newEmission\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldDistributionEnd\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newDistributionEnd\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assetIndex\",\"type\":\"uint256\"}],\"name\":\"AssetConfigUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"EMISSION_MANAGER\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getAllUserRewards\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"rewardsList\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"unclaimedAmounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"}],\"name\":\"getAssetDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"getAssetIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"getDistributionEnd\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getEmissionManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"}],\"name\":\"getRewardsByAsset\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"getRewardsData\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRewardsList\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"getUserAccruedRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"getUserAssetIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"getUserRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"newDistributionEnd\",\"type\":\"uint32\"}],\"name\":\"setDistributionEnd\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"rewards\",\"type\":\"address[]\"},{\"internalType\":\"uint88[]\",\"name\":\"newEmissionsPerSecond\",\"type\":\"uint88[]\"}],\"name\":\"setEmissionPerSecond\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Aave*\",\"events\":{\"Accrued(address,address,address,uint256,uint256,uint256)\":{\"details\":\"Emitted when rewards of an asset are accrued on behalf of a user.\",\"params\":{\"asset\":\"The address of the incentivized asset\",\"assetIndex\":\"The index of the asset distribution\",\"reward\":\"The address of the reward token\",\"rewardsAccrued\":\"The amount of rewards accrued\",\"user\":\"The address of the user that rewards are accrued on behalf of\",\"userIndex\":\"The index of the asset distribution on behalf of the user\"}},\"AssetConfigUpdated(address,address,uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Emitted when the configuration of the rewards of an asset is updated.\",\"params\":{\"asset\":\"The address of the incentivized asset\",\"assetIndex\":\"The index of the asset distribution\",\"newDistributionEnd\":\"The new end timestamp of the reward distribution\",\"newEmission\":\"The new emissions per second value of the reward distribution\",\"oldDistributionEnd\":\"The old end timestamp of the reward distribution\",\"oldEmission\":\"The old emissions per second value of the reward distribution\",\"reward\":\"The address of the reward token\"}}},\"kind\":\"dev\",\"methods\":{\"getAllUserRewards(address[],address)\":{\"details\":\"Returns a list all rewards of a user, including already accrued and unrealized claimable rewards\",\"params\":{\"assets\":\"List of incentivized assets to check eligible distributions\",\"user\":\"The address of the user\"},\"returns\":{\"rewardsList\":\"The list of reward addresses\",\"unclaimedAmounts\":\"The list of unclaimed amount of rewards*\"}},\"getAssetDecimals(address)\":{\"details\":\"Returns the decimals of an asset to calculate the distribution delta\",\"params\":{\"asset\":\"The address to retrieve decimals\"},\"returns\":{\"_0\":\"The decimals of an underlying asset\"}},\"getAssetIndex(address,address)\":{\"details\":\"Calculates the next value of an specific distribution index, with validations.\",\"params\":{\"asset\":\"The incentivized asset\",\"reward\":\"The reward token of the incentivized asset\"},\"returns\":{\"_0\":\"The old index of the asset distribution\",\"_1\":\"The new index of the asset distribution*\"}},\"getDistributionEnd(address,address)\":{\"details\":\"Gets the end date for the distribution\",\"params\":{\"asset\":\"The incentivized asset\",\"reward\":\"The reward token of the incentivized asset\"},\"returns\":{\"_0\":\"The timestamp with the end of the distribution, in unix time format*\"}},\"getEmissionManager()\":{\"details\":\"Returns the address of the emission manager. Deprecated: This getter is maintained for compatibility purposes. Use the `EMISSION_MANAGER()` function instead.\",\"returns\":{\"_0\":\"The address of the EmissionManager\"}},\"getRewardsByAsset(address)\":{\"details\":\"Returns the list of available reward token addresses of an incentivized asset\",\"params\":{\"asset\":\"The incentivized asset\"},\"returns\":{\"_0\":\"List of rewards addresses of the input asset*\"}},\"getRewardsData(address,address)\":{\"details\":\"Returns the configuration of the distribution reward for a certain asset\",\"params\":{\"asset\":\"The incentivized asset\",\"reward\":\"The reward token of the incentivized asset\"},\"returns\":{\"_0\":\"The index of the asset distribution\",\"_1\":\"The emission per second of the reward distribution\",\"_2\":\"The timestamp of the last update of the index\",\"_3\":\"The timestamp of the distribution end*\"}},\"getRewardsList()\":{\"details\":\"Returns the list of available reward addresses\",\"returns\":{\"_0\":\"List of rewards supported in this contract*\"}},\"getUserAccruedRewards(address,address)\":{\"details\":\"Returns the accrued rewards balance of a user, not including virtually accrued rewards since last distribution.\",\"params\":{\"reward\":\"The address of the reward token\",\"user\":\"The address of the user\"},\"returns\":{\"_0\":\"Unclaimed rewards, not including new distributions*\"}},\"getUserAssetIndex(address,address,address)\":{\"details\":\"Returns the index of a user on a reward distribution\",\"params\":{\"asset\":\"The incentivized asset\",\"reward\":\"The reward token of the incentivized asset\",\"user\":\"Address of the user\"},\"returns\":{\"_0\":\"The current user asset index, not including new distributions*\"}},\"getUserRewards(address[],address,address)\":{\"details\":\"Returns a single rewards balance of a user, including virtually accrued and unrealized claimable rewards.\",\"params\":{\"assets\":\"List of incentivized assets to check eligible distributions\",\"reward\":\"The address of the reward token\",\"user\":\"The address of the user\"},\"returns\":{\"_0\":\"The rewards amount*\"}},\"setDistributionEnd(address,address,uint32)\":{\"details\":\"Sets the end date for the distribution\",\"params\":{\"asset\":\"The asset to incentivize\",\"newDistributionEnd\":\"The end date of the incentivization, in unix time format*\",\"reward\":\"The reward token that incentives the asset\"}},\"setEmissionPerSecond(address,address[],uint88[])\":{\"details\":\"Sets the emission per second of a set of reward distributions\",\"params\":{\"asset\":\"The asset is being incentivized\",\"newEmissionsPerSecond\":\"List of new reward emissions per second\",\"rewards\":\"List of reward addresses are being distributed\"}}},\"stateVariables\":{\"EMISSION_MANAGER\":{\"details\":\"Returns the address of the emission manager\",\"return\":\"The address of the EmissionManager\",\"returns\":{\"_0\":\"The address of the EmissionManager\"}}},\"title\":\"RewardsDistributor\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Accounting contract to manage multiple staking distributions with multiple rewards\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/rewards/RewardsDistributor.sol\":\"RewardsDistributor\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol\":{\"keccak256\":\"0xf57d62241e553696a1324d225663ba2e1a51db0a51ca236d0c1b009d89b6284c\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://d327db93b636790909aa137124f30a856ac1631cb79c476aa188f9627fda8d03\",\"dweb:/ipfs/QmaxpmEoBFioeNYmpxJemyZ7aYF2nX1NKW1XDqREm7i6es\"]},\"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol\":{\"keccak256\":\"0x9365cd885dc1ed7aed1364ae4dedf8e4660100cba0437061013f64c5002b385a\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://ddc639d67c82e15f76b08588e8ad2ee87eaff6bb9cba5c0e5b08e242c3c4ac00\",\"dweb:/ipfs/QmY1D9WcH3nmg2VVfqSUkEX6Zrkmkmx8oi2pJAvw5BABi7\"]},\"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/SafeCast.sol\":{\"keccak256\":\"0x36824ad8ec8a12aa21938a05f971e21d23c7e84ae3b3a19b0643c5ebb873166e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4cf1652c12eb8727a9c039cbfa4be91aeff36d373f66301fc009d62816d4adbd\",\"dweb:/ipfs/QmX8QsPDKmEp6HohCwWo1yAmkc18btXaPCoTc4Wc4ZqPhL\"]},\"@aave/core-v3/contracts/interfaces/IScaledBalanceToken.sol\":{\"keccak256\":\"0x72b3ea433cd3386f369f1643a154bf233ec60c02acd02c32088a97556207d2e4\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://a5907c61cf65126001feebd94c7a869eff95045106d97e21bf7f0d3de22caf9d\",\"dweb:/ipfs/QmPARkA7YpsBtd1F3JgszZREJk6TAkqRLBkjWZUadCu3sM\"]},\"contracts/misc/interfaces/IEACAggregatorProxy.sol\":{\"keccak256\":\"0x637d15b86eae9f1e00697bf9aca057e9aee13968055c74fbca955ea52f7f682e\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://2ccbf668f63fa23f903abaaba8e8196e4847b82d1b8b076a6a147299c104a375\",\"dweb:/ipfs/QmXvgciSMm1ByuAZi9bN2ZRm52UtC2BGqLo8gXsUHA6Zns\"]},\"contracts/rewards/RewardsDistributor.sol\":{\"keccak256\":\"0x8c9751a178fbfd53460ef83f5cd571e1f4ca4df973dfbfb05d658df70f04f074\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://6a644cef7d5b096ecd93e7884e246a88dcc061d8b76ec9f8b03e9d70688593bf\",\"dweb:/ipfs/QmWDi39oXLDy9rSP8mPUEGwv7aToc7J2sTMmCXfkpS24Eu\"]},\"contracts/rewards/interfaces/IRewardsDistributor.sol\":{\"keccak256\":\"0x19256503a45c81beeb649aa1ed048739e7831a55f35bff4e459d5f7c1d544233\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://12570e8d56bda01b8681de19e18dfeea7b4422f01ca33ddddb97e0bca42d3733\",\"dweb:/ipfs/QmcP18235kisLnv4TdFu6R6ZtCHBd4g2mAdUkADhT7XM64\"]},\"contracts/rewards/interfaces/ITransferStrategyBase.sol\":{\"keccak256\":\"0x06217cc5297b238a5a11f666de608edb4f113593ad8be24db6eefa97e6e6346d\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://d80b6f9a5fdfe18e9e1b7b96fd795bb070cd4228e8590d9e7692b87972ab669b\",\"dweb:/ipfs/QmQM9MzVkfEjFznBa5p6vvbvmUpnntPSnTfwsa9fQwsTKc\"]},\"contracts/rewards/libraries/RewardsDataTypes.sol\":{\"keccak256\":\"0x653fa346267b50bd80c47e23653f4839f5c4b32d903ecebd05593f3b2ac9f61c\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://b2fcf951a2fcbac37fbb6a73fd09356317102102f267eaa789c4a83bce35d64e\",\"dweb:/ipfs/QmRQzpFYoMUbfxYzXCSgh4QqU5e8wvjRyqAm6NXj99qZUd\"]}},\"version\":1}",
|
|
"storageLayout": {
|
|
"storage": [
|
|
{
|
|
"astId": 627,
|
|
"contract": "contracts/rewards/RewardsDistributor.sol:RewardsDistributor",
|
|
"label": "_emissionManager",
|
|
"offset": 0,
|
|
"slot": "0",
|
|
"type": "t_address"
|
|
},
|
|
{
|
|
"astId": 632,
|
|
"contract": "contracts/rewards/RewardsDistributor.sol:RewardsDistributor",
|
|
"label": "_assets",
|
|
"offset": 0,
|
|
"slot": "1",
|
|
"type": "t_mapping(t_address,t_struct(AssetData)2345_storage)"
|
|
},
|
|
{
|
|
"astId": 636,
|
|
"contract": "contracts/rewards/RewardsDistributor.sol:RewardsDistributor",
|
|
"label": "_isRewardEnabled",
|
|
"offset": 0,
|
|
"slot": "2",
|
|
"type": "t_mapping(t_address,t_bool)"
|
|
},
|
|
{
|
|
"astId": 639,
|
|
"contract": "contracts/rewards/RewardsDistributor.sol:RewardsDistributor",
|
|
"label": "_rewardsList",
|
|
"offset": 0,
|
|
"slot": "3",
|
|
"type": "t_array(t_address)dyn_storage"
|
|
},
|
|
{
|
|
"astId": 642,
|
|
"contract": "contracts/rewards/RewardsDistributor.sol:RewardsDistributor",
|
|
"label": "_assetsList",
|
|
"offset": 0,
|
|
"slot": "4",
|
|
"type": "t_array(t_address)dyn_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_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"
|
|
},
|
|
"t_mapping(t_address,t_struct(AssetData)2345_storage)": {
|
|
"encoding": "mapping",
|
|
"key": "t_address",
|
|
"label": "mapping(address => struct RewardsDataTypes.AssetData)",
|
|
"numberOfBytes": "32",
|
|
"value": "t_struct(AssetData)2345_storage"
|
|
},
|
|
"t_mapping(t_address,t_struct(RewardData)2331_storage)": {
|
|
"encoding": "mapping",
|
|
"key": "t_address",
|
|
"label": "mapping(address => struct RewardsDataTypes.RewardData)",
|
|
"numberOfBytes": "32",
|
|
"value": "t_struct(RewardData)2331_storage"
|
|
},
|
|
"t_mapping(t_address,t_struct(UserData)2317_storage)": {
|
|
"encoding": "mapping",
|
|
"key": "t_address",
|
|
"label": "mapping(address => struct RewardsDataTypes.UserData)",
|
|
"numberOfBytes": "32",
|
|
"value": "t_struct(UserData)2317_storage"
|
|
},
|
|
"t_mapping(t_uint128,t_address)": {
|
|
"encoding": "mapping",
|
|
"key": "t_uint128",
|
|
"label": "mapping(uint128 => address)",
|
|
"numberOfBytes": "32",
|
|
"value": "t_address"
|
|
},
|
|
"t_struct(AssetData)2345_storage": {
|
|
"encoding": "inplace",
|
|
"label": "struct RewardsDataTypes.AssetData",
|
|
"members": [
|
|
{
|
|
"astId": 2336,
|
|
"contract": "contracts/rewards/RewardsDistributor.sol:RewardsDistributor",
|
|
"label": "rewards",
|
|
"offset": 0,
|
|
"slot": "0",
|
|
"type": "t_mapping(t_address,t_struct(RewardData)2331_storage)"
|
|
},
|
|
{
|
|
"astId": 2340,
|
|
"contract": "contracts/rewards/RewardsDistributor.sol:RewardsDistributor",
|
|
"label": "availableRewards",
|
|
"offset": 0,
|
|
"slot": "1",
|
|
"type": "t_mapping(t_uint128,t_address)"
|
|
},
|
|
{
|
|
"astId": 2342,
|
|
"contract": "contracts/rewards/RewardsDistributor.sol:RewardsDistributor",
|
|
"label": "availableRewardsCount",
|
|
"offset": 0,
|
|
"slot": "2",
|
|
"type": "t_uint128"
|
|
},
|
|
{
|
|
"astId": 2344,
|
|
"contract": "contracts/rewards/RewardsDistributor.sol:RewardsDistributor",
|
|
"label": "decimals",
|
|
"offset": 16,
|
|
"slot": "2",
|
|
"type": "t_uint8"
|
|
}
|
|
],
|
|
"numberOfBytes": "96"
|
|
},
|
|
"t_struct(RewardData)2331_storage": {
|
|
"encoding": "inplace",
|
|
"label": "struct RewardsDataTypes.RewardData",
|
|
"members": [
|
|
{
|
|
"astId": 2319,
|
|
"contract": "contracts/rewards/RewardsDistributor.sol:RewardsDistributor",
|
|
"label": "index",
|
|
"offset": 0,
|
|
"slot": "0",
|
|
"type": "t_uint104"
|
|
},
|
|
{
|
|
"astId": 2321,
|
|
"contract": "contracts/rewards/RewardsDistributor.sol:RewardsDistributor",
|
|
"label": "emissionPerSecond",
|
|
"offset": 13,
|
|
"slot": "0",
|
|
"type": "t_uint88"
|
|
},
|
|
{
|
|
"astId": 2323,
|
|
"contract": "contracts/rewards/RewardsDistributor.sol:RewardsDistributor",
|
|
"label": "lastUpdateTimestamp",
|
|
"offset": 24,
|
|
"slot": "0",
|
|
"type": "t_uint32"
|
|
},
|
|
{
|
|
"astId": 2325,
|
|
"contract": "contracts/rewards/RewardsDistributor.sol:RewardsDistributor",
|
|
"label": "distributionEnd",
|
|
"offset": 28,
|
|
"slot": "0",
|
|
"type": "t_uint32"
|
|
},
|
|
{
|
|
"astId": 2330,
|
|
"contract": "contracts/rewards/RewardsDistributor.sol:RewardsDistributor",
|
|
"label": "usersData",
|
|
"offset": 0,
|
|
"slot": "1",
|
|
"type": "t_mapping(t_address,t_struct(UserData)2317_storage)"
|
|
}
|
|
],
|
|
"numberOfBytes": "64"
|
|
},
|
|
"t_struct(UserData)2317_storage": {
|
|
"encoding": "inplace",
|
|
"label": "struct RewardsDataTypes.UserData",
|
|
"members": [
|
|
{
|
|
"astId": 2314,
|
|
"contract": "contracts/rewards/RewardsDistributor.sol:RewardsDistributor",
|
|
"label": "index",
|
|
"offset": 0,
|
|
"slot": "0",
|
|
"type": "t_uint104"
|
|
},
|
|
{
|
|
"astId": 2316,
|
|
"contract": "contracts/rewards/RewardsDistributor.sol:RewardsDistributor",
|
|
"label": "accrued",
|
|
"offset": 13,
|
|
"slot": "0",
|
|
"type": "t_uint128"
|
|
}
|
|
],
|
|
"numberOfBytes": "32"
|
|
},
|
|
"t_uint104": {
|
|
"encoding": "inplace",
|
|
"label": "uint104",
|
|
"numberOfBytes": "13"
|
|
},
|
|
"t_uint128": {
|
|
"encoding": "inplace",
|
|
"label": "uint128",
|
|
"numberOfBytes": "16"
|
|
},
|
|
"t_uint32": {
|
|
"encoding": "inplace",
|
|
"label": "uint32",
|
|
"numberOfBytes": "4"
|
|
},
|
|
"t_uint8": {
|
|
"encoding": "inplace",
|
|
"label": "uint8",
|
|
"numberOfBytes": "1"
|
|
},
|
|
"t_uint88": {
|
|
"encoding": "inplace",
|
|
"label": "uint88",
|
|
"numberOfBytes": "11"
|
|
}
|
|
}
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {},
|
|
"notice": "Accounting contract to manage multiple staking distributions with multiple rewards",
|
|
"version": 1
|
|
}
|
|
}
|
|
},
|
|
"contracts/rewards/interfaces/IRewardsDistributor.sol": {
|
|
"IRewardsDistributor": {
|
|
"abi": [
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "asset",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "reward",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "user",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "assetIndex",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "userIndex",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "rewardsAccrued",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Accrued",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "asset",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "reward",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "oldEmission",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "newEmission",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "oldDistributionEnd",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "newDistributionEnd",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "assetIndex",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "AssetConfigUpdated",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "EMISSION_MANAGER",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address[]",
|
|
"name": "assets",
|
|
"type": "address[]"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "user",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getAllUserRewards",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address[]",
|
|
"name": "",
|
|
"type": "address[]"
|
|
},
|
|
{
|
|
"internalType": "uint256[]",
|
|
"name": "",
|
|
"type": "uint256[]"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "asset",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getAssetDecimals",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "",
|
|
"type": "uint8"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "asset",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "reward",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getAssetIndex",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "asset",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "reward",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getDistributionEnd",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "getEmissionManager",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "asset",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getRewardsByAsset",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address[]",
|
|
"name": "",
|
|
"type": "address[]"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "asset",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "reward",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getRewardsData",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "getRewardsList",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address[]",
|
|
"name": "",
|
|
"type": "address[]"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "user",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "reward",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getUserAccruedRewards",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "user",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "asset",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "reward",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getUserAssetIndex",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address[]",
|
|
"name": "assets",
|
|
"type": "address[]"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "user",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "reward",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getUserRewards",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "asset",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "reward",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint32",
|
|
"name": "newDistributionEnd",
|
|
"type": "uint32"
|
|
}
|
|
],
|
|
"name": "setDistributionEnd",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "asset",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address[]",
|
|
"name": "rewards",
|
|
"type": "address[]"
|
|
},
|
|
{
|
|
"internalType": "uint88[]",
|
|
"name": "newEmissionsPerSecond",
|
|
"type": "uint88[]"
|
|
}
|
|
],
|
|
"name": "setEmissionPerSecond",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"devdoc": {
|
|
"author": "Aave",
|
|
"events": {
|
|
"Accrued(address,address,address,uint256,uint256,uint256)": {
|
|
"details": "Emitted when rewards of an asset are accrued on behalf of a user.",
|
|
"params": {
|
|
"asset": "The address of the incentivized asset",
|
|
"assetIndex": "The index of the asset distribution",
|
|
"reward": "The address of the reward token",
|
|
"rewardsAccrued": "The amount of rewards accrued",
|
|
"user": "The address of the user that rewards are accrued on behalf of",
|
|
"userIndex": "The index of the asset distribution on behalf of the user"
|
|
}
|
|
},
|
|
"AssetConfigUpdated(address,address,uint256,uint256,uint256,uint256,uint256)": {
|
|
"details": "Emitted when the configuration of the rewards of an asset is updated.",
|
|
"params": {
|
|
"asset": "The address of the incentivized asset",
|
|
"assetIndex": "The index of the asset distribution",
|
|
"newDistributionEnd": "The new end timestamp of the reward distribution",
|
|
"newEmission": "The new emissions per second value of the reward distribution",
|
|
"oldDistributionEnd": "The old end timestamp of the reward distribution",
|
|
"oldEmission": "The old emissions per second value of the reward distribution",
|
|
"reward": "The address of the reward token"
|
|
}
|
|
}
|
|
},
|
|
"kind": "dev",
|
|
"methods": {
|
|
"EMISSION_MANAGER()": {
|
|
"details": "Returns the address of the emission manager",
|
|
"returns": {
|
|
"_0": "The address of the EmissionManager"
|
|
}
|
|
},
|
|
"getAllUserRewards(address[],address)": {
|
|
"details": "Returns a list all rewards of a user, including already accrued and unrealized claimable rewards",
|
|
"params": {
|
|
"assets": "List of incentivized assets to check eligible distributions",
|
|
"user": "The address of the user"
|
|
},
|
|
"returns": {
|
|
"_0": "The list of reward addresses",
|
|
"_1": "The list of unclaimed amount of rewards*"
|
|
}
|
|
},
|
|
"getAssetDecimals(address)": {
|
|
"details": "Returns the decimals of an asset to calculate the distribution delta",
|
|
"params": {
|
|
"asset": "The address to retrieve decimals"
|
|
},
|
|
"returns": {
|
|
"_0": "The decimals of an underlying asset"
|
|
}
|
|
},
|
|
"getAssetIndex(address,address)": {
|
|
"details": "Calculates the next value of an specific distribution index, with validations.",
|
|
"params": {
|
|
"asset": "The incentivized asset",
|
|
"reward": "The reward token of the incentivized asset"
|
|
},
|
|
"returns": {
|
|
"_0": "The old index of the asset distribution",
|
|
"_1": "The new index of the asset distribution*"
|
|
}
|
|
},
|
|
"getDistributionEnd(address,address)": {
|
|
"details": "Gets the end date for the distribution",
|
|
"params": {
|
|
"asset": "The incentivized asset",
|
|
"reward": "The reward token of the incentivized asset"
|
|
},
|
|
"returns": {
|
|
"_0": "The timestamp with the end of the distribution, in unix time format*"
|
|
}
|
|
},
|
|
"getEmissionManager()": {
|
|
"details": "Returns the address of the emission manager. Deprecated: This getter is maintained for compatibility purposes. Use the `EMISSION_MANAGER()` function instead.",
|
|
"returns": {
|
|
"_0": "The address of the EmissionManager"
|
|
}
|
|
},
|
|
"getRewardsByAsset(address)": {
|
|
"details": "Returns the list of available reward token addresses of an incentivized asset",
|
|
"params": {
|
|
"asset": "The incentivized asset"
|
|
},
|
|
"returns": {
|
|
"_0": "List of rewards addresses of the input asset*"
|
|
}
|
|
},
|
|
"getRewardsData(address,address)": {
|
|
"details": "Returns the configuration of the distribution reward for a certain asset",
|
|
"params": {
|
|
"asset": "The incentivized asset",
|
|
"reward": "The reward token of the incentivized asset"
|
|
},
|
|
"returns": {
|
|
"_0": "The index of the asset distribution",
|
|
"_1": "The emission per second of the reward distribution",
|
|
"_2": "The timestamp of the last update of the index",
|
|
"_3": "The timestamp of the distribution end*"
|
|
}
|
|
},
|
|
"getRewardsList()": {
|
|
"details": "Returns the list of available reward addresses",
|
|
"returns": {
|
|
"_0": "List of rewards supported in this contract*"
|
|
}
|
|
},
|
|
"getUserAccruedRewards(address,address)": {
|
|
"details": "Returns the accrued rewards balance of a user, not including virtually accrued rewards since last distribution.",
|
|
"params": {
|
|
"reward": "The address of the reward token",
|
|
"user": "The address of the user"
|
|
},
|
|
"returns": {
|
|
"_0": "Unclaimed rewards, not including new distributions*"
|
|
}
|
|
},
|
|
"getUserAssetIndex(address,address,address)": {
|
|
"details": "Returns the index of a user on a reward distribution",
|
|
"params": {
|
|
"asset": "The incentivized asset",
|
|
"reward": "The reward token of the incentivized asset",
|
|
"user": "Address of the user"
|
|
},
|
|
"returns": {
|
|
"_0": "The current user asset index, not including new distributions*"
|
|
}
|
|
},
|
|
"getUserRewards(address[],address,address)": {
|
|
"details": "Returns a single rewards balance of a user, including virtually accrued and unrealized claimable rewards.",
|
|
"params": {
|
|
"assets": "List of incentivized assets to check eligible distributions",
|
|
"reward": "The address of the reward token",
|
|
"user": "The address of the user"
|
|
},
|
|
"returns": {
|
|
"_0": "The rewards amount*"
|
|
}
|
|
},
|
|
"setDistributionEnd(address,address,uint32)": {
|
|
"details": "Sets the end date for the distribution",
|
|
"params": {
|
|
"asset": "The asset to incentivize",
|
|
"newDistributionEnd": "The end date of the incentivization, in unix time format*",
|
|
"reward": "The reward token that incentives the asset"
|
|
}
|
|
},
|
|
"setEmissionPerSecond(address,address[],uint88[])": {
|
|
"details": "Sets the emission per second of a set of reward distributions",
|
|
"params": {
|
|
"asset": "The asset is being incentivized",
|
|
"newEmissionsPerSecond": "List of new reward emissions per second",
|
|
"rewards": "List of reward addresses are being distributed"
|
|
}
|
|
}
|
|
},
|
|
"title": "IRewardsDistributor",
|
|
"version": 1
|
|
},
|
|
"evm": {
|
|
"assembly": "",
|
|
"bytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"deployedBytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"immutableReferences": {},
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"gasEstimates": null,
|
|
"legacyAssembly": null,
|
|
"methodIdentifiers": {
|
|
"EMISSION_MANAGER()": "cbcbb507",
|
|
"getAllUserRewards(address[],address)": "4c0369c3",
|
|
"getAssetDecimals(address)": "9efd6f72",
|
|
"getAssetIndex(address,address)": "886fe70b",
|
|
"getDistributionEnd(address,address)": "1b839c77",
|
|
"getEmissionManager()": "92074b08",
|
|
"getRewardsByAsset(address)": "6657732f",
|
|
"getRewardsData(address,address)": "7eff4ba8",
|
|
"getRewardsList()": "b45ac1a9",
|
|
"getUserAccruedRewards(address,address)": "b022418c",
|
|
"getUserAssetIndex(address,address,address)": "533f542a",
|
|
"getUserRewards(address[],address,address)": "70674ab9",
|
|
"setDistributionEnd(address,address,uint32)": "c5a7b538",
|
|
"setEmissionPerSecond(address,address[],uint88[])": "f996868b"
|
|
}
|
|
},
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"reward\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assetIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"userIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"rewardsAccrued\",\"type\":\"uint256\"}],\"name\":\"Accrued\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"reward\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldEmission\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newEmission\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldDistributionEnd\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newDistributionEnd\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assetIndex\",\"type\":\"uint256\"}],\"name\":\"AssetConfigUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"EMISSION_MANAGER\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getAllUserRewards\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"}],\"name\":\"getAssetDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"getAssetIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"getDistributionEnd\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getEmissionManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"}],\"name\":\"getRewardsByAsset\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"getRewardsData\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRewardsList\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"getUserAccruedRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"getUserAssetIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"reward\",\"type\":\"address\"}],\"name\":\"getUserRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"newDistributionEnd\",\"type\":\"uint32\"}],\"name\":\"setDistributionEnd\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"rewards\",\"type\":\"address[]\"},{\"internalType\":\"uint88[]\",\"name\":\"newEmissionsPerSecond\",\"type\":\"uint88[]\"}],\"name\":\"setEmissionPerSecond\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Aave\",\"events\":{\"Accrued(address,address,address,uint256,uint256,uint256)\":{\"details\":\"Emitted when rewards of an asset are accrued on behalf of a user.\",\"params\":{\"asset\":\"The address of the incentivized asset\",\"assetIndex\":\"The index of the asset distribution\",\"reward\":\"The address of the reward token\",\"rewardsAccrued\":\"The amount of rewards accrued\",\"user\":\"The address of the user that rewards are accrued on behalf of\",\"userIndex\":\"The index of the asset distribution on behalf of the user\"}},\"AssetConfigUpdated(address,address,uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Emitted when the configuration of the rewards of an asset is updated.\",\"params\":{\"asset\":\"The address of the incentivized asset\",\"assetIndex\":\"The index of the asset distribution\",\"newDistributionEnd\":\"The new end timestamp of the reward distribution\",\"newEmission\":\"The new emissions per second value of the reward distribution\",\"oldDistributionEnd\":\"The old end timestamp of the reward distribution\",\"oldEmission\":\"The old emissions per second value of the reward distribution\",\"reward\":\"The address of the reward token\"}}},\"kind\":\"dev\",\"methods\":{\"EMISSION_MANAGER()\":{\"details\":\"Returns the address of the emission manager\",\"returns\":{\"_0\":\"The address of the EmissionManager\"}},\"getAllUserRewards(address[],address)\":{\"details\":\"Returns a list all rewards of a user, including already accrued and unrealized claimable rewards\",\"params\":{\"assets\":\"List of incentivized assets to check eligible distributions\",\"user\":\"The address of the user\"},\"returns\":{\"_0\":\"The list of reward addresses\",\"_1\":\"The list of unclaimed amount of rewards*\"}},\"getAssetDecimals(address)\":{\"details\":\"Returns the decimals of an asset to calculate the distribution delta\",\"params\":{\"asset\":\"The address to retrieve decimals\"},\"returns\":{\"_0\":\"The decimals of an underlying asset\"}},\"getAssetIndex(address,address)\":{\"details\":\"Calculates the next value of an specific distribution index, with validations.\",\"params\":{\"asset\":\"The incentivized asset\",\"reward\":\"The reward token of the incentivized asset\"},\"returns\":{\"_0\":\"The old index of the asset distribution\",\"_1\":\"The new index of the asset distribution*\"}},\"getDistributionEnd(address,address)\":{\"details\":\"Gets the end date for the distribution\",\"params\":{\"asset\":\"The incentivized asset\",\"reward\":\"The reward token of the incentivized asset\"},\"returns\":{\"_0\":\"The timestamp with the end of the distribution, in unix time format*\"}},\"getEmissionManager()\":{\"details\":\"Returns the address of the emission manager. Deprecated: This getter is maintained for compatibility purposes. Use the `EMISSION_MANAGER()` function instead.\",\"returns\":{\"_0\":\"The address of the EmissionManager\"}},\"getRewardsByAsset(address)\":{\"details\":\"Returns the list of available reward token addresses of an incentivized asset\",\"params\":{\"asset\":\"The incentivized asset\"},\"returns\":{\"_0\":\"List of rewards addresses of the input asset*\"}},\"getRewardsData(address,address)\":{\"details\":\"Returns the configuration of the distribution reward for a certain asset\",\"params\":{\"asset\":\"The incentivized asset\",\"reward\":\"The reward token of the incentivized asset\"},\"returns\":{\"_0\":\"The index of the asset distribution\",\"_1\":\"The emission per second of the reward distribution\",\"_2\":\"The timestamp of the last update of the index\",\"_3\":\"The timestamp of the distribution end*\"}},\"getRewardsList()\":{\"details\":\"Returns the list of available reward addresses\",\"returns\":{\"_0\":\"List of rewards supported in this contract*\"}},\"getUserAccruedRewards(address,address)\":{\"details\":\"Returns the accrued rewards balance of a user, not including virtually accrued rewards since last distribution.\",\"params\":{\"reward\":\"The address of the reward token\",\"user\":\"The address of the user\"},\"returns\":{\"_0\":\"Unclaimed rewards, not including new distributions*\"}},\"getUserAssetIndex(address,address,address)\":{\"details\":\"Returns the index of a user on a reward distribution\",\"params\":{\"asset\":\"The incentivized asset\",\"reward\":\"The reward token of the incentivized asset\",\"user\":\"Address of the user\"},\"returns\":{\"_0\":\"The current user asset index, not including new distributions*\"}},\"getUserRewards(address[],address,address)\":{\"details\":\"Returns a single rewards balance of a user, including virtually accrued and unrealized claimable rewards.\",\"params\":{\"assets\":\"List of incentivized assets to check eligible distributions\",\"reward\":\"The address of the reward token\",\"user\":\"The address of the user\"},\"returns\":{\"_0\":\"The rewards amount*\"}},\"setDistributionEnd(address,address,uint32)\":{\"details\":\"Sets the end date for the distribution\",\"params\":{\"asset\":\"The asset to incentivize\",\"newDistributionEnd\":\"The end date of the incentivization, in unix time format*\",\"reward\":\"The reward token that incentives the asset\"}},\"setEmissionPerSecond(address,address[],uint88[])\":{\"details\":\"Sets the emission per second of a set of reward distributions\",\"params\":{\"asset\":\"The asset is being incentivized\",\"newEmissionsPerSecond\":\"List of new reward emissions per second\",\"rewards\":\"List of reward addresses are being distributed\"}}},\"title\":\"IRewardsDistributor\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Defines the basic interface for a Rewards Distributor.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/rewards/interfaces/IRewardsDistributor.sol\":\"IRewardsDistributor\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/rewards/interfaces/IRewardsDistributor.sol\":{\"keccak256\":\"0x19256503a45c81beeb649aa1ed048739e7831a55f35bff4e459d5f7c1d544233\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://12570e8d56bda01b8681de19e18dfeea7b4422f01ca33ddddb97e0bca42d3733\",\"dweb:/ipfs/QmcP18235kisLnv4TdFu6R6ZtCHBd4g2mAdUkADhT7XM64\"]}},\"version\":1}",
|
|
"storageLayout": {
|
|
"storage": [],
|
|
"types": null
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {},
|
|
"notice": "Defines the basic interface for a Rewards Distributor.",
|
|
"version": 1
|
|
}
|
|
}
|
|
},
|
|
"contracts/rewards/interfaces/ITransferStrategyBase.sol": {
|
|
"ITransferStrategyBase": {
|
|
"abi": [
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "caller",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "token",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "EmergencyWithdrawal",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "token",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "emergencyWithdrawal",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "getIncentivesController",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "getRewardsAdmin",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "reward",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "performTransfer",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"devdoc": {
|
|
"kind": "dev",
|
|
"methods": {
|
|
"emergencyWithdrawal(address,address,uint256)": {
|
|
"details": "Perform an emergency token withdrawal only callable by the Rewards admin",
|
|
"params": {
|
|
"amount": "Amount of the withdrawal",
|
|
"to": "Address of the recipient of the withdrawal",
|
|
"token": "Address of the token to withdraw funds from this contract"
|
|
}
|
|
},
|
|
"getIncentivesController()": {
|
|
"returns": {
|
|
"_0": "Returns the address of the Incentives Controller"
|
|
}
|
|
},
|
|
"getRewardsAdmin()": {
|
|
"returns": {
|
|
"_0": "Returns the address of the Rewards admin"
|
|
}
|
|
},
|
|
"performTransfer(address,address,uint256)": {
|
|
"details": "Perform custom transfer logic via delegate call from source contract to a TransferStrategy implementation",
|
|
"params": {
|
|
"amount": "Amount to transfer to the \"to\" address parameter",
|
|
"reward": "Address of the reward token",
|
|
"to": "Account to transfer rewards"
|
|
},
|
|
"returns": {
|
|
"_0": "Returns true bool if transfer logic succeeds"
|
|
}
|
|
}
|
|
},
|
|
"version": 1
|
|
},
|
|
"evm": {
|
|
"assembly": "",
|
|
"bytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"deployedBytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"immutableReferences": {},
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"gasEstimates": null,
|
|
"legacyAssembly": null,
|
|
"methodIdentifiers": {
|
|
"emergencyWithdrawal(address,address,uint256)": "8d8e5da7",
|
|
"getIncentivesController()": "75d26413",
|
|
"getRewardsAdmin()": "c6255443",
|
|
"performTransfer(address,address,uint256)": "16beb982"
|
|
}
|
|
},
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"EmergencyWithdrawal\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"emergencyWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getIncentivesController\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRewardsAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"performTransfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"emergencyWithdrawal(address,address,uint256)\":{\"details\":\"Perform an emergency token withdrawal only callable by the Rewards admin\",\"params\":{\"amount\":\"Amount of the withdrawal\",\"to\":\"Address of the recipient of the withdrawal\",\"token\":\"Address of the token to withdraw funds from this contract\"}},\"getIncentivesController()\":{\"returns\":{\"_0\":\"Returns the address of the Incentives Controller\"}},\"getRewardsAdmin()\":{\"returns\":{\"_0\":\"Returns the address of the Rewards admin\"}},\"performTransfer(address,address,uint256)\":{\"details\":\"Perform custom transfer logic via delegate call from source contract to a TransferStrategy implementation\",\"params\":{\"amount\":\"Amount to transfer to the \\\"to\\\" address parameter\",\"reward\":\"Address of the reward token\",\"to\":\"Account to transfer rewards\"},\"returns\":{\"_0\":\"Returns true bool if transfer logic succeeds\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/rewards/interfaces/ITransferStrategyBase.sol\":\"ITransferStrategyBase\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/rewards/interfaces/ITransferStrategyBase.sol\":{\"keccak256\":\"0x06217cc5297b238a5a11f666de608edb4f113593ad8be24db6eefa97e6e6346d\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://d80b6f9a5fdfe18e9e1b7b96fd795bb070cd4228e8590d9e7692b87972ab669b\",\"dweb:/ipfs/QmQM9MzVkfEjFznBa5p6vvbvmUpnntPSnTfwsa9fQwsTKc\"]}},\"version\":1}",
|
|
"storageLayout": {
|
|
"storage": [],
|
|
"types": null
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {},
|
|
"version": 1
|
|
}
|
|
}
|
|
},
|
|
"contracts/rewards/libraries/RewardsDataTypes.sol": {
|
|
"RewardsDataTypes": {
|
|
"abi": [],
|
|
"devdoc": {
|
|
"kind": "dev",
|
|
"methods": {},
|
|
"version": 1
|
|
},
|
|
"evm": {
|
|
"assembly": " /* \"contracts/rewards/libraries/RewardsDataTypes.sol\":232:1717 library RewardsDataTypes {... */\n dataSize(sub_0)\n dataOffset(sub_0)\n 0x0b\n dup3\n dup3\n dup3\n codecopy\n dup1\n mload\n 0x00\n byte\n 0x73\n eq\n tag_1\n jumpi\n mstore(0x00, 0x4e487b7100000000000000000000000000000000000000000000000000000000)\n mstore(0x04, 0x00)\n revert(0x00, 0x24)\ntag_1:\n mstore(0x00, address)\n 0x73\n dup2\n mstore8\n dup3\n dup2\n return\nstop\n\nsub_0: assembly {\n /* \"contracts/rewards/libraries/RewardsDataTypes.sol\":232:1717 library RewardsDataTypes {... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa26469706673582212200dd2e0da30e05e3929572fbdbe7df23ed4a90a463142d3d36ea0d3fcafa8732c64736f6c634300081a0033\n}\n",
|
|
"bytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"linkReferences": {},
|
|
"object": "6055604b600b8282823980515f1a607314603f577f4e487b71000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f80fdfea26469706673582212200dd2e0da30e05e3929572fbdbe7df23ed4a90a463142d3d36ea0d3fcafa8732c64736f6c634300081a0033",
|
|
"opcodes": "PUSH1 0x55 PUSH1 0x4B PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x3F JUMPI PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xD 0xD2 0xE0 0xDA ADDRESS 0xE0 MCOPY CODECOPY 0x29 JUMPI 0x2F 0xBD 0xBE PUSH30 0xF23ED4A90A463142D3D36EA0D3FCAFA8732C64736F6C634300081A003300 ",
|
|
"sourceMap": "232:1485:8:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
|
|
},
|
|
"deployedBytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"immutableReferences": {},
|
|
"linkReferences": {},
|
|
"object": "730000000000000000000000000000000000000000301460806040525f80fdfea26469706673582212200dd2e0da30e05e3929572fbdbe7df23ed4a90a463142d3d36ea0d3fcafa8732c64736f6c634300081a0033",
|
|
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xD 0xD2 0xE0 0xDA ADDRESS 0xE0 MCOPY CODECOPY 0x29 JUMPI 0x2F 0xBD 0xBE PUSH30 0xF23ED4A90A463142D3D36EA0D3FCAFA8732C64736F6C634300081A003300 ",
|
|
"sourceMap": "232:1485:8:-:0;;;;;;;;"
|
|
},
|
|
"gasEstimates": {
|
|
"creation": {
|
|
"codeDepositCost": "17000",
|
|
"executionCost": "92",
|
|
"totalCost": "17092"
|
|
}
|
|
},
|
|
"legacyAssembly": {
|
|
".code": [
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "PUSH #[$]",
|
|
"source": 8,
|
|
"value": "0000000000000000000000000000000000000000000000000000000000000000"
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "PUSH [$]",
|
|
"source": 8,
|
|
"value": "0000000000000000000000000000000000000000000000000000000000000000"
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "PUSH",
|
|
"source": 8,
|
|
"value": "B"
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "DUP3",
|
|
"source": 8
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "DUP3",
|
|
"source": 8
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "DUP3",
|
|
"source": 8
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "CODECOPY",
|
|
"source": 8
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "DUP1",
|
|
"source": 8
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "MLOAD",
|
|
"source": 8
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "PUSH",
|
|
"source": 8,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "BYTE",
|
|
"source": 8
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "PUSH",
|
|
"source": 8,
|
|
"value": "73"
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "EQ",
|
|
"source": 8
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "PUSH [tag]",
|
|
"source": 8,
|
|
"value": "1"
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "JUMPI",
|
|
"source": 8
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "PUSH",
|
|
"source": 8,
|
|
"value": "4E487B7100000000000000000000000000000000000000000000000000000000"
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "PUSH",
|
|
"source": 8,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "MSTORE",
|
|
"source": 8
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "PUSH",
|
|
"source": 8,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "PUSH",
|
|
"source": 8,
|
|
"value": "4"
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "MSTORE",
|
|
"source": 8
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "PUSH",
|
|
"source": 8,
|
|
"value": "24"
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "PUSH",
|
|
"source": 8,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "REVERT",
|
|
"source": 8
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "tag",
|
|
"source": 8,
|
|
"value": "1"
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "JUMPDEST",
|
|
"source": 8
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "ADDRESS",
|
|
"source": 8
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "PUSH",
|
|
"source": 8,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "MSTORE",
|
|
"source": 8
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "PUSH",
|
|
"source": 8,
|
|
"value": "73"
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "DUP2",
|
|
"source": 8
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "MSTORE8",
|
|
"source": 8
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "DUP3",
|
|
"source": 8
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "DUP2",
|
|
"source": 8
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "RETURN",
|
|
"source": 8
|
|
}
|
|
],
|
|
".data": {
|
|
"0": {
|
|
".auxdata": "a26469706673582212200dd2e0da30e05e3929572fbdbe7df23ed4a90a463142d3d36ea0d3fcafa8732c64736f6c634300081a0033",
|
|
".code": [
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "PUSHDEPLOYADDRESS",
|
|
"source": 8
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "ADDRESS",
|
|
"source": 8
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "EQ",
|
|
"source": 8
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "PUSH",
|
|
"source": 8,
|
|
"value": "80"
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "PUSH",
|
|
"source": 8,
|
|
"value": "40"
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "MSTORE",
|
|
"source": 8
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "PUSH",
|
|
"source": 8,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "DUP1",
|
|
"source": 8
|
|
},
|
|
{
|
|
"begin": 232,
|
|
"end": 1717,
|
|
"name": "REVERT",
|
|
"source": 8
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"sourceList": [
|
|
"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol",
|
|
"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol",
|
|
"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/SafeCast.sol",
|
|
"@aave/core-v3/contracts/interfaces/IScaledBalanceToken.sol",
|
|
"contracts/misc/interfaces/IEACAggregatorProxy.sol",
|
|
"contracts/rewards/RewardsDistributor.sol",
|
|
"contracts/rewards/interfaces/IRewardsDistributor.sol",
|
|
"contracts/rewards/interfaces/ITransferStrategyBase.sol",
|
|
"contracts/rewards/libraries/RewardsDataTypes.sol",
|
|
"#utility.yul"
|
|
]
|
|
},
|
|
"methodIdentifiers": {}
|
|
},
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/rewards/libraries/RewardsDataTypes.sol\":\"RewardsDataTypes\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/misc/interfaces/IEACAggregatorProxy.sol\":{\"keccak256\":\"0x637d15b86eae9f1e00697bf9aca057e9aee13968055c74fbca955ea52f7f682e\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://2ccbf668f63fa23f903abaaba8e8196e4847b82d1b8b076a6a147299c104a375\",\"dweb:/ipfs/QmXvgciSMm1ByuAZi9bN2ZRm52UtC2BGqLo8gXsUHA6Zns\"]},\"contracts/rewards/interfaces/ITransferStrategyBase.sol\":{\"keccak256\":\"0x06217cc5297b238a5a11f666de608edb4f113593ad8be24db6eefa97e6e6346d\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://d80b6f9a5fdfe18e9e1b7b96fd795bb070cd4228e8590d9e7692b87972ab669b\",\"dweb:/ipfs/QmQM9MzVkfEjFznBa5p6vvbvmUpnntPSnTfwsa9fQwsTKc\"]},\"contracts/rewards/libraries/RewardsDataTypes.sol\":{\"keccak256\":\"0x653fa346267b50bd80c47e23653f4839f5c4b32d903ecebd05593f3b2ac9f61c\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://b2fcf951a2fcbac37fbb6a73fd09356317102102f267eaa789c4a83bce35d64e\",\"dweb:/ipfs/QmRQzpFYoMUbfxYzXCSgh4QqU5e8wvjRyqAm6NXj99qZUd\"]}},\"version\":1}",
|
|
"storageLayout": {
|
|
"storage": [],
|
|
"types": null
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {},
|
|
"version": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"sources": {
|
|
"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol": {
|
|
"ast": {
|
|
"absolutePath": "@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol",
|
|
"exportedSymbols": {
|
|
"IERC20": [
|
|
77
|
|
]
|
|
},
|
|
"id": 78,
|
|
"license": "AGPL-3.0",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".0"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "37:23:0"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"canonicalName": "IERC20",
|
|
"contractDependencies": [],
|
|
"contractKind": "interface",
|
|
"documentation": {
|
|
"id": 2,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "62:70:0",
|
|
"text": " @dev Interface of the ERC20 standard as defined in the EIP."
|
|
},
|
|
"fullyImplemented": false,
|
|
"id": 77,
|
|
"linearizedBaseContracts": [
|
|
77
|
|
],
|
|
"name": "IERC20",
|
|
"nameLocation": "143:6:0",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"documentation": {
|
|
"id": 3,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "154:62:0",
|
|
"text": " @dev Returns the amount of tokens in existence."
|
|
},
|
|
"functionSelector": "18160ddd",
|
|
"id": 8,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "totalSupply",
|
|
"nameLocation": "228:11:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 4,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "239:2:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 7,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 6,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 8,
|
|
"src": "265:7:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 5,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "265:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "264:9:0"
|
|
},
|
|
"scope": 77,
|
|
"src": "219:55:0",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 9,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "278:68:0",
|
|
"text": " @dev Returns the amount of tokens owned by `account`."
|
|
},
|
|
"functionSelector": "70a08231",
|
|
"id": 16,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "balanceOf",
|
|
"nameLocation": "358:9:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 12,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 11,
|
|
"mutability": "mutable",
|
|
"name": "account",
|
|
"nameLocation": "376:7:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 16,
|
|
"src": "368:15:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 10,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "368:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "367:17:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 15,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 14,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 16,
|
|
"src": "408:7:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 13,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "408:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "407:9:0"
|
|
},
|
|
"scope": 77,
|
|
"src": "349:68:0",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 17,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "421:197:0",
|
|
"text": " @dev Moves `amount` tokens from the caller's account to `recipient`.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event."
|
|
},
|
|
"functionSelector": "a9059cbb",
|
|
"id": 26,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "transfer",
|
|
"nameLocation": "630:8:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 22,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 19,
|
|
"mutability": "mutable",
|
|
"name": "recipient",
|
|
"nameLocation": "647:9:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 26,
|
|
"src": "639:17:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 18,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "639:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 21,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nameLocation": "666:6:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 26,
|
|
"src": "658:14:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 20,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "658:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "638:35:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 25,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 24,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 26,
|
|
"src": "692:4:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 23,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "692:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "691:6:0"
|
|
},
|
|
"scope": 77,
|
|
"src": "621:77:0",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 27,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "702:252:0",
|
|
"text": " @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 This value changes when {approve} or {transferFrom} are called."
|
|
},
|
|
"functionSelector": "dd62ed3e",
|
|
"id": 36,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "allowance",
|
|
"nameLocation": "966:9:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 32,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 29,
|
|
"mutability": "mutable",
|
|
"name": "owner",
|
|
"nameLocation": "984:5:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 36,
|
|
"src": "976:13:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 28,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "976:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 31,
|
|
"mutability": "mutable",
|
|
"name": "spender",
|
|
"nameLocation": "999:7:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 36,
|
|
"src": "991:15:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 30,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "991:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "975:32:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 35,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 34,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 36,
|
|
"src": "1031:7:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 33,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1031:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1030:9:0"
|
|
},
|
|
"scope": 77,
|
|
"src": "957:83:0",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 37,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1044:616:0",
|
|
"text": " @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n Returns a boolean value indicating whether the operation succeeded.\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 Emits an {Approval} event."
|
|
},
|
|
"functionSelector": "095ea7b3",
|
|
"id": 46,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "approve",
|
|
"nameLocation": "1672:7:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 42,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 39,
|
|
"mutability": "mutable",
|
|
"name": "spender",
|
|
"nameLocation": "1688:7:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 46,
|
|
"src": "1680:15:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 38,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1680:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 41,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nameLocation": "1705:6:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 46,
|
|
"src": "1697:14:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 40,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1697:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1679:33:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 45,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 44,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 46,
|
|
"src": "1731:4:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 43,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1731:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1730:6:0"
|
|
},
|
|
"scope": 77,
|
|
"src": "1663:74:0",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 47,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1741:280:0",
|
|
"text": " @dev Moves `amount` tokens from `sender` to `recipient` using the\n allowance mechanism. `amount` is then deducted from the caller's\n allowance.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event."
|
|
},
|
|
"functionSelector": "23b872dd",
|
|
"id": 58,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "transferFrom",
|
|
"nameLocation": "2033:12:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 54,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 49,
|
|
"mutability": "mutable",
|
|
"name": "sender",
|
|
"nameLocation": "2054:6:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 58,
|
|
"src": "2046:14:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 48,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2046:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 51,
|
|
"mutability": "mutable",
|
|
"name": "recipient",
|
|
"nameLocation": "2070:9:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 58,
|
|
"src": "2062:17:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 50,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2062:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 53,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nameLocation": "2089:6:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 58,
|
|
"src": "2081:14:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 52,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2081:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2045:51:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 57,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 56,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 58,
|
|
"src": "2115:4:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 55,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2115:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2114:6:0"
|
|
},
|
|
"scope": 77,
|
|
"src": "2024:97:0",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": {
|
|
"id": 59,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2125:148:0",
|
|
"text": " @dev Emitted when `value` tokens are moved from one account (`from`) to\n another (`to`).\n Note that `value` may be zero."
|
|
},
|
|
"eventSelector": "ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
|
|
"id": 67,
|
|
"name": "Transfer",
|
|
"nameLocation": "2282:8:0",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 66,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 61,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "from",
|
|
"nameLocation": "2307:4:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 67,
|
|
"src": "2291:20:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 60,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2291:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 63,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "to",
|
|
"nameLocation": "2329:2:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 67,
|
|
"src": "2313:18:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 62,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2313:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 65,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "2341:5:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 67,
|
|
"src": "2333:13:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 64,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2333:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2290:57:0"
|
|
},
|
|
"src": "2276:72:0"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": {
|
|
"id": 68,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2352:142:0",
|
|
"text": " @dev Emitted when the allowance of a `spender` for an `owner` is set by\n a call to {approve}. `value` is the new allowance."
|
|
},
|
|
"eventSelector": "8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
|
|
"id": 76,
|
|
"name": "Approval",
|
|
"nameLocation": "2503:8:0",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 75,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 70,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "owner",
|
|
"nameLocation": "2528:5:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 76,
|
|
"src": "2512:21:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 69,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2512:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 72,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "spender",
|
|
"nameLocation": "2551:7:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 76,
|
|
"src": "2535:23:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 71,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2535:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 74,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "2568:5:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 76,
|
|
"src": "2560:13:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 73,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2560:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2511:63:0"
|
|
},
|
|
"src": "2497:78:0"
|
|
}
|
|
],
|
|
"scope": 78,
|
|
"src": "133:2444:0",
|
|
"usedErrors": [],
|
|
"usedEvents": [
|
|
67,
|
|
76
|
|
]
|
|
}
|
|
],
|
|
"src": "37:2541:0"
|
|
},
|
|
"id": 0
|
|
},
|
|
"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol": {
|
|
"ast": {
|
|
"absolutePath": "@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol",
|
|
"exportedSymbols": {
|
|
"IERC20": [
|
|
77
|
|
],
|
|
"IERC20Detailed": [
|
|
99
|
|
]
|
|
},
|
|
"id": 100,
|
|
"license": "AGPL-3.0",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 79,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".0"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "37:23:1"
|
|
},
|
|
{
|
|
"absolutePath": "@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol",
|
|
"file": "./IERC20.sol",
|
|
"id": 81,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 100,
|
|
"sourceUnit": 78,
|
|
"src": "62:36:1",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"id": 80,
|
|
"name": "IERC20",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 77,
|
|
"src": "70:6:1",
|
|
"typeDescriptions": {}
|
|
},
|
|
"nameLocation": "-1:-1:-1"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [
|
|
{
|
|
"baseName": {
|
|
"id": 82,
|
|
"name": "IERC20",
|
|
"nameLocations": [
|
|
"128:6:1"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 77,
|
|
"src": "128:6:1"
|
|
},
|
|
"id": 83,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "128:6:1"
|
|
}
|
|
],
|
|
"canonicalName": "IERC20Detailed",
|
|
"contractDependencies": [],
|
|
"contractKind": "interface",
|
|
"fullyImplemented": false,
|
|
"id": 99,
|
|
"linearizedBaseContracts": [
|
|
99,
|
|
77
|
|
],
|
|
"name": "IERC20Detailed",
|
|
"nameLocation": "110:14:1",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"functionSelector": "06fdde03",
|
|
"id": 88,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "name",
|
|
"nameLocation": "148:4:1",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 84,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "152:2:1"
|
|
},
|
|
"returnParameters": {
|
|
"id": 87,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 86,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 88,
|
|
"src": "178:13:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 85,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "178:6:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "177:15:1"
|
|
},
|
|
"scope": 99,
|
|
"src": "139:54:1",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"functionSelector": "95d89b41",
|
|
"id": 93,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "symbol",
|
|
"nameLocation": "206:6:1",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 89,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "212:2:1"
|
|
},
|
|
"returnParameters": {
|
|
"id": 92,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 91,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 93,
|
|
"src": "238:13:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 90,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "238:6:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "237:15:1"
|
|
},
|
|
"scope": 99,
|
|
"src": "197:56:1",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"functionSelector": "313ce567",
|
|
"id": 98,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "decimals",
|
|
"nameLocation": "266:8:1",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 94,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "274:2:1"
|
|
},
|
|
"returnParameters": {
|
|
"id": 97,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 96,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 98,
|
|
"src": "300:5:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
},
|
|
"typeName": {
|
|
"id": 95,
|
|
"name": "uint8",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "300:5:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "299:7:1"
|
|
},
|
|
"scope": 99,
|
|
"src": "257:50:1",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
}
|
|
],
|
|
"scope": 100,
|
|
"src": "100:209:1",
|
|
"usedErrors": [],
|
|
"usedEvents": [
|
|
67,
|
|
76
|
|
]
|
|
}
|
|
],
|
|
"src": "37:273:1"
|
|
},
|
|
"id": 1
|
|
},
|
|
"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/SafeCast.sol": {
|
|
"ast": {
|
|
"absolutePath": "@aave/core-v3/contracts/dependencies/openzeppelin/contracts/SafeCast.sol",
|
|
"exportedSymbols": {
|
|
"SafeCast": [
|
|
492
|
|
]
|
|
},
|
|
"id": 493,
|
|
"license": "MIT",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 101,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".0"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "91:23:2"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"canonicalName": "SafeCast",
|
|
"contractDependencies": [],
|
|
"contractKind": "library",
|
|
"documentation": {
|
|
"id": 102,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "116:709:2",
|
|
"text": " @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\n checks.\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 Using this library instead of the unchecked operations eliminates an entire\n class of bugs, so it's recommended to use it always.\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."
|
|
},
|
|
"fullyImplemented": true,
|
|
"id": 492,
|
|
"linearizedBaseContracts": [
|
|
492
|
|
],
|
|
"name": "SafeCast",
|
|
"nameLocation": "834:8:2",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"body": {
|
|
"id": 126,
|
|
"nodeType": "Block",
|
|
"src": "1178:116:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 117,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 111,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 105,
|
|
"src": "1192:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 114,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1206:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint224_$",
|
|
"typeString": "type(uint224)"
|
|
},
|
|
"typeName": {
|
|
"id": 113,
|
|
"name": "uint224",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1206:7:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_type$_t_uint224_$",
|
|
"typeString": "type(uint224)"
|
|
}
|
|
],
|
|
"id": 112,
|
|
"name": "type",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967269,
|
|
"src": "1201:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
|
|
"typeString": "function () pure"
|
|
}
|
|
},
|
|
"id": 115,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1201:13:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_meta_type_t_uint224",
|
|
"typeString": "type(uint224)"
|
|
}
|
|
},
|
|
"id": 116,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1215:3:2",
|
|
"memberName": "max",
|
|
"nodeType": "MemberAccess",
|
|
"src": "1201:17:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint224",
|
|
"typeString": "uint224"
|
|
}
|
|
},
|
|
"src": "1192:26:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e203232342062697473",
|
|
"id": 118,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1220:41:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_9d2acf551b2466898443b9bc3a403a4d86037386bc5a8960c1bbb0f204e69b79",
|
|
"typeString": "literal_string \"SafeCast: value doesn't fit in 224 bits\""
|
|
},
|
|
"value": "SafeCast: value doesn't fit in 224 bits"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_9d2acf551b2466898443b9bc3a403a4d86037386bc5a8960c1bbb0f204e69b79",
|
|
"typeString": "literal_string \"SafeCast: value doesn't fit in 224 bits\""
|
|
}
|
|
],
|
|
"id": 110,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "1184:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 119,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1184:78:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 120,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1184:78:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 123,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 105,
|
|
"src": "1283:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 122,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1275:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint224_$",
|
|
"typeString": "type(uint224)"
|
|
},
|
|
"typeName": {
|
|
"id": 121,
|
|
"name": "uint224",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1275:7:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 124,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1275:14:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint224",
|
|
"typeString": "uint224"
|
|
}
|
|
},
|
|
"functionReturnParameters": 109,
|
|
"id": 125,
|
|
"nodeType": "Return",
|
|
"src": "1268:21:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 103,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "847:262:2",
|
|
"text": " @dev Returns the downcasted uint224 from uint256, reverting on\n overflow (when the input is greater than largest uint224).\n Counterpart to Solidity's `uint224` operator.\n Requirements:\n - input must fit into 224 bits"
|
|
},
|
|
"id": 127,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "toUint224",
|
|
"nameLocation": "1121:9:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 106,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 105,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "1139:5:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 127,
|
|
"src": "1131:13:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 104,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1131:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1130:15:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 109,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 108,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 127,
|
|
"src": "1169:7:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint224",
|
|
"typeString": "uint224"
|
|
},
|
|
"typeName": {
|
|
"id": 107,
|
|
"name": "uint224",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1169:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint224",
|
|
"typeString": "uint224"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1168:9:2"
|
|
},
|
|
"scope": 492,
|
|
"src": "1112:182:2",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 151,
|
|
"nodeType": "Block",
|
|
"src": "1629:116:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 142,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 136,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 130,
|
|
"src": "1643:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 139,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1657:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint128_$",
|
|
"typeString": "type(uint128)"
|
|
},
|
|
"typeName": {
|
|
"id": 138,
|
|
"name": "uint128",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1657:7:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_type$_t_uint128_$",
|
|
"typeString": "type(uint128)"
|
|
}
|
|
],
|
|
"id": 137,
|
|
"name": "type",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967269,
|
|
"src": "1652:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
|
|
"typeString": "function () pure"
|
|
}
|
|
},
|
|
"id": 140,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1652:13:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_meta_type_t_uint128",
|
|
"typeString": "type(uint128)"
|
|
}
|
|
},
|
|
"id": 141,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1666:3:2",
|
|
"memberName": "max",
|
|
"nodeType": "MemberAccess",
|
|
"src": "1652:17:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"src": "1643:26:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e203132382062697473",
|
|
"id": 143,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1671:41:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_47a1e201974f94d3d1a31c8b08ae18c6966c758bdcd4400020012b98cc55426c",
|
|
"typeString": "literal_string \"SafeCast: value doesn't fit in 128 bits\""
|
|
},
|
|
"value": "SafeCast: value doesn't fit in 128 bits"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_47a1e201974f94d3d1a31c8b08ae18c6966c758bdcd4400020012b98cc55426c",
|
|
"typeString": "literal_string \"SafeCast: value doesn't fit in 128 bits\""
|
|
}
|
|
],
|
|
"id": 135,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "1635:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 144,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1635:78:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 145,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1635:78:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 148,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 130,
|
|
"src": "1734:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 147,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1726:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint128_$",
|
|
"typeString": "type(uint128)"
|
|
},
|
|
"typeName": {
|
|
"id": 146,
|
|
"name": "uint128",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1726:7:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 149,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1726:14:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"functionReturnParameters": 134,
|
|
"id": 150,
|
|
"nodeType": "Return",
|
|
"src": "1719:21:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 128,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1298:262:2",
|
|
"text": " @dev Returns the downcasted uint128 from uint256, reverting on\n overflow (when the input is greater than largest uint128).\n Counterpart to Solidity's `uint128` operator.\n Requirements:\n - input must fit into 128 bits"
|
|
},
|
|
"id": 152,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "toUint128",
|
|
"nameLocation": "1572:9:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 131,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 130,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "1590:5:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 152,
|
|
"src": "1582:13:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 129,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1582:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1581:15:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 134,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 133,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 152,
|
|
"src": "1620:7:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
},
|
|
"typeName": {
|
|
"id": 132,
|
|
"name": "uint128",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1620:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1619:9:2"
|
|
},
|
|
"scope": 492,
|
|
"src": "1563:182:2",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 176,
|
|
"nodeType": "Block",
|
|
"src": "2074:113:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 167,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 161,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 155,
|
|
"src": "2088:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 164,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2102:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint96_$",
|
|
"typeString": "type(uint96)"
|
|
},
|
|
"typeName": {
|
|
"id": 163,
|
|
"name": "uint96",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2102:6:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_type$_t_uint96_$",
|
|
"typeString": "type(uint96)"
|
|
}
|
|
],
|
|
"id": 162,
|
|
"name": "type",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967269,
|
|
"src": "2097:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
|
|
"typeString": "function () pure"
|
|
}
|
|
},
|
|
"id": 165,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2097:12:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_meta_type_t_uint96",
|
|
"typeString": "type(uint96)"
|
|
}
|
|
},
|
|
"id": 166,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "2110:3:2",
|
|
"memberName": "max",
|
|
"nodeType": "MemberAccess",
|
|
"src": "2097:16:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint96",
|
|
"typeString": "uint96"
|
|
}
|
|
},
|
|
"src": "2088:25:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e2039362062697473",
|
|
"id": 168,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2115:40:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_06d20189090e973729391526269baef79c35dd621633195648e5f8309eef9e19",
|
|
"typeString": "literal_string \"SafeCast: value doesn't fit in 96 bits\""
|
|
},
|
|
"value": "SafeCast: value doesn't fit in 96 bits"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_06d20189090e973729391526269baef79c35dd621633195648e5f8309eef9e19",
|
|
"typeString": "literal_string \"SafeCast: value doesn't fit in 96 bits\""
|
|
}
|
|
],
|
|
"id": 160,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "2080:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 169,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2080:76:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 170,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2080:76:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 173,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 155,
|
|
"src": "2176:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 172,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2169:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint96_$",
|
|
"typeString": "type(uint96)"
|
|
},
|
|
"typeName": {
|
|
"id": 171,
|
|
"name": "uint96",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2169:6:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 174,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2169:13:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint96",
|
|
"typeString": "uint96"
|
|
}
|
|
},
|
|
"functionReturnParameters": 159,
|
|
"id": 175,
|
|
"nodeType": "Return",
|
|
"src": "2162:20:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 153,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1749:258:2",
|
|
"text": " @dev Returns the downcasted uint96 from uint256, reverting on\n overflow (when the input is greater than largest uint96).\n Counterpart to Solidity's `uint96` operator.\n Requirements:\n - input must fit into 96 bits"
|
|
},
|
|
"id": 177,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "toUint96",
|
|
"nameLocation": "2019:8:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 156,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 155,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "2036:5:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 177,
|
|
"src": "2028:13:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 154,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2028:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2027:15:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 159,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 158,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 177,
|
|
"src": "2066:6:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint96",
|
|
"typeString": "uint96"
|
|
},
|
|
"typeName": {
|
|
"id": 157,
|
|
"name": "uint96",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2066:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint96",
|
|
"typeString": "uint96"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2065:8:2"
|
|
},
|
|
"scope": 492,
|
|
"src": "2010:177:2",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 201,
|
|
"nodeType": "Block",
|
|
"src": "2516:113:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 192,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 186,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 180,
|
|
"src": "2530:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 189,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2544:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint64_$",
|
|
"typeString": "type(uint64)"
|
|
},
|
|
"typeName": {
|
|
"id": 188,
|
|
"name": "uint64",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2544:6:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_type$_t_uint64_$",
|
|
"typeString": "type(uint64)"
|
|
}
|
|
],
|
|
"id": 187,
|
|
"name": "type",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967269,
|
|
"src": "2539:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
|
|
"typeString": "function () pure"
|
|
}
|
|
},
|
|
"id": 190,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2539:12:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_meta_type_t_uint64",
|
|
"typeString": "type(uint64)"
|
|
}
|
|
},
|
|
"id": 191,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "2552:3:2",
|
|
"memberName": "max",
|
|
"nodeType": "MemberAccess",
|
|
"src": "2539:16:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"src": "2530:25:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e2036342062697473",
|
|
"id": 193,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2557:40:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_93ae0c6bf6ffaece591a770b1865daa9f65157e541970aa9d8dc5f89a9490939",
|
|
"typeString": "literal_string \"SafeCast: value doesn't fit in 64 bits\""
|
|
},
|
|
"value": "SafeCast: value doesn't fit in 64 bits"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_93ae0c6bf6ffaece591a770b1865daa9f65157e541970aa9d8dc5f89a9490939",
|
|
"typeString": "literal_string \"SafeCast: value doesn't fit in 64 bits\""
|
|
}
|
|
],
|
|
"id": 185,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "2522:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 194,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2522:76:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 195,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2522:76:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 198,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 180,
|
|
"src": "2618:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 197,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2611:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint64_$",
|
|
"typeString": "type(uint64)"
|
|
},
|
|
"typeName": {
|
|
"id": 196,
|
|
"name": "uint64",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2611:6:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 199,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2611:13:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"functionReturnParameters": 184,
|
|
"id": 200,
|
|
"nodeType": "Return",
|
|
"src": "2604:20:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 178,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2191:258:2",
|
|
"text": " @dev Returns the downcasted uint64 from uint256, reverting on\n overflow (when the input is greater than largest uint64).\n Counterpart to Solidity's `uint64` operator.\n Requirements:\n - input must fit into 64 bits"
|
|
},
|
|
"id": 202,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "toUint64",
|
|
"nameLocation": "2461:8:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 181,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 180,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "2478:5:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 202,
|
|
"src": "2470:13:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 179,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2470:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2469:15:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 184,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 183,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 202,
|
|
"src": "2508:6:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
},
|
|
"typeName": {
|
|
"id": 182,
|
|
"name": "uint64",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2508:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint64",
|
|
"typeString": "uint64"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2507:8:2"
|
|
},
|
|
"scope": 492,
|
|
"src": "2452:177:2",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 226,
|
|
"nodeType": "Block",
|
|
"src": "2958:113:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 217,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 211,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 205,
|
|
"src": "2972:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 214,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2986:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint32_$",
|
|
"typeString": "type(uint32)"
|
|
},
|
|
"typeName": {
|
|
"id": 213,
|
|
"name": "uint32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2986:6:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_type$_t_uint32_$",
|
|
"typeString": "type(uint32)"
|
|
}
|
|
],
|
|
"id": 212,
|
|
"name": "type",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967269,
|
|
"src": "2981:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
|
|
"typeString": "function () pure"
|
|
}
|
|
},
|
|
"id": 215,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2981:12:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_meta_type_t_uint32",
|
|
"typeString": "type(uint32)"
|
|
}
|
|
},
|
|
"id": 216,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "2994:3:2",
|
|
"memberName": "max",
|
|
"nodeType": "MemberAccess",
|
|
"src": "2981:16:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"src": "2972:25:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e2033322062697473",
|
|
"id": 218,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2999:40:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_c907489dafcfb622d3b83f2657a14d6da2f59e0de3116af0d6a80554c1a7cb19",
|
|
"typeString": "literal_string \"SafeCast: value doesn't fit in 32 bits\""
|
|
},
|
|
"value": "SafeCast: value doesn't fit in 32 bits"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_c907489dafcfb622d3b83f2657a14d6da2f59e0de3116af0d6a80554c1a7cb19",
|
|
"typeString": "literal_string \"SafeCast: value doesn't fit in 32 bits\""
|
|
}
|
|
],
|
|
"id": 210,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "2964:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 219,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2964:76:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 220,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2964:76:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 223,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 205,
|
|
"src": "3060:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 222,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "3053:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint32_$",
|
|
"typeString": "type(uint32)"
|
|
},
|
|
"typeName": {
|
|
"id": 221,
|
|
"name": "uint32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3053:6:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 224,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3053:13:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"functionReturnParameters": 209,
|
|
"id": 225,
|
|
"nodeType": "Return",
|
|
"src": "3046:20:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 203,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2633:258:2",
|
|
"text": " @dev Returns the downcasted uint32 from uint256, reverting on\n overflow (when the input is greater than largest uint32).\n Counterpart to Solidity's `uint32` operator.\n Requirements:\n - input must fit into 32 bits"
|
|
},
|
|
"id": 227,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "toUint32",
|
|
"nameLocation": "2903:8:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 206,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 205,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "2920:5:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 227,
|
|
"src": "2912:13:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 204,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2912:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2911:15:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 209,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 208,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 227,
|
|
"src": "2950:6:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
},
|
|
"typeName": {
|
|
"id": 207,
|
|
"name": "uint32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2950:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2949:8:2"
|
|
},
|
|
"scope": 492,
|
|
"src": "2894:177:2",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 251,
|
|
"nodeType": "Block",
|
|
"src": "3400:113:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 242,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 236,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 230,
|
|
"src": "3414:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 239,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "3428:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint16_$",
|
|
"typeString": "type(uint16)"
|
|
},
|
|
"typeName": {
|
|
"id": 238,
|
|
"name": "uint16",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3428:6:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_type$_t_uint16_$",
|
|
"typeString": "type(uint16)"
|
|
}
|
|
],
|
|
"id": 237,
|
|
"name": "type",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967269,
|
|
"src": "3423:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
|
|
"typeString": "function () pure"
|
|
}
|
|
},
|
|
"id": 240,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3423:12:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_meta_type_t_uint16",
|
|
"typeString": "type(uint16)"
|
|
}
|
|
},
|
|
"id": 241,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "3436:3:2",
|
|
"memberName": "max",
|
|
"nodeType": "MemberAccess",
|
|
"src": "3423:16:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint16",
|
|
"typeString": "uint16"
|
|
}
|
|
},
|
|
"src": "3414:25:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e2031362062697473",
|
|
"id": 243,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3441:40:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_13d3a66f9e0e5c92bbe7743bcd3bdb4695009d5f3a96e5ff49718d715b484033",
|
|
"typeString": "literal_string \"SafeCast: value doesn't fit in 16 bits\""
|
|
},
|
|
"value": "SafeCast: value doesn't fit in 16 bits"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_13d3a66f9e0e5c92bbe7743bcd3bdb4695009d5f3a96e5ff49718d715b484033",
|
|
"typeString": "literal_string \"SafeCast: value doesn't fit in 16 bits\""
|
|
}
|
|
],
|
|
"id": 235,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "3406:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 244,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3406:76:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 245,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3406:76:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 248,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 230,
|
|
"src": "3502:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 247,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "3495:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint16_$",
|
|
"typeString": "type(uint16)"
|
|
},
|
|
"typeName": {
|
|
"id": 246,
|
|
"name": "uint16",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3495:6:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 249,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3495:13:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint16",
|
|
"typeString": "uint16"
|
|
}
|
|
},
|
|
"functionReturnParameters": 234,
|
|
"id": 250,
|
|
"nodeType": "Return",
|
|
"src": "3488:20:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 228,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "3075:258:2",
|
|
"text": " @dev Returns the downcasted uint16 from uint256, reverting on\n overflow (when the input is greater than largest uint16).\n Counterpart to Solidity's `uint16` operator.\n Requirements:\n - input must fit into 16 bits"
|
|
},
|
|
"id": 252,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "toUint16",
|
|
"nameLocation": "3345:8:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 231,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 230,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "3362:5:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 252,
|
|
"src": "3354:13:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 229,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3354:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3353:15:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 234,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 233,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 252,
|
|
"src": "3392:6:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint16",
|
|
"typeString": "uint16"
|
|
},
|
|
"typeName": {
|
|
"id": 232,
|
|
"name": "uint16",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3392:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint16",
|
|
"typeString": "uint16"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3391:8:2"
|
|
},
|
|
"scope": 492,
|
|
"src": "3336:177:2",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 276,
|
|
"nodeType": "Block",
|
|
"src": "3837:110:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 267,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 261,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 255,
|
|
"src": "3851:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 264,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "3865:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint8_$",
|
|
"typeString": "type(uint8)"
|
|
},
|
|
"typeName": {
|
|
"id": 263,
|
|
"name": "uint8",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3865:5:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_type$_t_uint8_$",
|
|
"typeString": "type(uint8)"
|
|
}
|
|
],
|
|
"id": 262,
|
|
"name": "type",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967269,
|
|
"src": "3860:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
|
|
"typeString": "function () pure"
|
|
}
|
|
},
|
|
"id": 265,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3860:11:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_meta_type_t_uint8",
|
|
"typeString": "type(uint8)"
|
|
}
|
|
},
|
|
"id": 266,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "3872:3:2",
|
|
"memberName": "max",
|
|
"nodeType": "MemberAccess",
|
|
"src": "3860:15:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"src": "3851:24:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e20382062697473",
|
|
"id": 268,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3877:39:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_2610961ba53259047cd57c60366c5ad0b8aabf5eb4132487619b736715a740d1",
|
|
"typeString": "literal_string \"SafeCast: value doesn't fit in 8 bits\""
|
|
},
|
|
"value": "SafeCast: value doesn't fit in 8 bits"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_2610961ba53259047cd57c60366c5ad0b8aabf5eb4132487619b736715a740d1",
|
|
"typeString": "literal_string \"SafeCast: value doesn't fit in 8 bits\""
|
|
}
|
|
],
|
|
"id": 260,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "3843:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 269,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3843:74:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 270,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3843:74:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 273,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 255,
|
|
"src": "3936:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 272,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "3930:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint8_$",
|
|
"typeString": "type(uint8)"
|
|
},
|
|
"typeName": {
|
|
"id": 271,
|
|
"name": "uint8",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3930:5:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 274,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3930:12:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"functionReturnParameters": 259,
|
|
"id": 275,
|
|
"nodeType": "Return",
|
|
"src": "3923:19:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 253,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "3517:255:2",
|
|
"text": " @dev Returns the downcasted uint8 from uint256, reverting on\n overflow (when the input is greater than largest uint8).\n Counterpart to Solidity's `uint8` operator.\n Requirements:\n - input must fit into 8 bits."
|
|
},
|
|
"id": 277,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "toUint8",
|
|
"nameLocation": "3784:7:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 256,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 255,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "3800:5:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 277,
|
|
"src": "3792:13:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 254,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3792:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3791:15:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 259,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 258,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 277,
|
|
"src": "3830:5:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
},
|
|
"typeName": {
|
|
"id": 257,
|
|
"name": "uint8",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3830:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3829:7:2"
|
|
},
|
|
"scope": 492,
|
|
"src": "3775:172:2",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 297,
|
|
"nodeType": "Block",
|
|
"src": "4167:93:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"id": 288,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 286,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 280,
|
|
"src": "4181:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 287,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4190:1:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "4181:10:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "53616665436173743a2076616c7565206d75737420626520706f736974697665",
|
|
"id": 289,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4193:34:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_74e6d3a4204092bea305532ded31d3763fc378e46be3884a93ceff08a0761807",
|
|
"typeString": "literal_string \"SafeCast: value must be positive\""
|
|
},
|
|
"value": "SafeCast: value must be positive"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_74e6d3a4204092bea305532ded31d3763fc378e46be3884a93ceff08a0761807",
|
|
"typeString": "literal_string \"SafeCast: value must be positive\""
|
|
}
|
|
],
|
|
"id": 285,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "4173:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 290,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4173:55:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 291,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4173:55:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 294,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 280,
|
|
"src": "4249:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
],
|
|
"id": 293,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "4241:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint256_$",
|
|
"typeString": "type(uint256)"
|
|
},
|
|
"typeName": {
|
|
"id": 292,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4241:7:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 295,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4241:14:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 284,
|
|
"id": 296,
|
|
"nodeType": "Return",
|
|
"src": "4234:21:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 278,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "3951:148:2",
|
|
"text": " @dev Converts a signed int256 into an unsigned uint256.\n Requirements:\n - input must be greater than or equal to 0."
|
|
},
|
|
"id": 298,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "toUint256",
|
|
"nameLocation": "4111:9:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 281,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 280,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "4128:5:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 298,
|
|
"src": "4121:12:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"typeName": {
|
|
"id": 279,
|
|
"name": "int256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4121:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4120:14:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 284,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 283,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 298,
|
|
"src": "4158:7:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 282,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4158:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4157:9:2"
|
|
},
|
|
"scope": 492,
|
|
"src": "4102:158:2",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 330,
|
|
"nodeType": "Block",
|
|
"src": "4656:161:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 321,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"id": 313,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 307,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 301,
|
|
"src": "4677:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 310,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "4691:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_int128_$",
|
|
"typeString": "type(int128)"
|
|
},
|
|
"typeName": {
|
|
"id": 309,
|
|
"name": "int128",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4691:6:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_type$_t_int128_$",
|
|
"typeString": "type(int128)"
|
|
}
|
|
],
|
|
"id": 308,
|
|
"name": "type",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967269,
|
|
"src": "4686:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
|
|
"typeString": "function () pure"
|
|
}
|
|
},
|
|
"id": 311,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4686:12:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_meta_type_t_int128",
|
|
"typeString": "type(int128)"
|
|
}
|
|
},
|
|
"id": 312,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "4699:3:2",
|
|
"memberName": "min",
|
|
"nodeType": "MemberAccess",
|
|
"src": "4686:16:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int128",
|
|
"typeString": "int128"
|
|
}
|
|
},
|
|
"src": "4677:25:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "&&",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"id": 320,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 314,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 301,
|
|
"src": "4706:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 317,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "4720:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_int128_$",
|
|
"typeString": "type(int128)"
|
|
},
|
|
"typeName": {
|
|
"id": 316,
|
|
"name": "int128",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4720:6:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_type$_t_int128_$",
|
|
"typeString": "type(int128)"
|
|
}
|
|
],
|
|
"id": 315,
|
|
"name": "type",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967269,
|
|
"src": "4715:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
|
|
"typeString": "function () pure"
|
|
}
|
|
},
|
|
"id": 318,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4715:12:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_meta_type_t_int128",
|
|
"typeString": "type(int128)"
|
|
}
|
|
},
|
|
"id": 319,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "4728:3:2",
|
|
"memberName": "max",
|
|
"nodeType": "MemberAccess",
|
|
"src": "4715:16:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int128",
|
|
"typeString": "int128"
|
|
}
|
|
},
|
|
"src": "4706:25:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "4677:54:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e203132382062697473",
|
|
"id": 322,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4739:41:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_47a1e201974f94d3d1a31c8b08ae18c6966c758bdcd4400020012b98cc55426c",
|
|
"typeString": "literal_string \"SafeCast: value doesn't fit in 128 bits\""
|
|
},
|
|
"value": "SafeCast: value doesn't fit in 128 bits"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_47a1e201974f94d3d1a31c8b08ae18c6966c758bdcd4400020012b98cc55426c",
|
|
"typeString": "literal_string \"SafeCast: value doesn't fit in 128 bits\""
|
|
}
|
|
],
|
|
"id": 306,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "4662:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 323,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4662:124:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 324,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4662:124:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 327,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 301,
|
|
"src": "4806:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
],
|
|
"id": 326,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "4799:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_int128_$",
|
|
"typeString": "type(int128)"
|
|
},
|
|
"typeName": {
|
|
"id": 325,
|
|
"name": "int128",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4799:6:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 328,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4799:13:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int128",
|
|
"typeString": "int128"
|
|
}
|
|
},
|
|
"functionReturnParameters": 305,
|
|
"id": 329,
|
|
"nodeType": "Return",
|
|
"src": "4792:20:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 299,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "4264:326:2",
|
|
"text": " @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 Counterpart to Solidity's `int128` operator.\n Requirements:\n - input must fit into 128 bits\n _Available since v3.1._"
|
|
},
|
|
"id": 331,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "toInt128",
|
|
"nameLocation": "4602:8:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 302,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 301,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "4618:5:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 331,
|
|
"src": "4611:12:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"typeName": {
|
|
"id": 300,
|
|
"name": "int256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4611:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4610:14:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 305,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 304,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 331,
|
|
"src": "4648:6:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int128",
|
|
"typeString": "int128"
|
|
},
|
|
"typeName": {
|
|
"id": 303,
|
|
"name": "int128",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4648:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int128",
|
|
"typeString": "int128"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4647:8:2"
|
|
},
|
|
"scope": 492,
|
|
"src": "4593:224:2",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 363,
|
|
"nodeType": "Block",
|
|
"src": "5206:157:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 354,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"id": 346,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 340,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 334,
|
|
"src": "5227:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 343,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "5241:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_int64_$",
|
|
"typeString": "type(int64)"
|
|
},
|
|
"typeName": {
|
|
"id": 342,
|
|
"name": "int64",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5241:5:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_type$_t_int64_$",
|
|
"typeString": "type(int64)"
|
|
}
|
|
],
|
|
"id": 341,
|
|
"name": "type",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967269,
|
|
"src": "5236:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
|
|
"typeString": "function () pure"
|
|
}
|
|
},
|
|
"id": 344,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5236:11:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_meta_type_t_int64",
|
|
"typeString": "type(int64)"
|
|
}
|
|
},
|
|
"id": 345,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "5248:3:2",
|
|
"memberName": "min",
|
|
"nodeType": "MemberAccess",
|
|
"src": "5236:15:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int64",
|
|
"typeString": "int64"
|
|
}
|
|
},
|
|
"src": "5227:24:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "&&",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"id": 353,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 347,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 334,
|
|
"src": "5255:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 350,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "5269:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_int64_$",
|
|
"typeString": "type(int64)"
|
|
},
|
|
"typeName": {
|
|
"id": 349,
|
|
"name": "int64",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5269:5:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_type$_t_int64_$",
|
|
"typeString": "type(int64)"
|
|
}
|
|
],
|
|
"id": 348,
|
|
"name": "type",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967269,
|
|
"src": "5264:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
|
|
"typeString": "function () pure"
|
|
}
|
|
},
|
|
"id": 351,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5264:11:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_meta_type_t_int64",
|
|
"typeString": "type(int64)"
|
|
}
|
|
},
|
|
"id": 352,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "5276:3:2",
|
|
"memberName": "max",
|
|
"nodeType": "MemberAccess",
|
|
"src": "5264:15:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int64",
|
|
"typeString": "int64"
|
|
}
|
|
},
|
|
"src": "5255:24:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "5227:52:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e2036342062697473",
|
|
"id": 355,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "5287:40:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_93ae0c6bf6ffaece591a770b1865daa9f65157e541970aa9d8dc5f89a9490939",
|
|
"typeString": "literal_string \"SafeCast: value doesn't fit in 64 bits\""
|
|
},
|
|
"value": "SafeCast: value doesn't fit in 64 bits"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_93ae0c6bf6ffaece591a770b1865daa9f65157e541970aa9d8dc5f89a9490939",
|
|
"typeString": "literal_string \"SafeCast: value doesn't fit in 64 bits\""
|
|
}
|
|
],
|
|
"id": 339,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "5212:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 356,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5212:121:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 357,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "5212:121:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 360,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 334,
|
|
"src": "5352:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
],
|
|
"id": 359,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "5346:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_int64_$",
|
|
"typeString": "type(int64)"
|
|
},
|
|
"typeName": {
|
|
"id": 358,
|
|
"name": "int64",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5346:5:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 361,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5346:12:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int64",
|
|
"typeString": "int64"
|
|
}
|
|
},
|
|
"functionReturnParameters": 338,
|
|
"id": 362,
|
|
"nodeType": "Return",
|
|
"src": "5339:19:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 332,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "4821:321:2",
|
|
"text": " @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 Counterpart to Solidity's `int64` operator.\n Requirements:\n - input must fit into 64 bits\n _Available since v3.1._"
|
|
},
|
|
"id": 364,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "toInt64",
|
|
"nameLocation": "5154:7:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 335,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 334,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "5169:5:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 364,
|
|
"src": "5162:12:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"typeName": {
|
|
"id": 333,
|
|
"name": "int256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5162:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5161:14:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 338,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 337,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 364,
|
|
"src": "5199:5:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int64",
|
|
"typeString": "int64"
|
|
},
|
|
"typeName": {
|
|
"id": 336,
|
|
"name": "int64",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5199:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int64",
|
|
"typeString": "int64"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5198:7:2"
|
|
},
|
|
"scope": 492,
|
|
"src": "5145:218:2",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 396,
|
|
"nodeType": "Block",
|
|
"src": "5752:157:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 387,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"id": 379,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 373,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 367,
|
|
"src": "5773:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 376,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "5787:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_int32_$",
|
|
"typeString": "type(int32)"
|
|
},
|
|
"typeName": {
|
|
"id": 375,
|
|
"name": "int32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5787:5:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_type$_t_int32_$",
|
|
"typeString": "type(int32)"
|
|
}
|
|
],
|
|
"id": 374,
|
|
"name": "type",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967269,
|
|
"src": "5782:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
|
|
"typeString": "function () pure"
|
|
}
|
|
},
|
|
"id": 377,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5782:11:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_meta_type_t_int32",
|
|
"typeString": "type(int32)"
|
|
}
|
|
},
|
|
"id": 378,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "5794:3:2",
|
|
"memberName": "min",
|
|
"nodeType": "MemberAccess",
|
|
"src": "5782:15:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int32",
|
|
"typeString": "int32"
|
|
}
|
|
},
|
|
"src": "5773:24:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "&&",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"id": 386,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 380,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 367,
|
|
"src": "5801:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 383,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "5815:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_int32_$",
|
|
"typeString": "type(int32)"
|
|
},
|
|
"typeName": {
|
|
"id": 382,
|
|
"name": "int32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5815:5:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_type$_t_int32_$",
|
|
"typeString": "type(int32)"
|
|
}
|
|
],
|
|
"id": 381,
|
|
"name": "type",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967269,
|
|
"src": "5810:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
|
|
"typeString": "function () pure"
|
|
}
|
|
},
|
|
"id": 384,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5810:11:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_meta_type_t_int32",
|
|
"typeString": "type(int32)"
|
|
}
|
|
},
|
|
"id": 385,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "5822:3:2",
|
|
"memberName": "max",
|
|
"nodeType": "MemberAccess",
|
|
"src": "5810:15:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int32",
|
|
"typeString": "int32"
|
|
}
|
|
},
|
|
"src": "5801:24:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "5773:52:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e2033322062697473",
|
|
"id": 388,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "5833:40:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_c907489dafcfb622d3b83f2657a14d6da2f59e0de3116af0d6a80554c1a7cb19",
|
|
"typeString": "literal_string \"SafeCast: value doesn't fit in 32 bits\""
|
|
},
|
|
"value": "SafeCast: value doesn't fit in 32 bits"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_c907489dafcfb622d3b83f2657a14d6da2f59e0de3116af0d6a80554c1a7cb19",
|
|
"typeString": "literal_string \"SafeCast: value doesn't fit in 32 bits\""
|
|
}
|
|
],
|
|
"id": 372,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "5758:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 389,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5758:121:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 390,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "5758:121:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 393,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 367,
|
|
"src": "5898:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
],
|
|
"id": 392,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "5892:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_int32_$",
|
|
"typeString": "type(int32)"
|
|
},
|
|
"typeName": {
|
|
"id": 391,
|
|
"name": "int32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5892:5:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 394,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5892:12:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int32",
|
|
"typeString": "int32"
|
|
}
|
|
},
|
|
"functionReturnParameters": 371,
|
|
"id": 395,
|
|
"nodeType": "Return",
|
|
"src": "5885:19:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 365,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "5367:321:2",
|
|
"text": " @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 Counterpart to Solidity's `int32` operator.\n Requirements:\n - input must fit into 32 bits\n _Available since v3.1._"
|
|
},
|
|
"id": 397,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "toInt32",
|
|
"nameLocation": "5700:7:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 368,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 367,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "5715:5:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 397,
|
|
"src": "5708:12:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"typeName": {
|
|
"id": 366,
|
|
"name": "int256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5708:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5707:14:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 371,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 370,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 397,
|
|
"src": "5745:5:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int32",
|
|
"typeString": "int32"
|
|
},
|
|
"typeName": {
|
|
"id": 369,
|
|
"name": "int32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5745:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int32",
|
|
"typeString": "int32"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5744:7:2"
|
|
},
|
|
"scope": 492,
|
|
"src": "5691:218:2",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 429,
|
|
"nodeType": "Block",
|
|
"src": "6298:157:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 420,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"id": 412,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 406,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 400,
|
|
"src": "6319:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 409,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "6333:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_int16_$",
|
|
"typeString": "type(int16)"
|
|
},
|
|
"typeName": {
|
|
"id": 408,
|
|
"name": "int16",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6333:5:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_type$_t_int16_$",
|
|
"typeString": "type(int16)"
|
|
}
|
|
],
|
|
"id": 407,
|
|
"name": "type",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967269,
|
|
"src": "6328:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
|
|
"typeString": "function () pure"
|
|
}
|
|
},
|
|
"id": 410,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6328:11:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_meta_type_t_int16",
|
|
"typeString": "type(int16)"
|
|
}
|
|
},
|
|
"id": 411,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "6340:3:2",
|
|
"memberName": "min",
|
|
"nodeType": "MemberAccess",
|
|
"src": "6328:15:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int16",
|
|
"typeString": "int16"
|
|
}
|
|
},
|
|
"src": "6319:24:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "&&",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"id": 419,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 413,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 400,
|
|
"src": "6347:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 416,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "6361:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_int16_$",
|
|
"typeString": "type(int16)"
|
|
},
|
|
"typeName": {
|
|
"id": 415,
|
|
"name": "int16",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6361:5:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_type$_t_int16_$",
|
|
"typeString": "type(int16)"
|
|
}
|
|
],
|
|
"id": 414,
|
|
"name": "type",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967269,
|
|
"src": "6356:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
|
|
"typeString": "function () pure"
|
|
}
|
|
},
|
|
"id": 417,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6356:11:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_meta_type_t_int16",
|
|
"typeString": "type(int16)"
|
|
}
|
|
},
|
|
"id": 418,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "6368:3:2",
|
|
"memberName": "max",
|
|
"nodeType": "MemberAccess",
|
|
"src": "6356:15:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int16",
|
|
"typeString": "int16"
|
|
}
|
|
},
|
|
"src": "6347:24:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "6319:52:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e2031362062697473",
|
|
"id": 421,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "6379:40:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_13d3a66f9e0e5c92bbe7743bcd3bdb4695009d5f3a96e5ff49718d715b484033",
|
|
"typeString": "literal_string \"SafeCast: value doesn't fit in 16 bits\""
|
|
},
|
|
"value": "SafeCast: value doesn't fit in 16 bits"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_13d3a66f9e0e5c92bbe7743bcd3bdb4695009d5f3a96e5ff49718d715b484033",
|
|
"typeString": "literal_string \"SafeCast: value doesn't fit in 16 bits\""
|
|
}
|
|
],
|
|
"id": 405,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "6304:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 422,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6304:121:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 423,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6304:121:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 426,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 400,
|
|
"src": "6444:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
],
|
|
"id": 425,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "6438:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_int16_$",
|
|
"typeString": "type(int16)"
|
|
},
|
|
"typeName": {
|
|
"id": 424,
|
|
"name": "int16",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6438:5:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 427,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6438:12:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int16",
|
|
"typeString": "int16"
|
|
}
|
|
},
|
|
"functionReturnParameters": 404,
|
|
"id": 428,
|
|
"nodeType": "Return",
|
|
"src": "6431:19:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 398,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "5913:321:2",
|
|
"text": " @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 Counterpart to Solidity's `int16` operator.\n Requirements:\n - input must fit into 16 bits\n _Available since v3.1._"
|
|
},
|
|
"id": 430,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "toInt16",
|
|
"nameLocation": "6246:7:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 401,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 400,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "6261:5:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 430,
|
|
"src": "6254:12:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"typeName": {
|
|
"id": 399,
|
|
"name": "int256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6254:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6253:14:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 404,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 403,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 430,
|
|
"src": "6291:5:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int16",
|
|
"typeString": "int16"
|
|
},
|
|
"typeName": {
|
|
"id": 402,
|
|
"name": "int16",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6291:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int16",
|
|
"typeString": "int16"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6290:7:2"
|
|
},
|
|
"scope": 492,
|
|
"src": "6237:218:2",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 462,
|
|
"nodeType": "Block",
|
|
"src": "6838:153:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 453,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"id": 445,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 439,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 433,
|
|
"src": "6859:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 442,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "6873:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_int8_$",
|
|
"typeString": "type(int8)"
|
|
},
|
|
"typeName": {
|
|
"id": 441,
|
|
"name": "int8",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6873:4:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_type$_t_int8_$",
|
|
"typeString": "type(int8)"
|
|
}
|
|
],
|
|
"id": 440,
|
|
"name": "type",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967269,
|
|
"src": "6868:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
|
|
"typeString": "function () pure"
|
|
}
|
|
},
|
|
"id": 443,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6868:10:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_meta_type_t_int8",
|
|
"typeString": "type(int8)"
|
|
}
|
|
},
|
|
"id": 444,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "6879:3:2",
|
|
"memberName": "min",
|
|
"nodeType": "MemberAccess",
|
|
"src": "6868:14:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int8",
|
|
"typeString": "int8"
|
|
}
|
|
},
|
|
"src": "6859:23:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "&&",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"id": 452,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 446,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 433,
|
|
"src": "6886:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 449,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "6900:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_int8_$",
|
|
"typeString": "type(int8)"
|
|
},
|
|
"typeName": {
|
|
"id": 448,
|
|
"name": "int8",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6900:4:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_type$_t_int8_$",
|
|
"typeString": "type(int8)"
|
|
}
|
|
],
|
|
"id": 447,
|
|
"name": "type",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967269,
|
|
"src": "6895:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
|
|
"typeString": "function () pure"
|
|
}
|
|
},
|
|
"id": 450,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6895:10:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_meta_type_t_int8",
|
|
"typeString": "type(int8)"
|
|
}
|
|
},
|
|
"id": 451,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "6906:3:2",
|
|
"memberName": "max",
|
|
"nodeType": "MemberAccess",
|
|
"src": "6895:14:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int8",
|
|
"typeString": "int8"
|
|
}
|
|
},
|
|
"src": "6886:23:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "6859:50:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e20382062697473",
|
|
"id": 454,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "6917:39:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_2610961ba53259047cd57c60366c5ad0b8aabf5eb4132487619b736715a740d1",
|
|
"typeString": "literal_string \"SafeCast: value doesn't fit in 8 bits\""
|
|
},
|
|
"value": "SafeCast: value doesn't fit in 8 bits"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_2610961ba53259047cd57c60366c5ad0b8aabf5eb4132487619b736715a740d1",
|
|
"typeString": "literal_string \"SafeCast: value doesn't fit in 8 bits\""
|
|
}
|
|
],
|
|
"id": 438,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "6844:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 455,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6844:118:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 456,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6844:118:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 459,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 433,
|
|
"src": "6980:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
],
|
|
"id": 458,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "6975:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_int8_$",
|
|
"typeString": "type(int8)"
|
|
},
|
|
"typeName": {
|
|
"id": 457,
|
|
"name": "int8",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6975:4:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 460,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6975:11:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int8",
|
|
"typeString": "int8"
|
|
}
|
|
},
|
|
"functionReturnParameters": 437,
|
|
"id": 461,
|
|
"nodeType": "Return",
|
|
"src": "6968:18:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 431,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "6459:317:2",
|
|
"text": " @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 Counterpart to Solidity's `int8` operator.\n Requirements:\n - input must fit into 8 bits.\n _Available since v3.1._"
|
|
},
|
|
"id": 463,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "toInt8",
|
|
"nameLocation": "6788:6:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 434,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 433,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "6802:5:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 463,
|
|
"src": "6795:12:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"typeName": {
|
|
"id": 432,
|
|
"name": "int256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6795:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6794:14:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 437,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 436,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 463,
|
|
"src": "6832:4:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int8",
|
|
"typeString": "int8"
|
|
},
|
|
"typeName": {
|
|
"id": 435,
|
|
"name": "int8",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6832:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int8",
|
|
"typeString": "int8"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6831:6:2"
|
|
},
|
|
"scope": 492,
|
|
"src": "6779:212:2",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 490,
|
|
"nodeType": "Block",
|
|
"src": "7215:219:2",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 481,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 472,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 466,
|
|
"src": "7324:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"arguments": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 477,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "7346:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_int256_$",
|
|
"typeString": "type(int256)"
|
|
},
|
|
"typeName": {
|
|
"id": 476,
|
|
"name": "int256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7346:6:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_type$_t_int256_$",
|
|
"typeString": "type(int256)"
|
|
}
|
|
],
|
|
"id": 475,
|
|
"name": "type",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967269,
|
|
"src": "7341:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
|
|
"typeString": "function () pure"
|
|
}
|
|
},
|
|
"id": 478,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7341:12:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_meta_type_t_int256",
|
|
"typeString": "type(int256)"
|
|
}
|
|
},
|
|
"id": 479,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "7354:3:2",
|
|
"memberName": "max",
|
|
"nodeType": "MemberAccess",
|
|
"src": "7341:16:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
],
|
|
"id": 474,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "7333:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint256_$",
|
|
"typeString": "type(uint256)"
|
|
},
|
|
"typeName": {
|
|
"id": 473,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7333:7:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 480,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7333:25:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7324:34:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e20616e20696e74323536",
|
|
"id": 482,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "7360:42:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_d70dcf21692b3c91b4c5fbb89ed57f464aa42efbe5b0ea96c4acb7c080144227",
|
|
"typeString": "literal_string \"SafeCast: value doesn't fit in an int256\""
|
|
},
|
|
"value": "SafeCast: value doesn't fit in an int256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_d70dcf21692b3c91b4c5fbb89ed57f464aa42efbe5b0ea96c4acb7c080144227",
|
|
"typeString": "literal_string \"SafeCast: value doesn't fit in an int256\""
|
|
}
|
|
],
|
|
"id": 471,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "7316:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 483,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7316:87:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 484,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "7316:87:2"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 487,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 466,
|
|
"src": "7423:5:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 486,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "7416:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_int256_$",
|
|
"typeString": "type(int256)"
|
|
},
|
|
"typeName": {
|
|
"id": 485,
|
|
"name": "int256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7416:6:2",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 488,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7416:13:2",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 470,
|
|
"id": 489,
|
|
"nodeType": "Return",
|
|
"src": "7409:20:2"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 464,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "6995:153:2",
|
|
"text": " @dev Converts an unsigned uint256 into a signed int256.\n Requirements:\n - input must be less than or equal to maxInt256."
|
|
},
|
|
"id": 491,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "toInt256",
|
|
"nameLocation": "7160:8:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 467,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 466,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "7177:5:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 491,
|
|
"src": "7169:13:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 465,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7169:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "7168:15:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 470,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 469,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 491,
|
|
"src": "7207:6:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"typeName": {
|
|
"id": 468,
|
|
"name": "int256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7207:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "7206:8:2"
|
|
},
|
|
"scope": 492,
|
|
"src": "7151:283:2",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 493,
|
|
"src": "826:6610:2",
|
|
"usedErrors": [],
|
|
"usedEvents": []
|
|
}
|
|
],
|
|
"src": "91:7346:2"
|
|
},
|
|
"id": 2
|
|
},
|
|
"@aave/core-v3/contracts/interfaces/IScaledBalanceToken.sol": {
|
|
"ast": {
|
|
"absolutePath": "@aave/core-v3/contracts/interfaces/IScaledBalanceToken.sol",
|
|
"exportedSymbols": {
|
|
"IScaledBalanceToken": [
|
|
554
|
|
]
|
|
},
|
|
"id": 555,
|
|
"license": "AGPL-3.0",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 494,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".0"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "37:23:3"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"canonicalName": "IScaledBalanceToken",
|
|
"contractDependencies": [],
|
|
"contractKind": "interface",
|
|
"documentation": {
|
|
"id": 495,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "62:120:3",
|
|
"text": " @title IScaledBalanceToken\n @author Aave\n @notice Defines the basic interface for a scaled-balance token."
|
|
},
|
|
"fullyImplemented": false,
|
|
"id": 554,
|
|
"linearizedBaseContracts": [
|
|
554
|
|
],
|
|
"name": "IScaledBalanceToken",
|
|
"nameLocation": "193:19:3",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"anonymous": false,
|
|
"documentation": {
|
|
"id": 496,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "217:459:3",
|
|
"text": " @dev Emitted after the mint action\n @param caller The address performing the mint\n @param onBehalfOf The address of the user that will receive the minted tokens\n @param value The scaled-up amount being minted (based on user entered amount and balance increase from interest)\n @param balanceIncrease The increase in scaled-up balance since the last action of 'onBehalfOf'\n @param index The next liquidity index of the reserve"
|
|
},
|
|
"eventSelector": "458f5fa412d0f69b08dd84872b0215675cc67bc1d5b6fd93300a1c3878b86196",
|
|
"id": 508,
|
|
"name": "Mint",
|
|
"nameLocation": "685:4:3",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 507,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 498,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "caller",
|
|
"nameLocation": "711:6:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 508,
|
|
"src": "695:22:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 497,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "695:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 500,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "onBehalfOf",
|
|
"nameLocation": "739:10:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 508,
|
|
"src": "723:26:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 499,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "723:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 502,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "763:5:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 508,
|
|
"src": "755:13:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 501,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "755:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 504,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "balanceIncrease",
|
|
"nameLocation": "782:15:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 508,
|
|
"src": "774:23:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 503,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "774:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 506,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "index",
|
|
"nameLocation": "811:5:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 508,
|
|
"src": "803:13:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 505,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "803:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "689:131:3"
|
|
},
|
|
"src": "679:142:3"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": {
|
|
"id": 509,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "825:566:3",
|
|
"text": " @dev Emitted after the burn action\n @dev If the burn function does not involve a transfer of the underlying asset, the target defaults to zero address\n @param from The address from which the tokens will be burned\n @param target The address that will receive the underlying, if any\n @param value The scaled-up amount being burned (user entered amount - balance increase from interest)\n @param balanceIncrease The increase in scaled-up balance since the last action of 'from'\n @param index The next liquidity index of the reserve"
|
|
},
|
|
"eventSelector": "4cf25bc1d991c17529c25213d3cc0cda295eeaad5f13f361969b12ea48015f90",
|
|
"id": 521,
|
|
"name": "Burn",
|
|
"nameLocation": "1400:4:3",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 520,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 511,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "from",
|
|
"nameLocation": "1426:4:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 521,
|
|
"src": "1410:20:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 510,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1410:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 513,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "target",
|
|
"nameLocation": "1452:6:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 521,
|
|
"src": "1436:22:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 512,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1436:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 515,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "1472:5:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 521,
|
|
"src": "1464:13:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 514,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1464:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 517,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "balanceIncrease",
|
|
"nameLocation": "1491:15:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 521,
|
|
"src": "1483:23:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 516,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1483:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 519,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "index",
|
|
"nameLocation": "1520:5:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 521,
|
|
"src": "1512:13:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 518,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1512:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1404:125:3"
|
|
},
|
|
"src": "1394:136:3"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 522,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1534:308:3",
|
|
"text": " @notice Returns the scaled balance of the user.\n @dev The scaled balance is the sum of all the updated stored balance divided by the reserve's liquidity index\n at the moment of the update\n @param user The user whose balance is calculated\n @return The scaled balance of the user"
|
|
},
|
|
"functionSelector": "1da24f3e",
|
|
"id": 529,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "scaledBalanceOf",
|
|
"nameLocation": "1854:15:3",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 525,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 524,
|
|
"mutability": "mutable",
|
|
"name": "user",
|
|
"nameLocation": "1878:4:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 529,
|
|
"src": "1870:12:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 523,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1870:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1869:14:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 528,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 527,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 529,
|
|
"src": "1907:7:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 526,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1907:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1906:9:3"
|
|
},
|
|
"scope": 554,
|
|
"src": "1845:71:3",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 530,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1920:212:3",
|
|
"text": " @notice Returns the scaled balance of the user and the scaled total supply.\n @param user The address of the user\n @return The scaled balance of the user\n @return The scaled total supply"
|
|
},
|
|
"functionSelector": "0afbcdc9",
|
|
"id": 539,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getScaledUserBalanceAndSupply",
|
|
"nameLocation": "2144:29:3",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 533,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 532,
|
|
"mutability": "mutable",
|
|
"name": "user",
|
|
"nameLocation": "2182:4:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 539,
|
|
"src": "2174:12:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 531,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2174:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2173:14:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 538,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 535,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 539,
|
|
"src": "2211:7:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 534,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2211:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 537,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 539,
|
|
"src": "2220:7:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 536,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2220:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2210:18:3"
|
|
},
|
|
"scope": 554,
|
|
"src": "2135:94:3",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 540,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2233:147:3",
|
|
"text": " @notice Returns the scaled total supply of the scaled balance token. Represents sum(debt/index)\n @return The scaled total supply"
|
|
},
|
|
"functionSelector": "b1bf962d",
|
|
"id": 545,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "scaledTotalSupply",
|
|
"nameLocation": "2392:17:3",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 541,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2409:2:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 544,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 543,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 545,
|
|
"src": "2435:7:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 542,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2435:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2434:9:3"
|
|
},
|
|
"scope": 554,
|
|
"src": "2383:61:3",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 546,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2448:214:3",
|
|
"text": " @notice Returns last index interest was accrued to the user's balance\n @param user The address of the user\n @return The last index interest was accrued to the user's balance, expressed in ray"
|
|
},
|
|
"functionSelector": "e0753986",
|
|
"id": 553,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getPreviousIndex",
|
|
"nameLocation": "2674:16:3",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 549,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 548,
|
|
"mutability": "mutable",
|
|
"name": "user",
|
|
"nameLocation": "2699:4:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 553,
|
|
"src": "2691:12:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 547,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2691:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2690:14:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 552,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 551,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 553,
|
|
"src": "2728:7:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 550,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2728:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2727:9:3"
|
|
},
|
|
"scope": 554,
|
|
"src": "2665:72:3",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
}
|
|
],
|
|
"scope": 555,
|
|
"src": "183:2556:3",
|
|
"usedErrors": [],
|
|
"usedEvents": [
|
|
508,
|
|
521
|
|
]
|
|
}
|
|
],
|
|
"src": "37:2703:3"
|
|
},
|
|
"id": 3
|
|
},
|
|
"contracts/misc/interfaces/IEACAggregatorProxy.sol": {
|
|
"ast": {
|
|
"absolutePath": "contracts/misc/interfaces/IEACAggregatorProxy.sol",
|
|
"exportedSymbols": {
|
|
"IEACAggregatorProxy": [
|
|
605
|
|
]
|
|
},
|
|
"id": 606,
|
|
"license": "AGPL-3.0",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 556,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".10"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "38:24:4"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"canonicalName": "IEACAggregatorProxy",
|
|
"contractDependencies": [],
|
|
"contractKind": "interface",
|
|
"fullyImplemented": false,
|
|
"id": 605,
|
|
"linearizedBaseContracts": [
|
|
605
|
|
],
|
|
"name": "IEACAggregatorProxy",
|
|
"nameLocation": "76:19:4",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"functionSelector": "313ce567",
|
|
"id": 561,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "decimals",
|
|
"nameLocation": "110:8:4",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 557,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "118:2:4"
|
|
},
|
|
"returnParameters": {
|
|
"id": 560,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 559,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 561,
|
|
"src": "144:5:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
},
|
|
"typeName": {
|
|
"id": 558,
|
|
"name": "uint8",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "144:5:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "143:7:4"
|
|
},
|
|
"scope": 605,
|
|
"src": "101:50:4",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"functionSelector": "50d25bcd",
|
|
"id": 566,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "latestAnswer",
|
|
"nameLocation": "166:12:4",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 562,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "178:2:4"
|
|
},
|
|
"returnParameters": {
|
|
"id": 565,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 564,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 566,
|
|
"src": "204:6:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"typeName": {
|
|
"id": 563,
|
|
"name": "int256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "204:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "203:8:4"
|
|
},
|
|
"scope": 605,
|
|
"src": "157:55:4",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"functionSelector": "8205bf6a",
|
|
"id": 571,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "latestTimestamp",
|
|
"nameLocation": "227:15:4",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 567,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "242:2:4"
|
|
},
|
|
"returnParameters": {
|
|
"id": 570,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 569,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 571,
|
|
"src": "268:7:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 568,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "268:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "267:9:4"
|
|
},
|
|
"scope": 605,
|
|
"src": "218:59:4",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"functionSelector": "668a0f02",
|
|
"id": 576,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "latestRound",
|
|
"nameLocation": "292:11:4",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 572,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "303:2:4"
|
|
},
|
|
"returnParameters": {
|
|
"id": 575,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 574,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 576,
|
|
"src": "329:7:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 573,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "329:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "328:9:4"
|
|
},
|
|
"scope": 605,
|
|
"src": "283:55:4",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"functionSelector": "b5ab58dc",
|
|
"id": 583,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getAnswer",
|
|
"nameLocation": "353:9:4",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 579,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 578,
|
|
"mutability": "mutable",
|
|
"name": "roundId",
|
|
"nameLocation": "371:7:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 583,
|
|
"src": "363:15:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 577,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "363:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "362:17:4"
|
|
},
|
|
"returnParameters": {
|
|
"id": 582,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 581,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 583,
|
|
"src": "403:6:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"typeName": {
|
|
"id": 580,
|
|
"name": "int256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "403:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "402:8:4"
|
|
},
|
|
"scope": 605,
|
|
"src": "344:67:4",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"functionSelector": "b633620c",
|
|
"id": 590,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getTimestamp",
|
|
"nameLocation": "426:12:4",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 586,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 585,
|
|
"mutability": "mutable",
|
|
"name": "roundId",
|
|
"nameLocation": "447:7:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 590,
|
|
"src": "439:15:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 584,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "439:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "438:17:4"
|
|
},
|
|
"returnParameters": {
|
|
"id": 589,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 588,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 590,
|
|
"src": "479:7:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 587,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "479:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "478:9:4"
|
|
},
|
|
"scope": 605,
|
|
"src": "417:71:4",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"eventSelector": "0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f",
|
|
"id": 598,
|
|
"name": "AnswerUpdated",
|
|
"nameLocation": "500:13:4",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 597,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 592,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "current",
|
|
"nameLocation": "529:7:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 598,
|
|
"src": "514:22:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
},
|
|
"typeName": {
|
|
"id": 591,
|
|
"name": "int256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "514:6:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_int256",
|
|
"typeString": "int256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 594,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "roundId",
|
|
"nameLocation": "554:7:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 598,
|
|
"src": "538:23:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 593,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "538:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 596,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "timestamp",
|
|
"nameLocation": "571:9:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 598,
|
|
"src": "563:17:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 595,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "563:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "513:68:4"
|
|
},
|
|
"src": "494:88:4"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"eventSelector": "c3c45d1924f55369653f407ee9f095309d1e687b2c0011b1f709042d4f457e17",
|
|
"id": 604,
|
|
"name": "NewRound",
|
|
"nameLocation": "592:8:4",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 603,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 600,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "roundId",
|
|
"nameLocation": "617:7:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 604,
|
|
"src": "601:23:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 599,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "601:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 602,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "startedBy",
|
|
"nameLocation": "642:9:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 604,
|
|
"src": "626:25:4",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 601,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "626:7:4",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "600:52:4"
|
|
},
|
|
"src": "586:67:4"
|
|
}
|
|
],
|
|
"scope": 606,
|
|
"src": "66:590:4",
|
|
"usedErrors": [],
|
|
"usedEvents": [
|
|
598,
|
|
604
|
|
]
|
|
}
|
|
],
|
|
"src": "38:620:4"
|
|
},
|
|
"id": 4
|
|
},
|
|
"contracts/rewards/RewardsDistributor.sol": {
|
|
"ast": {
|
|
"absolutePath": "contracts/rewards/RewardsDistributor.sol",
|
|
"exportedSymbols": {
|
|
"IERC20Detailed": [
|
|
99
|
|
],
|
|
"IRewardsDistributor": [
|
|
2235
|
|
],
|
|
"IScaledBalanceToken": [
|
|
554
|
|
],
|
|
"RewardsDataTypes": [
|
|
2346
|
|
],
|
|
"RewardsDistributor": [
|
|
2053
|
|
],
|
|
"SafeCast": [
|
|
492
|
|
]
|
|
},
|
|
"id": 2054,
|
|
"license": "BUSL-1.1",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 607,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".10"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "38:24:5"
|
|
},
|
|
{
|
|
"absolutePath": "@aave/core-v3/contracts/interfaces/IScaledBalanceToken.sol",
|
|
"file": "@aave/core-v3/contracts/interfaces/IScaledBalanceToken.sol",
|
|
"id": 609,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 2054,
|
|
"sourceUnit": 555,
|
|
"src": "66:95:5",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"id": 608,
|
|
"name": "IScaledBalanceToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 554,
|
|
"src": "74:19:5",
|
|
"typeDescriptions": {}
|
|
},
|
|
"nameLocation": "-1:-1:-1"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol",
|
|
"file": "@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol",
|
|
"id": 611,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 2054,
|
|
"sourceUnit": 100,
|
|
"src": "163:110:5",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"id": 610,
|
|
"name": "IERC20Detailed",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 99,
|
|
"src": "171:14:5",
|
|
"typeDescriptions": {}
|
|
},
|
|
"nameLocation": "-1:-1:-1"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "@aave/core-v3/contracts/dependencies/openzeppelin/contracts/SafeCast.sol",
|
|
"file": "@aave/core-v3/contracts/dependencies/openzeppelin/contracts/SafeCast.sol",
|
|
"id": 613,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 2054,
|
|
"sourceUnit": 493,
|
|
"src": "275:98:5",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"id": 612,
|
|
"name": "SafeCast",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 492,
|
|
"src": "283:8:5",
|
|
"typeDescriptions": {}
|
|
},
|
|
"nameLocation": "-1:-1:-1"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "contracts/rewards/interfaces/IRewardsDistributor.sol",
|
|
"file": "./interfaces/IRewardsDistributor.sol",
|
|
"id": 615,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 2054,
|
|
"sourceUnit": 2236,
|
|
"src": "375:73:5",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"id": 614,
|
|
"name": "IRewardsDistributor",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2235,
|
|
"src": "383:19:5",
|
|
"typeDescriptions": {}
|
|
},
|
|
"nameLocation": "-1:-1:-1"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "contracts/rewards/libraries/RewardsDataTypes.sol",
|
|
"file": "./libraries/RewardsDataTypes.sol",
|
|
"id": 617,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 2054,
|
|
"sourceUnit": 2347,
|
|
"src": "450:66:5",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"id": 616,
|
|
"name": "RewardsDataTypes",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2346,
|
|
"src": "458:16:5",
|
|
"typeDescriptions": {}
|
|
},
|
|
"nameLocation": "-1:-1:-1"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": true,
|
|
"baseContracts": [
|
|
{
|
|
"baseName": {
|
|
"id": 619,
|
|
"name": "IRewardsDistributor",
|
|
"nameLocations": [
|
|
"713:19:5"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 2235,
|
|
"src": "713:19:5"
|
|
},
|
|
"id": 620,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "713:19:5"
|
|
}
|
|
],
|
|
"canonicalName": "RewardsDistributor",
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": {
|
|
"id": 618,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "520:151:5",
|
|
"text": " @title RewardsDistributor\n @notice Accounting contract to manage multiple staking distributions with multiple rewards\n @author Aave*"
|
|
},
|
|
"fullyImplemented": false,
|
|
"id": 2053,
|
|
"linearizedBaseContracts": [
|
|
2053,
|
|
2235
|
|
],
|
|
"name": "RewardsDistributor",
|
|
"nameLocation": "691:18:5",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"global": false,
|
|
"id": 623,
|
|
"libraryName": {
|
|
"id": 621,
|
|
"name": "SafeCast",
|
|
"nameLocations": [
|
|
"744:8:5"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 492,
|
|
"src": "744:8:5"
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "738:27:5",
|
|
"typeName": {
|
|
"id": 622,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "757:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
2228
|
|
],
|
|
"constant": false,
|
|
"functionSelector": "cbcbb507",
|
|
"id": 625,
|
|
"mutability": "immutable",
|
|
"name": "EMISSION_MANAGER",
|
|
"nameLocation": "824:16:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2053,
|
|
"src": "799:41:5",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 624,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "799:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 627,
|
|
"mutability": "mutable",
|
|
"name": "_emissionManager",
|
|
"nameLocation": "944:16:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2053,
|
|
"src": "927:33:5",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 626,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "927:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 632,
|
|
"mutability": "mutable",
|
|
"name": "_assets",
|
|
"nameLocation": "1104:7:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2053,
|
|
"src": "1048:63:5",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData)"
|
|
},
|
|
"typeName": {
|
|
"id": 631,
|
|
"keyName": "",
|
|
"keyNameLocation": "-1:-1:-1",
|
|
"keyType": {
|
|
"id": 628,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1056:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "1048:46:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData)"
|
|
},
|
|
"valueName": "",
|
|
"valueNameLocation": "-1:-1:-1",
|
|
"valueType": {
|
|
"id": 630,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 629,
|
|
"name": "RewardsDataTypes.AssetData",
|
|
"nameLocations": [
|
|
"1067:16:5",
|
|
"1084:9:5"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 2345,
|
|
"src": "1067:26:5"
|
|
},
|
|
"referencedDeclaration": 2345,
|
|
"src": "1067:26:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.AssetData"
|
|
}
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 636,
|
|
"mutability": "mutable",
|
|
"name": "_isRewardEnabled",
|
|
"nameLocation": "1206:16:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2053,
|
|
"src": "1172:50:5",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
|
|
"typeString": "mapping(address => bool)"
|
|
},
|
|
"typeName": {
|
|
"id": 635,
|
|
"keyName": "",
|
|
"keyNameLocation": "-1:-1:-1",
|
|
"keyType": {
|
|
"id": 633,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1180:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "1172:24:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
|
|
"typeString": "mapping(address => bool)"
|
|
},
|
|
"valueName": "",
|
|
"valueNameLocation": "-1:-1:-1",
|
|
"valueType": {
|
|
"id": 634,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1191:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 639,
|
|
"mutability": "mutable",
|
|
"name": "_rewardsList",
|
|
"nameLocation": "1267:12:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2053,
|
|
"src": "1248:31:5",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage",
|
|
"typeString": "address[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 637,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1248:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 638,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "1248:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
|
|
"typeString": "address[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 642,
|
|
"mutability": "mutable",
|
|
"name": "_assetsList",
|
|
"nameLocation": "1323:11:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2053,
|
|
"src": "1304:30:5",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage",
|
|
"typeString": "address[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 640,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1304:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 641,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "1304:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
|
|
"typeString": "address[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 653,
|
|
"nodeType": "Block",
|
|
"src": "1372:85:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 648,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"id": 645,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967281,
|
|
"src": "1387:3:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 646,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1391:6:5",
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"src": "1387:10:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"id": 647,
|
|
"name": "EMISSION_MANAGER",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 625,
|
|
"src": "1401:16:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "1387:30:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "4f4e4c595f454d495353494f4e5f4d414e41474552",
|
|
"id": 649,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1419:23:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_a28d34ff463a8cc689c6ec4b8c995983f85d0a40987242bc4cc3cec37303c18e",
|
|
"typeString": "literal_string \"ONLY_EMISSION_MANAGER\""
|
|
},
|
|
"value": "ONLY_EMISSION_MANAGER"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_a28d34ff463a8cc689c6ec4b8c995983f85d0a40987242bc4cc3cec37303c18e",
|
|
"typeString": "literal_string \"ONLY_EMISSION_MANAGER\""
|
|
}
|
|
],
|
|
"id": 644,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "1379:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 650,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1379:64:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 651,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1379:64:5"
|
|
},
|
|
{
|
|
"id": 652,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "1450:1:5"
|
|
}
|
|
]
|
|
},
|
|
"id": 654,
|
|
"name": "onlyEmissionManager",
|
|
"nameLocation": "1350:19:5",
|
|
"nodeType": "ModifierDefinition",
|
|
"parameters": {
|
|
"id": 643,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1369:2:5"
|
|
},
|
|
"src": "1341:116:5",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 663,
|
|
"nodeType": "Block",
|
|
"src": "1500:47:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 661,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 659,
|
|
"name": "EMISSION_MANAGER",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 625,
|
|
"src": "1507:16:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"id": 660,
|
|
"name": "emissionManager",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 656,
|
|
"src": "1526:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "1507:34:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 662,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1507:34:5"
|
|
}
|
|
]
|
|
},
|
|
"id": 664,
|
|
"implemented": true,
|
|
"kind": "constructor",
|
|
"modifiers": [],
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 657,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 656,
|
|
"mutability": "mutable",
|
|
"name": "emissionManager",
|
|
"nameLocation": "1483:15:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 664,
|
|
"src": "1475:23:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 655,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1475:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1474:25:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 658,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1500:0:5"
|
|
},
|
|
"scope": 2053,
|
|
"src": "1463:84:5",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
2148
|
|
],
|
|
"body": {
|
|
"id": 711,
|
|
"nodeType": "Block",
|
|
"src": "1728:243:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"components": [
|
|
{
|
|
"expression": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 681,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "1751:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 683,
|
|
"indexExpression": {
|
|
"id": 682,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 667,
|
|
"src": "1759:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1751:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 684,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1766:7:5",
|
|
"memberName": "rewards",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2336,
|
|
"src": "1751:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_RewardData_$2331_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.RewardData storage ref)"
|
|
}
|
|
},
|
|
"id": 686,
|
|
"indexExpression": {
|
|
"id": 685,
|
|
"name": "reward",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 669,
|
|
"src": "1774:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1751:30:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage ref"
|
|
}
|
|
},
|
|
"id": 687,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1782:5:5",
|
|
"memberName": "index",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2319,
|
|
"src": "1751:36:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint104",
|
|
"typeString": "uint104"
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 688,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "1796:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 690,
|
|
"indexExpression": {
|
|
"id": 689,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 667,
|
|
"src": "1804:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1796:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 691,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1811:7:5",
|
|
"memberName": "rewards",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2336,
|
|
"src": "1796:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_RewardData_$2331_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.RewardData storage ref)"
|
|
}
|
|
},
|
|
"id": 693,
|
|
"indexExpression": {
|
|
"id": 692,
|
|
"name": "reward",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 669,
|
|
"src": "1819:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1796:30:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage ref"
|
|
}
|
|
},
|
|
"id": 694,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1827:17:5",
|
|
"memberName": "emissionPerSecond",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2321,
|
|
"src": "1796:48:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 695,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "1853:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 697,
|
|
"indexExpression": {
|
|
"id": 696,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 667,
|
|
"src": "1861:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1853:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 698,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1868:7:5",
|
|
"memberName": "rewards",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2336,
|
|
"src": "1853:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_RewardData_$2331_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.RewardData storage ref)"
|
|
}
|
|
},
|
|
"id": 700,
|
|
"indexExpression": {
|
|
"id": 699,
|
|
"name": "reward",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 669,
|
|
"src": "1876:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1853:30:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage ref"
|
|
}
|
|
},
|
|
"id": 701,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1884:19:5",
|
|
"memberName": "lastUpdateTimestamp",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2323,
|
|
"src": "1853:50:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 702,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "1912:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 704,
|
|
"indexExpression": {
|
|
"id": 703,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 667,
|
|
"src": "1920:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1912:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 705,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1927:7:5",
|
|
"memberName": "rewards",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2336,
|
|
"src": "1912:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_RewardData_$2331_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.RewardData storage ref)"
|
|
}
|
|
},
|
|
"id": 707,
|
|
"indexExpression": {
|
|
"id": 706,
|
|
"name": "reward",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 669,
|
|
"src": "1935:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1912:30:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage ref"
|
|
}
|
|
},
|
|
"id": 708,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1943:15:5",
|
|
"memberName": "distributionEnd",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2325,
|
|
"src": "1912:46:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
}
|
|
],
|
|
"id": 709,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "1742:223:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint104_$_t_uint88_$_t_uint32_$_t_uint32_$",
|
|
"typeString": "tuple(uint104,uint88,uint32,uint32)"
|
|
}
|
|
},
|
|
"functionReturnParameters": 680,
|
|
"id": 710,
|
|
"nodeType": "Return",
|
|
"src": "1735:230:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 665,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1553:35:5",
|
|
"text": "@inheritdoc IRewardsDistributor"
|
|
},
|
|
"functionSelector": "7eff4ba8",
|
|
"id": 712,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getRewardsData",
|
|
"nameLocation": "1601:14:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": {
|
|
"id": 671,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "1674:8:5"
|
|
},
|
|
"parameters": {
|
|
"id": 670,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 667,
|
|
"mutability": "mutable",
|
|
"name": "asset",
|
|
"nameLocation": "1630:5:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 712,
|
|
"src": "1622:13:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 666,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1622:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 669,
|
|
"mutability": "mutable",
|
|
"name": "reward",
|
|
"nameLocation": "1650:6:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 712,
|
|
"src": "1642:14:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 668,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1642:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1615:46:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 680,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 673,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 712,
|
|
"src": "1692:7:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 672,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1692:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 675,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 712,
|
|
"src": "1701:7:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 674,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1701:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 677,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 712,
|
|
"src": "1710:7:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 676,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1710:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 679,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 712,
|
|
"src": "1719:7:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 678,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1719:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1691:36:5"
|
|
},
|
|
"scope": 2053,
|
|
"src": "1592:379:5",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
2160
|
|
],
|
|
"body": {
|
|
"id": 752,
|
|
"nodeType": "Block",
|
|
"src": "2135:254:5",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
729
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 729,
|
|
"mutability": "mutable",
|
|
"name": "rewardData",
|
|
"nameLocation": "2178:10:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 752,
|
|
"src": "2142:46:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "storage",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData"
|
|
},
|
|
"typeName": {
|
|
"id": 728,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 727,
|
|
"name": "RewardsDataTypes.RewardData",
|
|
"nameLocations": [
|
|
"2142:16:5",
|
|
"2159:10:5"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 2331,
|
|
"src": "2142:27:5"
|
|
},
|
|
"referencedDeclaration": 2331,
|
|
"src": "2142:27:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 736,
|
|
"initialValue": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 730,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "2191:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 732,
|
|
"indexExpression": {
|
|
"id": 731,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 715,
|
|
"src": "2199:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2191:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 733,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "2206:7:5",
|
|
"memberName": "rewards",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2336,
|
|
"src": "2191:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_RewardData_$2331_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.RewardData storage ref)"
|
|
}
|
|
},
|
|
"id": 735,
|
|
"indexExpression": {
|
|
"id": 734,
|
|
"name": "reward",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 717,
|
|
"src": "2214:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2191:30:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage ref"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2142:79:5"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 738,
|
|
"name": "rewardData",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 729,
|
|
"src": "2267:10:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
{
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 740,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 715,
|
|
"src": "2308:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 739,
|
|
"name": "IScaledBalanceToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 554,
|
|
"src": "2288:19:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_IScaledBalanceToken_$554_$",
|
|
"typeString": "type(contract IScaledBalanceToken)"
|
|
}
|
|
},
|
|
"id": 741,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2288:26:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IScaledBalanceToken_$554",
|
|
"typeString": "contract IScaledBalanceToken"
|
|
}
|
|
},
|
|
"id": 742,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "2315:17:5",
|
|
"memberName": "scaledTotalSupply",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 545,
|
|
"src": "2288:44:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
|
|
"typeString": "function () view external returns (uint256)"
|
|
}
|
|
},
|
|
"id": 743,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2288:46:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 749,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "3130",
|
|
"id": 744,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2345:2:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "**",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 745,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "2351:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 747,
|
|
"indexExpression": {
|
|
"id": 746,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 715,
|
|
"src": "2359:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2351:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 748,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "2366:8:5",
|
|
"memberName": "decimals",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2344,
|
|
"src": "2351:23:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"src": "2345:29:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 737,
|
|
"name": "_getAssetIndex",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2016,
|
|
"src": "2242:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_struct$_RewardData_$2331_storage_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_uint256_$",
|
|
"typeString": "function (struct RewardsDataTypes.RewardData storage pointer,uint256,uint256) view returns (uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 750,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2242:141:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
|
|
"typeString": "tuple(uint256,uint256)"
|
|
}
|
|
},
|
|
"functionReturnParameters": 724,
|
|
"id": 751,
|
|
"nodeType": "Return",
|
|
"src": "2228:155:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 713,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1977:35:5",
|
|
"text": "@inheritdoc IRewardsDistributor"
|
|
},
|
|
"functionSelector": "886fe70b",
|
|
"id": 753,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getAssetIndex",
|
|
"nameLocation": "2025:13:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": {
|
|
"id": 719,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "2099:8:5"
|
|
},
|
|
"parameters": {
|
|
"id": 718,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 715,
|
|
"mutability": "mutable",
|
|
"name": "asset",
|
|
"nameLocation": "2053:5:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 753,
|
|
"src": "2045:13:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 714,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2045:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 717,
|
|
"mutability": "mutable",
|
|
"name": "reward",
|
|
"nameLocation": "2073:6:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 753,
|
|
"src": "2065:14:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 716,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2065:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2038:46:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 724,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 721,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 753,
|
|
"src": "2117:7:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 720,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2117:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 723,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 753,
|
|
"src": "2126:7:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 722,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2126:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2116:18:5"
|
|
},
|
|
"scope": 2053,
|
|
"src": "2016:373:5",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
2120
|
|
],
|
|
"body": {
|
|
"id": 772,
|
|
"nodeType": "Block",
|
|
"src": "2549:66:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 764,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "2563:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 766,
|
|
"indexExpression": {
|
|
"id": 765,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 756,
|
|
"src": "2571:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2563:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 767,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "2578:7:5",
|
|
"memberName": "rewards",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2336,
|
|
"src": "2563:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_RewardData_$2331_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.RewardData storage ref)"
|
|
}
|
|
},
|
|
"id": 769,
|
|
"indexExpression": {
|
|
"id": 768,
|
|
"name": "reward",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 758,
|
|
"src": "2586:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2563:30:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage ref"
|
|
}
|
|
},
|
|
"id": 770,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "2594:15:5",
|
|
"memberName": "distributionEnd",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2325,
|
|
"src": "2563:46:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"functionReturnParameters": 763,
|
|
"id": 771,
|
|
"nodeType": "Return",
|
|
"src": "2556:53:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 754,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2395:35:5",
|
|
"text": "@inheritdoc IRewardsDistributor"
|
|
},
|
|
"functionSelector": "1b839c77",
|
|
"id": 773,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getDistributionEnd",
|
|
"nameLocation": "2443:18:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": {
|
|
"id": 760,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "2522:8:5"
|
|
},
|
|
"parameters": {
|
|
"id": 759,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 756,
|
|
"mutability": "mutable",
|
|
"name": "asset",
|
|
"nameLocation": "2476:5:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 773,
|
|
"src": "2468:13:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 755,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2468:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 758,
|
|
"mutability": "mutable",
|
|
"name": "reward",
|
|
"nameLocation": "2496:6:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 773,
|
|
"src": "2488:14:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 757,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2488:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2461:46:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 763,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 762,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 773,
|
|
"src": "2540:7:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 761,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2540:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2539:9:5"
|
|
},
|
|
"scope": 2053,
|
|
"src": "2434:181:5",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
2169
|
|
],
|
|
"body": {
|
|
"id": 826,
|
|
"nodeType": "Block",
|
|
"src": "2752:296:5",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
784
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 784,
|
|
"mutability": "mutable",
|
|
"name": "rewardsCount",
|
|
"nameLocation": "2767:12:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 826,
|
|
"src": "2759:20:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
},
|
|
"typeName": {
|
|
"id": 783,
|
|
"name": "uint128",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2759:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 789,
|
|
"initialValue": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 785,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "2782:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 787,
|
|
"indexExpression": {
|
|
"id": 786,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 776,
|
|
"src": "2790:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2782:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 788,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "2797:21:5",
|
|
"memberName": "availableRewardsCount",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2342,
|
|
"src": "2782:36:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2759:59:5"
|
|
},
|
|
{
|
|
"assignments": [
|
|
794
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 794,
|
|
"mutability": "mutable",
|
|
"name": "availableRewards",
|
|
"nameLocation": "2842:16:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 826,
|
|
"src": "2825:33:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
|
"typeString": "address[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 792,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2825:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 793,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "2825:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
|
|
"typeString": "address[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 800,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"id": 798,
|
|
"name": "rewardsCount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 784,
|
|
"src": "2875:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
],
|
|
"id": 797,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "NewExpression",
|
|
"src": "2861:13:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$",
|
|
"typeString": "function (uint256) pure returns (address[] memory)"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 795,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2865:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 796,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "2865:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
|
|
"typeString": "address[]"
|
|
}
|
|
}
|
|
},
|
|
"id": 799,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2861:27:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
|
"typeString": "address[] memory"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2825:63:5"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 822,
|
|
"nodeType": "Block",
|
|
"src": "2940:73:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 820,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"baseExpression": {
|
|
"id": 811,
|
|
"name": "availableRewards",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 794,
|
|
"src": "2949:16:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
|
"typeString": "address[] memory"
|
|
}
|
|
},
|
|
"id": 813,
|
|
"indexExpression": {
|
|
"id": 812,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 802,
|
|
"src": "2966:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2949:19:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 814,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "2971:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 816,
|
|
"indexExpression": {
|
|
"id": 815,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 776,
|
|
"src": "2979:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2971:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 817,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "2986:16:5",
|
|
"memberName": "availableRewards",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2340,
|
|
"src": "2971:31:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_uint128_$_t_address_$",
|
|
"typeString": "mapping(uint128 => address)"
|
|
}
|
|
},
|
|
"id": 819,
|
|
"indexExpression": {
|
|
"id": 818,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 802,
|
|
"src": "3003:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2971:34:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "2949:56:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 821,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2949:56:5"
|
|
}
|
|
]
|
|
},
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
},
|
|
"id": 807,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 805,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 802,
|
|
"src": "2917:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"id": 806,
|
|
"name": "rewardsCount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 784,
|
|
"src": "2921:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"src": "2917:16:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 823,
|
|
"initializationExpression": {
|
|
"assignments": [
|
|
802
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 802,
|
|
"mutability": "mutable",
|
|
"name": "i",
|
|
"nameLocation": "2910:1:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 823,
|
|
"src": "2902:9:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
},
|
|
"typeName": {
|
|
"id": 801,
|
|
"name": "uint128",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2902:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 804,
|
|
"initialValue": {
|
|
"hexValue": "30",
|
|
"id": 803,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2914:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2902:13:5"
|
|
},
|
|
"isSimpleCounterLoop": true,
|
|
"loopExpression": {
|
|
"expression": {
|
|
"id": 809,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "UnaryOperation",
|
|
"operator": "++",
|
|
"prefix": false,
|
|
"src": "2935:3:5",
|
|
"subExpression": {
|
|
"id": 808,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 802,
|
|
"src": "2935:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"id": 810,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2935:3:5"
|
|
},
|
|
"nodeType": "ForStatement",
|
|
"src": "2897:116:5"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 824,
|
|
"name": "availableRewards",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 794,
|
|
"src": "3026:16:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
|
"typeString": "address[] memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 782,
|
|
"id": 825,
|
|
"nodeType": "Return",
|
|
"src": "3019:23:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 774,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2621:35:5",
|
|
"text": "@inheritdoc IRewardsDistributor"
|
|
},
|
|
"functionSelector": "6657732f",
|
|
"id": 827,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getRewardsByAsset",
|
|
"nameLocation": "2669:17:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": {
|
|
"id": 778,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "2716:8:5"
|
|
},
|
|
"parameters": {
|
|
"id": 777,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 776,
|
|
"mutability": "mutable",
|
|
"name": "asset",
|
|
"nameLocation": "2695:5:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 827,
|
|
"src": "2687:13:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 775,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2687:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2686:15:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 782,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 781,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 827,
|
|
"src": "2734:16:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
|
"typeString": "address[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 779,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2734:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 780,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "2734:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
|
|
"typeString": "address[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2733:18:5"
|
|
},
|
|
"scope": 2053,
|
|
"src": "2660:388:5",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
2176
|
|
],
|
|
"body": {
|
|
"id": 837,
|
|
"nodeType": "Block",
|
|
"src": "3169:32:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 835,
|
|
"name": "_rewardsList",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 639,
|
|
"src": "3183:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage",
|
|
"typeString": "address[] storage ref"
|
|
}
|
|
},
|
|
"functionReturnParameters": 834,
|
|
"id": 836,
|
|
"nodeType": "Return",
|
|
"src": "3176:19:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 828,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "3054:35:5",
|
|
"text": "@inheritdoc IRewardsDistributor"
|
|
},
|
|
"functionSelector": "b45ac1a9",
|
|
"id": 838,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getRewardsList",
|
|
"nameLocation": "3102:14:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": {
|
|
"id": 830,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "3133:8:5"
|
|
},
|
|
"parameters": {
|
|
"id": 829,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "3116:2:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 834,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 833,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 838,
|
|
"src": "3151:16:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
|
"typeString": "address[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 831,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3151:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 832,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "3151:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
|
|
"typeString": "address[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3150:18:5"
|
|
},
|
|
"scope": 2053,
|
|
"src": "3093:108:5",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
2132
|
|
],
|
|
"body": {
|
|
"id": 862,
|
|
"nodeType": "Block",
|
|
"src": "3377:72:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 851,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "3391:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 853,
|
|
"indexExpression": {
|
|
"id": 852,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 843,
|
|
"src": "3399:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3391:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 854,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "3406:7:5",
|
|
"memberName": "rewards",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2336,
|
|
"src": "3391:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_RewardData_$2331_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.RewardData storage ref)"
|
|
}
|
|
},
|
|
"id": 856,
|
|
"indexExpression": {
|
|
"id": 855,
|
|
"name": "reward",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 845,
|
|
"src": "3414:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3391:30:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage ref"
|
|
}
|
|
},
|
|
"id": 857,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "3422:9:5",
|
|
"memberName": "usersData",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2330,
|
|
"src": "3391:40:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_UserData_$2317_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.UserData storage ref)"
|
|
}
|
|
},
|
|
"id": 859,
|
|
"indexExpression": {
|
|
"id": 858,
|
|
"name": "user",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 841,
|
|
"src": "3432:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3391:46:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserData_$2317_storage",
|
|
"typeString": "struct RewardsDataTypes.UserData storage ref"
|
|
}
|
|
},
|
|
"id": 860,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "3438:5:5",
|
|
"memberName": "index",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2314,
|
|
"src": "3391:52:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint104",
|
|
"typeString": "uint104"
|
|
}
|
|
},
|
|
"functionReturnParameters": 850,
|
|
"id": 861,
|
|
"nodeType": "Return",
|
|
"src": "3384:59:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 839,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "3207:35:5",
|
|
"text": "@inheritdoc IRewardsDistributor"
|
|
},
|
|
"functionSelector": "533f542a",
|
|
"id": 863,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getUserAssetIndex",
|
|
"nameLocation": "3255:17:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": {
|
|
"id": 847,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "3350:8:5"
|
|
},
|
|
"parameters": {
|
|
"id": 846,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 841,
|
|
"mutability": "mutable",
|
|
"name": "user",
|
|
"nameLocation": "3287:4:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 863,
|
|
"src": "3279:12:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 840,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3279:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 843,
|
|
"mutability": "mutable",
|
|
"name": "asset",
|
|
"nameLocation": "3306:5:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 863,
|
|
"src": "3298:13:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 842,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3298:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 845,
|
|
"mutability": "mutable",
|
|
"name": "reward",
|
|
"nameLocation": "3326:6:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 863,
|
|
"src": "3318:14:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 844,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3318:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3272:65:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 850,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 849,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 863,
|
|
"src": "3368:7:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 848,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3368:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3367:9:5"
|
|
},
|
|
"scope": 2053,
|
|
"src": "3246:203:5",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
2186
|
|
],
|
|
"body": {
|
|
"id": 907,
|
|
"nodeType": "Block",
|
|
"src": "3611:212:5",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
875
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 875,
|
|
"mutability": "mutable",
|
|
"name": "totalAccrued",
|
|
"nameLocation": "3626:12:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 907,
|
|
"src": "3618:20:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 874,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3618:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 876,
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "3618:20:5"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 903,
|
|
"nodeType": "Block",
|
|
"src": "3694:96:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 901,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 888,
|
|
"name": "totalAccrued",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 875,
|
|
"src": "3703:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 889,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "3719:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 893,
|
|
"indexExpression": {
|
|
"baseExpression": {
|
|
"id": 890,
|
|
"name": "_assetsList",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 642,
|
|
"src": "3727:11:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage",
|
|
"typeString": "address[] storage ref"
|
|
}
|
|
},
|
|
"id": 892,
|
|
"indexExpression": {
|
|
"id": 891,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 878,
|
|
"src": "3739:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3727:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3719:23:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 894,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "3743:7:5",
|
|
"memberName": "rewards",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2336,
|
|
"src": "3719:31:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_RewardData_$2331_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.RewardData storage ref)"
|
|
}
|
|
},
|
|
"id": 896,
|
|
"indexExpression": {
|
|
"id": 895,
|
|
"name": "reward",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 868,
|
|
"src": "3751:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3719:39:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage ref"
|
|
}
|
|
},
|
|
"id": 897,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "3759:9:5",
|
|
"memberName": "usersData",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2330,
|
|
"src": "3719:49:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_UserData_$2317_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.UserData storage ref)"
|
|
}
|
|
},
|
|
"id": 899,
|
|
"indexExpression": {
|
|
"id": 898,
|
|
"name": "user",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 866,
|
|
"src": "3769:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3719:55:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserData_$2317_storage",
|
|
"typeString": "struct RewardsDataTypes.UserData storage ref"
|
|
}
|
|
},
|
|
"id": 900,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "3775:7:5",
|
|
"memberName": "accrued",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2316,
|
|
"src": "3719:63:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"src": "3703:79:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 902,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3703:79:5"
|
|
}
|
|
]
|
|
},
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 884,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 881,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 878,
|
|
"src": "3665:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"id": 882,
|
|
"name": "_assetsList",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 642,
|
|
"src": "3669:11:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage",
|
|
"typeString": "address[] storage ref"
|
|
}
|
|
},
|
|
"id": 883,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "3681:6:5",
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"src": "3669:18:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3665:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 904,
|
|
"initializationExpression": {
|
|
"assignments": [
|
|
878
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 878,
|
|
"mutability": "mutable",
|
|
"name": "i",
|
|
"nameLocation": "3658:1:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 904,
|
|
"src": "3650:9:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 877,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3650:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 880,
|
|
"initialValue": {
|
|
"hexValue": "30",
|
|
"id": 879,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3662:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "3650:13:5"
|
|
},
|
|
"isSimpleCounterLoop": true,
|
|
"loopExpression": {
|
|
"expression": {
|
|
"id": 886,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "UnaryOperation",
|
|
"operator": "++",
|
|
"prefix": false,
|
|
"src": "3689:3:5",
|
|
"subExpression": {
|
|
"id": 885,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 878,
|
|
"src": "3689:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 887,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3689:3:5"
|
|
},
|
|
"nodeType": "ForStatement",
|
|
"src": "3645:145:5"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 905,
|
|
"name": "totalAccrued",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 875,
|
|
"src": "3805:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 873,
|
|
"id": 906,
|
|
"nodeType": "Return",
|
|
"src": "3798:19:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 864,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "3455:35:5",
|
|
"text": "@inheritdoc IRewardsDistributor"
|
|
},
|
|
"functionSelector": "b022418c",
|
|
"id": 908,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getUserAccruedRewards",
|
|
"nameLocation": "3503:21:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": {
|
|
"id": 870,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "3584:8:5"
|
|
},
|
|
"parameters": {
|
|
"id": 869,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 866,
|
|
"mutability": "mutable",
|
|
"name": "user",
|
|
"nameLocation": "3539:4:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 908,
|
|
"src": "3531:12:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 865,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3531:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 868,
|
|
"mutability": "mutable",
|
|
"name": "reward",
|
|
"nameLocation": "3558:6:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 908,
|
|
"src": "3550:14:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 867,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3550:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3524:45:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 873,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 872,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 908,
|
|
"src": "3602:7:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 871,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3602:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3601:9:5"
|
|
},
|
|
"scope": 2053,
|
|
"src": "3494:329:5",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
2199
|
|
],
|
|
"body": {
|
|
"id": 931,
|
|
"nodeType": "Block",
|
|
"src": "4010:85:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 923,
|
|
"name": "user",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 914,
|
|
"src": "4039:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 924,
|
|
"name": "reward",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 916,
|
|
"src": "4045:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"id": 926,
|
|
"name": "assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 912,
|
|
"src": "4075:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr",
|
|
"typeString": "address[] calldata"
|
|
}
|
|
},
|
|
{
|
|
"id": 927,
|
|
"name": "user",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 914,
|
|
"src": "4083:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr",
|
|
"typeString": "address[] calldata"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 925,
|
|
"name": "_getUserAssetBalances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2029,
|
|
"src": "4053:21:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_array$_t_address_$dyn_calldata_ptr_$_t_address_$returns$_t_array$_t_struct$_UserAssetBalance_$2312_memory_ptr_$dyn_memory_ptr_$",
|
|
"typeString": "function (address[] calldata,address) view returns (struct RewardsDataTypes.UserAssetBalance memory[] memory)"
|
|
}
|
|
},
|
|
"id": 928,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4053:35:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_UserAssetBalance_$2312_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory[] memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_array$_t_struct$_UserAssetBalance_$2312_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory[] memory"
|
|
}
|
|
],
|
|
"id": 922,
|
|
"name": "_getUserReward",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1840,
|
|
"src": "4024:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$_t_array$_t_struct$_UserAssetBalance_$2312_memory_ptr_$dyn_memory_ptr_$returns$_t_uint256_$",
|
|
"typeString": "function (address,address,struct RewardsDataTypes.UserAssetBalance memory[] memory) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 929,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4024:65:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 921,
|
|
"id": 930,
|
|
"nodeType": "Return",
|
|
"src": "4017:72:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 909,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "3829:35:5",
|
|
"text": "@inheritdoc IRewardsDistributor"
|
|
},
|
|
"functionSelector": "70674ab9",
|
|
"id": 932,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getUserRewards",
|
|
"nameLocation": "3877:14:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": {
|
|
"id": 918,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "3983:8:5"
|
|
},
|
|
"parameters": {
|
|
"id": 917,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 912,
|
|
"mutability": "mutable",
|
|
"name": "assets",
|
|
"nameLocation": "3917:6:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 932,
|
|
"src": "3898:25:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "calldata",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr",
|
|
"typeString": "address[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 910,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3898:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 911,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "3898:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
|
|
"typeString": "address[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 914,
|
|
"mutability": "mutable",
|
|
"name": "user",
|
|
"nameLocation": "3938:4:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 932,
|
|
"src": "3930:12:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 913,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3930:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 916,
|
|
"mutability": "mutable",
|
|
"name": "reward",
|
|
"nameLocation": "3957:6:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 932,
|
|
"src": "3949:14:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 915,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3949:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3891:77:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 921,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 920,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 932,
|
|
"src": "4001:7:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 919,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4001:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4000:9:5"
|
|
},
|
|
"scope": 2053,
|
|
"src": "3868:227:5",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
2214
|
|
],
|
|
"body": {
|
|
"id": 1058,
|
|
"nodeType": "Block",
|
|
"src": "4343:870:5",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
953
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 953,
|
|
"mutability": "mutable",
|
|
"name": "userAssetBalances",
|
|
"nameLocation": "4393:17:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1058,
|
|
"src": "4350:60:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_UserAssetBalance_$2312_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 951,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 950,
|
|
"name": "RewardsDataTypes.UserAssetBalance",
|
|
"nameLocations": [
|
|
"4350:16:5",
|
|
"4367:16:5"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 2312,
|
|
"src": "4350:33:5"
|
|
},
|
|
"referencedDeclaration": 2312,
|
|
"src": "4350:33:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserAssetBalance_$2312_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance"
|
|
}
|
|
},
|
|
"id": 952,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "4350:35:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_UserAssetBalance_$2312_storage_$dyn_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 958,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"id": 955,
|
|
"name": "assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 936,
|
|
"src": "4443:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr",
|
|
"typeString": "address[] calldata"
|
|
}
|
|
},
|
|
{
|
|
"id": 956,
|
|
"name": "user",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 938,
|
|
"src": "4458:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr",
|
|
"typeString": "address[] calldata"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 954,
|
|
"name": "_getUserAssetBalances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2029,
|
|
"src": "4413:21:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_array$_t_address_$dyn_calldata_ptr_$_t_address_$returns$_t_array$_t_struct$_UserAssetBalance_$2312_memory_ptr_$dyn_memory_ptr_$",
|
|
"typeString": "function (address[] calldata,address) view returns (struct RewardsDataTypes.UserAssetBalance memory[] memory)"
|
|
}
|
|
},
|
|
"id": 957,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4413:56:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_UserAssetBalance_$2312_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory[] memory"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "4350:119:5"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 966,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 959,
|
|
"name": "rewardsList",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 943,
|
|
"src": "4476:11:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
|
"typeString": "address[] memory"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"arguments": [
|
|
{
|
|
"expression": {
|
|
"id": 963,
|
|
"name": "_rewardsList",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 639,
|
|
"src": "4504:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage",
|
|
"typeString": "address[] storage ref"
|
|
}
|
|
},
|
|
"id": 964,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "4517:6:5",
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"src": "4504:19:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 962,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "NewExpression",
|
|
"src": "4490:13:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$",
|
|
"typeString": "function (uint256) pure returns (address[] memory)"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 960,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4494:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 961,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "4494:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
|
|
"typeString": "address[]"
|
|
}
|
|
}
|
|
},
|
|
"id": 965,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4490:34:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
|
"typeString": "address[] memory"
|
|
}
|
|
},
|
|
"src": "4476:48:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
|
"typeString": "address[] memory"
|
|
}
|
|
},
|
|
"id": 967,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4476:48:5"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 975,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 968,
|
|
"name": "unclaimedAmounts",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 946,
|
|
"src": "4531:16:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
|
"typeString": "uint256[] memory"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"arguments": [
|
|
{
|
|
"expression": {
|
|
"id": 972,
|
|
"name": "rewardsList",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 943,
|
|
"src": "4564:11:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
|
"typeString": "address[] memory"
|
|
}
|
|
},
|
|
"id": 973,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "4576:6:5",
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"src": "4564:18:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 971,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "NewExpression",
|
|
"src": "4550:13:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
|
|
"typeString": "function (uint256) pure returns (uint256[] memory)"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 969,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4554:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 970,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "4554:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
|
|
"typeString": "uint256[]"
|
|
}
|
|
}
|
|
},
|
|
"id": 974,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4550:33:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
|
"typeString": "uint256[] memory"
|
|
}
|
|
},
|
|
"src": "4531:52:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
|
"typeString": "uint256[] memory"
|
|
}
|
|
},
|
|
"id": 976,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4531:52:5"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1052,
|
|
"nodeType": "Block",
|
|
"src": "4708:455:5",
|
|
"statements": [
|
|
{
|
|
"body": {
|
|
"id": 1050,
|
|
"nodeType": "Block",
|
|
"src": "4766:390:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 1005,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"baseExpression": {
|
|
"id": 999,
|
|
"name": "rewardsList",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 943,
|
|
"src": "4777:11:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
|
"typeString": "address[] memory"
|
|
}
|
|
},
|
|
"id": 1001,
|
|
"indexExpression": {
|
|
"id": 1000,
|
|
"name": "r",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 989,
|
|
"src": "4789:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "4777:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"baseExpression": {
|
|
"id": 1002,
|
|
"name": "_rewardsList",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 639,
|
|
"src": "4794:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage",
|
|
"typeString": "address[] storage ref"
|
|
}
|
|
},
|
|
"id": 1004,
|
|
"indexExpression": {
|
|
"id": 1003,
|
|
"name": "r",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 989,
|
|
"src": "4807:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "4794:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "4777:32:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 1006,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4777:32:5"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 1025,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"baseExpression": {
|
|
"id": 1007,
|
|
"name": "unclaimedAmounts",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 946,
|
|
"src": "4820:16:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
|
"typeString": "uint256[] memory"
|
|
}
|
|
},
|
|
"id": 1009,
|
|
"indexExpression": {
|
|
"id": 1008,
|
|
"name": "r",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 989,
|
|
"src": "4837:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "4820:19:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1010,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "4843:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 1015,
|
|
"indexExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1011,
|
|
"name": "userAssetBalances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 953,
|
|
"src": "4851:17:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_UserAssetBalance_$2312_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory[] memory"
|
|
}
|
|
},
|
|
"id": 1013,
|
|
"indexExpression": {
|
|
"id": 1012,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 978,
|
|
"src": "4869:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "4851:20:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserAssetBalance_$2312_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory"
|
|
}
|
|
},
|
|
"id": 1014,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "4872:5:5",
|
|
"memberName": "asset",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2307,
|
|
"src": "4851:26:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "4843:35:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 1016,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "4891:7:5",
|
|
"memberName": "rewards",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2336,
|
|
"src": "4843:55:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_RewardData_$2331_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.RewardData storage ref)"
|
|
}
|
|
},
|
|
"id": 1020,
|
|
"indexExpression": {
|
|
"baseExpression": {
|
|
"id": 1017,
|
|
"name": "rewardsList",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 943,
|
|
"src": "4899:11:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
|
"typeString": "address[] memory"
|
|
}
|
|
},
|
|
"id": 1019,
|
|
"indexExpression": {
|
|
"id": 1018,
|
|
"name": "r",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 989,
|
|
"src": "4911:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "4899:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "4843:71:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage ref"
|
|
}
|
|
},
|
|
"id": 1021,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "4927:9:5",
|
|
"memberName": "usersData",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2330,
|
|
"src": "4843:93:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_UserData_$2317_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.UserData storage ref)"
|
|
}
|
|
},
|
|
"id": 1023,
|
|
"indexExpression": {
|
|
"id": 1022,
|
|
"name": "user",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 938,
|
|
"src": "4937:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "4843:99:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserData_$2317_storage",
|
|
"typeString": "struct RewardsDataTypes.UserData storage ref"
|
|
}
|
|
},
|
|
"id": 1024,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "4955:7:5",
|
|
"memberName": "accrued",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2316,
|
|
"src": "4843:119:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"src": "4820:142:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1026,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4820:142:5"
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1032,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1027,
|
|
"name": "userAssetBalances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 953,
|
|
"src": "4979:17:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_UserAssetBalance_$2312_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory[] memory"
|
|
}
|
|
},
|
|
"id": 1029,
|
|
"indexExpression": {
|
|
"id": 1028,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 978,
|
|
"src": "4997:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "4979:20:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserAssetBalance_$2312_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory"
|
|
}
|
|
},
|
|
"id": 1030,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "5000:11:5",
|
|
"memberName": "userBalance",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2309,
|
|
"src": "4979:32:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 1031,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "5015:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "4979:37:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 1035,
|
|
"nodeType": "IfStatement",
|
|
"src": "4975:76:5",
|
|
"trueBody": {
|
|
"id": 1034,
|
|
"nodeType": "Block",
|
|
"src": "5018:33:5",
|
|
"statements": [
|
|
{
|
|
"id": 1033,
|
|
"nodeType": "Continue",
|
|
"src": "5031:8:5"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 1048,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"baseExpression": {
|
|
"id": 1036,
|
|
"name": "unclaimedAmounts",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 946,
|
|
"src": "5061:16:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
|
"typeString": "uint256[] memory"
|
|
}
|
|
},
|
|
"id": 1038,
|
|
"indexExpression": {
|
|
"id": 1037,
|
|
"name": "r",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 989,
|
|
"src": "5078:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "5061:19:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"arguments": [
|
|
{
|
|
"id": 1040,
|
|
"name": "user",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 938,
|
|
"src": "5103:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"baseExpression": {
|
|
"id": 1041,
|
|
"name": "rewardsList",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 943,
|
|
"src": "5109:11:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
|
"typeString": "address[] memory"
|
|
}
|
|
},
|
|
"id": 1043,
|
|
"indexExpression": {
|
|
"id": 1042,
|
|
"name": "r",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 989,
|
|
"src": "5121:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "5109:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"baseExpression": {
|
|
"id": 1044,
|
|
"name": "userAssetBalances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 953,
|
|
"src": "5125:17:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_UserAssetBalance_$2312_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory[] memory"
|
|
}
|
|
},
|
|
"id": 1046,
|
|
"indexExpression": {
|
|
"id": 1045,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 978,
|
|
"src": "5143:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "5125:20:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserAssetBalance_$2312_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_struct$_UserAssetBalance_$2312_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory"
|
|
}
|
|
],
|
|
"id": 1039,
|
|
"name": "_getPendingRewards",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1898,
|
|
"src": "5084:18:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$_t_struct$_UserAssetBalance_$2312_memory_ptr_$returns$_t_uint256_$",
|
|
"typeString": "function (address,address,struct RewardsDataTypes.UserAssetBalance memory) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1047,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5084:62:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "5061:85:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1049,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "5061:85:5"
|
|
}
|
|
]
|
|
},
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 995,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 992,
|
|
"name": "r",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 989,
|
|
"src": "4737:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"id": 993,
|
|
"name": "rewardsList",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 943,
|
|
"src": "4741:11:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
|
"typeString": "address[] memory"
|
|
}
|
|
},
|
|
"id": 994,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "4753:6:5",
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"src": "4741:18:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4737:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 1051,
|
|
"initializationExpression": {
|
|
"assignments": [
|
|
989
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 989,
|
|
"mutability": "mutable",
|
|
"name": "r",
|
|
"nameLocation": "4730:1:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1051,
|
|
"src": "4722:9:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 988,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4722:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 991,
|
|
"initialValue": {
|
|
"hexValue": "30",
|
|
"id": 990,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4734:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "4722:13:5"
|
|
},
|
|
"isSimpleCounterLoop": true,
|
|
"loopExpression": {
|
|
"expression": {
|
|
"id": 997,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "UnaryOperation",
|
|
"operator": "++",
|
|
"prefix": false,
|
|
"src": "4761:3:5",
|
|
"subExpression": {
|
|
"id": 996,
|
|
"name": "r",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 989,
|
|
"src": "4761:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 998,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4761:3:5"
|
|
},
|
|
"nodeType": "ForStatement",
|
|
"src": "4717:439:5"
|
|
}
|
|
]
|
|
},
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 984,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 981,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 978,
|
|
"src": "4673:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"id": 982,
|
|
"name": "userAssetBalances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 953,
|
|
"src": "4677:17:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_UserAssetBalance_$2312_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory[] memory"
|
|
}
|
|
},
|
|
"id": 983,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "4695:6:5",
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"src": "4677:24:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "4673:28:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 1053,
|
|
"initializationExpression": {
|
|
"assignments": [
|
|
978
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 978,
|
|
"mutability": "mutable",
|
|
"name": "i",
|
|
"nameLocation": "4666:1:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1053,
|
|
"src": "4658:9:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 977,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4658:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 980,
|
|
"initialValue": {
|
|
"hexValue": "30",
|
|
"id": 979,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4670:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "4658:13:5"
|
|
},
|
|
"isSimpleCounterLoop": true,
|
|
"loopExpression": {
|
|
"expression": {
|
|
"id": 986,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "UnaryOperation",
|
|
"operator": "++",
|
|
"prefix": false,
|
|
"src": "4703:3:5",
|
|
"subExpression": {
|
|
"id": 985,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 978,
|
|
"src": "4703:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 987,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4703:3:5"
|
|
},
|
|
"nodeType": "ForStatement",
|
|
"src": "4653:510:5"
|
|
},
|
|
{
|
|
"expression": {
|
|
"components": [
|
|
{
|
|
"id": 1054,
|
|
"name": "rewardsList",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 943,
|
|
"src": "5177:11:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
|
"typeString": "address[] memory"
|
|
}
|
|
},
|
|
{
|
|
"id": 1055,
|
|
"name": "unclaimedAmounts",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 946,
|
|
"src": "5190:16:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
|
"typeString": "uint256[] memory"
|
|
}
|
|
}
|
|
],
|
|
"id": 1056,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "5176:31:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
|
|
"typeString": "tuple(address[] memory,uint256[] memory)"
|
|
}
|
|
},
|
|
"functionReturnParameters": 947,
|
|
"id": 1057,
|
|
"nodeType": "Return",
|
|
"src": "5169:38:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 933,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "4101:35:5",
|
|
"text": "@inheritdoc IRewardsDistributor"
|
|
},
|
|
"functionSelector": "4c0369c3",
|
|
"id": 1059,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getAllUserRewards",
|
|
"nameLocation": "4149:17:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": {
|
|
"id": 940,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "4252:8:5"
|
|
},
|
|
"parameters": {
|
|
"id": 939,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 936,
|
|
"mutability": "mutable",
|
|
"name": "assets",
|
|
"nameLocation": "4192:6:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1059,
|
|
"src": "4173:25:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "calldata",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr",
|
|
"typeString": "address[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 934,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4173:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 935,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "4173:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
|
|
"typeString": "address[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 938,
|
|
"mutability": "mutable",
|
|
"name": "user",
|
|
"nameLocation": "4213:4:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1059,
|
|
"src": "4205:12:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 937,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4205:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4166:56:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 947,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 943,
|
|
"mutability": "mutable",
|
|
"name": "rewardsList",
|
|
"nameLocation": "4292:11:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1059,
|
|
"src": "4275:28:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
|
"typeString": "address[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 941,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4275:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 942,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "4275:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
|
|
"typeString": "address[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 946,
|
|
"mutability": "mutable",
|
|
"name": "unclaimedAmounts",
|
|
"nameLocation": "4322:16:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1059,
|
|
"src": "4305:33:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
|
"typeString": "uint256[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 944,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4305:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 945,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "4305:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
|
|
"typeString": "uint256[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4274:65:5"
|
|
},
|
|
"scope": 2053,
|
|
"src": "4140:1073:5",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
2098
|
|
],
|
|
"body": {
|
|
"id": 1120,
|
|
"nodeType": "Block",
|
|
"src": "5402:443:5",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
1073
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1073,
|
|
"mutability": "mutable",
|
|
"name": "oldDistributionEnd",
|
|
"nameLocation": "5417:18:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1120,
|
|
"src": "5409:26:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1072,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5409:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1081,
|
|
"initialValue": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1074,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "5438:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 1076,
|
|
"indexExpression": {
|
|
"id": 1075,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1062,
|
|
"src": "5446:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "5438:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 1077,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "5453:7:5",
|
|
"memberName": "rewards",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2336,
|
|
"src": "5438:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_RewardData_$2331_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.RewardData storage ref)"
|
|
}
|
|
},
|
|
"id": 1079,
|
|
"indexExpression": {
|
|
"id": 1078,
|
|
"name": "reward",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1064,
|
|
"src": "5461:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "5438:30:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage ref"
|
|
}
|
|
},
|
|
"id": 1080,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "5469:15:5",
|
|
"memberName": "distributionEnd",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2325,
|
|
"src": "5438:46:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "5409:75:5"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 1090,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1082,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "5491:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 1084,
|
|
"indexExpression": {
|
|
"id": 1083,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1062,
|
|
"src": "5499:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "5491:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 1085,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "5506:7:5",
|
|
"memberName": "rewards",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2336,
|
|
"src": "5491:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_RewardData_$2331_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.RewardData storage ref)"
|
|
}
|
|
},
|
|
"id": 1087,
|
|
"indexExpression": {
|
|
"id": 1086,
|
|
"name": "reward",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1064,
|
|
"src": "5514:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "5491:30:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage ref"
|
|
}
|
|
},
|
|
"id": 1088,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"memberLocation": "5522:15:5",
|
|
"memberName": "distributionEnd",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2325,
|
|
"src": "5491:46:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"id": 1089,
|
|
"name": "newDistributionEnd",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1066,
|
|
"src": "5540:18:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"src": "5491:67:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"id": 1091,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "5491:67:5"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"arguments": [
|
|
{
|
|
"id": 1093,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1062,
|
|
"src": "5599:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 1094,
|
|
"name": "reward",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1064,
|
|
"src": "5613:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1095,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "5628:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 1097,
|
|
"indexExpression": {
|
|
"id": 1096,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1062,
|
|
"src": "5636:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "5628:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 1098,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "5643:7:5",
|
|
"memberName": "rewards",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2336,
|
|
"src": "5628:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_RewardData_$2331_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.RewardData storage ref)"
|
|
}
|
|
},
|
|
"id": 1100,
|
|
"indexExpression": {
|
|
"id": 1099,
|
|
"name": "reward",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1064,
|
|
"src": "5651:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "5628:30:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage ref"
|
|
}
|
|
},
|
|
"id": 1101,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "5659:17:5",
|
|
"memberName": "emissionPerSecond",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2321,
|
|
"src": "5628:48:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1102,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "5685:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 1104,
|
|
"indexExpression": {
|
|
"id": 1103,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1062,
|
|
"src": "5693:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "5685:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 1105,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "5700:7:5",
|
|
"memberName": "rewards",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2336,
|
|
"src": "5685:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_RewardData_$2331_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.RewardData storage ref)"
|
|
}
|
|
},
|
|
"id": 1107,
|
|
"indexExpression": {
|
|
"id": 1106,
|
|
"name": "reward",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1064,
|
|
"src": "5708:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "5685:30:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage ref"
|
|
}
|
|
},
|
|
"id": 1108,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "5716:17:5",
|
|
"memberName": "emissionPerSecond",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2321,
|
|
"src": "5685:48:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
}
|
|
},
|
|
{
|
|
"id": 1109,
|
|
"name": "oldDistributionEnd",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1073,
|
|
"src": "5742:18:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 1110,
|
|
"name": "newDistributionEnd",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1066,
|
|
"src": "5769:18:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1111,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "5796:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 1113,
|
|
"indexExpression": {
|
|
"id": 1112,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1062,
|
|
"src": "5804:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "5796:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 1114,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "5811:7:5",
|
|
"memberName": "rewards",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2336,
|
|
"src": "5796:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_RewardData_$2331_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.RewardData storage ref)"
|
|
}
|
|
},
|
|
"id": 1116,
|
|
"indexExpression": {
|
|
"id": 1115,
|
|
"name": "reward",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1064,
|
|
"src": "5819:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "5796:30:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage ref"
|
|
}
|
|
},
|
|
"id": 1117,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "5827:5:5",
|
|
"memberName": "index",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2319,
|
|
"src": "5796:36:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint104",
|
|
"typeString": "uint104"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint104",
|
|
"typeString": "uint104"
|
|
}
|
|
],
|
|
"id": 1092,
|
|
"name": "AssetConfigUpdated",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2073,
|
|
"src": "5572:18:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,address,uint256,uint256,uint256,uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 1118,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5572:267:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1119,
|
|
"nodeType": "EmitStatement",
|
|
"src": "5567:272:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1060,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "5219:35:5",
|
|
"text": "@inheritdoc IRewardsDistributor"
|
|
},
|
|
"functionSelector": "c5a7b538",
|
|
"id": 1121,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"id": 1070,
|
|
"kind": "modifierInvocation",
|
|
"modifierName": {
|
|
"id": 1069,
|
|
"name": "onlyEmissionManager",
|
|
"nameLocations": [
|
|
"5382:19:5"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 654,
|
|
"src": "5382:19:5"
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "5382:19:5"
|
|
}
|
|
],
|
|
"name": "setDistributionEnd",
|
|
"nameLocation": "5267:18:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": {
|
|
"id": 1068,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "5373:8:5"
|
|
},
|
|
"parameters": {
|
|
"id": 1067,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1062,
|
|
"mutability": "mutable",
|
|
"name": "asset",
|
|
"nameLocation": "5300:5:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1121,
|
|
"src": "5292:13:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1061,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5292:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1064,
|
|
"mutability": "mutable",
|
|
"name": "reward",
|
|
"nameLocation": "5320:6:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1121,
|
|
"src": "5312:14:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1063,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5312:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1066,
|
|
"mutability": "mutable",
|
|
"name": "newDistributionEnd",
|
|
"nameLocation": "5340:18:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1121,
|
|
"src": "5333:25:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
},
|
|
"typeName": {
|
|
"id": 1065,
|
|
"name": "uint32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5333:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5285:78:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1071,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "5402:0:5"
|
|
},
|
|
"scope": 2053,
|
|
"src": "5258:587:5",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
2110
|
|
],
|
|
"body": {
|
|
"id": 1241,
|
|
"nodeType": "Block",
|
|
"src": "6062:1034:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1141,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"id": 1137,
|
|
"name": "rewards",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1127,
|
|
"src": "6077:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr",
|
|
"typeString": "address[] calldata"
|
|
}
|
|
},
|
|
"id": 1138,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "6085:6:5",
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"src": "6077:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"id": 1139,
|
|
"name": "newEmissionsPerSecond",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1130,
|
|
"src": "6095:21:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint88_$dyn_calldata_ptr",
|
|
"typeString": "uint88[] calldata"
|
|
}
|
|
},
|
|
"id": 1140,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "6117:6:5",
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"src": "6095:28:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "6077:46:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "494e56414c49445f494e505554",
|
|
"id": 1142,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "6125:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_711bd914f7cada6362ff0637d445621cad80f8b6c31f2f06bb305d960854e2b7",
|
|
"typeString": "literal_string \"INVALID_INPUT\""
|
|
},
|
|
"value": "INVALID_INPUT"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_711bd914f7cada6362ff0637d445621cad80f8b6c31f2f06bb305d960854e2b7",
|
|
"typeString": "literal_string \"INVALID_INPUT\""
|
|
}
|
|
],
|
|
"id": 1136,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "6069:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 1143,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6069:72:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1144,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6069:72:5"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1239,
|
|
"nodeType": "Block",
|
|
"src": "6193:898:5",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
1160
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1160,
|
|
"mutability": "mutable",
|
|
"name": "assetConfig",
|
|
"nameLocation": "6237:11:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1239,
|
|
"src": "6202:46:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "storage",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.AssetData"
|
|
},
|
|
"typeName": {
|
|
"id": 1159,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 1158,
|
|
"name": "RewardsDataTypes.AssetData",
|
|
"nameLocations": [
|
|
"6202:16:5",
|
|
"6219:9:5"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 2345,
|
|
"src": "6202:26:5"
|
|
},
|
|
"referencedDeclaration": 2345,
|
|
"src": "6202:26:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.AssetData"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1164,
|
|
"initialValue": {
|
|
"baseExpression": {
|
|
"id": 1161,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "6251:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 1163,
|
|
"indexExpression": {
|
|
"id": 1162,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1124,
|
|
"src": "6259:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "6251:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "6202:63:5"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1169
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1169,
|
|
"mutability": "mutable",
|
|
"name": "rewardConfig",
|
|
"nameLocation": "6310:12:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1239,
|
|
"src": "6274:48:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "storage",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData"
|
|
},
|
|
"typeName": {
|
|
"id": 1168,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 1167,
|
|
"name": "RewardsDataTypes.RewardData",
|
|
"nameLocations": [
|
|
"6274:16:5",
|
|
"6291:10:5"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 2331,
|
|
"src": "6274:27:5"
|
|
},
|
|
"referencedDeclaration": 2331,
|
|
"src": "6274:27:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1178,
|
|
"initialValue": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1170,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "6325:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 1172,
|
|
"indexExpression": {
|
|
"id": 1171,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1124,
|
|
"src": "6333:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "6325:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 1173,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "6340:7:5",
|
|
"memberName": "rewards",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2336,
|
|
"src": "6325:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_RewardData_$2331_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.RewardData storage ref)"
|
|
}
|
|
},
|
|
"id": 1177,
|
|
"indexExpression": {
|
|
"baseExpression": {
|
|
"id": 1174,
|
|
"name": "rewards",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1127,
|
|
"src": "6348:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr",
|
|
"typeString": "address[] calldata"
|
|
}
|
|
},
|
|
"id": 1176,
|
|
"indexExpression": {
|
|
"id": 1175,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1146,
|
|
"src": "6356:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "6348:10:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "6325:34:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage ref"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "6274:85:5"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1180
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1180,
|
|
"mutability": "mutable",
|
|
"name": "decimals",
|
|
"nameLocation": "6376:8:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1239,
|
|
"src": "6368:16:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1179,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6368:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1183,
|
|
"initialValue": {
|
|
"expression": {
|
|
"id": 1181,
|
|
"name": "assetConfig",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1160,
|
|
"src": "6387:11:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage pointer"
|
|
}
|
|
},
|
|
"id": 1182,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "6399:8:5",
|
|
"memberName": "decimals",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2344,
|
|
"src": "6387:20:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "6368:39:5"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 1192,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1187,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 1185,
|
|
"name": "decimals",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1180,
|
|
"src": "6434:8:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 1186,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "6446:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "6434:13:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "&&",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
},
|
|
"id": 1191,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"id": 1188,
|
|
"name": "rewardConfig",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1169,
|
|
"src": "6451:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
"id": 1189,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "6464:19:5",
|
|
"memberName": "lastUpdateTimestamp",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2323,
|
|
"src": "6451:32:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 1190,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "6487:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "6451:37:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "6434:54:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "444953545249425554494f4e5f444f45535f4e4f545f4558495354",
|
|
"id": 1193,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "6499:29:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_10feaa42ab1cceccf694775bb33448aff8ff2c6abffd88c4558574e392cfbf89",
|
|
"typeString": "literal_string \"DISTRIBUTION_DOES_NOT_EXIST\""
|
|
},
|
|
"value": "DISTRIBUTION_DOES_NOT_EXIST"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_10feaa42ab1cceccf694775bb33448aff8ff2c6abffd88c4558574e392cfbf89",
|
|
"typeString": "literal_string \"DISTRIBUTION_DOES_NOT_EXIST\""
|
|
}
|
|
],
|
|
"id": 1184,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "6416:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 1194,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6416:121:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1195,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6416:121:5"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1197,
|
|
null
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1197,
|
|
"mutability": "mutable",
|
|
"name": "newIndex",
|
|
"nameLocation": "6557:8:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1239,
|
|
"src": "6549:16:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1196,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6549:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
null
|
|
],
|
|
"id": 1209,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"id": 1199,
|
|
"name": "rewardConfig",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1169,
|
|
"src": "6599:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
{
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 1201,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1124,
|
|
"src": "6642:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 1200,
|
|
"name": "IScaledBalanceToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 554,
|
|
"src": "6622:19:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_IScaledBalanceToken_$554_$",
|
|
"typeString": "type(contract IScaledBalanceToken)"
|
|
}
|
|
},
|
|
"id": 1202,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6622:26:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IScaledBalanceToken_$554",
|
|
"typeString": "contract IScaledBalanceToken"
|
|
}
|
|
},
|
|
"id": 1203,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "6649:17:5",
|
|
"memberName": "scaledTotalSupply",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 545,
|
|
"src": "6622:44:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
|
|
"typeString": "function () view external returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1204,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6622:46:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1207,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "3130",
|
|
"id": 1205,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "6679:2:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "**",
|
|
"rightExpression": {
|
|
"id": 1206,
|
|
"name": "decimals",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1180,
|
|
"src": "6685:8:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "6679:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 1198,
|
|
"name": "_updateRewardData",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1529,
|
|
"src": "6571:17:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_struct$_RewardData_$2331_storage_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_bool_$",
|
|
"typeString": "function (struct RewardsDataTypes.RewardData storage pointer,uint256,uint256) returns (uint256,bool)"
|
|
}
|
|
},
|
|
"id": 1208,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6571:131:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_bool_$",
|
|
"typeString": "tuple(uint256,bool)"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "6548:154:5"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1211
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1211,
|
|
"mutability": "mutable",
|
|
"name": "oldEmissionPerSecond",
|
|
"nameLocation": "6721:20:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1239,
|
|
"src": "6713:28:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1210,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6713:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1214,
|
|
"initialValue": {
|
|
"expression": {
|
|
"id": 1212,
|
|
"name": "rewardConfig",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1169,
|
|
"src": "6744:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
"id": 1213,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "6757:17:5",
|
|
"memberName": "emissionPerSecond",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2321,
|
|
"src": "6744:30:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "6713:61:5"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 1221,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"expression": {
|
|
"id": 1215,
|
|
"name": "rewardConfig",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1169,
|
|
"src": "6783:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
"id": 1217,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"memberLocation": "6796:17:5",
|
|
"memberName": "emissionPerSecond",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2321,
|
|
"src": "6783:30:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"baseExpression": {
|
|
"id": 1218,
|
|
"name": "newEmissionsPerSecond",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1130,
|
|
"src": "6816:21:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint88_$dyn_calldata_ptr",
|
|
"typeString": "uint88[] calldata"
|
|
}
|
|
},
|
|
"id": 1220,
|
|
"indexExpression": {
|
|
"id": 1219,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1146,
|
|
"src": "6838:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "6816:24:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
}
|
|
},
|
|
"src": "6783:57:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
}
|
|
},
|
|
"id": 1222,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6783:57:5"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"arguments": [
|
|
{
|
|
"id": 1224,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1124,
|
|
"src": "6885:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"baseExpression": {
|
|
"id": 1225,
|
|
"name": "rewards",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1127,
|
|
"src": "6901:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr",
|
|
"typeString": "address[] calldata"
|
|
}
|
|
},
|
|
"id": 1227,
|
|
"indexExpression": {
|
|
"id": 1226,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1146,
|
|
"src": "6909:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "6901:10:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 1228,
|
|
"name": "oldEmissionPerSecond",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1211,
|
|
"src": "6922:20:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"baseExpression": {
|
|
"id": 1229,
|
|
"name": "newEmissionsPerSecond",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1130,
|
|
"src": "6953:21:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint88_$dyn_calldata_ptr",
|
|
"typeString": "uint88[] calldata"
|
|
}
|
|
},
|
|
"id": 1231,
|
|
"indexExpression": {
|
|
"id": 1230,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1146,
|
|
"src": "6975:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "6953:24:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 1232,
|
|
"name": "rewardConfig",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1169,
|
|
"src": "6988:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
"id": 1233,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "7001:15:5",
|
|
"memberName": "distributionEnd",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2325,
|
|
"src": "6988:28:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 1234,
|
|
"name": "rewardConfig",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1169,
|
|
"src": "7027:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
"id": 1235,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "7040:15:5",
|
|
"memberName": "distributionEnd",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2325,
|
|
"src": "7027:28:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
{
|
|
"id": 1236,
|
|
"name": "newIndex",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1197,
|
|
"src": "7066:8:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 1223,
|
|
"name": "AssetConfigUpdated",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2073,
|
|
"src": "6856:18:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,address,uint256,uint256,uint256,uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 1237,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6856:227:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1238,
|
|
"nodeType": "EmitStatement",
|
|
"src": "6851:232:5"
|
|
}
|
|
]
|
|
},
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1152,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 1149,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1146,
|
|
"src": "6168:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"id": 1150,
|
|
"name": "rewards",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1127,
|
|
"src": "6172:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr",
|
|
"typeString": "address[] calldata"
|
|
}
|
|
},
|
|
"id": 1151,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "6180:6:5",
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"src": "6172:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "6168:18:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 1240,
|
|
"initializationExpression": {
|
|
"assignments": [
|
|
1146
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1146,
|
|
"mutability": "mutable",
|
|
"name": "i",
|
|
"nameLocation": "6161:1:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1240,
|
|
"src": "6153:9:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1145,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6153:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1148,
|
|
"initialValue": {
|
|
"hexValue": "30",
|
|
"id": 1147,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "6165:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "6153:13:5"
|
|
},
|
|
"isSimpleCounterLoop": true,
|
|
"loopExpression": {
|
|
"expression": {
|
|
"id": 1154,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "UnaryOperation",
|
|
"operator": "++",
|
|
"prefix": false,
|
|
"src": "6188:3:5",
|
|
"subExpression": {
|
|
"id": 1153,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1146,
|
|
"src": "6188:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1155,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6188:3:5"
|
|
},
|
|
"nodeType": "ForStatement",
|
|
"src": "6148:943:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1122,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "5851:35:5",
|
|
"text": "@inheritdoc IRewardsDistributor"
|
|
},
|
|
"functionSelector": "f996868b",
|
|
"id": 1242,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"id": 1134,
|
|
"kind": "modifierInvocation",
|
|
"modifierName": {
|
|
"id": 1133,
|
|
"name": "onlyEmissionManager",
|
|
"nameLocations": [
|
|
"6042:19:5"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 654,
|
|
"src": "6042:19:5"
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "6042:19:5"
|
|
}
|
|
],
|
|
"name": "setEmissionPerSecond",
|
|
"nameLocation": "5899:20:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": {
|
|
"id": 1132,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "6033:8:5"
|
|
},
|
|
"parameters": {
|
|
"id": 1131,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1124,
|
|
"mutability": "mutable",
|
|
"name": "asset",
|
|
"nameLocation": "5934:5:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1242,
|
|
"src": "5926:13:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1123,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5926:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1127,
|
|
"mutability": "mutable",
|
|
"name": "rewards",
|
|
"nameLocation": "5965:7:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1242,
|
|
"src": "5946:26:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "calldata",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr",
|
|
"typeString": "address[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 1125,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5946:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 1126,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "5946:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
|
|
"typeString": "address[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1130,
|
|
"mutability": "mutable",
|
|
"name": "newEmissionsPerSecond",
|
|
"nameLocation": "5997:21:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1242,
|
|
"src": "5979:39:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "calldata",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint88_$dyn_calldata_ptr",
|
|
"typeString": "uint88[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 1128,
|
|
"name": "uint88",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5979:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
}
|
|
},
|
|
"id": 1129,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "5979:8:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint88_$dyn_storage_ptr",
|
|
"typeString": "uint88[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5919:104:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1135,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "6062:0:5"
|
|
},
|
|
"scope": 2053,
|
|
"src": "5890:1206:5",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1447,
|
|
"nodeType": "Block",
|
|
"src": "7332:2019:5",
|
|
"statements": [
|
|
{
|
|
"body": {
|
|
"id": 1445,
|
|
"nodeType": "Block",
|
|
"src": "7389:1957:5",
|
|
"statements": [
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
},
|
|
"id": 1269,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1261,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "7402:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 1266,
|
|
"indexExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1262,
|
|
"name": "rewardsInput",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1247,
|
|
"src": "7410:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_RewardsConfigInput_$2305_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory[] memory"
|
|
}
|
|
},
|
|
"id": 1264,
|
|
"indexExpression": {
|
|
"id": 1263,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1251,
|
|
"src": "7423:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "7410:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardsConfigInput_$2305_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory"
|
|
}
|
|
},
|
|
"id": 1265,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "7426:5:5",
|
|
"memberName": "asset",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2296,
|
|
"src": "7410:21:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "7402:30:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 1267,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "7433:8:5",
|
|
"memberName": "decimals",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2344,
|
|
"src": "7402:39:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 1268,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "7445:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "7402:44:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 1280,
|
|
"nodeType": "IfStatement",
|
|
"src": "7398:176:5",
|
|
"trueBody": {
|
|
"id": 1279,
|
|
"nodeType": "Block",
|
|
"src": "7448:126:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1273,
|
|
"name": "rewardsInput",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1247,
|
|
"src": "7542:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_RewardsConfigInput_$2305_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory[] memory"
|
|
}
|
|
},
|
|
"id": 1275,
|
|
"indexExpression": {
|
|
"id": 1274,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1251,
|
|
"src": "7555:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "7542:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardsConfigInput_$2305_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory"
|
|
}
|
|
},
|
|
"id": 1276,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "7558:5:5",
|
|
"memberName": "asset",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2296,
|
|
"src": "7542:21:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 1270,
|
|
"name": "_assetsList",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 642,
|
|
"src": "7525:11:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage",
|
|
"typeString": "address[] storage ref"
|
|
}
|
|
},
|
|
"id": 1272,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "7537:4:5",
|
|
"memberName": "push",
|
|
"nodeType": "MemberAccess",
|
|
"src": "7525:16:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_address_$dyn_storage_ptr_$_t_address_$returns$__$attached_to$_t_array$_t_address_$dyn_storage_ptr_$",
|
|
"typeString": "function (address[] storage pointer,address)"
|
|
}
|
|
},
|
|
"id": 1277,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7525:39:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1278,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "7525:39:5"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"assignments": [
|
|
1282
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1282,
|
|
"mutability": "mutable",
|
|
"name": "decimals",
|
|
"nameLocation": "7592:8:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1445,
|
|
"src": "7584:16:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1281,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7584:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1299,
|
|
"initialValue": {
|
|
"id": 1298,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1283,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "7603:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 1288,
|
|
"indexExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1284,
|
|
"name": "rewardsInput",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1247,
|
|
"src": "7611:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_RewardsConfigInput_$2305_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory[] memory"
|
|
}
|
|
},
|
|
"id": 1286,
|
|
"indexExpression": {
|
|
"id": 1285,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1251,
|
|
"src": "7624:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "7611:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardsConfigInput_$2305_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory"
|
|
}
|
|
},
|
|
"id": 1287,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "7627:5:5",
|
|
"memberName": "asset",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2296,
|
|
"src": "7611:21:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "7603:30:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 1289,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"memberLocation": "7634:8:5",
|
|
"memberName": "decimals",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2344,
|
|
"src": "7603:39:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1291,
|
|
"name": "rewardsInput",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1247,
|
|
"src": "7670:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_RewardsConfigInput_$2305_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory[] memory"
|
|
}
|
|
},
|
|
"id": 1293,
|
|
"indexExpression": {
|
|
"id": 1292,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1251,
|
|
"src": "7683:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "7670:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardsConfigInput_$2305_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory"
|
|
}
|
|
},
|
|
"id": 1294,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "7686:5:5",
|
|
"memberName": "asset",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2296,
|
|
"src": "7670:21:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 1290,
|
|
"name": "IERC20Detailed",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 99,
|
|
"src": "7645:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_IERC20Detailed_$99_$",
|
|
"typeString": "type(contract IERC20Detailed)"
|
|
}
|
|
},
|
|
"id": 1295,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7645:55:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20Detailed_$99",
|
|
"typeString": "contract IERC20Detailed"
|
|
}
|
|
},
|
|
"id": 1296,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "7701:8:5",
|
|
"memberName": "decimals",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 98,
|
|
"src": "7645:64:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$",
|
|
"typeString": "function () view external returns (uint8)"
|
|
}
|
|
},
|
|
"id": 1297,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7645:66:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"src": "7603:108:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "7584:127:5"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1304
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1304,
|
|
"mutability": "mutable",
|
|
"name": "rewardConfig",
|
|
"nameLocation": "7758:12:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1445,
|
|
"src": "7722:48:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "storage",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData"
|
|
},
|
|
"typeName": {
|
|
"id": 1303,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 1302,
|
|
"name": "RewardsDataTypes.RewardData",
|
|
"nameLocations": [
|
|
"7722:16:5",
|
|
"7739:10:5"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 2331,
|
|
"src": "7722:27:5"
|
|
},
|
|
"referencedDeclaration": 2331,
|
|
"src": "7722:27:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1317,
|
|
"initialValue": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1305,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "7773:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 1310,
|
|
"indexExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1306,
|
|
"name": "rewardsInput",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1247,
|
|
"src": "7781:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_RewardsConfigInput_$2305_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory[] memory"
|
|
}
|
|
},
|
|
"id": 1308,
|
|
"indexExpression": {
|
|
"id": 1307,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1251,
|
|
"src": "7794:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "7781:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardsConfigInput_$2305_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory"
|
|
}
|
|
},
|
|
"id": 1309,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "7797:5:5",
|
|
"memberName": "asset",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2296,
|
|
"src": "7781:21:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "7773:30:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 1311,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "7804:7:5",
|
|
"memberName": "rewards",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2336,
|
|
"src": "7773:38:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_RewardData_$2331_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.RewardData storage ref)"
|
|
}
|
|
},
|
|
"id": 1316,
|
|
"indexExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1312,
|
|
"name": "rewardsInput",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1247,
|
|
"src": "7822:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_RewardsConfigInput_$2305_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory[] memory"
|
|
}
|
|
},
|
|
"id": 1314,
|
|
"indexExpression": {
|
|
"id": 1313,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1251,
|
|
"src": "7835:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "7822:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardsConfigInput_$2305_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory"
|
|
}
|
|
},
|
|
"id": 1315,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "7838:6:5",
|
|
"memberName": "reward",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2298,
|
|
"src": "7822:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "7773:80:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage ref"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "7722:131:5"
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
},
|
|
"id": 1321,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"id": 1318,
|
|
"name": "rewardConfig",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1304,
|
|
"src": "7957:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
"id": 1319,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "7970:19:5",
|
|
"memberName": "lastUpdateTimestamp",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2323,
|
|
"src": "7957:32:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 1320,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "7993:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "7957:37:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 1353,
|
|
"nodeType": "IfStatement",
|
|
"src": "7953:277:5",
|
|
"trueBody": {
|
|
"id": 1352,
|
|
"nodeType": "Block",
|
|
"src": "7996:234:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 1341,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1322,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "8007:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 1327,
|
|
"indexExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1323,
|
|
"name": "rewardsInput",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1247,
|
|
"src": "8015:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_RewardsConfigInput_$2305_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory[] memory"
|
|
}
|
|
},
|
|
"id": 1325,
|
|
"indexExpression": {
|
|
"id": 1324,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1251,
|
|
"src": "8028:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "8015:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardsConfigInput_$2305_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory"
|
|
}
|
|
},
|
|
"id": 1326,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "8031:5:5",
|
|
"memberName": "asset",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2296,
|
|
"src": "8015:21:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "8007:30:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 1328,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "8038:16:5",
|
|
"memberName": "availableRewards",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2340,
|
|
"src": "8007:47:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_uint128_$_t_address_$",
|
|
"typeString": "mapping(uint128 => address)"
|
|
}
|
|
},
|
|
"id": 1336,
|
|
"indexExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1329,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "8067:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 1334,
|
|
"indexExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1330,
|
|
"name": "rewardsInput",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1247,
|
|
"src": "8075:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_RewardsConfigInput_$2305_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory[] memory"
|
|
}
|
|
},
|
|
"id": 1332,
|
|
"indexExpression": {
|
|
"id": 1331,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1251,
|
|
"src": "8088:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "8075:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardsConfigInput_$2305_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory"
|
|
}
|
|
},
|
|
"id": 1333,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "8091:5:5",
|
|
"memberName": "asset",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2296,
|
|
"src": "8075:21:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "8067:30:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 1335,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "8098:21:5",
|
|
"memberName": "availableRewardsCount",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2342,
|
|
"src": "8067:52:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "8007:123:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1337,
|
|
"name": "rewardsInput",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1247,
|
|
"src": "8133:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_RewardsConfigInput_$2305_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory[] memory"
|
|
}
|
|
},
|
|
"id": 1339,
|
|
"indexExpression": {
|
|
"id": 1338,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1251,
|
|
"src": "8146:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "8133:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardsConfigInput_$2305_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory"
|
|
}
|
|
},
|
|
"id": 1340,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "8149:6:5",
|
|
"memberName": "reward",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2298,
|
|
"src": "8133:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "8007:148:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 1342,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8007:148:5"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 1350,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "UnaryOperation",
|
|
"operator": "++",
|
|
"prefix": false,
|
|
"src": "8166:54:5",
|
|
"subExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1343,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "8166:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 1348,
|
|
"indexExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1344,
|
|
"name": "rewardsInput",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1247,
|
|
"src": "8174:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_RewardsConfigInput_$2305_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory[] memory"
|
|
}
|
|
},
|
|
"id": 1346,
|
|
"indexExpression": {
|
|
"id": 1345,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1251,
|
|
"src": "8187:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "8174:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardsConfigInput_$2305_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory"
|
|
}
|
|
},
|
|
"id": 1347,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "8190:5:5",
|
|
"memberName": "asset",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2296,
|
|
"src": "8174:21:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "8166:30:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 1349,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"memberLocation": "8197:21:5",
|
|
"memberName": "availableRewardsCount",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2342,
|
|
"src": "8166:52:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"id": 1351,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8166:54:5"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 1361,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"baseExpression": {
|
|
"id": 1354,
|
|
"name": "_isRewardEnabled",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 636,
|
|
"src": "8317:16:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
|
|
"typeString": "mapping(address => bool)"
|
|
}
|
|
},
|
|
"id": 1359,
|
|
"indexExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1355,
|
|
"name": "rewardsInput",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1247,
|
|
"src": "8334:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_RewardsConfigInput_$2305_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory[] memory"
|
|
}
|
|
},
|
|
"id": 1357,
|
|
"indexExpression": {
|
|
"id": 1356,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1251,
|
|
"src": "8347:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "8334:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardsConfigInput_$2305_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory"
|
|
}
|
|
},
|
|
"id": 1358,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "8350:6:5",
|
|
"memberName": "reward",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2298,
|
|
"src": "8334:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "8317:40:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"hexValue": "66616c7365",
|
|
"id": 1360,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "8361:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "false"
|
|
},
|
|
"src": "8317:49:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 1381,
|
|
"nodeType": "IfStatement",
|
|
"src": "8313:175:5",
|
|
"trueBody": {
|
|
"id": 1380,
|
|
"nodeType": "Block",
|
|
"src": "8368:120:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 1369,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"baseExpression": {
|
|
"id": 1362,
|
|
"name": "_isRewardEnabled",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 636,
|
|
"src": "8379:16:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
|
|
"typeString": "mapping(address => bool)"
|
|
}
|
|
},
|
|
"id": 1367,
|
|
"indexExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1363,
|
|
"name": "rewardsInput",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1247,
|
|
"src": "8396:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_RewardsConfigInput_$2305_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory[] memory"
|
|
}
|
|
},
|
|
"id": 1365,
|
|
"indexExpression": {
|
|
"id": 1364,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1251,
|
|
"src": "8409:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "8396:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardsConfigInput_$2305_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory"
|
|
}
|
|
},
|
|
"id": 1366,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "8412:6:5",
|
|
"memberName": "reward",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2298,
|
|
"src": "8396:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "8379:40:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"hexValue": "74727565",
|
|
"id": 1368,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "8422:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "true"
|
|
},
|
|
"src": "8379:47:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 1370,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8379:47:5"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1374,
|
|
"name": "rewardsInput",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1247,
|
|
"src": "8455:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_RewardsConfigInput_$2305_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory[] memory"
|
|
}
|
|
},
|
|
"id": 1376,
|
|
"indexExpression": {
|
|
"id": 1375,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1251,
|
|
"src": "8468:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "8455:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardsConfigInput_$2305_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory"
|
|
}
|
|
},
|
|
"id": 1377,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "8471:6:5",
|
|
"memberName": "reward",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2298,
|
|
"src": "8455:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 1371,
|
|
"name": "_rewardsList",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 639,
|
|
"src": "8437:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage",
|
|
"typeString": "address[] storage ref"
|
|
}
|
|
},
|
|
"id": 1373,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "8450:4:5",
|
|
"memberName": "push",
|
|
"nodeType": "MemberAccess",
|
|
"src": "8437:17:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_address_$dyn_storage_ptr_$_t_address_$returns$__$attached_to$_t_array$_t_address_$dyn_storage_ptr_$",
|
|
"typeString": "function (address[] storage pointer,address)"
|
|
}
|
|
},
|
|
"id": 1378,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "8437:41:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1379,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8437:41:5"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"assignments": [
|
|
1383,
|
|
null
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1383,
|
|
"mutability": "mutable",
|
|
"name": "newIndex",
|
|
"nameLocation": "8581:8:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1445,
|
|
"src": "8573:16:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1382,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "8573:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
null
|
|
],
|
|
"id": 1394,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"id": 1385,
|
|
"name": "rewardConfig",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1304,
|
|
"src": "8623:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1386,
|
|
"name": "rewardsInput",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1247,
|
|
"src": "8646:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_RewardsConfigInput_$2305_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory[] memory"
|
|
}
|
|
},
|
|
"id": 1388,
|
|
"indexExpression": {
|
|
"id": 1387,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1251,
|
|
"src": "8659:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "8646:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardsConfigInput_$2305_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory"
|
|
}
|
|
},
|
|
"id": 1389,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "8662:11:5",
|
|
"memberName": "totalSupply",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2292,
|
|
"src": "8646:27:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1392,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "3130",
|
|
"id": 1390,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "8684:2:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "**",
|
|
"rightExpression": {
|
|
"id": 1391,
|
|
"name": "decimals",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1282,
|
|
"src": "8690:8:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "8684:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 1384,
|
|
"name": "_updateRewardData",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1529,
|
|
"src": "8595:17:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_struct$_RewardData_$2331_storage_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_bool_$",
|
|
"typeString": "function (struct RewardsDataTypes.RewardData storage pointer,uint256,uint256) returns (uint256,bool)"
|
|
}
|
|
},
|
|
"id": 1393,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "8595:112:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_bool_$",
|
|
"typeString": "tuple(uint256,bool)"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "8572:135:5"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1396
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1396,
|
|
"mutability": "mutable",
|
|
"name": "oldEmissionsPerSecond",
|
|
"nameLocation": "8799:21:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1445,
|
|
"src": "8792:28:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
},
|
|
"typeName": {
|
|
"id": 1395,
|
|
"name": "uint88",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "8792:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1399,
|
|
"initialValue": {
|
|
"expression": {
|
|
"id": 1397,
|
|
"name": "rewardConfig",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1304,
|
|
"src": "8823:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
"id": 1398,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "8836:17:5",
|
|
"memberName": "emissionPerSecond",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2321,
|
|
"src": "8823:30:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "8792:61:5"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1401
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1401,
|
|
"mutability": "mutable",
|
|
"name": "oldDistributionEnd",
|
|
"nameLocation": "8869:18:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1445,
|
|
"src": "8862:25:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
},
|
|
"typeName": {
|
|
"id": 1400,
|
|
"name": "uint32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "8862:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1404,
|
|
"initialValue": {
|
|
"expression": {
|
|
"id": 1402,
|
|
"name": "rewardConfig",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1304,
|
|
"src": "8890:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
"id": 1403,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "8903:15:5",
|
|
"memberName": "distributionEnd",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2325,
|
|
"src": "8890:28:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "8862:56:5"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 1412,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"expression": {
|
|
"id": 1405,
|
|
"name": "rewardConfig",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1304,
|
|
"src": "8927:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
"id": 1407,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"memberLocation": "8940:17:5",
|
|
"memberName": "emissionPerSecond",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2321,
|
|
"src": "8927:30:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1408,
|
|
"name": "rewardsInput",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1247,
|
|
"src": "8960:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_RewardsConfigInput_$2305_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory[] memory"
|
|
}
|
|
},
|
|
"id": 1410,
|
|
"indexExpression": {
|
|
"id": 1409,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1251,
|
|
"src": "8973:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "8960:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardsConfigInput_$2305_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory"
|
|
}
|
|
},
|
|
"id": 1411,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "8976:17:5",
|
|
"memberName": "emissionPerSecond",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2290,
|
|
"src": "8960:33:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
}
|
|
},
|
|
"src": "8927:66:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
}
|
|
},
|
|
"id": 1413,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "8927:66:5"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 1421,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"expression": {
|
|
"id": 1414,
|
|
"name": "rewardConfig",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1304,
|
|
"src": "9002:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
"id": 1416,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"memberLocation": "9015:15:5",
|
|
"memberName": "distributionEnd",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2325,
|
|
"src": "9002:28:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1417,
|
|
"name": "rewardsInput",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1247,
|
|
"src": "9033:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_RewardsConfigInput_$2305_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory[] memory"
|
|
}
|
|
},
|
|
"id": 1419,
|
|
"indexExpression": {
|
|
"id": 1418,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1251,
|
|
"src": "9046:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "9033:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardsConfigInput_$2305_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory"
|
|
}
|
|
},
|
|
"id": 1420,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "9049:15:5",
|
|
"memberName": "distributionEnd",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2294,
|
|
"src": "9033:31:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"src": "9002:62:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"id": 1422,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "9002:62:5"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"arguments": [
|
|
{
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1424,
|
|
"name": "rewardsInput",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1247,
|
|
"src": "9109:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_RewardsConfigInput_$2305_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory[] memory"
|
|
}
|
|
},
|
|
"id": 1426,
|
|
"indexExpression": {
|
|
"id": 1425,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1251,
|
|
"src": "9122:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "9109:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardsConfigInput_$2305_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory"
|
|
}
|
|
},
|
|
"id": 1427,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "9125:5:5",
|
|
"memberName": "asset",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2296,
|
|
"src": "9109:21:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1428,
|
|
"name": "rewardsInput",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1247,
|
|
"src": "9141:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_RewardsConfigInput_$2305_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory[] memory"
|
|
}
|
|
},
|
|
"id": 1430,
|
|
"indexExpression": {
|
|
"id": 1429,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1251,
|
|
"src": "9154:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "9141:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardsConfigInput_$2305_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory"
|
|
}
|
|
},
|
|
"id": 1431,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "9157:6:5",
|
|
"memberName": "reward",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2298,
|
|
"src": "9141:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 1432,
|
|
"name": "oldEmissionsPerSecond",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1396,
|
|
"src": "9174:21:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1433,
|
|
"name": "rewardsInput",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1247,
|
|
"src": "9206:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_RewardsConfigInput_$2305_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory[] memory"
|
|
}
|
|
},
|
|
"id": 1435,
|
|
"indexExpression": {
|
|
"id": 1434,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1251,
|
|
"src": "9219:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "9206:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardsConfigInput_$2305_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory"
|
|
}
|
|
},
|
|
"id": 1436,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "9222:17:5",
|
|
"memberName": "emissionPerSecond",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2290,
|
|
"src": "9206:33:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
}
|
|
},
|
|
{
|
|
"id": 1437,
|
|
"name": "oldDistributionEnd",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1401,
|
|
"src": "9250:18:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1438,
|
|
"name": "rewardsInput",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1247,
|
|
"src": "9279:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_RewardsConfigInput_$2305_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory[] memory"
|
|
}
|
|
},
|
|
"id": 1440,
|
|
"indexExpression": {
|
|
"id": 1439,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1251,
|
|
"src": "9292:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "9279:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardsConfigInput_$2305_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory"
|
|
}
|
|
},
|
|
"id": 1441,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "9295:15:5",
|
|
"memberName": "distributionEnd",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2294,
|
|
"src": "9279:31:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
{
|
|
"id": 1442,
|
|
"name": "newIndex",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1383,
|
|
"src": "9321:8:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 1423,
|
|
"name": "AssetConfigUpdated",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2073,
|
|
"src": "9080:18:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,address,uint256,uint256,uint256,uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 1443,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "9080:258:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1444,
|
|
"nodeType": "EmitStatement",
|
|
"src": "9075:263:5"
|
|
}
|
|
]
|
|
},
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1257,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 1254,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1251,
|
|
"src": "7359:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"id": 1255,
|
|
"name": "rewardsInput",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1247,
|
|
"src": "7363:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_RewardsConfigInput_$2305_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput memory[] memory"
|
|
}
|
|
},
|
|
"id": 1256,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "7376:6:5",
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"src": "7363:19:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "7359:23:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 1446,
|
|
"initializationExpression": {
|
|
"assignments": [
|
|
1251
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1251,
|
|
"mutability": "mutable",
|
|
"name": "i",
|
|
"nameLocation": "7352:1:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1446,
|
|
"src": "7344:9:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1250,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7344:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1253,
|
|
"initialValue": {
|
|
"hexValue": "30",
|
|
"id": 1252,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "7356:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "7344:13:5"
|
|
},
|
|
"isSimpleCounterLoop": true,
|
|
"loopExpression": {
|
|
"expression": {
|
|
"id": 1259,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "UnaryOperation",
|
|
"operator": "++",
|
|
"prefix": false,
|
|
"src": "7384:3:5",
|
|
"subExpression": {
|
|
"id": 1258,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1251,
|
|
"src": "7384:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1260,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "7384:3:5"
|
|
},
|
|
"nodeType": "ForStatement",
|
|
"src": "7339:2007:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1243,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "7102:132:5",
|
|
"text": " @dev Configure the _assets for a specific emission\n @param rewardsInput The array of each asset configuration*"
|
|
},
|
|
"id": 1448,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "_configureAssets",
|
|
"nameLocation": "7247:16:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1248,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1247,
|
|
"mutability": "mutable",
|
|
"name": "rewardsInput",
|
|
"nameLocation": "7309:12:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1448,
|
|
"src": "7264:57:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_RewardsConfigInput_$2305_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 1245,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 1244,
|
|
"name": "RewardsDataTypes.RewardsConfigInput",
|
|
"nameLocations": [
|
|
"7264:16:5",
|
|
"7281:18:5"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 2305,
|
|
"src": "7264:35:5"
|
|
},
|
|
"referencedDeclaration": 2305,
|
|
"src": "7264:35:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardsConfigInput_$2305_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput"
|
|
}
|
|
},
|
|
"id": 1246,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "7264:37:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_RewardsConfigInput_$2305_storage_$dyn_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardsConfigInput[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "7263:59:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1249,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "7332:0:5"
|
|
},
|
|
"scope": 2053,
|
|
"src": "7238:2113:5",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1528,
|
|
"nodeType": "Block",
|
|
"src": "9928:562:5",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
1464,
|
|
1466
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1464,
|
|
"mutability": "mutable",
|
|
"name": "oldIndex",
|
|
"nameLocation": "9944:8:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1528,
|
|
"src": "9936:16:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1463,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "9936:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1466,
|
|
"mutability": "mutable",
|
|
"name": "newIndex",
|
|
"nameLocation": "9962:8:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1528,
|
|
"src": "9954:16:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1465,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "9954:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1472,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"id": 1468,
|
|
"name": "rewardData",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1452,
|
|
"src": "9989:10:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
{
|
|
"id": 1469,
|
|
"name": "totalSupply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1454,
|
|
"src": "10001:11:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 1470,
|
|
"name": "assetUnit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1456,
|
|
"src": "10014:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 1467,
|
|
"name": "_getAssetIndex",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2016,
|
|
"src": "9974:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_struct$_RewardData_$2331_storage_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_uint256_$",
|
|
"typeString": "function (struct RewardsDataTypes.RewardData storage pointer,uint256,uint256) view returns (uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 1471,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "9974:50:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
|
|
"typeString": "tuple(uint256,uint256)"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "9935:89:5"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1474
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1474,
|
|
"mutability": "mutable",
|
|
"name": "indexUpdated",
|
|
"nameLocation": "10036:12:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1528,
|
|
"src": "10031:17:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 1473,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "10031:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1475,
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "10031:17:5"
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1478,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 1476,
|
|
"name": "newIndex",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1466,
|
|
"src": "10059:8:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"id": 1477,
|
|
"name": "oldIndex",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1464,
|
|
"src": "10071:8:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "10059:20:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"id": 1522,
|
|
"nodeType": "Block",
|
|
"src": "10369:76:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 1520,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"expression": {
|
|
"id": 1513,
|
|
"name": "rewardData",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1452,
|
|
"src": "10378:10:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
"id": 1515,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"memberLocation": "10389:19:5",
|
|
"memberName": "lastUpdateTimestamp",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2323,
|
|
"src": "10378:30:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"expression": {
|
|
"expression": {
|
|
"id": 1516,
|
|
"name": "block",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967292,
|
|
"src": "10411:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_block",
|
|
"typeString": "block"
|
|
}
|
|
},
|
|
"id": 1517,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "10417:9:5",
|
|
"memberName": "timestamp",
|
|
"nodeType": "MemberAccess",
|
|
"src": "10411:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1518,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "10427:8:5",
|
|
"memberName": "toUint32",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 227,
|
|
"src": "10411:24:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint32_$attached_to$_t_uint256_$",
|
|
"typeString": "function (uint256) pure returns (uint32)"
|
|
}
|
|
},
|
|
"id": 1519,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "10411:26:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"src": "10378:59:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"id": 1521,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "10378:59:5"
|
|
}
|
|
]
|
|
},
|
|
"id": 1523,
|
|
"nodeType": "IfStatement",
|
|
"src": "10055:390:5",
|
|
"trueBody": {
|
|
"id": 1512,
|
|
"nodeType": "Block",
|
|
"src": "10081:282:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1486,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 1480,
|
|
"name": "newIndex",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1466,
|
|
"src": "10098:8:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 1483,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "10115:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint104_$",
|
|
"typeString": "type(uint104)"
|
|
},
|
|
"typeName": {
|
|
"id": 1482,
|
|
"name": "uint104",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "10115:7:5",
|
|
"typeDescriptions": {}
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_type$_t_uint104_$",
|
|
"typeString": "type(uint104)"
|
|
}
|
|
],
|
|
"id": 1481,
|
|
"name": "type",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967269,
|
|
"src": "10110:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
|
|
"typeString": "function () pure"
|
|
}
|
|
},
|
|
"id": 1484,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "10110:13:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_meta_type_t_uint104",
|
|
"typeString": "type(uint104)"
|
|
}
|
|
},
|
|
"id": 1485,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "10124:3:5",
|
|
"memberName": "max",
|
|
"nodeType": "MemberAccess",
|
|
"src": "10110:17:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint104",
|
|
"typeString": "uint104"
|
|
}
|
|
},
|
|
"src": "10098:29:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "494e4445585f4f564552464c4f57",
|
|
"id": 1487,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10129:16:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_f6a7187dfb6061567b074df0155c071985ca15e6ac6b3024e5bd106b2c7018cf",
|
|
"typeString": "literal_string \"INDEX_OVERFLOW\""
|
|
},
|
|
"value": "INDEX_OVERFLOW"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_f6a7187dfb6061567b074df0155c071985ca15e6ac6b3024e5bd106b2c7018cf",
|
|
"typeString": "literal_string \"INDEX_OVERFLOW\""
|
|
}
|
|
],
|
|
"id": 1479,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "10090:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 1488,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "10090:56:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1489,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "10090:56:5"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 1492,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 1490,
|
|
"name": "indexUpdated",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1474,
|
|
"src": "10155:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"hexValue": "74727565",
|
|
"id": 1491,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "10170:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "true"
|
|
},
|
|
"src": "10155:19:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 1493,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "10155:19:5"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 1501,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"expression": {
|
|
"id": 1494,
|
|
"name": "rewardData",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1452,
|
|
"src": "10251:10:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
"id": 1496,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"memberLocation": "10262:5:5",
|
|
"memberName": "index",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2319,
|
|
"src": "10251:16:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint104",
|
|
"typeString": "uint104"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"arguments": [
|
|
{
|
|
"id": 1499,
|
|
"name": "newIndex",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1466,
|
|
"src": "10278:8:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 1498,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "10270:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint104_$",
|
|
"typeString": "type(uint104)"
|
|
},
|
|
"typeName": {
|
|
"id": 1497,
|
|
"name": "uint104",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "10270:7:5",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 1500,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "10270:17:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint104",
|
|
"typeString": "uint104"
|
|
}
|
|
},
|
|
"src": "10251:36:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint104",
|
|
"typeString": "uint104"
|
|
}
|
|
},
|
|
"id": 1502,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "10251:36:5"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 1510,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"expression": {
|
|
"id": 1503,
|
|
"name": "rewardData",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1452,
|
|
"src": "10296:10:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
"id": 1505,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"memberLocation": "10307:19:5",
|
|
"memberName": "lastUpdateTimestamp",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2323,
|
|
"src": "10296:30:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"expression": {
|
|
"expression": {
|
|
"id": 1506,
|
|
"name": "block",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967292,
|
|
"src": "10329:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_block",
|
|
"typeString": "block"
|
|
}
|
|
},
|
|
"id": 1507,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "10335:9:5",
|
|
"memberName": "timestamp",
|
|
"nodeType": "MemberAccess",
|
|
"src": "10329:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1508,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "10345:8:5",
|
|
"memberName": "toUint32",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 227,
|
|
"src": "10329:24:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint32_$attached_to$_t_uint256_$",
|
|
"typeString": "function (uint256) pure returns (uint32)"
|
|
}
|
|
},
|
|
"id": 1509,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "10329:26:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"src": "10296:59:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"id": 1511,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "10296:59:5"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"components": [
|
|
{
|
|
"id": 1524,
|
|
"name": "newIndex",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1466,
|
|
"src": "10461:8:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 1525,
|
|
"name": "indexUpdated",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1474,
|
|
"src": "10471:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"id": 1526,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "10460:24:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_bool_$",
|
|
"typeString": "tuple(uint256,bool)"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1462,
|
|
"id": 1527,
|
|
"nodeType": "Return",
|
|
"src": "10453:31:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1449,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "9357:399:5",
|
|
"text": " @dev Updates the state of the distribution for the specified reward\n @param rewardData Storage pointer to the distribution reward config\n @param totalSupply Current total of underlying assets for this distribution\n @param assetUnit One unit of asset (10**decimals)\n @return The new distribution index\n @return True if the index was updated, false otherwise*"
|
|
},
|
|
"id": 1529,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "_updateRewardData",
|
|
"nameLocation": "9769:17:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1457,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1452,
|
|
"mutability": "mutable",
|
|
"name": "rewardData",
|
|
"nameLocation": "9829:10:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1529,
|
|
"src": "9793:46:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "storage",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData"
|
|
},
|
|
"typeName": {
|
|
"id": 1451,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 1450,
|
|
"name": "RewardsDataTypes.RewardData",
|
|
"nameLocations": [
|
|
"9793:16:5",
|
|
"9810:10:5"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 2331,
|
|
"src": "9793:27:5"
|
|
},
|
|
"referencedDeclaration": 2331,
|
|
"src": "9793:27:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1454,
|
|
"mutability": "mutable",
|
|
"name": "totalSupply",
|
|
"nameLocation": "9854:11:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1529,
|
|
"src": "9846:19:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1453,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "9846:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1456,
|
|
"mutability": "mutable",
|
|
"name": "assetUnit",
|
|
"nameLocation": "9880:9:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1529,
|
|
"src": "9872:17:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1455,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "9872:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "9786:108:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1462,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1459,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1529,
|
|
"src": "9913:7:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1458,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "9913:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1461,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1529,
|
|
"src": "9922:4:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 1460,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "9922:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "9912:15:5"
|
|
},
|
|
"scope": 2053,
|
|
"src": "9760:730:5",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1611,
|
|
"nodeType": "Block",
|
|
"src": "11145:554:5",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
1549
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1549,
|
|
"mutability": "mutable",
|
|
"name": "userIndex",
|
|
"nameLocation": "11160:9:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1611,
|
|
"src": "11152:17:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1548,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "11152:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1555,
|
|
"initialValue": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"id": 1550,
|
|
"name": "rewardData",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1533,
|
|
"src": "11172:10:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
"id": 1551,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "11183:9:5",
|
|
"memberName": "usersData",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2330,
|
|
"src": "11172:20:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_UserData_$2317_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.UserData storage ref)"
|
|
}
|
|
},
|
|
"id": 1553,
|
|
"indexExpression": {
|
|
"id": 1552,
|
|
"name": "user",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1535,
|
|
"src": "11193:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "11172:26:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserData_$2317_storage",
|
|
"typeString": "struct RewardsDataTypes.UserData storage ref"
|
|
}
|
|
},
|
|
"id": 1554,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "11199:5:5",
|
|
"memberName": "index",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2314,
|
|
"src": "11172:32:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint104",
|
|
"typeString": "uint104"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "11152:52:5"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1557
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1557,
|
|
"mutability": "mutable",
|
|
"name": "rewardsAccrued",
|
|
"nameLocation": "11219:14:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1611,
|
|
"src": "11211:22:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1556,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "11211:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1558,
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "11211:22:5"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1560
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1560,
|
|
"mutability": "mutable",
|
|
"name": "dataUpdated",
|
|
"nameLocation": "11245:11:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1611,
|
|
"src": "11240:16:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 1559,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "11240:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1561,
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "11240:16:5"
|
|
},
|
|
{
|
|
"condition": {
|
|
"components": [
|
|
{
|
|
"id": 1566,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 1562,
|
|
"name": "dataUpdated",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1560,
|
|
"src": "11268:11:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1565,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 1563,
|
|
"name": "userIndex",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1549,
|
|
"src": "11282:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"id": 1564,
|
|
"name": "newAssetIndex",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1539,
|
|
"src": "11295:13:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "11282:26:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "11268:40:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"id": 1567,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "11267:42:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 1606,
|
|
"nodeType": "IfStatement",
|
|
"src": "11263:388:5",
|
|
"trueBody": {
|
|
"id": 1605,
|
|
"nodeType": "Block",
|
|
"src": "11311:340:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 1578,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"id": 1568,
|
|
"name": "rewardData",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1533,
|
|
"src": "11380:10:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
"id": 1571,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "11391:9:5",
|
|
"memberName": "usersData",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2330,
|
|
"src": "11380:20:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_UserData_$2317_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.UserData storage ref)"
|
|
}
|
|
},
|
|
"id": 1572,
|
|
"indexExpression": {
|
|
"id": 1570,
|
|
"name": "user",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1535,
|
|
"src": "11401:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "11380:26:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserData_$2317_storage",
|
|
"typeString": "struct RewardsDataTypes.UserData storage ref"
|
|
}
|
|
},
|
|
"id": 1573,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"memberLocation": "11407:5:5",
|
|
"memberName": "index",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2314,
|
|
"src": "11380:32:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint104",
|
|
"typeString": "uint104"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"arguments": [
|
|
{
|
|
"id": 1576,
|
|
"name": "newAssetIndex",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1539,
|
|
"src": "11423:13:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 1575,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "11415:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_uint104_$",
|
|
"typeString": "type(uint104)"
|
|
},
|
|
"typeName": {
|
|
"id": 1574,
|
|
"name": "uint104",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "11415:7:5",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 1577,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "11415:22:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint104",
|
|
"typeString": "uint104"
|
|
}
|
|
},
|
|
"src": "11380:57:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint104",
|
|
"typeString": "uint104"
|
|
}
|
|
},
|
|
"id": 1579,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "11380:57:5"
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1582,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 1580,
|
|
"name": "userBalance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1537,
|
|
"src": "11450:11:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 1581,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "11465:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "11450:16:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 1604,
|
|
"nodeType": "IfStatement",
|
|
"src": "11446:198:5",
|
|
"trueBody": {
|
|
"id": 1603,
|
|
"nodeType": "Block",
|
|
"src": "11468:176:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 1590,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 1583,
|
|
"name": "rewardsAccrued",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1557,
|
|
"src": "11479:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"arguments": [
|
|
{
|
|
"id": 1585,
|
|
"name": "userBalance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1537,
|
|
"src": "11508:11:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 1586,
|
|
"name": "newAssetIndex",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1539,
|
|
"src": "11521:13:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 1587,
|
|
"name": "userIndex",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1549,
|
|
"src": "11536:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 1588,
|
|
"name": "assetUnit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1541,
|
|
"src": "11547:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 1584,
|
|
"name": "_getRewards",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1925,
|
|
"src": "11496:11:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256,uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1589,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "11496:61:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "11479:78:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1591,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "11479:78:5"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 1601,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"id": 1592,
|
|
"name": "rewardData",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1533,
|
|
"src": "11570:10:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
"id": 1595,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "11581:9:5",
|
|
"memberName": "usersData",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2330,
|
|
"src": "11570:20:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_UserData_$2317_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.UserData storage ref)"
|
|
}
|
|
},
|
|
"id": 1596,
|
|
"indexExpression": {
|
|
"id": 1594,
|
|
"name": "user",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1535,
|
|
"src": "11591:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "11570:26:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserData_$2317_storage",
|
|
"typeString": "struct RewardsDataTypes.UserData storage ref"
|
|
}
|
|
},
|
|
"id": 1597,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"memberLocation": "11597:7:5",
|
|
"memberName": "accrued",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2316,
|
|
"src": "11570:34:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"expression": {
|
|
"id": 1598,
|
|
"name": "rewardsAccrued",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1557,
|
|
"src": "11608:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1599,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "11623:9:5",
|
|
"memberName": "toUint128",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 152,
|
|
"src": "11608:24:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint128_$attached_to$_t_uint256_$",
|
|
"typeString": "function (uint256) pure returns (uint128)"
|
|
}
|
|
},
|
|
"id": 1600,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "11608:26:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"src": "11570:64:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"id": 1602,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "11570:64:5"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"components": [
|
|
{
|
|
"id": 1607,
|
|
"name": "rewardsAccrued",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1557,
|
|
"src": "11665:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 1608,
|
|
"name": "dataUpdated",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1560,
|
|
"src": "11681:11:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"id": 1609,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "11664:29:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_bool_$",
|
|
"typeString": "tuple(uint256,bool)"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1547,
|
|
"id": 1610,
|
|
"nodeType": "Return",
|
|
"src": "11657:36:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1530,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "10496:432:5",
|
|
"text": " @dev Updates the state of the distribution for the specific user\n @param rewardData Storage pointer to the distribution reward config\n @param user The address of the user\n @param userBalance The user balance of the asset\n @param newAssetIndex The new index of the asset distribution\n @param assetUnit One unit of asset (10**decimals)\n @return The rewards accrued since the last update*"
|
|
},
|
|
"id": 1612,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "_updateUserData",
|
|
"nameLocation": "10941:15:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1542,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1533,
|
|
"mutability": "mutable",
|
|
"name": "rewardData",
|
|
"nameLocation": "10999:10:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1612,
|
|
"src": "10963:46:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "storage",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData"
|
|
},
|
|
"typeName": {
|
|
"id": 1532,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 1531,
|
|
"name": "RewardsDataTypes.RewardData",
|
|
"nameLocations": [
|
|
"10963:16:5",
|
|
"10980:10:5"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 2331,
|
|
"src": "10963:27:5"
|
|
},
|
|
"referencedDeclaration": 2331,
|
|
"src": "10963:27:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1535,
|
|
"mutability": "mutable",
|
|
"name": "user",
|
|
"nameLocation": "11024:4:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1612,
|
|
"src": "11016:12:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1534,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "11016:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1537,
|
|
"mutability": "mutable",
|
|
"name": "userBalance",
|
|
"nameLocation": "11043:11:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1612,
|
|
"src": "11035:19:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1536,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "11035:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1539,
|
|
"mutability": "mutable",
|
|
"name": "newAssetIndex",
|
|
"nameLocation": "11069:13:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1612,
|
|
"src": "11061:21:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1538,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "11061:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1541,
|
|
"mutability": "mutable",
|
|
"name": "assetUnit",
|
|
"nameLocation": "11097:9:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1612,
|
|
"src": "11089:17:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1540,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "11089:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "10956:155:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1547,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1544,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1612,
|
|
"src": "11130:7:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1543,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "11130:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1546,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1612,
|
|
"src": "11139:4:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 1545,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "11139:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "11129:15:5"
|
|
},
|
|
"scope": 2053,
|
|
"src": "10932:767:5",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1720,
|
|
"nodeType": "Block",
|
|
"src": "12141:1000:5",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
1625
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1625,
|
|
"mutability": "mutable",
|
|
"name": "assetUnit",
|
|
"nameLocation": "12156:9:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1720,
|
|
"src": "12148:17:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1624,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "12148:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1626,
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "12148:17:5"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1628
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1628,
|
|
"mutability": "mutable",
|
|
"name": "numAvailableRewards",
|
|
"nameLocation": "12180:19:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1720,
|
|
"src": "12172:27:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1627,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "12172:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1633,
|
|
"initialValue": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1629,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "12202:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 1631,
|
|
"indexExpression": {
|
|
"id": 1630,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1615,
|
|
"src": "12210:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "12202:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 1632,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "12217:21:5",
|
|
"memberName": "availableRewardsCount",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2342,
|
|
"src": "12202:36:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "12172:66:5"
|
|
},
|
|
{
|
|
"id": 1643,
|
|
"nodeType": "UncheckedBlock",
|
|
"src": "12245:68:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 1641,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 1634,
|
|
"name": "assetUnit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1625,
|
|
"src": "12264:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1640,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "3130",
|
|
"id": 1635,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "12276:2:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "**",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1636,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "12282:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 1638,
|
|
"indexExpression": {
|
|
"id": 1637,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1615,
|
|
"src": "12290:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "12282:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 1639,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "12297:8:5",
|
|
"memberName": "decimals",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2344,
|
|
"src": "12282:23:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"src": "12276:29:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "12264:41:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1642,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "12264:41:5"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1646,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 1644,
|
|
"name": "numAvailableRewards",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1628,
|
|
"src": "12325:19:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 1645,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "12348:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "12325:24:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 1649,
|
|
"nodeType": "IfStatement",
|
|
"src": "12321:53:5",
|
|
"trueBody": {
|
|
"id": 1648,
|
|
"nodeType": "Block",
|
|
"src": "12351:23:5",
|
|
"statements": [
|
|
{
|
|
"functionReturnParameters": 1623,
|
|
"id": 1647,
|
|
"nodeType": "Return",
|
|
"src": "12360:7:5"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": 1719,
|
|
"nodeType": "UncheckedBlock",
|
|
"src": "12380:756:5",
|
|
"statements": [
|
|
{
|
|
"body": {
|
|
"id": 1717,
|
|
"nodeType": "Block",
|
|
"src": "12449:680:5",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
1661
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1661,
|
|
"mutability": "mutable",
|
|
"name": "reward",
|
|
"nameLocation": "12468:6:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1717,
|
|
"src": "12460:14:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1660,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "12460:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1668,
|
|
"initialValue": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1662,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "12477:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 1664,
|
|
"indexExpression": {
|
|
"id": 1663,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1615,
|
|
"src": "12485:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "12477:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 1665,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "12492:16:5",
|
|
"memberName": "availableRewards",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2340,
|
|
"src": "12477:31:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_uint128_$_t_address_$",
|
|
"typeString": "mapping(uint128 => address)"
|
|
}
|
|
},
|
|
"id": 1667,
|
|
"indexExpression": {
|
|
"id": 1666,
|
|
"name": "r",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1651,
|
|
"src": "12509:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "12477:34:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "12460:51:5"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1673
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1673,
|
|
"mutability": "mutable",
|
|
"name": "rewardData",
|
|
"nameLocation": "12558:10:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1717,
|
|
"src": "12522:46:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "storage",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData"
|
|
},
|
|
"typeName": {
|
|
"id": 1672,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 1671,
|
|
"name": "RewardsDataTypes.RewardData",
|
|
"nameLocations": [
|
|
"12522:16:5",
|
|
"12539:10:5"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 2331,
|
|
"src": "12522:27:5"
|
|
},
|
|
"referencedDeclaration": 2331,
|
|
"src": "12522:27:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1680,
|
|
"initialValue": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1674,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "12571:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 1676,
|
|
"indexExpression": {
|
|
"id": 1675,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1615,
|
|
"src": "12579:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "12571:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 1677,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "12586:7:5",
|
|
"memberName": "rewards",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2336,
|
|
"src": "12571:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_RewardData_$2331_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.RewardData storage ref)"
|
|
}
|
|
},
|
|
"id": 1679,
|
|
"indexExpression": {
|
|
"id": 1678,
|
|
"name": "reward",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1661,
|
|
"src": "12594:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "12571:30:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage ref"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "12522:79:5"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1682,
|
|
1684
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1682,
|
|
"mutability": "mutable",
|
|
"name": "newAssetIndex",
|
|
"nameLocation": "12623:13:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1717,
|
|
"src": "12615:21:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1681,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "12615:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1684,
|
|
"mutability": "mutable",
|
|
"name": "rewardDataUpdated",
|
|
"nameLocation": "12643:17:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1717,
|
|
"src": "12638:22:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 1683,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "12638:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1690,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"id": 1686,
|
|
"name": "rewardData",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1673,
|
|
"src": "12694:10:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
{
|
|
"id": 1687,
|
|
"name": "totalSupply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1621,
|
|
"src": "12717:11:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 1688,
|
|
"name": "assetUnit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1625,
|
|
"src": "12741:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 1685,
|
|
"name": "_updateRewardData",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1529,
|
|
"src": "12664:17:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_struct$_RewardData_$2331_storage_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_bool_$",
|
|
"typeString": "function (struct RewardsDataTypes.RewardData storage pointer,uint256,uint256) returns (uint256,bool)"
|
|
}
|
|
},
|
|
"id": 1689,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "12664:97:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_bool_$",
|
|
"typeString": "tuple(uint256,bool)"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "12614:147:5"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1692,
|
|
1694
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1692,
|
|
"mutability": "mutable",
|
|
"name": "rewardsAccrued",
|
|
"nameLocation": "12783:14:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1717,
|
|
"src": "12775:22:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1691,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "12775:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1694,
|
|
"mutability": "mutable",
|
|
"name": "userDataUpdated",
|
|
"nameLocation": "12804:15:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1717,
|
|
"src": "12799:20:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 1693,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "12799:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1702,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"id": 1696,
|
|
"name": "rewardData",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1673,
|
|
"src": "12851:10:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
{
|
|
"id": 1697,
|
|
"name": "user",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1617,
|
|
"src": "12874:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 1698,
|
|
"name": "userBalance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1619,
|
|
"src": "12891:11:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 1699,
|
|
"name": "newAssetIndex",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1682,
|
|
"src": "12915:13:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 1700,
|
|
"name": "assetUnit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1625,
|
|
"src": "12941:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 1695,
|
|
"name": "_updateUserData",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1612,
|
|
"src": "12823:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_struct$_RewardData_$2331_storage_ptr_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_bool_$",
|
|
"typeString": "function (struct RewardsDataTypes.RewardData storage pointer,address,uint256,uint256,uint256) returns (uint256,bool)"
|
|
}
|
|
},
|
|
"id": 1701,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "12823:138:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_bool_$",
|
|
"typeString": "tuple(uint256,bool)"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "12774:187:5"
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 1705,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 1703,
|
|
"name": "rewardDataUpdated",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1684,
|
|
"src": "12978:17:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "||",
|
|
"rightExpression": {
|
|
"id": 1704,
|
|
"name": "userDataUpdated",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1694,
|
|
"src": "12999:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "12978:36:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 1716,
|
|
"nodeType": "IfStatement",
|
|
"src": "12974:146:5",
|
|
"trueBody": {
|
|
"id": 1715,
|
|
"nodeType": "Block",
|
|
"src": "13016:104:5",
|
|
"statements": [
|
|
{
|
|
"eventCall": {
|
|
"arguments": [
|
|
{
|
|
"id": 1707,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1615,
|
|
"src": "13042:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 1708,
|
|
"name": "reward",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1661,
|
|
"src": "13049:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 1709,
|
|
"name": "user",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1617,
|
|
"src": "13057:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 1710,
|
|
"name": "newAssetIndex",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1682,
|
|
"src": "13063:13:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 1711,
|
|
"name": "newAssetIndex",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1682,
|
|
"src": "13078:13:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 1712,
|
|
"name": "rewardsAccrued",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1692,
|
|
"src": "13093:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 1706,
|
|
"name": "Accrued",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2088,
|
|
"src": "13034:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,address,address,uint256,uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 1713,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "13034:74:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1714,
|
|
"nodeType": "EmitStatement",
|
|
"src": "13029:79:5"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1656,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 1654,
|
|
"name": "r",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1651,
|
|
"src": "12419:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"id": 1655,
|
|
"name": "numAvailableRewards",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1628,
|
|
"src": "12423:19:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "12419:23:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 1718,
|
|
"initializationExpression": {
|
|
"assignments": [
|
|
1651
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1651,
|
|
"mutability": "mutable",
|
|
"name": "r",
|
|
"nameLocation": "12412:1:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1718,
|
|
"src": "12404:9:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
},
|
|
"typeName": {
|
|
"id": 1650,
|
|
"name": "uint128",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "12404:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1653,
|
|
"initialValue": {
|
|
"hexValue": "30",
|
|
"id": 1652,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "12416:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "12404:13:5"
|
|
},
|
|
"isSimpleCounterLoop": false,
|
|
"loopExpression": {
|
|
"expression": {
|
|
"id": 1658,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "UnaryOperation",
|
|
"operator": "++",
|
|
"prefix": false,
|
|
"src": "12444:3:5",
|
|
"subExpression": {
|
|
"id": 1657,
|
|
"name": "r",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1651,
|
|
"src": "12444:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"id": 1659,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "12444:3:5"
|
|
},
|
|
"nodeType": "ForStatement",
|
|
"src": "12399:730:5"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1613,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "11705:306:5",
|
|
"text": " @dev Iterates and accrues all the rewards for asset of the specific user\n @param asset The address of the reference asset of the distribution\n @param user The user address\n @param userBalance The current user asset balance\n @param totalSupply Total supply of the asset*"
|
|
},
|
|
"id": 1721,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "_updateData",
|
|
"nameLocation": "12024:11:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1622,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1615,
|
|
"mutability": "mutable",
|
|
"name": "asset",
|
|
"nameLocation": "12050:5:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1721,
|
|
"src": "12042:13:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1614,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "12042:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1617,
|
|
"mutability": "mutable",
|
|
"name": "user",
|
|
"nameLocation": "12070:4:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1721,
|
|
"src": "12062:12:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1616,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "12062:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1619,
|
|
"mutability": "mutable",
|
|
"name": "userBalance",
|
|
"nameLocation": "12089:11:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1721,
|
|
"src": "12081:19:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1618,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "12081:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1621,
|
|
"mutability": "mutable",
|
|
"name": "totalSupply",
|
|
"nameLocation": "12115:11:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1721,
|
|
"src": "12107:19:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1620,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "12107:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "12035:96:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1623,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "12141:0:5"
|
|
},
|
|
"scope": 2053,
|
|
"src": "12015:1126:5",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1760,
|
|
"nodeType": "Block",
|
|
"src": "13527:242:5",
|
|
"statements": [
|
|
{
|
|
"body": {
|
|
"id": 1758,
|
|
"nodeType": "Block",
|
|
"src": "13589:175:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1743,
|
|
"name": "userAssetBalances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1728,
|
|
"src": "13620:17:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_UserAssetBalance_$2312_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory[] memory"
|
|
}
|
|
},
|
|
"id": 1745,
|
|
"indexExpression": {
|
|
"id": 1744,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1732,
|
|
"src": "13638:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "13620:20:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserAssetBalance_$2312_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory"
|
|
}
|
|
},
|
|
"id": 1746,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "13641:5:5",
|
|
"memberName": "asset",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2307,
|
|
"src": "13620:26:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 1747,
|
|
"name": "user",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1724,
|
|
"src": "13657:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1748,
|
|
"name": "userAssetBalances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1728,
|
|
"src": "13672:17:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_UserAssetBalance_$2312_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory[] memory"
|
|
}
|
|
},
|
|
"id": 1750,
|
|
"indexExpression": {
|
|
"id": 1749,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1732,
|
|
"src": "13690:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "13672:20:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserAssetBalance_$2312_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory"
|
|
}
|
|
},
|
|
"id": 1751,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "13693:11:5",
|
|
"memberName": "userBalance",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2309,
|
|
"src": "13672:32:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1752,
|
|
"name": "userAssetBalances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1728,
|
|
"src": "13715:17:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_UserAssetBalance_$2312_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory[] memory"
|
|
}
|
|
},
|
|
"id": 1754,
|
|
"indexExpression": {
|
|
"id": 1753,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1732,
|
|
"src": "13733:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "13715:20:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserAssetBalance_$2312_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory"
|
|
}
|
|
},
|
|
"id": 1755,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "13736:11:5",
|
|
"memberName": "totalSupply",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2311,
|
|
"src": "13715:32:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 1742,
|
|
"name": "_updateData",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1721,
|
|
"src": "13598:11:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,address,uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 1756,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "13598:158:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1757,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "13598:158:5"
|
|
}
|
|
]
|
|
},
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1738,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 1735,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1732,
|
|
"src": "13554:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"id": 1736,
|
|
"name": "userAssetBalances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1728,
|
|
"src": "13558:17:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_UserAssetBalance_$2312_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory[] memory"
|
|
}
|
|
},
|
|
"id": 1737,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "13576:6:5",
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"src": "13558:24:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "13554:28:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 1759,
|
|
"initializationExpression": {
|
|
"assignments": [
|
|
1732
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1732,
|
|
"mutability": "mutable",
|
|
"name": "i",
|
|
"nameLocation": "13547:1:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1759,
|
|
"src": "13539:9:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1731,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "13539:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1734,
|
|
"initialValue": {
|
|
"hexValue": "30",
|
|
"id": 1733,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "13551:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "13539:13:5"
|
|
},
|
|
"isSimpleCounterLoop": true,
|
|
"loopExpression": {
|
|
"expression": {
|
|
"id": 1740,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "UnaryOperation",
|
|
"operator": "++",
|
|
"prefix": false,
|
|
"src": "13584:3:5",
|
|
"subExpression": {
|
|
"id": 1739,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1732,
|
|
"src": "13584:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1741,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "13584:3:5"
|
|
},
|
|
"nodeType": "ForStatement",
|
|
"src": "13534:230:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1722,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "13147:247:5",
|
|
"text": " @dev Accrues all the rewards of the assets specified in the userAssetBalances list\n @param user The address of the user\n @param userAssetBalances List of structs with the user balance and total supply of a set of assets*"
|
|
},
|
|
"id": 1761,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "_updateDataMultiple",
|
|
"nameLocation": "13407:19:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1729,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1724,
|
|
"mutability": "mutable",
|
|
"name": "user",
|
|
"nameLocation": "13441:4:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1761,
|
|
"src": "13433:12:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1723,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "13433:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1728,
|
|
"mutability": "mutable",
|
|
"name": "userAssetBalances",
|
|
"nameLocation": "13495:17:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1761,
|
|
"src": "13452:60:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_UserAssetBalance_$2312_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 1726,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 1725,
|
|
"name": "RewardsDataTypes.UserAssetBalance",
|
|
"nameLocations": [
|
|
"13452:16:5",
|
|
"13469:16:5"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 2312,
|
|
"src": "13452:33:5"
|
|
},
|
|
"referencedDeclaration": 2312,
|
|
"src": "13452:33:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserAssetBalance_$2312_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance"
|
|
}
|
|
},
|
|
"id": 1727,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "13452:35:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_UserAssetBalance_$2312_storage_$dyn_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "13426:91:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1730,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "13527:0:5"
|
|
},
|
|
"scope": 2053,
|
|
"src": "13398:371:5",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1839,
|
|
"nodeType": "Block",
|
|
"src": "14354:542:5",
|
|
"statements": [
|
|
{
|
|
"body": {
|
|
"id": 1835,
|
|
"nodeType": "Block",
|
|
"src": "14447:412:5",
|
|
"statements": [
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1791,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1786,
|
|
"name": "userAssetBalances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1770,
|
|
"src": "14460:17:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_UserAssetBalance_$2312_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory[] memory"
|
|
}
|
|
},
|
|
"id": 1788,
|
|
"indexExpression": {
|
|
"id": 1787,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1776,
|
|
"src": "14478:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "14460:20:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserAssetBalance_$2312_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory"
|
|
}
|
|
},
|
|
"id": 1789,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "14481:11:5",
|
|
"memberName": "userBalance",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2309,
|
|
"src": "14460:32:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 1790,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "14496:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "14460:37:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"id": 1833,
|
|
"nodeType": "Block",
|
|
"src": "14657:195:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 1831,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 1809,
|
|
"name": "unclaimedRewards",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1773,
|
|
"src": "14668:16:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1830,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"arguments": [
|
|
{
|
|
"id": 1811,
|
|
"name": "user",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1764,
|
|
"src": "14718:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 1812,
|
|
"name": "reward",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1766,
|
|
"src": "14724:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"baseExpression": {
|
|
"id": 1813,
|
|
"name": "userAssetBalances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1770,
|
|
"src": "14732:17:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_UserAssetBalance_$2312_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory[] memory"
|
|
}
|
|
},
|
|
"id": 1815,
|
|
"indexExpression": {
|
|
"id": 1814,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1776,
|
|
"src": "14750:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "14732:20:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserAssetBalance_$2312_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_struct$_UserAssetBalance_$2312_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory"
|
|
}
|
|
],
|
|
"id": 1810,
|
|
"name": "_getPendingRewards",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1898,
|
|
"src": "14699:18:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$_t_struct$_UserAssetBalance_$2312_memory_ptr_$returns$_t_uint256_$",
|
|
"typeString": "function (address,address,struct RewardsDataTypes.UserAssetBalance memory) view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1816,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "14699:54:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1817,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "14767:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 1822,
|
|
"indexExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1818,
|
|
"name": "userAssetBalances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1770,
|
|
"src": "14775:17:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_UserAssetBalance_$2312_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory[] memory"
|
|
}
|
|
},
|
|
"id": 1820,
|
|
"indexExpression": {
|
|
"id": 1819,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1776,
|
|
"src": "14793:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "14775:20:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserAssetBalance_$2312_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory"
|
|
}
|
|
},
|
|
"id": 1821,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "14796:5:5",
|
|
"memberName": "asset",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2307,
|
|
"src": "14775:26:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "14767:35:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 1823,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "14803:7:5",
|
|
"memberName": "rewards",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2336,
|
|
"src": "14767:43:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_RewardData_$2331_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.RewardData storage ref)"
|
|
}
|
|
},
|
|
"id": 1825,
|
|
"indexExpression": {
|
|
"id": 1824,
|
|
"name": "reward",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1766,
|
|
"src": "14811:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "14767:51:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage ref"
|
|
}
|
|
},
|
|
"id": 1826,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "14819:9:5",
|
|
"memberName": "usersData",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2330,
|
|
"src": "14767:61:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_UserData_$2317_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.UserData storage ref)"
|
|
}
|
|
},
|
|
"id": 1828,
|
|
"indexExpression": {
|
|
"id": 1827,
|
|
"name": "user",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1764,
|
|
"src": "14829:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "14767:67:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserData_$2317_storage",
|
|
"typeString": "struct RewardsDataTypes.UserData storage ref"
|
|
}
|
|
},
|
|
"id": 1829,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "14835:7:5",
|
|
"memberName": "accrued",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2316,
|
|
"src": "14767:75:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"src": "14699:143:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "14668:174:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1832,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "14668:174:5"
|
|
}
|
|
]
|
|
},
|
|
"id": 1834,
|
|
"nodeType": "IfStatement",
|
|
"src": "14456:396:5",
|
|
"trueBody": {
|
|
"id": 1808,
|
|
"nodeType": "Block",
|
|
"src": "14499:152:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 1806,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 1792,
|
|
"name": "unclaimedRewards",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1773,
|
|
"src": "14510:16:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1793,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "14530:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 1798,
|
|
"indexExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1794,
|
|
"name": "userAssetBalances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1770,
|
|
"src": "14538:17:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_UserAssetBalance_$2312_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory[] memory"
|
|
}
|
|
},
|
|
"id": 1796,
|
|
"indexExpression": {
|
|
"id": 1795,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1776,
|
|
"src": "14556:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "14538:20:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserAssetBalance_$2312_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory"
|
|
}
|
|
},
|
|
"id": 1797,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "14559:5:5",
|
|
"memberName": "asset",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2307,
|
|
"src": "14538:26:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "14530:35:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 1799,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "14578:7:5",
|
|
"memberName": "rewards",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2336,
|
|
"src": "14530:55:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_RewardData_$2331_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.RewardData storage ref)"
|
|
}
|
|
},
|
|
"id": 1801,
|
|
"indexExpression": {
|
|
"id": 1800,
|
|
"name": "reward",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1766,
|
|
"src": "14586:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "14530:63:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage ref"
|
|
}
|
|
},
|
|
"id": 1802,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "14606:9:5",
|
|
"memberName": "usersData",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2330,
|
|
"src": "14530:85:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_UserData_$2317_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.UserData storage ref)"
|
|
}
|
|
},
|
|
"id": 1804,
|
|
"indexExpression": {
|
|
"id": 1803,
|
|
"name": "user",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1764,
|
|
"src": "14616:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "14530:91:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserData_$2317_storage",
|
|
"typeString": "struct RewardsDataTypes.UserData storage ref"
|
|
}
|
|
},
|
|
"id": 1805,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "14634:7:5",
|
|
"memberName": "accrued",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2316,
|
|
"src": "14530:111:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"src": "14510:131:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1807,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "14510:131:5"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1782,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 1779,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1776,
|
|
"src": "14412:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"id": 1780,
|
|
"name": "userAssetBalances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1770,
|
|
"src": "14416:17:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_UserAssetBalance_$2312_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory[] memory"
|
|
}
|
|
},
|
|
"id": 1781,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "14434:6:5",
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"src": "14416:24:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "14412:28:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 1836,
|
|
"initializationExpression": {
|
|
"assignments": [
|
|
1776
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1776,
|
|
"mutability": "mutable",
|
|
"name": "i",
|
|
"nameLocation": "14405:1:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1836,
|
|
"src": "14397:9:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1775,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "14397:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1778,
|
|
"initialValue": {
|
|
"hexValue": "30",
|
|
"id": 1777,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "14409:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "14397:13:5"
|
|
},
|
|
"isSimpleCounterLoop": true,
|
|
"loopExpression": {
|
|
"expression": {
|
|
"id": 1784,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "UnaryOperation",
|
|
"operator": "++",
|
|
"prefix": false,
|
|
"src": "14442:3:5",
|
|
"subExpression": {
|
|
"id": 1783,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1776,
|
|
"src": "14442:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1785,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "14442:3:5"
|
|
},
|
|
"nodeType": "ForStatement",
|
|
"src": "14392:467:5"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 1837,
|
|
"name": "unclaimedRewards",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1773,
|
|
"src": "14874:16:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1774,
|
|
"id": 1838,
|
|
"nodeType": "Return",
|
|
"src": "14867:23:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1762,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "13775:390:5",
|
|
"text": " @dev Return the accrued unclaimed amount of a reward from a user over a list of distribution\n @param user The address of the user\n @param reward The address of the reward token\n @param userAssetBalances List of structs with the user balance and total supply of a set of assets\n @return unclaimedRewards The accrued rewards for the user until the moment*"
|
|
},
|
|
"id": 1840,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "_getUserReward",
|
|
"nameLocation": "14178:14:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1771,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1764,
|
|
"mutability": "mutable",
|
|
"name": "user",
|
|
"nameLocation": "14207:4:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1840,
|
|
"src": "14199:12:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1763,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "14199:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1766,
|
|
"mutability": "mutable",
|
|
"name": "reward",
|
|
"nameLocation": "14226:6:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1840,
|
|
"src": "14218:14:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1765,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "14218:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1770,
|
|
"mutability": "mutable",
|
|
"name": "userAssetBalances",
|
|
"nameLocation": "14282:17:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1840,
|
|
"src": "14239:60:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_UserAssetBalance_$2312_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 1768,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 1767,
|
|
"name": "RewardsDataTypes.UserAssetBalance",
|
|
"nameLocations": [
|
|
"14239:16:5",
|
|
"14256:16:5"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 2312,
|
|
"src": "14239:33:5"
|
|
},
|
|
"referencedDeclaration": 2312,
|
|
"src": "14239:33:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserAssetBalance_$2312_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance"
|
|
}
|
|
},
|
|
"id": 1769,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "14239:35:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_UserAssetBalance_$2312_storage_$dyn_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "14192:112:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1774,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1773,
|
|
"mutability": "mutable",
|
|
"name": "unclaimedRewards",
|
|
"nameLocation": "14336:16:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1840,
|
|
"src": "14328:24:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1772,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "14328:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "14327:26:5"
|
|
},
|
|
"scope": 2053,
|
|
"src": "14169:727:5",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1897,
|
|
"nodeType": "Block",
|
|
"src": "15443:459:5",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
1857
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1857,
|
|
"mutability": "mutable",
|
|
"name": "rewardData",
|
|
"nameLocation": "15486:10:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1897,
|
|
"src": "15450:46:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "storage",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData"
|
|
},
|
|
"typeName": {
|
|
"id": 1856,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 1855,
|
|
"name": "RewardsDataTypes.RewardData",
|
|
"nameLocations": [
|
|
"15450:16:5",
|
|
"15467:10:5"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 2331,
|
|
"src": "15450:27:5"
|
|
},
|
|
"referencedDeclaration": 2331,
|
|
"src": "15450:27:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1865,
|
|
"initialValue": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1858,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "15499:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 1861,
|
|
"indexExpression": {
|
|
"expression": {
|
|
"id": 1859,
|
|
"name": "userAssetBalance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1848,
|
|
"src": "15507:16:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserAssetBalance_$2312_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory"
|
|
}
|
|
},
|
|
"id": 1860,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "15524:5:5",
|
|
"memberName": "asset",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2307,
|
|
"src": "15507:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "15499:31:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 1862,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "15531:7:5",
|
|
"memberName": "rewards",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2336,
|
|
"src": "15499:39:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_RewardData_$2331_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.RewardData storage ref)"
|
|
}
|
|
},
|
|
"id": 1864,
|
|
"indexExpression": {
|
|
"id": 1863,
|
|
"name": "reward",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1845,
|
|
"src": "15547:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "15499:61:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage ref"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "15450:110:5"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1867
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1867,
|
|
"mutability": "mutable",
|
|
"name": "assetUnit",
|
|
"nameLocation": "15575:9:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1897,
|
|
"src": "15567:17:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1866,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "15567:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1875,
|
|
"initialValue": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1874,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"hexValue": "3130",
|
|
"id": 1868,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "15587:2:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "**",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 1869,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "15593:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 1872,
|
|
"indexExpression": {
|
|
"expression": {
|
|
"id": 1870,
|
|
"name": "userAssetBalance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1848,
|
|
"src": "15601:16:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserAssetBalance_$2312_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory"
|
|
}
|
|
},
|
|
"id": 1871,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "15618:5:5",
|
|
"memberName": "asset",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2307,
|
|
"src": "15601:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "15593:31:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 1873,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "15625:8:5",
|
|
"memberName": "decimals",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2344,
|
|
"src": "15593:40:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"src": "15587:46:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "15567:66:5"
|
|
},
|
|
{
|
|
"assignments": [
|
|
null,
|
|
1877
|
|
],
|
|
"declarations": [
|
|
null,
|
|
{
|
|
"constant": false,
|
|
"id": 1877,
|
|
"mutability": "mutable",
|
|
"name": "nextIndex",
|
|
"nameLocation": "15651:9:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1897,
|
|
"src": "15643:17:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1876,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "15643:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1884,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"id": 1879,
|
|
"name": "rewardData",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1857,
|
|
"src": "15679:10:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 1880,
|
|
"name": "userAssetBalance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1848,
|
|
"src": "15691:16:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserAssetBalance_$2312_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory"
|
|
}
|
|
},
|
|
"id": 1881,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "15708:11:5",
|
|
"memberName": "totalSupply",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2311,
|
|
"src": "15691:28:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 1882,
|
|
"name": "assetUnit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1867,
|
|
"src": "15721:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 1878,
|
|
"name": "_getAssetIndex",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2016,
|
|
"src": "15664:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_struct$_RewardData_$2331_storage_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_uint256_$",
|
|
"typeString": "function (struct RewardsDataTypes.RewardData storage pointer,uint256,uint256) view returns (uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 1883,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "15664:67:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
|
|
"typeString": "tuple(uint256,uint256)"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "15640:91:5"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"expression": {
|
|
"id": 1886,
|
|
"name": "userAssetBalance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1848,
|
|
"src": "15776:16:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserAssetBalance_$2312_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance memory"
|
|
}
|
|
},
|
|
"id": 1887,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "15793:11:5",
|
|
"memberName": "userBalance",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2309,
|
|
"src": "15776:28:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 1888,
|
|
"name": "nextIndex",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1877,
|
|
"src": "15815:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"baseExpression": {
|
|
"expression": {
|
|
"id": 1889,
|
|
"name": "rewardData",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1857,
|
|
"src": "15835:10:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
"id": 1890,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "15846:9:5",
|
|
"memberName": "usersData",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2330,
|
|
"src": "15835:20:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_UserData_$2317_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.UserData storage ref)"
|
|
}
|
|
},
|
|
"id": 1892,
|
|
"indexExpression": {
|
|
"id": 1891,
|
|
"name": "user",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1843,
|
|
"src": "15856:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "15835:26:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserData_$2317_storage",
|
|
"typeString": "struct RewardsDataTypes.UserData storage ref"
|
|
}
|
|
},
|
|
"id": 1893,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "15862:5:5",
|
|
"memberName": "index",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2314,
|
|
"src": "15835:32:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint104",
|
|
"typeString": "uint104"
|
|
}
|
|
},
|
|
{
|
|
"id": 1894,
|
|
"name": "assetUnit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1867,
|
|
"src": "15878:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint104",
|
|
"typeString": "uint104"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 1885,
|
|
"name": "_getRewards",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1925,
|
|
"src": "15754:11:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256,uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1895,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "15754:142:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1852,
|
|
"id": 1896,
|
|
"nodeType": "Return",
|
|
"src": "15740:156:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1841,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "14902:368:5",
|
|
"text": " @dev Calculates the pending (not yet accrued) rewards since the last user action\n @param user The address of the user\n @param reward The address of the reward token\n @param userAssetBalance struct with the user balance and total supply of the incentivized asset\n @return The pending rewards for the user since the last user action*"
|
|
},
|
|
"id": 1898,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "_getPendingRewards",
|
|
"nameLocation": "15283:18:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1849,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1843,
|
|
"mutability": "mutable",
|
|
"name": "user",
|
|
"nameLocation": "15316:4:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1898,
|
|
"src": "15308:12:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1842,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "15308:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1845,
|
|
"mutability": "mutable",
|
|
"name": "reward",
|
|
"nameLocation": "15335:6:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1898,
|
|
"src": "15327:14:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1844,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "15327:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1848,
|
|
"mutability": "mutable",
|
|
"name": "userAssetBalance",
|
|
"nameLocation": "15389:16:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1898,
|
|
"src": "15348:57:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserAssetBalance_$2312_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance"
|
|
},
|
|
"typeName": {
|
|
"id": 1847,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 1846,
|
|
"name": "RewardsDataTypes.UserAssetBalance",
|
|
"nameLocations": [
|
|
"15348:16:5",
|
|
"15365:16:5"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 2312,
|
|
"src": "15348:33:5"
|
|
},
|
|
"referencedDeclaration": 2312,
|
|
"src": "15348:33:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserAssetBalance_$2312_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "15301:109:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1852,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1851,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1898,
|
|
"src": "15434:7:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1850,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "15434:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "15433:9:5"
|
|
},
|
|
"scope": 2053,
|
|
"src": "15274:628:5",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1924,
|
|
"nodeType": "Block",
|
|
"src": "16462:153:5",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
1913
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1913,
|
|
"mutability": "mutable",
|
|
"name": "result",
|
|
"nameLocation": "16477:6:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1924,
|
|
"src": "16469:14:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1912,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "16469:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1920,
|
|
"initialValue": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1919,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 1914,
|
|
"name": "userBalance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1901,
|
|
"src": "16486:11:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"components": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1917,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 1915,
|
|
"name": "reserveIndex",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1903,
|
|
"src": "16501:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "-",
|
|
"rightExpression": {
|
|
"id": 1916,
|
|
"name": "userIndex",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1905,
|
|
"src": "16516:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "16501:24:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 1918,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "16500:26:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "16486:40:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "16469:57:5"
|
|
},
|
|
{
|
|
"AST": {
|
|
"nativeSrc": "16542:48:5",
|
|
"nodeType": "YulBlock",
|
|
"src": "16542:48:5",
|
|
"statements": [
|
|
{
|
|
"nativeSrc": "16551:32:5",
|
|
"nodeType": "YulAssignment",
|
|
"src": "16551:32:5",
|
|
"value": {
|
|
"arguments": [
|
|
{
|
|
"name": "result",
|
|
"nativeSrc": "16565:6:5",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "16565:6:5"
|
|
},
|
|
{
|
|
"name": "assetUnit",
|
|
"nativeSrc": "16573:9:5",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "16573:9:5"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "div",
|
|
"nativeSrc": "16561:3:5",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "16561:3:5"
|
|
},
|
|
"nativeSrc": "16561:22:5",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "16561:22:5"
|
|
},
|
|
"variableNames": [
|
|
{
|
|
"name": "result",
|
|
"nativeSrc": "16551:6:5",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "16551:6:5"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"evmVersion": "cancun",
|
|
"externalReferences": [
|
|
{
|
|
"declaration": 1907,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "16573:9:5",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 1913,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "16551:6:5",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 1913,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "16565:6:5",
|
|
"valueSize": 1
|
|
}
|
|
],
|
|
"id": 1921,
|
|
"nodeType": "InlineAssembly",
|
|
"src": "16533:57:5"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 1922,
|
|
"name": "result",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1913,
|
|
"src": "16603:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1911,
|
|
"id": 1923,
|
|
"nodeType": "Return",
|
|
"src": "16596:13:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1899,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "15908:391:5",
|
|
"text": " @dev Internal function for the calculation of user's rewards on a distribution\n @param userBalance Balance of the user asset on a distribution\n @param reserveIndex Current index of the distribution\n @param userIndex Index stored for the user, representation his staking moment\n @param assetUnit One unit of asset (10**decimals)\n @return The rewards*"
|
|
},
|
|
"id": 1925,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "_getRewards",
|
|
"nameLocation": "16312:11:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1908,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1901,
|
|
"mutability": "mutable",
|
|
"name": "userBalance",
|
|
"nameLocation": "16338:11:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1925,
|
|
"src": "16330:19:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1900,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "16330:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1903,
|
|
"mutability": "mutable",
|
|
"name": "reserveIndex",
|
|
"nameLocation": "16364:12:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1925,
|
|
"src": "16356:20:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1902,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "16356:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1905,
|
|
"mutability": "mutable",
|
|
"name": "userIndex",
|
|
"nameLocation": "16391:9:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1925,
|
|
"src": "16383:17:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1904,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "16383:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1907,
|
|
"mutability": "mutable",
|
|
"name": "assetUnit",
|
|
"nameLocation": "16415:9:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1925,
|
|
"src": "16407:17:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1906,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "16407:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "16323:106:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1911,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1910,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1925,
|
|
"src": "16453:7:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1909,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "16453:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "16452:9:5"
|
|
},
|
|
"scope": 2053,
|
|
"src": "16303:312:5",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 2015,
|
|
"nodeType": "Block",
|
|
"src": "17110:827:5",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
1941
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1941,
|
|
"mutability": "mutable",
|
|
"name": "oldIndex",
|
|
"nameLocation": "17125:8:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2015,
|
|
"src": "17117:16:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1940,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "17117:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1944,
|
|
"initialValue": {
|
|
"expression": {
|
|
"id": 1942,
|
|
"name": "rewardData",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1929,
|
|
"src": "17136:10:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
"id": 1943,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "17147:5:5",
|
|
"memberName": "index",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2319,
|
|
"src": "17136:16:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint104",
|
|
"typeString": "uint104"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "17117:35:5"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1946
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1946,
|
|
"mutability": "mutable",
|
|
"name": "distributionEnd",
|
|
"nameLocation": "17167:15:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2015,
|
|
"src": "17159:23:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1945,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "17159:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1949,
|
|
"initialValue": {
|
|
"expression": {
|
|
"id": 1947,
|
|
"name": "rewardData",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1929,
|
|
"src": "17185:10:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
"id": 1948,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "17196:15:5",
|
|
"memberName": "distributionEnd",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2325,
|
|
"src": "17185:26:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "17159:52:5"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1951
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1951,
|
|
"mutability": "mutable",
|
|
"name": "emissionPerSecond",
|
|
"nameLocation": "17226:17:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2015,
|
|
"src": "17218:25:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1950,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "17218:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1954,
|
|
"initialValue": {
|
|
"expression": {
|
|
"id": 1952,
|
|
"name": "rewardData",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1929,
|
|
"src": "17246:10:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
"id": 1953,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "17257:17:5",
|
|
"memberName": "emissionPerSecond",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2321,
|
|
"src": "17246:28:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "17218:56:5"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1956
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1956,
|
|
"mutability": "mutable",
|
|
"name": "lastUpdateTimestamp",
|
|
"nameLocation": "17289:19:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2015,
|
|
"src": "17281:27:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1955,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "17281:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1959,
|
|
"initialValue": {
|
|
"expression": {
|
|
"id": 1957,
|
|
"name": "rewardData",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1929,
|
|
"src": "17311:10:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData storage pointer"
|
|
}
|
|
},
|
|
"id": 1958,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "17322:19:5",
|
|
"memberName": "lastUpdateTimestamp",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2323,
|
|
"src": "17311:30:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "17281:60:5"
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 1975,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 1971,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 1966,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1962,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 1960,
|
|
"name": "emissionPerSecond",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1951,
|
|
"src": "17362:17:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 1961,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "17383:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "17362:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "||",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1965,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 1963,
|
|
"name": "totalSupply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1931,
|
|
"src": "17395:11:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 1964,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "17410:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "17395:16:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "17362:49:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "||",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1970,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 1967,
|
|
"name": "lastUpdateTimestamp",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1956,
|
|
"src": "17422:19:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"id": 1968,
|
|
"name": "block",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967292,
|
|
"src": "17445:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_block",
|
|
"typeString": "block"
|
|
}
|
|
},
|
|
"id": 1969,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "17451:9:5",
|
|
"memberName": "timestamp",
|
|
"nodeType": "MemberAccess",
|
|
"src": "17445:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "17422:38:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "17362:98:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "||",
|
|
"rightExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1974,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 1972,
|
|
"name": "lastUpdateTimestamp",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1956,
|
|
"src": "17471:19:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"id": 1973,
|
|
"name": "distributionEnd",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1946,
|
|
"src": "17494:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "17471:38:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "17362:147:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 1981,
|
|
"nodeType": "IfStatement",
|
|
"src": "17350:211:5",
|
|
"trueBody": {
|
|
"id": 1980,
|
|
"nodeType": "Block",
|
|
"src": "17517:44:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"components": [
|
|
{
|
|
"id": 1976,
|
|
"name": "oldIndex",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1941,
|
|
"src": "17534:8:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"id": 1977,
|
|
"name": "oldIndex",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1941,
|
|
"src": "17544:8:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 1978,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "17533:20:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
|
|
"typeString": "tuple(uint256,uint256)"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1939,
|
|
"id": 1979,
|
|
"nodeType": "Return",
|
|
"src": "17526:27:5"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"assignments": [
|
|
1983
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1983,
|
|
"mutability": "mutable",
|
|
"name": "currentTimestamp",
|
|
"nameLocation": "17577:16:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2015,
|
|
"src": "17569:24:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1982,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "17569:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1992,
|
|
"initialValue": {
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1987,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"id": 1984,
|
|
"name": "block",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967292,
|
|
"src": "17596:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_block",
|
|
"typeString": "block"
|
|
}
|
|
},
|
|
"id": 1985,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "17602:9:5",
|
|
"memberName": "timestamp",
|
|
"nodeType": "MemberAccess",
|
|
"src": "17596:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"id": 1986,
|
|
"name": "distributionEnd",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1946,
|
|
"src": "17614:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "17596:33:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseExpression": {
|
|
"expression": {
|
|
"id": 1989,
|
|
"name": "block",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967292,
|
|
"src": "17664:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_block",
|
|
"typeString": "block"
|
|
}
|
|
},
|
|
"id": 1990,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "17670:9:5",
|
|
"memberName": "timestamp",
|
|
"nodeType": "MemberAccess",
|
|
"src": "17664:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1991,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "Conditional",
|
|
"src": "17596:83:5",
|
|
"trueExpression": {
|
|
"id": 1988,
|
|
"name": "distributionEnd",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1946,
|
|
"src": "17639:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "17569:110:5"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1994
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1994,
|
|
"mutability": "mutable",
|
|
"name": "timeDelta",
|
|
"nameLocation": "17694:9:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2015,
|
|
"src": "17686:17:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1993,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "17686:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1998,
|
|
"initialValue": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1997,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 1995,
|
|
"name": "currentTimestamp",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1983,
|
|
"src": "17706:16:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "-",
|
|
"rightExpression": {
|
|
"id": 1996,
|
|
"name": "lastUpdateTimestamp",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1956,
|
|
"src": "17725:19:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "17706:38:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "17686:58:5"
|
|
},
|
|
{
|
|
"assignments": [
|
|
2000
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 2000,
|
|
"mutability": "mutable",
|
|
"name": "firstTerm",
|
|
"nameLocation": "17759:9:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2015,
|
|
"src": "17751:17:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1999,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "17751:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 2006,
|
|
"initialValue": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 2005,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 2003,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 2001,
|
|
"name": "emissionPerSecond",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1951,
|
|
"src": "17771:17:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"id": 2002,
|
|
"name": "timeDelta",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1994,
|
|
"src": "17791:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "17771:29:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"id": 2004,
|
|
"name": "assetUnit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1933,
|
|
"src": "17803:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "17771:41:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "17751:61:5"
|
|
},
|
|
{
|
|
"AST": {
|
|
"nativeSrc": "17828:56:5",
|
|
"nodeType": "YulBlock",
|
|
"src": "17828:56:5",
|
|
"statements": [
|
|
{
|
|
"nativeSrc": "17837:40:5",
|
|
"nodeType": "YulAssignment",
|
|
"src": "17837:40:5",
|
|
"value": {
|
|
"arguments": [
|
|
{
|
|
"name": "firstTerm",
|
|
"nativeSrc": "17854:9:5",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "17854:9:5"
|
|
},
|
|
{
|
|
"name": "totalSupply",
|
|
"nativeSrc": "17865:11:5",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "17865:11:5"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "div",
|
|
"nativeSrc": "17850:3:5",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "17850:3:5"
|
|
},
|
|
"nativeSrc": "17850:27:5",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "17850:27:5"
|
|
},
|
|
"variableNames": [
|
|
{
|
|
"name": "firstTerm",
|
|
"nativeSrc": "17837:9:5",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "17837:9:5"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"evmVersion": "cancun",
|
|
"externalReferences": [
|
|
{
|
|
"declaration": 2000,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "17837:9:5",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 2000,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "17854:9:5",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 1931,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "17865:11:5",
|
|
"valueSize": 1
|
|
}
|
|
],
|
|
"id": 2007,
|
|
"nodeType": "InlineAssembly",
|
|
"src": "17819:65:5"
|
|
},
|
|
{
|
|
"expression": {
|
|
"components": [
|
|
{
|
|
"id": 2008,
|
|
"name": "oldIndex",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1941,
|
|
"src": "17898:8:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"components": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 2011,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 2009,
|
|
"name": "firstTerm",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2000,
|
|
"src": "17909:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"id": 2010,
|
|
"name": "oldIndex",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1941,
|
|
"src": "17921:8:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "17909:20:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 2012,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "17908:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 2013,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "17897:34:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
|
|
"typeString": "tuple(uint256,uint256)"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1939,
|
|
"id": 2014,
|
|
"nodeType": "Return",
|
|
"src": "17890:41:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 1926,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "16621:312:5",
|
|
"text": " @dev Calculates the next value of an specific distribution index, with validations\n @param rewardData Storage pointer to the distribution reward config\n @param totalSupply of the asset being rewarded\n @param assetUnit One unit of asset (10**decimals)\n @return The new index.*"
|
|
},
|
|
"id": 2016,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "_getAssetIndex",
|
|
"nameLocation": "16946:14:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1934,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1929,
|
|
"mutability": "mutable",
|
|
"name": "rewardData",
|
|
"nameLocation": "17003:10:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2016,
|
|
"src": "16967:46:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "storage",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData"
|
|
},
|
|
"typeName": {
|
|
"id": 1928,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 1927,
|
|
"name": "RewardsDataTypes.RewardData",
|
|
"nameLocations": [
|
|
"16967:16:5",
|
|
"16984:10:5"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 2331,
|
|
"src": "16967:27:5"
|
|
},
|
|
"referencedDeclaration": 2331,
|
|
"src": "16967:27:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1931,
|
|
"mutability": "mutable",
|
|
"name": "totalSupply",
|
|
"nameLocation": "17028:11:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2016,
|
|
"src": "17020:19:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1930,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "17020:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1933,
|
|
"mutability": "mutable",
|
|
"name": "assetUnit",
|
|
"nameLocation": "17054:9:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2016,
|
|
"src": "17046:17:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1932,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "17046:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "16960:108:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1939,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1936,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2016,
|
|
"src": "17092:7:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1935,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "17092:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1938,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2016,
|
|
"src": "17101:7:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1937,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "17101:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "17091:18:5"
|
|
},
|
|
"scope": 2053,
|
|
"src": "16937:1000:5",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 2017,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "17943:337:5",
|
|
"text": " @dev Get user balances and total supply of all the assets specified by the assets parameter\n @param assets List of assets to retrieve user balance and total supply\n @param user Address of the user\n @return userAssetBalances contains a list of structs with user balance and total supply of the given assets"
|
|
},
|
|
"id": 2029,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "_getUserAssetBalances",
|
|
"nameLocation": "18293:21:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 2023,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2020,
|
|
"mutability": "mutable",
|
|
"name": "assets",
|
|
"nameLocation": "18340:6:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2029,
|
|
"src": "18321:25:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "calldata",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr",
|
|
"typeString": "address[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 2018,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "18321:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 2019,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "18321:9:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
|
|
"typeString": "address[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2022,
|
|
"mutability": "mutable",
|
|
"name": "user",
|
|
"nameLocation": "18361:4:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2029,
|
|
"src": "18353:12:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2021,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "18353:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "18314:56:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2028,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2027,
|
|
"mutability": "mutable",
|
|
"name": "userAssetBalances",
|
|
"nameLocation": "18445:17:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2029,
|
|
"src": "18402:60:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_UserAssetBalance_$2312_memory_ptr_$dyn_memory_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 2025,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 2024,
|
|
"name": "RewardsDataTypes.UserAssetBalance",
|
|
"nameLocations": [
|
|
"18402:16:5",
|
|
"18419:16:5"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 2312,
|
|
"src": "18402:33:5"
|
|
},
|
|
"referencedDeclaration": 2312,
|
|
"src": "18402:33:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserAssetBalance_$2312_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance"
|
|
}
|
|
},
|
|
"id": 2026,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "18402:35:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_struct$_UserAssetBalance_$2312_storage_$dyn_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserAssetBalance[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "18401:62:5"
|
|
},
|
|
"scope": 2053,
|
|
"src": "18284:180:5",
|
|
"stateMutability": "view",
|
|
"virtual": true,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
2222
|
|
],
|
|
"body": {
|
|
"id": 2042,
|
|
"nodeType": "Block",
|
|
"src": "18580:43:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"expression": {
|
|
"baseExpression": {
|
|
"id": 2037,
|
|
"name": "_assets",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 632,
|
|
"src": "18594:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_AssetData_$2345_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.AssetData storage ref)"
|
|
}
|
|
},
|
|
"id": 2039,
|
|
"indexExpression": {
|
|
"id": 2038,
|
|
"name": "asset",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2032,
|
|
"src": "18602:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "18594:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_AssetData_$2345_storage",
|
|
"typeString": "struct RewardsDataTypes.AssetData storage ref"
|
|
}
|
|
},
|
|
"id": 2040,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "18609:8:5",
|
|
"memberName": "decimals",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 2344,
|
|
"src": "18594:23:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"functionReturnParameters": 2036,
|
|
"id": 2041,
|
|
"nodeType": "Return",
|
|
"src": "18587:30:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 2030,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "18470:35:5",
|
|
"text": "@inheritdoc IRewardsDistributor"
|
|
},
|
|
"functionSelector": "9efd6f72",
|
|
"id": 2043,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getAssetDecimals",
|
|
"nameLocation": "18518:16:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 2033,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2032,
|
|
"mutability": "mutable",
|
|
"name": "asset",
|
|
"nameLocation": "18543:5:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2043,
|
|
"src": "18535:13:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2031,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "18535:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "18534:15:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2036,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2035,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2043,
|
|
"src": "18573:5:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
},
|
|
"typeName": {
|
|
"id": 2034,
|
|
"name": "uint8",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "18573:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "18572:7:5"
|
|
},
|
|
"scope": 2053,
|
|
"src": "18509:114:5",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
2234
|
|
],
|
|
"body": {
|
|
"id": 2051,
|
|
"nodeType": "Block",
|
|
"src": "18730:36:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 2049,
|
|
"name": "EMISSION_MANAGER",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 625,
|
|
"src": "18744:16:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"functionReturnParameters": 2048,
|
|
"id": 2050,
|
|
"nodeType": "Return",
|
|
"src": "18737:23:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 2044,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "18629:35:5",
|
|
"text": "@inheritdoc IRewardsDistributor"
|
|
},
|
|
"functionSelector": "92074b08",
|
|
"id": 2052,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getEmissionManager",
|
|
"nameLocation": "18677:18:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 2045,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "18695:2:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2048,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2047,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2052,
|
|
"src": "18721:7:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2046,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "18721:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "18720:9:5"
|
|
},
|
|
"scope": 2053,
|
|
"src": "18668:98:5",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
}
|
|
],
|
|
"scope": 2054,
|
|
"src": "673:18096:5",
|
|
"usedErrors": [],
|
|
"usedEvents": [
|
|
2073,
|
|
2088
|
|
]
|
|
}
|
|
],
|
|
"src": "38:18733:5"
|
|
},
|
|
"id": 5
|
|
},
|
|
"contracts/rewards/interfaces/IRewardsDistributor.sol": {
|
|
"ast": {
|
|
"absolutePath": "contracts/rewards/interfaces/IRewardsDistributor.sol",
|
|
"exportedSymbols": {
|
|
"IRewardsDistributor": [
|
|
2235
|
|
]
|
|
},
|
|
"id": 2236,
|
|
"license": "AGPL-3.0",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 2055,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".10"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "38:24:6"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"canonicalName": "IRewardsDistributor",
|
|
"contractDependencies": [],
|
|
"contractKind": "interface",
|
|
"documentation": {
|
|
"id": 2056,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "66:123:6",
|
|
"text": " @title IRewardsDistributor\n @author Aave\n @notice Defines the basic interface for a Rewards Distributor."
|
|
},
|
|
"fullyImplemented": false,
|
|
"id": 2235,
|
|
"linearizedBaseContracts": [
|
|
2235
|
|
],
|
|
"name": "IRewardsDistributor",
|
|
"nameLocation": "201:19:6",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"anonymous": false,
|
|
"documentation": {
|
|
"id": 2057,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "226:596:6",
|
|
"text": " @dev Emitted when the configuration of the rewards of an asset is updated.\n @param asset The address of the incentivized asset\n @param reward The address of the reward token\n @param oldEmission The old emissions per second value of the reward distribution\n @param newEmission The new emissions per second value of the reward distribution\n @param oldDistributionEnd The old end timestamp of the reward distribution\n @param newDistributionEnd The new end timestamp of the reward distribution\n @param assetIndex The index of the asset distribution"
|
|
},
|
|
"eventSelector": "ac1777479f07f3e7c34da8402139d54027a6a260caaae168bdee825ca5580dc5",
|
|
"id": 2073,
|
|
"name": "AssetConfigUpdated",
|
|
"nameLocation": "832:18:6",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 2072,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2059,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "asset",
|
|
"nameLocation": "873:5:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2073,
|
|
"src": "857:21:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2058,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "857:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2061,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "reward",
|
|
"nameLocation": "901:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2073,
|
|
"src": "885:22:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2060,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "885:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2063,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "oldEmission",
|
|
"nameLocation": "922:11:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2073,
|
|
"src": "914:19:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2062,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "914:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2065,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "newEmission",
|
|
"nameLocation": "948:11:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2073,
|
|
"src": "940:19:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2064,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "940:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2067,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "oldDistributionEnd",
|
|
"nameLocation": "974:18:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2073,
|
|
"src": "966:26:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2066,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "966:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2069,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "newDistributionEnd",
|
|
"nameLocation": "1007:18:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2073,
|
|
"src": "999:26:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2068,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "999:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2071,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "assetIndex",
|
|
"nameLocation": "1040:10:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2073,
|
|
"src": "1032:18:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2070,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1032:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "850:205:6"
|
|
},
|
|
"src": "826:230:6"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": {
|
|
"id": 2074,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1062:475:6",
|
|
"text": " @dev Emitted when rewards of an asset are accrued on behalf of a user.\n @param asset The address of the incentivized asset\n @param reward The address of the reward token\n @param user The address of the user that rewards are accrued on behalf of\n @param assetIndex The index of the asset distribution\n @param userIndex The index of the asset distribution on behalf of the user\n @param rewardsAccrued The amount of rewards accrued"
|
|
},
|
|
"eventSelector": "3303facd24627943a92e9dc87cfbb34b15c49b726eec3ad3487c16be9ab8efe8",
|
|
"id": 2088,
|
|
"name": "Accrued",
|
|
"nameLocation": "1547:7:6",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 2087,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2076,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "asset",
|
|
"nameLocation": "1577:5:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2088,
|
|
"src": "1561:21:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2075,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1561:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2078,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "reward",
|
|
"nameLocation": "1605:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2088,
|
|
"src": "1589:22:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2077,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1589:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2080,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "user",
|
|
"nameLocation": "1634:4:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2088,
|
|
"src": "1618:20:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2079,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1618:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2082,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "assetIndex",
|
|
"nameLocation": "1653:10:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2088,
|
|
"src": "1645:18:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2081,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1645:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2084,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "userIndex",
|
|
"nameLocation": "1678:9:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2088,
|
|
"src": "1670:17:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2083,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1670:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2086,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "rewardsAccrued",
|
|
"nameLocation": "1702:14:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2088,
|
|
"src": "1694:22:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2085,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1694:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1554:167:6"
|
|
},
|
|
"src": "1541:181:6"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 2089,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1728:257:6",
|
|
"text": " @dev Sets the end date for the distribution\n @param asset The asset to incentivize\n @param reward The reward token that incentives the asset\n @param newDistributionEnd The end date of the incentivization, in unix time format*"
|
|
},
|
|
"functionSelector": "c5a7b538",
|
|
"id": 2098,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "setDistributionEnd",
|
|
"nameLocation": "1998:18:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 2096,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2091,
|
|
"mutability": "mutable",
|
|
"name": "asset",
|
|
"nameLocation": "2025:5:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2098,
|
|
"src": "2017:13:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2090,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2017:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2093,
|
|
"mutability": "mutable",
|
|
"name": "reward",
|
|
"nameLocation": "2040:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2098,
|
|
"src": "2032:14:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2092,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2032:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2095,
|
|
"mutability": "mutable",
|
|
"name": "newDistributionEnd",
|
|
"nameLocation": "2055:18:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2098,
|
|
"src": "2048:25:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
},
|
|
"typeName": {
|
|
"id": 2094,
|
|
"name": "uint32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2048:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2016:58:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2097,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2083:0:6"
|
|
},
|
|
"scope": 2235,
|
|
"src": "1989:95:6",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 2099,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2090:277:6",
|
|
"text": " @dev Sets the emission per second of a set of reward distributions\n @param asset The asset is being incentivized\n @param rewards List of reward addresses are being distributed\n @param newEmissionsPerSecond List of new reward emissions per second"
|
|
},
|
|
"functionSelector": "f996868b",
|
|
"id": 2110,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "setEmissionPerSecond",
|
|
"nameLocation": "2380:20:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 2108,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2101,
|
|
"mutability": "mutable",
|
|
"name": "asset",
|
|
"nameLocation": "2415:5:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2110,
|
|
"src": "2407:13:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2100,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2407:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2104,
|
|
"mutability": "mutable",
|
|
"name": "rewards",
|
|
"nameLocation": "2446:7:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2110,
|
|
"src": "2427:26:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "calldata",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr",
|
|
"typeString": "address[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 2102,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2427:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 2103,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "2427:9:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
|
|
"typeString": "address[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2107,
|
|
"mutability": "mutable",
|
|
"name": "newEmissionsPerSecond",
|
|
"nameLocation": "2478:21:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2110,
|
|
"src": "2460:39:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "calldata",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint88_$dyn_calldata_ptr",
|
|
"typeString": "uint88[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 2105,
|
|
"name": "uint88",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2460:6:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
}
|
|
},
|
|
"id": 2106,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "2460:8:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint88_$dyn_storage_ptr",
|
|
"typeString": "uint88[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2400:104:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2109,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2513:0:6"
|
|
},
|
|
"scope": 2235,
|
|
"src": "2371:143:6",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 2111,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2520:248:6",
|
|
"text": " @dev Gets the end date for the distribution\n @param asset The incentivized asset\n @param reward The reward token of the incentivized asset\n @return The timestamp with the end of the distribution, in unix time format*"
|
|
},
|
|
"functionSelector": "1b839c77",
|
|
"id": 2120,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getDistributionEnd",
|
|
"nameLocation": "2781:18:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 2116,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2113,
|
|
"mutability": "mutable",
|
|
"name": "asset",
|
|
"nameLocation": "2808:5:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2120,
|
|
"src": "2800:13:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2112,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2800:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2115,
|
|
"mutability": "mutable",
|
|
"name": "reward",
|
|
"nameLocation": "2823:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2120,
|
|
"src": "2815:14:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2114,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2815:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2799:31:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2119,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2118,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2120,
|
|
"src": "2854:7:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2117,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2854:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2853:9:6"
|
|
},
|
|
"scope": 2235,
|
|
"src": "2772:91:6",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 2121,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2869:294:6",
|
|
"text": " @dev Returns the index of a user on a reward distribution\n @param user Address of the user\n @param asset The incentivized asset\n @param reward The reward token of the incentivized asset\n @return The current user asset index, not including new distributions*"
|
|
},
|
|
"functionSelector": "533f542a",
|
|
"id": 2132,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getUserAssetIndex",
|
|
"nameLocation": "3176:17:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 2128,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2123,
|
|
"mutability": "mutable",
|
|
"name": "user",
|
|
"nameLocation": "3208:4:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2132,
|
|
"src": "3200:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2122,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3200:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2125,
|
|
"mutability": "mutable",
|
|
"name": "asset",
|
|
"nameLocation": "3227:5:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2132,
|
|
"src": "3219:13:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2124,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3219:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2127,
|
|
"mutability": "mutable",
|
|
"name": "reward",
|
|
"nameLocation": "3247:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2132,
|
|
"src": "3239:14:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2126,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3239:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3193:65:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2131,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2130,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2132,
|
|
"src": "3282:7:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2129,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3282:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3281:9:6"
|
|
},
|
|
"scope": 2235,
|
|
"src": "3167:124:6",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 2133,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "3297:427:6",
|
|
"text": " @dev Returns the configuration of the distribution reward for a certain asset\n @param asset The incentivized asset\n @param reward The reward token of the incentivized asset\n @return The index of the asset distribution\n @return The emission per second of the reward distribution\n @return The timestamp of the last update of the index\n @return The timestamp of the distribution end*"
|
|
},
|
|
"functionSelector": "7eff4ba8",
|
|
"id": 2148,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getRewardsData",
|
|
"nameLocation": "3737:14:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 2138,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2135,
|
|
"mutability": "mutable",
|
|
"name": "asset",
|
|
"nameLocation": "3766:5:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2148,
|
|
"src": "3758:13:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2134,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3758:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2137,
|
|
"mutability": "mutable",
|
|
"name": "reward",
|
|
"nameLocation": "3786:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2148,
|
|
"src": "3778:14:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2136,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3778:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3751:46:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2147,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2140,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2148,
|
|
"src": "3821:7:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2139,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3821:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2142,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2148,
|
|
"src": "3830:7:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2141,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3830:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2144,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2148,
|
|
"src": "3839:7:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2143,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3839:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2146,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2148,
|
|
"src": "3848:7:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2145,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3848:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3820:36:6"
|
|
},
|
|
"scope": 2235,
|
|
"src": "3728:129:6",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 2149,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "3863:314:6",
|
|
"text": " @dev Calculates the next value of an specific distribution index, with validations.\n @param asset The incentivized asset\n @param reward The reward token of the incentivized asset\n @return The old index of the asset distribution\n @return The new index of the asset distribution*"
|
|
},
|
|
"functionSelector": "886fe70b",
|
|
"id": 2160,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getAssetIndex",
|
|
"nameLocation": "4190:13:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 2154,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2151,
|
|
"mutability": "mutable",
|
|
"name": "asset",
|
|
"nameLocation": "4212:5:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2160,
|
|
"src": "4204:13:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2150,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4204:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2153,
|
|
"mutability": "mutable",
|
|
"name": "reward",
|
|
"nameLocation": "4227:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2160,
|
|
"src": "4219:14:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2152,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4219:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4203:31:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2159,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2156,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2160,
|
|
"src": "4258:7:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2155,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4258:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2158,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2160,
|
|
"src": "4267:7:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2157,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4267:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4257:18:6"
|
|
},
|
|
"scope": 2235,
|
|
"src": "4181:95:6",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 2161,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "4282:201:6",
|
|
"text": " @dev Returns the list of available reward token addresses of an incentivized asset\n @param asset The incentivized asset\n @return List of rewards addresses of the input asset*"
|
|
},
|
|
"functionSelector": "6657732f",
|
|
"id": 2169,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getRewardsByAsset",
|
|
"nameLocation": "4496:17:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 2164,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2163,
|
|
"mutability": "mutable",
|
|
"name": "asset",
|
|
"nameLocation": "4522:5:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2169,
|
|
"src": "4514:13:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2162,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4514:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4513:15:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2168,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2167,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2169,
|
|
"src": "4552:16:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
|
"typeString": "address[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 2165,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4552:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 2166,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "4552:9:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
|
|
"typeString": "address[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4551:18:6"
|
|
},
|
|
"scope": 2235,
|
|
"src": "4487:83:6",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 2170,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "4576:126:6",
|
|
"text": " @dev Returns the list of available reward addresses\n @return List of rewards supported in this contract*"
|
|
},
|
|
"functionSelector": "b45ac1a9",
|
|
"id": 2176,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getRewardsList",
|
|
"nameLocation": "4715:14:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 2171,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "4729:2:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2175,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2174,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2176,
|
|
"src": "4755:16:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
|
"typeString": "address[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 2172,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4755:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 2173,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "4755:9:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
|
|
"typeString": "address[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4754:18:6"
|
|
},
|
|
"scope": 2235,
|
|
"src": "4706:67:6",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 2177,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "4779:293:6",
|
|
"text": " @dev Returns the accrued rewards balance of a user, not including virtually accrued rewards since last distribution.\n @param user The address of the user\n @param reward The address of the reward token\n @return Unclaimed rewards, not including new distributions*"
|
|
},
|
|
"functionSelector": "b022418c",
|
|
"id": 2186,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getUserAccruedRewards",
|
|
"nameLocation": "5085:21:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 2182,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2179,
|
|
"mutability": "mutable",
|
|
"name": "user",
|
|
"nameLocation": "5115:4:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2186,
|
|
"src": "5107:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2178,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5107:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2181,
|
|
"mutability": "mutable",
|
|
"name": "reward",
|
|
"nameLocation": "5129:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2186,
|
|
"src": "5121:14:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2180,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5121:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5106:30:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2185,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2184,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2186,
|
|
"src": "5160:7:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2183,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5160:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5159:9:6"
|
|
},
|
|
"scope": 2235,
|
|
"src": "5076:93:6",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 2187,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "5175:335:6",
|
|
"text": " @dev Returns a single rewards balance of a user, including virtually accrued and unrealized claimable rewards.\n @param assets List of incentivized assets to check eligible distributions\n @param user The address of the user\n @param reward The address of the reward token\n @return The rewards amount*"
|
|
},
|
|
"functionSelector": "70674ab9",
|
|
"id": 2199,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getUserRewards",
|
|
"nameLocation": "5523:14:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 2195,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2190,
|
|
"mutability": "mutable",
|
|
"name": "assets",
|
|
"nameLocation": "5563:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2199,
|
|
"src": "5544:25:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "calldata",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr",
|
|
"typeString": "address[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 2188,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5544:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 2189,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "5544:9:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
|
|
"typeString": "address[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2192,
|
|
"mutability": "mutable",
|
|
"name": "user",
|
|
"nameLocation": "5584:4:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2199,
|
|
"src": "5576:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2191,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5576:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2194,
|
|
"mutability": "mutable",
|
|
"name": "reward",
|
|
"nameLocation": "5603:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2199,
|
|
"src": "5595:14:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2193,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5595:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5537:77:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2198,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2197,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2199,
|
|
"src": "5638:7:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2196,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5638:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5637:9:6"
|
|
},
|
|
"scope": 2235,
|
|
"src": "5514:133:6",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 2200,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "5653:338:6",
|
|
"text": " @dev Returns a list all rewards of a user, including already accrued and unrealized claimable rewards\n @param assets List of incentivized assets to check eligible distributions\n @param user The address of the user\n @return The list of reward addresses\n @return The list of unclaimed amount of rewards*"
|
|
},
|
|
"functionSelector": "4c0369c3",
|
|
"id": 2214,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getAllUserRewards",
|
|
"nameLocation": "6004:17:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 2206,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2203,
|
|
"mutability": "mutable",
|
|
"name": "assets",
|
|
"nameLocation": "6047:6:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2214,
|
|
"src": "6028:25:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "calldata",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr",
|
|
"typeString": "address[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 2201,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6028:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 2202,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "6028:9:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
|
|
"typeString": "address[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2205,
|
|
"mutability": "mutable",
|
|
"name": "user",
|
|
"nameLocation": "6068:4:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2214,
|
|
"src": "6060:12:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2204,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6060:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6021:56:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2213,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2209,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2214,
|
|
"src": "6101:16:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
|
"typeString": "address[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 2207,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6101:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 2208,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "6101:9:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
|
|
"typeString": "address[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2212,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2214,
|
|
"src": "6119:16:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
|
"typeString": "uint256[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 2210,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6119:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 2211,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "6119:9:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
|
|
"typeString": "uint256[]"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6100:36:6"
|
|
},
|
|
"scope": 2235,
|
|
"src": "5995:142:6",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 2215,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "6143:192:6",
|
|
"text": " @dev Returns the decimals of an asset to calculate the distribution delta\n @param asset The address to retrieve decimals\n @return The decimals of an underlying asset"
|
|
},
|
|
"functionSelector": "9efd6f72",
|
|
"id": 2222,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getAssetDecimals",
|
|
"nameLocation": "6348:16:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 2218,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2217,
|
|
"mutability": "mutable",
|
|
"name": "asset",
|
|
"nameLocation": "6373:5:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2222,
|
|
"src": "6365:13:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2216,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6365:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6364:15:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2221,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2220,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2222,
|
|
"src": "6403:5:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
},
|
|
"typeName": {
|
|
"id": 2219,
|
|
"name": "uint8",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6403:5:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6402:7:6"
|
|
},
|
|
"scope": 2235,
|
|
"src": "6339:71:6",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 2223,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "6416:114:6",
|
|
"text": " @dev Returns the address of the emission manager\n @return The address of the EmissionManager"
|
|
},
|
|
"functionSelector": "cbcbb507",
|
|
"id": 2228,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "EMISSION_MANAGER",
|
|
"nameLocation": "6543:16:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 2224,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "6559:2:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2227,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2226,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2228,
|
|
"src": "6585:7:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2225,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6585:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6584:9:6"
|
|
},
|
|
"scope": 2235,
|
|
"src": "6534:60:6",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 2229,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "6600:234:6",
|
|
"text": " @dev Returns the address of the emission manager.\n Deprecated: This getter is maintained for compatibility purposes. Use the `EMISSION_MANAGER()` function instead.\n @return The address of the EmissionManager"
|
|
},
|
|
"functionSelector": "92074b08",
|
|
"id": 2234,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getEmissionManager",
|
|
"nameLocation": "6847:18:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 2230,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "6865:2:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2233,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2232,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2234,
|
|
"src": "6891:7:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2231,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6891:7:6",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6890:9:6"
|
|
},
|
|
"scope": 2235,
|
|
"src": "6838:62:6",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
}
|
|
],
|
|
"scope": 2236,
|
|
"src": "191:6712:6",
|
|
"usedErrors": [],
|
|
"usedEvents": [
|
|
2073,
|
|
2088
|
|
]
|
|
}
|
|
],
|
|
"src": "38:6867:6"
|
|
},
|
|
"id": 6
|
|
},
|
|
"contracts/rewards/interfaces/ITransferStrategyBase.sol": {
|
|
"ast": {
|
|
"absolutePath": "contracts/rewards/interfaces/ITransferStrategyBase.sol",
|
|
"exportedSymbols": {
|
|
"ITransferStrategyBase": [
|
|
2282
|
|
]
|
|
},
|
|
"id": 2283,
|
|
"license": "AGPL-3.0",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 2237,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".10"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "38:24:7"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"canonicalName": "ITransferStrategyBase",
|
|
"contractDependencies": [],
|
|
"contractKind": "interface",
|
|
"fullyImplemented": false,
|
|
"id": 2282,
|
|
"linearizedBaseContracts": [
|
|
2282
|
|
],
|
|
"name": "ITransferStrategyBase",
|
|
"nameLocation": "76:21:7",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"anonymous": false,
|
|
"eventSelector": "7dc4ea712e6400e67a5abca1a983e5c420c386c19936dc120cd860b50b8e2579",
|
|
"id": 2247,
|
|
"name": "EmergencyWithdrawal",
|
|
"nameLocation": "109:19:7",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 2246,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2239,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "caller",
|
|
"nameLocation": "151:6:7",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2247,
|
|
"src": "135:22:7",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2238,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "135:7:7",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2241,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "token",
|
|
"nameLocation": "180:5:7",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2247,
|
|
"src": "164:21:7",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2240,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "164:7:7",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2243,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "to",
|
|
"nameLocation": "208:2:7",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2247,
|
|
"src": "192:18:7",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2242,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "192:7:7",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2245,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nameLocation": "225:6:7",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2247,
|
|
"src": "217:14:7",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2244,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "217:7:7",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "128:108:7"
|
|
},
|
|
"src": "103:134:7"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 2248,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "243:347:7",
|
|
"text": " @dev Perform custom transfer logic via delegate call from source contract to a TransferStrategy implementation\n @param to Account to transfer rewards\n @param reward Address of the reward token\n @param amount Amount to transfer to the \"to\" address parameter\n @return Returns true bool if transfer logic succeeds"
|
|
},
|
|
"functionSelector": "16beb982",
|
|
"id": 2259,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "performTransfer",
|
|
"nameLocation": "603:15:7",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 2255,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2250,
|
|
"mutability": "mutable",
|
|
"name": "to",
|
|
"nameLocation": "627:2:7",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2259,
|
|
"src": "619:10:7",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2249,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "619:7:7",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2252,
|
|
"mutability": "mutable",
|
|
"name": "reward",
|
|
"nameLocation": "639:6:7",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2259,
|
|
"src": "631:14:7",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2251,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "631:7:7",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2254,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nameLocation": "655:6:7",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2259,
|
|
"src": "647:14:7",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2253,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "647:7:7",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "618:44:7"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2258,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2257,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2259,
|
|
"src": "681:4:7",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 2256,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "681:4:7",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "680:6:7"
|
|
},
|
|
"scope": 2282,
|
|
"src": "594:93:7",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 2260,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "693:73:7",
|
|
"text": " @return Returns the address of the Incentives Controller"
|
|
},
|
|
"functionSelector": "75d26413",
|
|
"id": 2265,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getIncentivesController",
|
|
"nameLocation": "779:23:7",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 2261,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "802:2:7"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2264,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2263,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2265,
|
|
"src": "828:7:7",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2262,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "828:7:7",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "827:9:7"
|
|
},
|
|
"scope": 2282,
|
|
"src": "770:67:7",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 2266,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "843:65:7",
|
|
"text": " @return Returns the address of the Rewards admin"
|
|
},
|
|
"functionSelector": "c6255443",
|
|
"id": 2271,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getRewardsAdmin",
|
|
"nameLocation": "921:15:7",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 2267,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "936:2:7"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2270,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2269,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2271,
|
|
"src": "962:7:7",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2268,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "962:7:7",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "961:9:7"
|
|
},
|
|
"scope": 2282,
|
|
"src": "912:59:7",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 2272,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "977:275:7",
|
|
"text": " @dev Perform an emergency token withdrawal only callable by the Rewards admin\n @param token Address of the token to withdraw funds from this contract\n @param to Address of the recipient of the withdrawal\n @param amount Amount of the withdrawal"
|
|
},
|
|
"functionSelector": "8d8e5da7",
|
|
"id": 2281,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "emergencyWithdrawal",
|
|
"nameLocation": "1265:19:7",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 2279,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2274,
|
|
"mutability": "mutable",
|
|
"name": "token",
|
|
"nameLocation": "1293:5:7",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2281,
|
|
"src": "1285:13:7",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2273,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1285:7:7",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2276,
|
|
"mutability": "mutable",
|
|
"name": "to",
|
|
"nameLocation": "1308:2:7",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2281,
|
|
"src": "1300:10:7",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2275,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1300:7:7",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2278,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nameLocation": "1320:6:7",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2281,
|
|
"src": "1312:14:7",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2277,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1312:7:7",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1284:43:7"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2280,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1336:0:7"
|
|
},
|
|
"scope": 2282,
|
|
"src": "1256:81:7",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
}
|
|
],
|
|
"scope": 2283,
|
|
"src": "66:1274:7",
|
|
"usedErrors": [],
|
|
"usedEvents": [
|
|
2247
|
|
]
|
|
}
|
|
],
|
|
"src": "38:1304:7"
|
|
},
|
|
"id": 7
|
|
},
|
|
"contracts/rewards/libraries/RewardsDataTypes.sol": {
|
|
"ast": {
|
|
"absolutePath": "contracts/rewards/libraries/RewardsDataTypes.sol",
|
|
"exportedSymbols": {
|
|
"IEACAggregatorProxy": [
|
|
605
|
|
],
|
|
"ITransferStrategyBase": [
|
|
2282
|
|
],
|
|
"RewardsDataTypes": [
|
|
2346
|
|
]
|
|
},
|
|
"id": 2347,
|
|
"license": "AGPL-3.0",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 2284,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".10"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "38:24:8"
|
|
},
|
|
{
|
|
"absolutePath": "contracts/rewards/interfaces/ITransferStrategyBase.sol",
|
|
"file": "../interfaces/ITransferStrategyBase.sol",
|
|
"id": 2286,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 2347,
|
|
"sourceUnit": 2283,
|
|
"src": "66:78:8",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"id": 2285,
|
|
"name": "ITransferStrategyBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2282,
|
|
"src": "74:21:8",
|
|
"typeDescriptions": {}
|
|
},
|
|
"nameLocation": "-1:-1:-1"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "contracts/misc/interfaces/IEACAggregatorProxy.sol",
|
|
"file": "../../misc/interfaces/IEACAggregatorProxy.sol",
|
|
"id": 2288,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 2347,
|
|
"sourceUnit": 606,
|
|
"src": "146:82:8",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"id": 2287,
|
|
"name": "IEACAggregatorProxy",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 605,
|
|
"src": "154:19:8",
|
|
"typeDescriptions": {}
|
|
},
|
|
"nameLocation": "-1:-1:-1"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"canonicalName": "RewardsDataTypes",
|
|
"contractDependencies": [],
|
|
"contractKind": "library",
|
|
"fullyImplemented": true,
|
|
"id": 2346,
|
|
"linearizedBaseContracts": [
|
|
2346
|
|
],
|
|
"name": "RewardsDataTypes",
|
|
"nameLocation": "240:16:8",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"canonicalName": "RewardsDataTypes.RewardsConfigInput",
|
|
"id": 2305,
|
|
"members": [
|
|
{
|
|
"constant": false,
|
|
"id": 2290,
|
|
"mutability": "mutable",
|
|
"name": "emissionPerSecond",
|
|
"nameLocation": "302:17:8",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2305,
|
|
"src": "295:24:8",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
},
|
|
"typeName": {
|
|
"id": 2289,
|
|
"name": "uint88",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "295:6:8",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2292,
|
|
"mutability": "mutable",
|
|
"name": "totalSupply",
|
|
"nameLocation": "334:11:8",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2305,
|
|
"src": "326:19:8",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2291,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "326:7:8",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2294,
|
|
"mutability": "mutable",
|
|
"name": "distributionEnd",
|
|
"nameLocation": "359:15:8",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2305,
|
|
"src": "352:22:8",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
},
|
|
"typeName": {
|
|
"id": 2293,
|
|
"name": "uint32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "352:6:8",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2296,
|
|
"mutability": "mutable",
|
|
"name": "asset",
|
|
"nameLocation": "389:5:8",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2305,
|
|
"src": "381:13:8",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2295,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "381:7:8",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2298,
|
|
"mutability": "mutable",
|
|
"name": "reward",
|
|
"nameLocation": "409:6:8",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2305,
|
|
"src": "401:14:8",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2297,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "401:7:8",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2301,
|
|
"mutability": "mutable",
|
|
"name": "transferStrategy",
|
|
"nameLocation": "444:16:8",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2305,
|
|
"src": "422:38:8",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ITransferStrategyBase_$2282",
|
|
"typeString": "contract ITransferStrategyBase"
|
|
},
|
|
"typeName": {
|
|
"id": 2300,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 2299,
|
|
"name": "ITransferStrategyBase",
|
|
"nameLocations": [
|
|
"422:21:8"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 2282,
|
|
"src": "422:21:8"
|
|
},
|
|
"referencedDeclaration": 2282,
|
|
"src": "422:21:8",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ITransferStrategyBase_$2282",
|
|
"typeString": "contract ITransferStrategyBase"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2304,
|
|
"mutability": "mutable",
|
|
"name": "rewardOracle",
|
|
"nameLocation": "487:12:8",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2305,
|
|
"src": "467:32:8",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IEACAggregatorProxy_$605",
|
|
"typeString": "contract IEACAggregatorProxy"
|
|
},
|
|
"typeName": {
|
|
"id": 2303,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 2302,
|
|
"name": "IEACAggregatorProxy",
|
|
"nameLocations": [
|
|
"467:19:8"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 605,
|
|
"src": "467:19:8"
|
|
},
|
|
"referencedDeclaration": 605,
|
|
"src": "467:19:8",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IEACAggregatorProxy_$605",
|
|
"typeString": "contract IEACAggregatorProxy"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"name": "RewardsConfigInput",
|
|
"nameLocation": "269:18:8",
|
|
"nodeType": "StructDefinition",
|
|
"scope": 2346,
|
|
"src": "262:243:8",
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"canonicalName": "RewardsDataTypes.UserAssetBalance",
|
|
"id": 2312,
|
|
"members": [
|
|
{
|
|
"constant": false,
|
|
"id": 2307,
|
|
"mutability": "mutable",
|
|
"name": "asset",
|
|
"nameLocation": "550:5:8",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2312,
|
|
"src": "542:13:8",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 2306,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "542:7:8",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2309,
|
|
"mutability": "mutable",
|
|
"name": "userBalance",
|
|
"nameLocation": "570:11:8",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2312,
|
|
"src": "562:19:8",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2308,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "562:7:8",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2311,
|
|
"mutability": "mutable",
|
|
"name": "totalSupply",
|
|
"nameLocation": "596:11:8",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2312,
|
|
"src": "588:19:8",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 2310,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "588:7:8",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"name": "UserAssetBalance",
|
|
"nameLocation": "518:16:8",
|
|
"nodeType": "StructDefinition",
|
|
"scope": 2346,
|
|
"src": "511:102:8",
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"canonicalName": "RewardsDataTypes.UserData",
|
|
"id": 2317,
|
|
"members": [
|
|
{
|
|
"constant": false,
|
|
"id": 2314,
|
|
"mutability": "mutable",
|
|
"name": "index",
|
|
"nameLocation": "714:5:8",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2317,
|
|
"src": "706:13:8",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint104",
|
|
"typeString": "uint104"
|
|
},
|
|
"typeName": {
|
|
"id": 2313,
|
|
"name": "uint104",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "706:7:8",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint104",
|
|
"typeString": "uint104"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2316,
|
|
"mutability": "mutable",
|
|
"name": "accrued",
|
|
"nameLocation": "810:7:8",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2317,
|
|
"src": "802:15:8",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
},
|
|
"typeName": {
|
|
"id": 2315,
|
|
"name": "uint128",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "802:7:8",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"name": "UserData",
|
|
"nameLocation": "626:8:8",
|
|
"nodeType": "StructDefinition",
|
|
"scope": 2346,
|
|
"src": "619:204:8",
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"canonicalName": "RewardsDataTypes.RewardData",
|
|
"id": 2331,
|
|
"members": [
|
|
{
|
|
"constant": false,
|
|
"id": 2319,
|
|
"mutability": "mutable",
|
|
"name": "index",
|
|
"nameLocation": "913:5:8",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2331,
|
|
"src": "905:13:8",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint104",
|
|
"typeString": "uint104"
|
|
},
|
|
"typeName": {
|
|
"id": 2318,
|
|
"name": "uint104",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "905:7:8",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint104",
|
|
"typeString": "uint104"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2321,
|
|
"mutability": "mutable",
|
|
"name": "emissionPerSecond",
|
|
"nameLocation": "987:17:8",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2331,
|
|
"src": "980:24:8",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
},
|
|
"typeName": {
|
|
"id": 2320,
|
|
"name": "uint88",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "980:6:8",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint88",
|
|
"typeString": "uint88"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2323,
|
|
"mutability": "mutable",
|
|
"name": "lastUpdateTimestamp",
|
|
"nameLocation": "1068:19:8",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2331,
|
|
"src": "1061:26:8",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
},
|
|
"typeName": {
|
|
"id": 2322,
|
|
"name": "uint32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1061:6:8",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2325,
|
|
"mutability": "mutable",
|
|
"name": "distributionEnd",
|
|
"nameLocation": "1161:15:8",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2331,
|
|
"src": "1154:22:8",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
},
|
|
"typeName": {
|
|
"id": 2324,
|
|
"name": "uint32",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1154:6:8",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint32",
|
|
"typeString": "uint32"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2330,
|
|
"mutability": "mutable",
|
|
"name": "usersData",
|
|
"nameLocation": "1291:9:8",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2331,
|
|
"src": "1262:38:8",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_UserData_$2317_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.UserData)"
|
|
},
|
|
"typeName": {
|
|
"id": 2329,
|
|
"keyName": "",
|
|
"keyNameLocation": "-1:-1:-1",
|
|
"keyType": {
|
|
"id": 2326,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1270:7:8",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "1262:28:8",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_UserData_$2317_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.UserData)"
|
|
},
|
|
"valueName": "",
|
|
"valueNameLocation": "-1:-1:-1",
|
|
"valueType": {
|
|
"id": 2328,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 2327,
|
|
"name": "UserData",
|
|
"nameLocations": [
|
|
"1281:8:8"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 2317,
|
|
"src": "1281:8:8"
|
|
},
|
|
"referencedDeclaration": 2317,
|
|
"src": "1281:8:8",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_UserData_$2317_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.UserData"
|
|
}
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"name": "RewardData",
|
|
"nameLocation": "836:10:8",
|
|
"nodeType": "StructDefinition",
|
|
"scope": 2346,
|
|
"src": "829:477:8",
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"canonicalName": "RewardsDataTypes.AssetData",
|
|
"id": 2345,
|
|
"members": [
|
|
{
|
|
"constant": false,
|
|
"id": 2336,
|
|
"mutability": "mutable",
|
|
"name": "rewards",
|
|
"nameLocation": "1455:7:8",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2345,
|
|
"src": "1424:38:8",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_RewardData_$2331_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.RewardData)"
|
|
},
|
|
"typeName": {
|
|
"id": 2335,
|
|
"keyName": "",
|
|
"keyNameLocation": "-1:-1:-1",
|
|
"keyType": {
|
|
"id": 2332,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1432:7:8",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "1424:30:8",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_RewardData_$2331_storage_$",
|
|
"typeString": "mapping(address => struct RewardsDataTypes.RewardData)"
|
|
},
|
|
"valueName": "",
|
|
"valueNameLocation": "-1:-1:-1",
|
|
"valueType": {
|
|
"id": 2334,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 2333,
|
|
"name": "RewardData",
|
|
"nameLocations": [
|
|
"1443:10:8"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 2331,
|
|
"src": "1443:10:8"
|
|
},
|
|
"referencedDeclaration": 2331,
|
|
"src": "1443:10:8",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_RewardData_$2331_storage_ptr",
|
|
"typeString": "struct RewardsDataTypes.RewardData"
|
|
}
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2340,
|
|
"mutability": "mutable",
|
|
"name": "availableRewards",
|
|
"nameLocation": "1550:16:8",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2345,
|
|
"src": "1522:44:8",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_uint128_$_t_address_$",
|
|
"typeString": "mapping(uint128 => address)"
|
|
},
|
|
"typeName": {
|
|
"id": 2339,
|
|
"keyName": "",
|
|
"keyNameLocation": "-1:-1:-1",
|
|
"keyType": {
|
|
"id": 2337,
|
|
"name": "uint128",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1530:7:8",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "1522:27:8",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_uint128_$_t_address_$",
|
|
"typeString": "mapping(uint128 => address)"
|
|
},
|
|
"valueName": "",
|
|
"valueNameLocation": "-1:-1:-1",
|
|
"valueType": {
|
|
"id": 2338,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1541:7:8",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2342,
|
|
"mutability": "mutable",
|
|
"name": "availableRewardsCount",
|
|
"nameLocation": "1626:21:8",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2345,
|
|
"src": "1618:29:8",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
},
|
|
"typeName": {
|
|
"id": 2341,
|
|
"name": "uint128",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1618:7:8",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint128",
|
|
"typeString": "uint128"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 2344,
|
|
"mutability": "mutable",
|
|
"name": "decimals",
|
|
"nameLocation": "1700:8:8",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2345,
|
|
"src": "1694:14:8",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
},
|
|
"typeName": {
|
|
"id": 2343,
|
|
"name": "uint8",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1694:5:8",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"name": "AssetData",
|
|
"nameLocation": "1319:9:8",
|
|
"nodeType": "StructDefinition",
|
|
"scope": 2346,
|
|
"src": "1312:402:8",
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 2347,
|
|
"src": "232:1485:8",
|
|
"usedErrors": [],
|
|
"usedEvents": []
|
|
}
|
|
],
|
|
"src": "38:1681:8"
|
|
},
|
|
"id": 8
|
|
}
|
|
}
|
|
}
|
|
} |