Feature Tip: Add private address tag to any address under My Name Tag !
Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
BendProtocolIncentivesController
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.4;
pragma abicoder v2;
import {SafeMath} from "@openzeppelin/contracts/utils/math/SafeMath.sol";
import {SafeERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
import {DistributionTypes} from "./DistributionTypes.sol";
import {DistributionManager} from "./DistributionManager.sol";
import {IERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import {IScaledBalanceToken} from "./interfaces/IScaledBalanceToken.sol";
import {IIncentivesController} from "./interfaces/IIncentivesController.sol";
/**
* @title BendProtocolIncentivesController
* @notice Distributor contract for rewards to the Bend protocol
* @author Bend
**/
contract BendProtocolIncentivesController is
IIncentivesController,
DistributionManager
{
using SafeMath for uint256;
using SafeERC20Upgradeable for IERC20Upgradeable;
IERC20Upgradeable public REWARD_TOKEN;
address public REWARDS_VAULT;
mapping(address => uint256) internal usersUnclaimedRewards;
mapping(address => bool) public authorizedAssets;
/**
* @dev initial and configrate contract
* @param _rewardToken The reward token to incentivize
* @param _rewardsVault The vault of reward token
* @param _distributionDuration Duration of the reward distribution
*/
function initialize(
address _rewardToken,
address _rewardsVault,
uint128 _distributionDuration
) external initializer {
__DistributionManager_init(_distributionDuration);
REWARD_TOKEN = IERC20Upgradeable(_rewardToken);
REWARDS_VAULT = _rewardsVault;
}
/**
* @dev Configure assets for a certain rewards emission
* @param _assets The assets to incentivize
* @param _emissionsPerSecond The emission for each asset
*/
function configureAssets(
IScaledBalanceToken[] calldata _assets,
uint256[] calldata _emissionsPerSecond
) external override onlyOwner {
require(
_assets.length == _emissionsPerSecond.length,
"INVALID_CONFIGURATION"
);
DistributionTypes.AssetConfigInput[]
memory assetsConfig = new DistributionTypes.AssetConfigInput[](
_assets.length
);
for (uint256 i = 0; i < _assets.length; i++) {
authorizedAssets[address(_assets[i])] = true;
assetsConfig[i].underlyingAsset = address(_assets[i]);
assetsConfig[i].emissionPerSecond = uint128(_emissionsPerSecond[i]);
require(
assetsConfig[i].emissionPerSecond == _emissionsPerSecond[i],
"INVALID_CONFIGURATION"
);
assetsConfig[i].totalStaked = _assets[i].scaledTotalSupply();
}
_configureAssets(assetsConfig);
}
/**
* @dev Called by the corresponding asset on any update that affects the rewards distribution
* @param _user The address of the user
* @param _totalSupply The total supply of the asset in the lending pool
* @param _userBalance The balance of the user of the asset in the lending pool
**/
function handleAction(
address _user,
uint256 _totalSupply,
uint256 _userBalance
) external override {
require(authorizedAssets[msg.sender], "Sender Unauthorized");
uint256 accruedRewards = _updateUserAssetInternal(
_user,
msg.sender,
_userBalance,
_totalSupply
);
if (accruedRewards != 0) {
usersUnclaimedRewards[_user] = usersUnclaimedRewards[_user].add(
accruedRewards
);
emit RewardsAccrued(_user, accruedRewards);
}
}
/**
* @dev Returns the total of rewards of an user, already accrued + not yet accrued
* @param _assets The assets to incentivize
* @param _user The address of the user
* @return The rewards
**/
function getRewardsBalance(
IScaledBalanceToken[] calldata _assets,
address _user
) external view override returns (uint256) {
uint256 unclaimedRewards = usersUnclaimedRewards[_user];
DistributionTypes.UserStakeInput[]
memory userState = new DistributionTypes.UserStakeInput[](
_assets.length
);
for (uint256 i = 0; i < _assets.length; i++) {
userState[i].underlyingAsset = address(_assets[i]);
(
userState[i].stakedByUser,
userState[i].totalStaked
) = IScaledBalanceToken(_assets[i]).getScaledUserBalanceAndSupply(
_user
);
}
unclaimedRewards = unclaimedRewards.add(
_getUnclaimedRewards(_user, userState)
);
return unclaimedRewards;
}
/**
* @dev returns the unclaimed rewards of the user
* @param _user the address of the user
* @return the unclaimed user rewards
*/
function getUserUnclaimedRewards(address _user)
external
view
override
returns (uint256)
{
return usersUnclaimedRewards[_user];
}
/**
* @dev Claims reward for an user, on all the assets of the lending pool, accumulating the pending rewards
* @param _assets The assets to incentivize
* @param _amount Amount of rewards to claim
* @return Rewards claimed
**/
function claimRewards(
IScaledBalanceToken[] calldata _assets,
uint256 _amount
) external override returns (uint256) {
if (_amount == 0) {
return 0;
}
address user = msg.sender;
uint256 unclaimedRewards = usersUnclaimedRewards[user];
DistributionTypes.UserStakeInput[]
memory userState = new DistributionTypes.UserStakeInput[](
_assets.length
);
for (uint256 i = 0; i < _assets.length; i++) {
userState[i].underlyingAsset = address(_assets[i]);
(
userState[i].stakedByUser,
userState[i].totalStaked
) = IScaledBalanceToken(_assets[i]).getScaledUserBalanceAndSupply(
user
);
}
uint256 accruedRewards = _claimRewards(user, userState);
if (accruedRewards != 0) {
unclaimedRewards = unclaimedRewards.add(accruedRewards);
emit RewardsAccrued(user, accruedRewards);
}
if (unclaimedRewards == 0) {
return 0;
}
uint256 amountToClaim = _amount > unclaimedRewards
? unclaimedRewards
: _amount;
usersUnclaimedRewards[user] = unclaimedRewards - amountToClaim; // Safe due to the previous line
IERC20Upgradeable(REWARD_TOKEN).safeTransferFrom(
REWARDS_VAULT,
msg.sender,
amountToClaim
);
emit RewardsClaimed(msg.sender, amountToClaim);
return amountToClaim;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../IERC20Upgradeable.sol";
import "../../../utils/AddressUpgradeable.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20Upgradeable {
using AddressUpgradeable for address;
function safeTransfer(
IERC20Upgradeable token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20Upgradeable token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(
IERC20Upgradeable token,
address spender,
uint256 value
) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IERC20Upgradeable token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20Upgradeable token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
// Return data is optional
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.4;
pragma abicoder v2;
library DistributionTypes {
struct AssetConfigInput {
uint128 emissionPerSecond;
uint256 totalStaked;
address underlyingAsset;
}
struct UserStakeInput {
address underlyingAsset;
uint256 stakedByUser;
uint256 totalStaked;
}
}// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.4;
pragma abicoder v2;
import {SafeMath} from "@openzeppelin/contracts/utils/math/SafeMath.sol";
import {DistributionTypes} from "./DistributionTypes.sol";
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
// import "hardhat/console.sol";
/**
* @title DistributionManager
* @notice Accounting contract to manage multiple staking distributions
* @author Bend
**/
contract DistributionManager is Initializable, OwnableUpgradeable {
using SafeMath for uint256;
struct AssetData {
uint128 emissionPerSecond;
uint128 lastUpdateTimestamp;
uint256 index;
mapping(address => uint256) users;
}
uint256 public DISTRIBUTION_END;
uint8 public constant PRECISION = 18;
mapping(address => AssetData) public assets;
event AssetConfigUpdated(
address indexed _asset,
uint256 _emissionPerSecond
);
event AssetIndexUpdated(address indexed _asset, uint256 _index);
event DistributionEndUpdated(uint256 newDistributionEnd);
event UserIndexUpdated(
address indexed user,
address indexed asset,
uint256 index
);
function __DistributionManager_init(uint256 _distributionDuration)
internal
initializer
{
__Ownable_init();
DISTRIBUTION_END = block.timestamp.add(_distributionDuration);
}
function setDistributionEnd(uint256 _distributionEnd) external onlyOwner {
DISTRIBUTION_END = _distributionEnd;
emit DistributionEndUpdated(_distributionEnd);
}
function _configureAssets(
DistributionTypes.AssetConfigInput[] memory _assetsConfigInput
) internal onlyOwner {
for (uint256 i = 0; i < _assetsConfigInput.length; i++) {
AssetData storage assetConfig = assets[
_assetsConfigInput[i].underlyingAsset
];
_updateAssetStateInternal(
_assetsConfigInput[i].underlyingAsset,
assetConfig,
_assetsConfigInput[i].totalStaked
);
assetConfig.emissionPerSecond = _assetsConfigInput[i]
.emissionPerSecond;
emit AssetConfigUpdated(
_assetsConfigInput[i].underlyingAsset,
_assetsConfigInput[i].emissionPerSecond
);
}
}
/**
* @dev Updates the state of one distribution, mainly rewards index and timestamp
* @param _underlyingAsset The address used as key in the distribution, for example sBEND or the aTokens addresses on Bend
* @param _assetConfig Storage pointer to the distribution's config
* @param _totalStaked Current total of staked assets for this distribution
* @return The new distribution index
**/
function _updateAssetStateInternal(
address _underlyingAsset,
AssetData storage _assetConfig,
uint256 _totalStaked
) internal returns (uint256) {
uint256 oldIndex = _assetConfig.index;
uint128 lastUpdateTimestamp = _assetConfig.lastUpdateTimestamp;
if (block.timestamp == lastUpdateTimestamp) {
return oldIndex;
}
uint256 newIndex = _getAssetIndex(
oldIndex,
_assetConfig.emissionPerSecond,
lastUpdateTimestamp,
_totalStaked
);
if (newIndex != oldIndex) {
_assetConfig.index = newIndex;
emit AssetIndexUpdated(_underlyingAsset, newIndex);
}
_assetConfig.lastUpdateTimestamp = uint128(block.timestamp);
return newIndex;
}
/**
* @dev Updates the state of an user in a distribution
* @param _user The user's address
* @param _asset The address of the reference asset of the distribution
* @param _stakedByUser Amount of tokens staked by the user in the distribution at the moment
* @param _totalStaked Total tokens staked in the distribution
* @return The accrued rewards for the user until the moment
**/
function _updateUserAssetInternal(
address _user,
address _asset,
uint256 _stakedByUser,
uint256 _totalStaked
) internal returns (uint256) {
AssetData storage assetData = assets[_asset];
uint256 userIndex = assetData.users[_user];
uint256 accruedRewards = 0;
uint256 newIndex = _updateAssetStateInternal(
_asset,
assetData,
_totalStaked
);
if (userIndex != newIndex) {
if (_stakedByUser != 0) {
accruedRewards = _getRewards(
_stakedByUser,
newIndex,
userIndex
);
}
assetData.users[_user] = newIndex;
emit UserIndexUpdated(_user, _asset, newIndex);
}
return accruedRewards;
}
/**
* @dev Used by "frontend" stake contracts to update the data of an user when claiming rewards from there
* @param _user The address of the user
* @param _stakes List of structs of the user data related with his stake
* @return The accrued rewards for the user until the moment
**/
function _claimRewards(
address _user,
DistributionTypes.UserStakeInput[] memory _stakes
) internal returns (uint256) {
uint256 accruedRewards = 0;
for (uint256 i = 0; i < _stakes.length; i++) {
accruedRewards = accruedRewards.add(
_updateUserAssetInternal(
_user,
_stakes[i].underlyingAsset,
_stakes[i].stakedByUser,
_stakes[i].totalStaked
)
);
}
return accruedRewards;
}
/**
* @dev Return the accrued rewards for an user over a list of distribution
* @param _user The address of the user
* @param _stakes List of structs of the user data related with his stake
* @return The accrued rewards for the user until the moment
**/
function _getUnclaimedRewards(
address _user,
DistributionTypes.UserStakeInput[] memory _stakes
) internal view returns (uint256) {
uint256 accruedRewards = 0;
for (uint256 i = 0; i < _stakes.length; i++) {
AssetData storage assetConfig = assets[_stakes[i].underlyingAsset];
uint256 assetIndex = _getAssetIndex(
assetConfig.index,
assetConfig.emissionPerSecond,
assetConfig.lastUpdateTimestamp,
_stakes[i].totalStaked
);
accruedRewards = accruedRewards.add(
_getRewards(
_stakes[i].stakedByUser,
assetIndex,
assetConfig.users[_user]
)
);
}
return accruedRewards;
}
/**
* @dev Internal function for the calculation of user's rewards on a distribution
* @param _principalUserBalance Amount staked by the user on a distribution
* @param _reserveIndex Current index of the distribution
* @param _userIndex Index stored for the user, representation his staking moment
* @return The rewards
**/
function _getRewards(
uint256 _principalUserBalance,
uint256 _reserveIndex,
uint256 _userIndex
) internal pure returns (uint256) {
return
_principalUserBalance.mul(_reserveIndex.sub(_userIndex)).div(
10**uint256(PRECISION)
);
}
/**
* @dev Calculates the next value of an specific distribution index, with validations
* @param _currentIndex Current index of the distribution
* @param _emissionPerSecond Representing the total rewards distributed per second per asset unit, on the distribution
* @param _lastUpdateTimestamp Last moment this distribution was updated
* @param _totalBalance of tokens considered for the distribution
* @return The new index.
**/
function _getAssetIndex(
uint256 _currentIndex,
uint256 _emissionPerSecond,
uint128 _lastUpdateTimestamp,
uint256 _totalBalance
) internal view returns (uint256) {
if (
_emissionPerSecond == 0 ||
_totalBalance == 0 ||
_lastUpdateTimestamp == block.timestamp ||
_lastUpdateTimestamp >= DISTRIBUTION_END
) {
return _currentIndex;
}
uint256 currentTimestamp = block.timestamp > DISTRIBUTION_END
? DISTRIBUTION_END
: block.timestamp;
uint256 timeDelta = currentTimestamp.sub(_lastUpdateTimestamp);
return
_emissionPerSecond
.mul(timeDelta)
.mul(10**uint256(PRECISION))
.div(_totalBalance)
.add(_currentIndex);
}
/**
* @dev Returns the data of an user on a distribution
* @param _user Address of the user
* @param _asset The address of the reference asset of the distribution
* @return The new index
**/
function getUserAssetData(address _user, address _asset)
public
view
returns (uint256)
{
return assets[_asset].users[_user];
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20Upgradeable {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev 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.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev 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.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev 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.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.4;
interface IScaledBalanceToken {
/**
* @dev Returns the scaled balance of the user and the scaled total supply.
* @param _user The address of the user
* @return The scaled balance of the user
* @return The scaled balance and the scaled total supply
**/
function getScaledUserBalanceAndSupply(address _user)
external
view
returns (uint256, uint256);
/**
* @dev Returns the scaled total supply of the token. Represents sum(debt/index)
* @return The scaled total supply
**/
function scaledTotalSupply() external view returns (uint256);
}// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.4;
pragma abicoder v2;
import {IScaledBalanceToken} from "./IScaledBalanceToken.sol";
interface IIncentivesController {
event RewardsAccrued(address indexed _user, uint256 _amount);
event RewardsClaimed(address indexed _user, uint256 _amount);
/**
* @dev Configure assets for a certain rewards emission
* @param _assets The assets to incentivize
* @param _emissionsPerSecond The emission for each asset
*/
function configureAssets(
IScaledBalanceToken[] calldata _assets,
uint256[] calldata _emissionsPerSecond
) external;
/**
* @dev Called by the corresponding asset on any update that affects the rewards distribution
* @param _user The address of the user
* @param _totalSupply The total supply of the asset in the lending pool
* @param _userBalance The balance of the user of the asset in the lending pool
**/
function handleAction(
address _user,
uint256 _totalSupply,
uint256 _userBalance
) external;
/**
* @dev Returns the total of rewards of an user, already accrued + not yet accrued
* @param _assets The assets to incentivize
* @param _user The address of the user
* @return The rewards
**/
function getRewardsBalance(
IScaledBalanceToken[] calldata _assets,
address _user
) external view returns (uint256);
/**
* @dev Claims reward for an user, on all the assets of the lending pool, accumulating the pending rewards
* @param _assets The assets to incentivize
* @param _amount Amount of rewards to claim
* @return Rewards claimed
**/
function claimRewards(
IScaledBalanceToken[] calldata _assets,
uint256 _amount
) external returns (uint256);
/**
* @dev returns the unclaimed rewards of the user
* @param _user the address of the user
* @return the unclaimed user rewards
*/
function getUserUnclaimedRewards(address _user)
external
view
returns (uint256);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Collection of functions related to the address type
*/
library AddressUpgradeable {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*/
abstract contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
*/
bool private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Modifier to protect an initializer function from being invoked twice.
*/
modifier initializer() {
require(_initializing || !_initialized, "Initializable: contract is already initialized");
bool isTopLevelCall = !_initializing;
if (isTopLevelCall) {
_initializing = true;
_initialized = true;
}
_;
if (isTopLevelCall) {
_initializing = false;
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
function __Ownable_init() internal initializer {
__Context_init_unchained();
__Ownable_init_unchained();
}
function __Ownable_init_unchained() internal initializer {
_setOwner(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_setOwner(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_setOwner(newOwner);
}
function _setOwner(address newOwner) private {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
uint256[49] private __gap;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract ContextUpgradeable is Initializable {
function __Context_init() internal initializer {
__Context_init_unchained();
}
function __Context_init_unchained() internal initializer {
}
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
uint256[50] private __gap;
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"_emissionPerSecond","type":"uint256"}],"name":"AssetConfigUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"_index","type":"uint256"}],"name":"AssetIndexUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newDistributionEnd","type":"uint256"}],"name":"DistributionEndUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"RewardsAccrued","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"RewardsClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"}],"name":"UserIndexUpdated","type":"event"},{"inputs":[],"name":"DISTRIBUTION_END","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRECISION","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REWARDS_VAULT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REWARD_TOKEN","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"assets","outputs":[{"internalType":"uint128","name":"emissionPerSecond","type":"uint128"},{"internalType":"uint128","name":"lastUpdateTimestamp","type":"uint128"},{"internalType":"uint256","name":"index","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"authorizedAssets","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IScaledBalanceToken[]","name":"_assets","type":"address[]"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"claimRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IScaledBalanceToken[]","name":"_assets","type":"address[]"},{"internalType":"uint256[]","name":"_emissionsPerSecond","type":"uint256[]"}],"name":"configureAssets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IScaledBalanceToken[]","name":"_assets","type":"address[]"},{"internalType":"address","name":"_user","type":"address"}],"name":"getRewardsBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"address","name":"_asset","type":"address"}],"name":"getUserAssetData","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getUserUnclaimedRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_totalSupply","type":"uint256"},{"internalType":"uint256","name":"_userBalance","type":"uint256"}],"name":"handleAction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"},{"internalType":"address","name":"_rewardsVault","type":"address"},{"internalType":"uint128","name":"_distributionDuration","type":"uint128"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_distributionEnd","type":"uint256"}],"name":"setDistributionEnd","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b50611f62806100206000396000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c80638da5cb5b116100a257806399248ea71161007157806399248ea71461023c578063aaf5eb681461024f578063f11b818814610269578063f2fde38b146102cb578063fad66604146102de57600080fd5b80638da5cb5b146101c8578063919cd40f146101ed578063946776cd146101f657806395c589091461020957600080fd5b8063715018a6116100de578063715018a6146101875780637265580f1461018f57806379f171b2146101a25780638b599f26146101b557600080fd5b8063198fa81e1461011057806331873e2e1461014c5780633373ee4c1461016157806339ccbdd314610174575b600080fd5b61013961011e366004611a42565b6001600160a01b031660009081526069602052604090205490565b6040519081526020015b60405180910390f35b61015f61015a366004611aeb565b6102f1565b005b61013961016f366004611a5e565b6103e2565b61015f610182366004611c3c565b610413565b61015f610478565b61015f61019d366004611a96565b6104ae565b61015f6101b0366004611b69565b61055e565b6101396101c3366004611b1f565b610923565b6033546001600160a01b03165b6040516001600160a01b039091168152602001610143565b61013960655481565b6068546101d5906001600160a01b031681565b61022c610217366004611a42565b606a6020526000908152604090205460ff1681565b6040519015158152602001610143565b6067546101d5906001600160a01b031681565b610257601281565b60405160ff9091168152602001610143565b6102a5610277366004611a42565b606660205260009081526040902080546001909101546001600160801b0380831692600160801b9004169083565b604080516001600160801b03948516815293909216602084015290820152606001610143565b61015f6102d9366004611a42565b610b7d565b6101396102ec366004611bd2565b610c18565b336000908152606a602052604090205460ff1661034b5760405162461bcd60e51b815260206004820152601360248201527214d95b99195c88155b985d5d1a1bdc9a5e9959606a1b60448201526064015b60405180910390fd5b600061035984338486610f5f565b905080156103dc576001600160a01b0384166000908152606960205260409020546103849082611022565b6001600160a01b038516600081815260696020526040908190209290925590517f2468f9268c60ad90e2d49edb0032c8a001e733ae888b3ab8e982edf535be1a76906103d39084815260200190565b60405180910390a25b50505050565b6001600160a01b03808216600090815260666020908152604080832093861683526002909301905220545b92915050565b6033546001600160a01b0316331461043d5760405162461bcd60e51b815260040161034290611d2c565b60658190556040518181527f1cc1849a6602c3e91f2088cadea4381cc5717f2f28584197060ed2ebb434c16f9060200160405180910390a150565b6033546001600160a01b031633146104a25760405162461bcd60e51b815260040161034290611d2c565b6104ac600061102e565b565b600054610100900460ff16806104c7575060005460ff16155b6104e35760405162461bcd60e51b815260040161034290611cde565b600054610100900460ff16158015610505576000805461ffff19166101011790555b610517826001600160801b0316611080565b606780546001600160a01b038087166001600160a01b031992831617909255606880549286169290911691909117905580156103dc576000805461ff001916905550505050565b6033546001600160a01b031633146105885760405162461bcd60e51b815260040161034290611d2c565b8281146105cf5760405162461bcd60e51b815260206004820152601560248201527424a72b20a624a22fa1a7a72324a3aaa920aa24a7a760591b6044820152606401610342565b60008367ffffffffffffffff8111156105f857634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561064357816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816106165790505b50905060005b84811015610912576001606a600088888581811061067757634e487b7160e01b600052603260045260246000fd5b905060200201602081019061068c9190611a42565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558585828181106106d457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906106e99190611a42565b82828151811061070957634e487b7160e01b600052603260045260246000fd5b6020026020010151604001906001600160a01b031690816001600160a01b03168152505083838281811061074d57634e487b7160e01b600052603260045260246000fd5b9050602002013582828151811061077457634e487b7160e01b600052603260045260246000fd5b60209081029190910101516001600160801b0390911690528383828181106107ac57634e487b7160e01b600052603260045260246000fd5b905060200201358282815181106107d357634e487b7160e01b600052603260045260246000fd5b6020026020010151600001516001600160801b03161461082d5760405162461bcd60e51b815260206004820152601560248201527424a72b20a624a22fa1a7a72324a3aaa920aa24a7a760591b6044820152606401610342565b85858281811061084d57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906108629190611a42565b6001600160a01b031663b1bf962d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561089a57600080fd5b505afa1580156108ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d29190611c54565b8282815181106108f257634e487b7160e01b600052603260045260246000fd5b60209081029190910181015101528061090a81611ee6565b915050610649565b5061091c81611102565b5050505050565b6001600160a01b038116600090815260696020526040812054818467ffffffffffffffff81111561096457634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156109c257816020015b6109af604051806060016040528060006001600160a01b0316815260200160008152602001600081525090565b8152602001906001900390816109825790505b50905060005b85811015610b5c578686828181106109f057634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610a059190611a42565b828281518110610a2557634e487b7160e01b600052603260045260246000fd5b60209081029190910101516001600160a01b039091169052868682818110610a5d57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610a729190611a42565b604051630afbcdc960e01b81526001600160a01b0387811660048301529190911690630afbcdc990602401604080518083038186803b158015610ab457600080fd5b505afa158015610ac8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aec9190611c6c565b838381518110610b0c57634e487b7160e01b600052603260045260246000fd5b6020026020010151602001848481518110610b3757634e487b7160e01b600052603260045260246000fd5b6020908102919091010151604001919091525280610b5481611ee6565b9150506109c8565b50610b71610b6a85836112ee565b8390611022565b925050505b9392505050565b6033546001600160a01b03163314610ba75760405162461bcd60e51b815260040161034290611d2c565b6001600160a01b038116610c0c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610342565b610c158161102e565b50565b600081610c2757506000610b76565b33600081815260696020526040812054908567ffffffffffffffff811115610c5f57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610cbd57816020015b610caa604051806060016040528060006001600160a01b0316815260200160008152602001600081525090565b815260200190600190039081610c7d5790505b50905060005b86811015610e5757878782818110610ceb57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610d009190611a42565b828281518110610d2057634e487b7160e01b600052603260045260246000fd5b60209081029190910101516001600160a01b039091169052878782818110610d5857634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610d6d9190611a42565b604051630afbcdc960e01b81526001600160a01b0386811660048301529190911690630afbcdc990602401604080518083038186803b158015610daf57600080fd5b505afa158015610dc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de79190611c6c565b838381518110610e0757634e487b7160e01b600052603260045260246000fd5b6020026020010151602001848481518110610e3257634e487b7160e01b600052603260045260246000fd5b6020908102919091010151604001919091525280610e4f81611ee6565b915050610cc3565b506000610e648483611426565b90508015610ebc57610e768382611022565b9250836001600160a01b03167f2468f9268c60ad90e2d49edb0032c8a001e733ae888b3ab8e982edf535be1a7682604051610eb391815260200190565b60405180910390a25b82610ece576000945050505050610b76565b6000838711610edd5786610edf565b835b9050610eeb8185611ea3565b6001600160a01b03808716600090815260696020526040902091909155606854606754610f1e92908116911633846114d8565b60405181815233907ffc30cddea38e2bf4d6ea7d3f9ed3b6ad7f176419f4963bd81318067a4aee73fe9060200160405180910390a298975050505050505050565b6001600160a01b0380841660009081526066602090815260408083209388168352600284019091528120549091908280610f9a888588611532565b9050808314611014578615610fb757610fb48782856115ea565b91505b6001600160a01b03808a1660008181526002870160205260409081902084905551918a16917fbb123b5c06d5408bbea3c4fef481578175cfb432e3b482c6186f02ed9086585b9061100b9085815260200190565b60405180910390a35b50925050505b949350505050565b6000610b768284611d61565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff1680611099575060005460ff16155b6110b55760405162461bcd60e51b815260040161034290611cde565b600054610100900460ff161580156110d7576000805461ffff19166101011790555b6110df611615565b6110e94283611022565b60655580156110fe576000805461ff00191690555b5050565b6033546001600160a01b0316331461112c5760405162461bcd60e51b815260040161034290611d2c565b60005b81518110156110fe5760006066600084848151811061115e57634e487b7160e01b600052603260045260246000fd5b6020026020010151604001516001600160a01b03166001600160a01b0316815260200190815260200160002090506111ed8383815181106111af57634e487b7160e01b600052603260045260246000fd5b602002602001015160400151828585815181106111dc57634e487b7160e01b600052603260045260246000fd5b602002602001015160200151611532565b5082828151811061120e57634e487b7160e01b600052603260045260246000fd5b60209081029190910101515181546fffffffffffffffffffffffffffffffff19166001600160801b03909116178155825183908390811061125f57634e487b7160e01b600052603260045260246000fd5b6020026020010151604001516001600160a01b03167f87fa03892a0556cb6b8f97e6d533a150d4d55fcbf275fff5fa003fa636bcc7fa8484815181106112b557634e487b7160e01b600052603260045260246000fd5b602090810291909101810151516040516001600160801b0390911681520160405180910390a250806112e681611ee6565b91505061112f565b600080805b835181101561141e5760006066600086848151811061132257634e487b7160e01b600052603260045260246000fd5b602090810291909101810151516001600160a01b03168252810191909152604001600090812060018101548154885192945061139e926001600160801b0380831692600160801b900416908a908890811061138d57634e487b7160e01b600052603260045260246000fd5b602002602001015160400151611690565b90506114076114008785815181106113c657634e487b7160e01b600052603260045260246000fd5b602002602001015160200151838560020160008c6001600160a01b03166001600160a01b03168152602001908152602001600020546115ea565b8590611022565b93505050808061141690611ee6565b9150506112f3565b509392505050565b600080805b835181101561141e576114c4610b6a8686848151811061145b57634e487b7160e01b600052603260045260246000fd5b60200260200101516000015187858151811061148757634e487b7160e01b600052603260045260246000fd5b6020026020010151602001518886815181106114b357634e487b7160e01b600052603260045260246000fd5b602002602001015160400151610f5f565b9150806114d081611ee6565b91505061142b565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526103dc908590611738565b6001820154825460009190600160801b90046001600160801b03164281141561155d57509050610b76565b84546000906115789084906001600160801b03168488611690565b90508281146115c757600186018190556040518181526001600160a01b038816907f5777ca300dfe5bead41006fbce4389794dbc0ed8d6cccebfaf94630aa04184bc9060200160405180910390a25b85546001600160801b03428116600160801b029116178655925050509392505050565b600061101a6115fb6012600a611ddc565b61160f611608868661180f565b879061181b565b90611827565b600054610100900460ff168061162e575060005460ff16155b61164a5760405162461bcd60e51b815260040161034290611cde565b600054610100900460ff1615801561166c576000805461ffff19166101011790555b611674611833565b61167c61189d565b8015610c15576000805461ff001916905550565b600083158061169d575081155b806116b0575042836001600160801b0316145b806116c65750606554836001600160801b031610155b156116d257508361101a565b600060655442116116e357426116e7565b6065545b905060006116fe826001600160801b03871661180f565b905061172d876117278661160f6117176012600a611ddc565b6117218c8861181b565b9061181b565b90611022565b979650505050505050565b600061178d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166118fd9092919063ffffffff16565b80519091501561180a57808060200190518101906117ab9190611c1c565b61180a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610342565b505050565b6000610b768284611ea3565b6000610b768284611e84565b6000610b768284611d79565b600054610100900460ff168061184c575060005460ff16155b6118685760405162461bcd60e51b815260040161034290611cde565b600054610100900460ff1615801561167c576000805461ffff19166101011790558015610c15576000805461ff001916905550565b600054610100900460ff16806118b6575060005460ff16155b6118d25760405162461bcd60e51b815260040161034290611cde565b600054610100900460ff161580156118f4576000805461ffff19166101011790555b61167c3361102e565b606061101a848460008585843b6119565760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610342565b600080866001600160a01b031685876040516119729190611c8f565b60006040518083038185875af1925050503d80600081146119af576040519150601f19603f3d011682016040523d82523d6000602084013e6119b4565b606091505b509150915061172d828286606083156119ce575081610b76565b8251156119de5782518084602001fd5b8160405162461bcd60e51b81526004016103429190611cab565b60008083601f840112611a09578182fd5b50813567ffffffffffffffff811115611a20578182fd5b6020830191508360208260051b8501011115611a3b57600080fd5b9250929050565b600060208284031215611a53578081fd5b8135610b7681611f17565b60008060408385031215611a70578081fd5b8235611a7b81611f17565b91506020830135611a8b81611f17565b809150509250929050565b600080600060608486031215611aaa578081fd5b8335611ab581611f17565b92506020840135611ac581611f17565b915060408401356001600160801b0381168114611ae0578182fd5b809150509250925092565b600080600060608486031215611aff578283fd5b8335611b0a81611f17565b95602085013595506040909401359392505050565b600080600060408486031215611b33578283fd5b833567ffffffffffffffff811115611b49578384fd5b611b55868287016119f8565b9094509250506020840135611ae081611f17565b60008060008060408587031215611b7e578081fd5b843567ffffffffffffffff80821115611b95578283fd5b611ba1888389016119f8565b90965094506020870135915080821115611bb9578283fd5b50611bc6878288016119f8565b95989497509550505050565b600080600060408486031215611be6578283fd5b833567ffffffffffffffff811115611bfc578384fd5b611c08868287016119f8565b909790965060209590950135949350505050565b600060208284031215611c2d578081fd5b81518015158114610b76578182fd5b600060208284031215611c4d578081fd5b5035919050565b600060208284031215611c65578081fd5b5051919050565b60008060408385031215611c7e578182fd5b505080516020909101519092909150565b60008251611ca1818460208701611eba565b9190910192915050565b6020815260008251806020840152611cca816040850160208701611eba565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115611d7457611d74611f01565b500190565b600082611d9457634e487b7160e01b81526012600452602481fd5b500490565b600181815b80851115611dd4578160001904821115611dba57611dba611f01565b80851615611dc757918102915b93841c9390800290611d9e565b509250929050565b6000610b768383600082611df25750600161040d565b81611dff5750600061040d565b8160018114611e155760028114611e1f57611e3b565b600191505061040d565b60ff841115611e3057611e30611f01565b50506001821b61040d565b5060208310610133831016604e8410600b8410161715611e5e575081810a61040d565b611e688383611d99565b8060001904821115611e7c57611e7c611f01565b029392505050565b6000816000190483118215151615611e9e57611e9e611f01565b500290565b600082821015611eb557611eb5611f01565b500390565b60005b83811015611ed5578181015183820152602001611ebd565b838111156103dc5750506000910152565b6000600019821415611efa57611efa611f01565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610c1557600080fdfea2646970667358221220d856834cd7452229295e481f99131deebeddd034db2e0e45d028b1367b14efca64736f6c63430008040033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061010b5760003560e01c80638da5cb5b116100a257806399248ea71161007157806399248ea71461023c578063aaf5eb681461024f578063f11b818814610269578063f2fde38b146102cb578063fad66604146102de57600080fd5b80638da5cb5b146101c8578063919cd40f146101ed578063946776cd146101f657806395c589091461020957600080fd5b8063715018a6116100de578063715018a6146101875780637265580f1461018f57806379f171b2146101a25780638b599f26146101b557600080fd5b8063198fa81e1461011057806331873e2e1461014c5780633373ee4c1461016157806339ccbdd314610174575b600080fd5b61013961011e366004611a42565b6001600160a01b031660009081526069602052604090205490565b6040519081526020015b60405180910390f35b61015f61015a366004611aeb565b6102f1565b005b61013961016f366004611a5e565b6103e2565b61015f610182366004611c3c565b610413565b61015f610478565b61015f61019d366004611a96565b6104ae565b61015f6101b0366004611b69565b61055e565b6101396101c3366004611b1f565b610923565b6033546001600160a01b03165b6040516001600160a01b039091168152602001610143565b61013960655481565b6068546101d5906001600160a01b031681565b61022c610217366004611a42565b606a6020526000908152604090205460ff1681565b6040519015158152602001610143565b6067546101d5906001600160a01b031681565b610257601281565b60405160ff9091168152602001610143565b6102a5610277366004611a42565b606660205260009081526040902080546001909101546001600160801b0380831692600160801b9004169083565b604080516001600160801b03948516815293909216602084015290820152606001610143565b61015f6102d9366004611a42565b610b7d565b6101396102ec366004611bd2565b610c18565b336000908152606a602052604090205460ff1661034b5760405162461bcd60e51b815260206004820152601360248201527214d95b99195c88155b985d5d1a1bdc9a5e9959606a1b60448201526064015b60405180910390fd5b600061035984338486610f5f565b905080156103dc576001600160a01b0384166000908152606960205260409020546103849082611022565b6001600160a01b038516600081815260696020526040908190209290925590517f2468f9268c60ad90e2d49edb0032c8a001e733ae888b3ab8e982edf535be1a76906103d39084815260200190565b60405180910390a25b50505050565b6001600160a01b03808216600090815260666020908152604080832093861683526002909301905220545b92915050565b6033546001600160a01b0316331461043d5760405162461bcd60e51b815260040161034290611d2c565b60658190556040518181527f1cc1849a6602c3e91f2088cadea4381cc5717f2f28584197060ed2ebb434c16f9060200160405180910390a150565b6033546001600160a01b031633146104a25760405162461bcd60e51b815260040161034290611d2c565b6104ac600061102e565b565b600054610100900460ff16806104c7575060005460ff16155b6104e35760405162461bcd60e51b815260040161034290611cde565b600054610100900460ff16158015610505576000805461ffff19166101011790555b610517826001600160801b0316611080565b606780546001600160a01b038087166001600160a01b031992831617909255606880549286169290911691909117905580156103dc576000805461ff001916905550505050565b6033546001600160a01b031633146105885760405162461bcd60e51b815260040161034290611d2c565b8281146105cf5760405162461bcd60e51b815260206004820152601560248201527424a72b20a624a22fa1a7a72324a3aaa920aa24a7a760591b6044820152606401610342565b60008367ffffffffffffffff8111156105f857634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561064357816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816106165790505b50905060005b84811015610912576001606a600088888581811061067757634e487b7160e01b600052603260045260246000fd5b905060200201602081019061068c9190611a42565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558585828181106106d457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906106e99190611a42565b82828151811061070957634e487b7160e01b600052603260045260246000fd5b6020026020010151604001906001600160a01b031690816001600160a01b03168152505083838281811061074d57634e487b7160e01b600052603260045260246000fd5b9050602002013582828151811061077457634e487b7160e01b600052603260045260246000fd5b60209081029190910101516001600160801b0390911690528383828181106107ac57634e487b7160e01b600052603260045260246000fd5b905060200201358282815181106107d357634e487b7160e01b600052603260045260246000fd5b6020026020010151600001516001600160801b03161461082d5760405162461bcd60e51b815260206004820152601560248201527424a72b20a624a22fa1a7a72324a3aaa920aa24a7a760591b6044820152606401610342565b85858281811061084d57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906108629190611a42565b6001600160a01b031663b1bf962d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561089a57600080fd5b505afa1580156108ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d29190611c54565b8282815181106108f257634e487b7160e01b600052603260045260246000fd5b60209081029190910181015101528061090a81611ee6565b915050610649565b5061091c81611102565b5050505050565b6001600160a01b038116600090815260696020526040812054818467ffffffffffffffff81111561096457634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156109c257816020015b6109af604051806060016040528060006001600160a01b0316815260200160008152602001600081525090565b8152602001906001900390816109825790505b50905060005b85811015610b5c578686828181106109f057634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610a059190611a42565b828281518110610a2557634e487b7160e01b600052603260045260246000fd5b60209081029190910101516001600160a01b039091169052868682818110610a5d57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610a729190611a42565b604051630afbcdc960e01b81526001600160a01b0387811660048301529190911690630afbcdc990602401604080518083038186803b158015610ab457600080fd5b505afa158015610ac8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aec9190611c6c565b838381518110610b0c57634e487b7160e01b600052603260045260246000fd5b6020026020010151602001848481518110610b3757634e487b7160e01b600052603260045260246000fd5b6020908102919091010151604001919091525280610b5481611ee6565b9150506109c8565b50610b71610b6a85836112ee565b8390611022565b925050505b9392505050565b6033546001600160a01b03163314610ba75760405162461bcd60e51b815260040161034290611d2c565b6001600160a01b038116610c0c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610342565b610c158161102e565b50565b600081610c2757506000610b76565b33600081815260696020526040812054908567ffffffffffffffff811115610c5f57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610cbd57816020015b610caa604051806060016040528060006001600160a01b0316815260200160008152602001600081525090565b815260200190600190039081610c7d5790505b50905060005b86811015610e5757878782818110610ceb57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610d009190611a42565b828281518110610d2057634e487b7160e01b600052603260045260246000fd5b60209081029190910101516001600160a01b039091169052878782818110610d5857634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610d6d9190611a42565b604051630afbcdc960e01b81526001600160a01b0386811660048301529190911690630afbcdc990602401604080518083038186803b158015610daf57600080fd5b505afa158015610dc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de79190611c6c565b838381518110610e0757634e487b7160e01b600052603260045260246000fd5b6020026020010151602001848481518110610e3257634e487b7160e01b600052603260045260246000fd5b6020908102919091010151604001919091525280610e4f81611ee6565b915050610cc3565b506000610e648483611426565b90508015610ebc57610e768382611022565b9250836001600160a01b03167f2468f9268c60ad90e2d49edb0032c8a001e733ae888b3ab8e982edf535be1a7682604051610eb391815260200190565b60405180910390a25b82610ece576000945050505050610b76565b6000838711610edd5786610edf565b835b9050610eeb8185611ea3565b6001600160a01b03808716600090815260696020526040902091909155606854606754610f1e92908116911633846114d8565b60405181815233907ffc30cddea38e2bf4d6ea7d3f9ed3b6ad7f176419f4963bd81318067a4aee73fe9060200160405180910390a298975050505050505050565b6001600160a01b0380841660009081526066602090815260408083209388168352600284019091528120549091908280610f9a888588611532565b9050808314611014578615610fb757610fb48782856115ea565b91505b6001600160a01b03808a1660008181526002870160205260409081902084905551918a16917fbb123b5c06d5408bbea3c4fef481578175cfb432e3b482c6186f02ed9086585b9061100b9085815260200190565b60405180910390a35b50925050505b949350505050565b6000610b768284611d61565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff1680611099575060005460ff16155b6110b55760405162461bcd60e51b815260040161034290611cde565b600054610100900460ff161580156110d7576000805461ffff19166101011790555b6110df611615565b6110e94283611022565b60655580156110fe576000805461ff00191690555b5050565b6033546001600160a01b0316331461112c5760405162461bcd60e51b815260040161034290611d2c565b60005b81518110156110fe5760006066600084848151811061115e57634e487b7160e01b600052603260045260246000fd5b6020026020010151604001516001600160a01b03166001600160a01b0316815260200190815260200160002090506111ed8383815181106111af57634e487b7160e01b600052603260045260246000fd5b602002602001015160400151828585815181106111dc57634e487b7160e01b600052603260045260246000fd5b602002602001015160200151611532565b5082828151811061120e57634e487b7160e01b600052603260045260246000fd5b60209081029190910101515181546fffffffffffffffffffffffffffffffff19166001600160801b03909116178155825183908390811061125f57634e487b7160e01b600052603260045260246000fd5b6020026020010151604001516001600160a01b03167f87fa03892a0556cb6b8f97e6d533a150d4d55fcbf275fff5fa003fa636bcc7fa8484815181106112b557634e487b7160e01b600052603260045260246000fd5b602090810291909101810151516040516001600160801b0390911681520160405180910390a250806112e681611ee6565b91505061112f565b600080805b835181101561141e5760006066600086848151811061132257634e487b7160e01b600052603260045260246000fd5b602090810291909101810151516001600160a01b03168252810191909152604001600090812060018101548154885192945061139e926001600160801b0380831692600160801b900416908a908890811061138d57634e487b7160e01b600052603260045260246000fd5b602002602001015160400151611690565b90506114076114008785815181106113c657634e487b7160e01b600052603260045260246000fd5b602002602001015160200151838560020160008c6001600160a01b03166001600160a01b03168152602001908152602001600020546115ea565b8590611022565b93505050808061141690611ee6565b9150506112f3565b509392505050565b600080805b835181101561141e576114c4610b6a8686848151811061145b57634e487b7160e01b600052603260045260246000fd5b60200260200101516000015187858151811061148757634e487b7160e01b600052603260045260246000fd5b6020026020010151602001518886815181106114b357634e487b7160e01b600052603260045260246000fd5b602002602001015160400151610f5f565b9150806114d081611ee6565b91505061142b565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526103dc908590611738565b6001820154825460009190600160801b90046001600160801b03164281141561155d57509050610b76565b84546000906115789084906001600160801b03168488611690565b90508281146115c757600186018190556040518181526001600160a01b038816907f5777ca300dfe5bead41006fbce4389794dbc0ed8d6cccebfaf94630aa04184bc9060200160405180910390a25b85546001600160801b03428116600160801b029116178655925050509392505050565b600061101a6115fb6012600a611ddc565b61160f611608868661180f565b879061181b565b90611827565b600054610100900460ff168061162e575060005460ff16155b61164a5760405162461bcd60e51b815260040161034290611cde565b600054610100900460ff1615801561166c576000805461ffff19166101011790555b611674611833565b61167c61189d565b8015610c15576000805461ff001916905550565b600083158061169d575081155b806116b0575042836001600160801b0316145b806116c65750606554836001600160801b031610155b156116d257508361101a565b600060655442116116e357426116e7565b6065545b905060006116fe826001600160801b03871661180f565b905061172d876117278661160f6117176012600a611ddc565b6117218c8861181b565b9061181b565b90611022565b979650505050505050565b600061178d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166118fd9092919063ffffffff16565b80519091501561180a57808060200190518101906117ab9190611c1c565b61180a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610342565b505050565b6000610b768284611ea3565b6000610b768284611e84565b6000610b768284611d79565b600054610100900460ff168061184c575060005460ff16155b6118685760405162461bcd60e51b815260040161034290611cde565b600054610100900460ff1615801561167c576000805461ffff19166101011790558015610c15576000805461ff001916905550565b600054610100900460ff16806118b6575060005460ff16155b6118d25760405162461bcd60e51b815260040161034290611cde565b600054610100900460ff161580156118f4576000805461ffff19166101011790555b61167c3361102e565b606061101a848460008585843b6119565760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610342565b600080866001600160a01b031685876040516119729190611c8f565b60006040518083038185875af1925050503d80600081146119af576040519150601f19603f3d011682016040523d82523d6000602084013e6119b4565b606091505b509150915061172d828286606083156119ce575081610b76565b8251156119de5782518084602001fd5b8160405162461bcd60e51b81526004016103429190611cab565b60008083601f840112611a09578182fd5b50813567ffffffffffffffff811115611a20578182fd5b6020830191508360208260051b8501011115611a3b57600080fd5b9250929050565b600060208284031215611a53578081fd5b8135610b7681611f17565b60008060408385031215611a70578081fd5b8235611a7b81611f17565b91506020830135611a8b81611f17565b809150509250929050565b600080600060608486031215611aaa578081fd5b8335611ab581611f17565b92506020840135611ac581611f17565b915060408401356001600160801b0381168114611ae0578182fd5b809150509250925092565b600080600060608486031215611aff578283fd5b8335611b0a81611f17565b95602085013595506040909401359392505050565b600080600060408486031215611b33578283fd5b833567ffffffffffffffff811115611b49578384fd5b611b55868287016119f8565b9094509250506020840135611ae081611f17565b60008060008060408587031215611b7e578081fd5b843567ffffffffffffffff80821115611b95578283fd5b611ba1888389016119f8565b90965094506020870135915080821115611bb9578283fd5b50611bc6878288016119f8565b95989497509550505050565b600080600060408486031215611be6578283fd5b833567ffffffffffffffff811115611bfc578384fd5b611c08868287016119f8565b909790965060209590950135949350505050565b600060208284031215611c2d578081fd5b81518015158114610b76578182fd5b600060208284031215611c4d578081fd5b5035919050565b600060208284031215611c65578081fd5b5051919050565b60008060408385031215611c7e578182fd5b505080516020909101519092909150565b60008251611ca1818460208701611eba565b9190910192915050565b6020815260008251806020840152611cca816040850160208701611eba565b601f01601f19169190910160400192915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115611d7457611d74611f01565b500190565b600082611d9457634e487b7160e01b81526012600452602481fd5b500490565b600181815b80851115611dd4578160001904821115611dba57611dba611f01565b80851615611dc757918102915b93841c9390800290611d9e565b509250929050565b6000610b768383600082611df25750600161040d565b81611dff5750600061040d565b8160018114611e155760028114611e1f57611e3b565b600191505061040d565b60ff841115611e3057611e30611f01565b50506001821b61040d565b5060208310610133831016604e8410600b8410161715611e5e575081810a61040d565b611e688383611d99565b8060001904821115611e7c57611e7c611f01565b029392505050565b6000816000190483118215151615611e9e57611e9e611f01565b500290565b600082821015611eb557611eb5611f01565b500390565b60005b83811015611ed5578181015183820152602001611ebd565b838111156103dc5750506000910152565b6000600019821415611efa57611efa611f01565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610c1557600080fdfea2646970667358221220d856834cd7452229295e481f99131deebeddd034db2e0e45d028b1367b14efca64736f6c63430008040033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.