ETH Price: $2,372.10 (-3.93%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim Rewards210621122024-10-28 5:42:117 days ago1730094131IN
0x6c1603aB...97DA3C229
0 ETH0.002800915.49571282
Claim Rewards209952222024-10-18 21:45:3517 days ago1729287935IN
0x6c1603aB...97DA3C229
0 ETH0.0050674910.60194636
Claim Rewards208839992024-10-03 9:09:3532 days ago1727946575IN
0x6c1603aB...97DA3C229
0 ETH0.0094751510.42139684
Claim Rewards208671662024-10-01 0:49:4734 days ago1727743787IN
0x6c1603aB...97DA3C229
0 ETH0.005796646.38791434
Claim Rewards208614092024-09-30 5:35:2335 days ago1727674523IN
0x6c1603aB...97DA3C229
0 ETH0.002391314.98460367
Claim Rewards208394272024-09-27 3:59:5938 days ago1727409599IN
0x6c1603aB...97DA3C229
0 ETH0.0063022513.18524836
Claim Rewards207615652024-09-16 7:02:2349 days ago1726470143IN
0x6c1603aB...97DA3C229
0 ETH0.0071916914.99081362
Claim Rewards207482142024-09-14 10:20:4751 days ago1726309247IN
0x6c1603aB...97DA3C229
0 ETH0.001549041.7
Claim Rewards207462832024-09-14 3:51:2351 days ago1726285883IN
0x6c1603aB...97DA3C229
0 ETH0.000556661.19805304
Claim Rewards207408072024-09-13 9:29:4752 days ago1726219787IN
0x6c1603aB...97DA3C229
0 ETH0.002031132.22906987
Claim Rewards207372102024-09-12 21:27:4753 days ago1726176467IN
0x6c1603aB...97DA3C229
0 ETH0.002065614.46483493
Claim Rewards207039302024-09-08 5:54:2357 days ago1725774863IN
0x6c1603aB...97DA3C229
0 ETH0.000509911.05223974
Claim Rewards206845812024-09-05 13:07:3560 days ago1725541655IN
0x6c1603aB...97DA3C229
0 ETH0.003141413.40392836
Claim Rewards206556842024-09-01 12:21:2364 days ago1725193283IN
0x6c1603aB...97DA3C229
0 ETH0.001121621.23092819
Claim Rewards206445252024-08-30 22:58:2365 days ago1725058703IN
0x6c1603aB...97DA3C229
0 ETH0.000390320.84005523
Claim Rewards206412282024-08-30 11:55:1166 days ago1725018911IN
0x6c1603aB...97DA3C229
0 ETH0.001477561.62157412
Claim Rewards206387182024-08-30 3:30:2366 days ago1724988623IN
0x6c1603aB...97DA3C229
0 ETH0.000335050.72698779
Claim Rewards206354402024-08-29 16:30:1167 days ago1724949011IN
0x6c1603aB...97DA3C229
0 ETH0.001700663.54497236
Claim Rewards206101372024-08-26 3:39:3570 days ago1724643575IN
0x6c1603aB...97DA3C229
0 ETH0.000434550.9
Claim Rewards206029702024-08-25 3:37:2371 days ago1724557043IN
0x6c1603aB...97DA3C229
0 ETH0.000903891.00145515
Claim Rewards206017992024-08-24 23:41:3571 days ago1724542895IN
0x6c1603aB...97DA3C229
0 ETH0.001123271.26854954
Claim Rewards205713562024-08-20 17:34:2376 days ago1724175263IN
0x6c1603aB...97DA3C229
0 ETH0.001246921.37411404
Claim Rewards205677352024-08-20 5:25:2376 days ago1724131523IN
0x6c1603aB...97DA3C229
0 ETH0.001978682.1805171
Claim Rewards205618332024-08-19 9:39:1177 days ago1724060351IN
0x6c1603aB...97DA3C229
0 ETH0.002290672.55746327
Claim Rewards205578202024-08-18 20:11:5978 days ago1724011919IN
0x6c1603aB...97DA3C229
0 ETH0.000839091.03246863
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SiloIncentivesController

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 10 : SiloIncentivesController.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.13;

import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {BaseIncentivesController} from "../external/aave/incentives/base/BaseIncentivesController.sol";
import "../interfaces/INotificationReceiver.sol";


/**
 * @title SiloIncentivesController
 * @notice Distributor contract for rewards to the Aave protocol, using a staked token as rewards asset.
 * The contract stakes the rewards before redistributing them to the Aave protocol participants.
 * The reference staked token implementation is at https://github.com/aave/aave-stake-v2
 * @author Aave
 */
contract SiloIncentivesController is BaseIncentivesController, INotificationReceiver {
    using SafeERC20 for IERC20;

    constructor(IERC20 rewardToken, address emissionManager) BaseIncentivesController(rewardToken, emissionManager) {}

    /**
     * @dev Silo share token event handler
     */
    function onAfterTransfer(address /* _token */, address _from, address _to, uint256 _amount) external {
        if (assets[msg.sender].lastUpdateTimestamp == 0) {
            // optimisation check, if we never configured rewards distribution, then no need for updating any data
            return;
        }

        uint256 totalSupplyBefore = IERC20(msg.sender).totalSupply();

        if (_from == address(0x0)) {
            // we minting tokens, so supply before was less
            // we safe, because this amount came from token, if token handle them we can handle as well
            unchecked { totalSupplyBefore -= _amount; }
        } else if (_to == address(0x0)) {
            // we burning, so supply before was more
            // we safe, because this amount came from token, if token handle them we can handle as well
            unchecked { totalSupplyBefore += _amount; }
        }

        // here user either transferring token to someone else or burning tokens
        // user state will be new, because this event is `onAfterTransfer`
        // we need to recreate status before event in order to automatically calculate rewards
        if (_from != address(0x0)) {
            uint256 balanceBefore;
            // we safe, because this amount came from token, if token handle them we can handle as well
            unchecked { balanceBefore = IERC20(msg.sender).balanceOf(_from) + _amount; }
            handleAction(_from, totalSupplyBefore, balanceBefore);
        }

        // we have to checkout also user `_to`
        if (_to != address(0x0)) {
            uint256 balanceBefore;
            // we safe, because this amount came from token, if token handle them we can handle as well
            unchecked { balanceBefore = IERC20(msg.sender).balanceOf(_to) - _amount; }
            handleAction(_to, totalSupplyBefore, balanceBefore);
        }
    }

    /// @dev it will transfer all balance of reward token to emission manager wallet
    function rescueRewards() external onlyEmissionManager {
        IERC20(REWARD_TOKEN).safeTransfer(msg.sender, IERC20(REWARD_TOKEN).balanceOf(address(this)));
    }

    function notificationReceiverPing() external pure returns (bytes4) {
        return this.notificationReceiverPing.selector;
    }

    function _transferRewards(address to, uint256 amount) internal override {
        IERC20(REWARD_TOKEN).safeTransfer(to, amount);
    }

    /**
     * @dev in Silo, there is no scale, we simply using balance and total supply. Original method name is used here
     * to keep as much of original code.
     */
    function _getScaledUserBalanceAndSupply(address _asset, address _user)
        internal
        virtual
        view
        override
        returns (uint256 userBalance, uint256 totalSupply)
    {
        userBalance = IERC20(_asset).balanceOf(_user);
        totalSupply = IERC20(_asset).totalSupply();
    }
}

File 2 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);
}

File 3 of 10 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.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 SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 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(
        IERC20 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(
        IERC20 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(
        IERC20 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(IERC20 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");
        }
    }
}

File 4 of 10 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @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 Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(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);
            }
        }
    }
}

File 5 of 10 : BaseIncentivesController.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.13;

import {DistributionTypes} from "../../lib/DistributionTypes.sol";
import {DistributionManager} from "./DistributionManager.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {IAaveIncentivesController} from "../../interfaces/IAaveIncentivesController.sol";

/**
 * @title BaseIncentivesController
 * @notice Abstract contract template to build Distributors contracts for ERC20 rewards to protocol participants
 * @author Aave
  */
abstract contract BaseIncentivesController is IAaveIncentivesController, DistributionManager {
    uint256 public constant REVISION = 1;

    address public immutable override REWARD_TOKEN; // solhint-disable-line var-name-mixedcase

    mapping(address => uint256) internal _usersUnclaimedRewards;

    // this mapping allows whitelisted addresses to claim on behalf of others
    // useful for contracts that hold tokens to be rewarded but don't have any native logic to claim Liquidity Mining
    // rewards
    mapping(address => address) internal _authorizedClaimers;

    modifier onlyAuthorizedClaimers(address claimer, address user) {
        if (_authorizedClaimers[user] != claimer) revert ClaimerUnauthorized();

        _;
    }

    error InvalidConfiguration();
    error IndexOverflowAtEmissionsPerSecond();
    error InvalidToAddress();
    error InvalidUserAddress();
    error ClaimerUnauthorized();

    constructor(IERC20 rewardToken, address emissionManager) DistributionManager(emissionManager) {
        REWARD_TOKEN = address(rewardToken);
    }

    /// @inheritdoc IAaveIncentivesController
    function configureAssets(address[] calldata assets, uint256[] calldata emissionsPerSecond)
        external
        override
        onlyEmissionManager
    {
        if (assets.length != emissionsPerSecond.length) revert InvalidConfiguration();

        DistributionTypes.AssetConfigInput[] memory assetsConfig =
            new DistributionTypes.AssetConfigInput[](assets.length);

        for (uint256 i = 0; i < assets.length;) {
            if (uint104(emissionsPerSecond[i]) != emissionsPerSecond[i]) revert IndexOverflowAtEmissionsPerSecond();

            assetsConfig[i].underlyingAsset = assets[i];
            assetsConfig[i].emissionPerSecond = uint104(emissionsPerSecond[i]);
            assetsConfig[i].totalStaked = IERC20(assets[i]).totalSupply();

            unchecked { i++; }
        }

        _configureAssets(assetsConfig);
    }

    /// @inheritdoc IAaveIncentivesController
    function handleAction(
        address user,
        uint256 totalSupply,
        uint256 userBalance
    ) public override {
        uint256 accruedRewards = _updateUserAssetInternal(user, msg.sender, userBalance, totalSupply);

        if (accruedRewards != 0) {
            _usersUnclaimedRewards[user] = _usersUnclaimedRewards[user] + accruedRewards;
            emit RewardsAccrued(user, accruedRewards);
        }
    }

    /// @inheritdoc IAaveIncentivesController
    function getRewardsBalance(address[] 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;) {
            userState[i].underlyingAsset = assets[i];
            (userState[i].stakedByUser, userState[i].totalStaked) = _getScaledUserBalanceAndSupply(assets[i], user);

            unchecked { i++; }
        }

        unclaimedRewards = unclaimedRewards + _getUnclaimedRewards(user, userState);
        return unclaimedRewards;
    }

    /// @inheritdoc IAaveIncentivesController
    function claimRewards(
        address[] calldata assets,
        uint256 amount,
        address to
    ) external override returns (uint256) {
        if (to == address(0)) revert InvalidToAddress();

        return _claimRewards(assets, amount, msg.sender, msg.sender, to);
    }

    /// @inheritdoc IAaveIncentivesController
    function claimRewardsOnBehalf(
        address[] calldata assets,
        uint256 amount,
        address user,
        address to
    ) external override onlyAuthorizedClaimers(msg.sender, user) returns (uint256) {
        if (user == address(0)) revert InvalidUserAddress();
        if (to == address(0)) revert InvalidToAddress();

        return _claimRewards(assets, amount, msg.sender, user, to);
    }

    /// @inheritdoc IAaveIncentivesController
    function claimRewardsToSelf(address[] calldata assets, uint256 amount)
        external
        override
        returns (uint256)
    {
        return _claimRewards(assets, amount, msg.sender, msg.sender, msg.sender);
    }

    /// @inheritdoc IAaveIncentivesController
    function setClaimer(address user, address caller) external override onlyEmissionManager {
        _authorizedClaimers[user] = caller;
        emit ClaimerSet(user, caller);
    }

    /// @inheritdoc IAaveIncentivesController
    function getClaimer(address user) external view override returns (address) {
        return _authorizedClaimers[user];
    }

    /// @inheritdoc IAaveIncentivesController
    function getUserUnclaimedRewards(address _user) external view override returns (uint256) {
        return _usersUnclaimedRewards[_user];
    }

    /**
     * @dev Claims reward for an user on behalf, on all the assets of the lending pool, accumulating the pending rewards
     * @param amount Amount of rewards to claim
     * @param user Address to check and claim rewards
     * @param to Address that will be receiving the rewards
     * @return Rewards claimed
     */
    function _claimRewards(
        address[] calldata assets,
        uint256 amount,
        address claimer,
        address user,
        address to
    ) internal returns (uint256) {
        if (amount == 0) {
            return 0;
        }

        uint256 unclaimedRewards = _usersUnclaimedRewards[user];

        if (amount > unclaimedRewards) {
            DistributionTypes.UserStakeInput[] memory userState = new DistributionTypes.UserStakeInput[](assets.length);

            for (uint256 i = 0; i < assets.length;) {
                userState[i].underlyingAsset = assets[i];
                (userState[i].stakedByUser, userState[i].totalStaked) = _getScaledUserBalanceAndSupply(assets[i], user);

                unchecked { i++; }
            }

            uint256 accruedRewards = _claimRewards(user, userState);

            if (accruedRewards != 0) {
                unclaimedRewards = unclaimedRewards + accruedRewards;
                emit RewardsAccrued(user, accruedRewards);
            }
        }

        if (unclaimedRewards == 0) {
            return 0;
        }

        uint256 amountToClaim = amount > unclaimedRewards ? unclaimedRewards : amount;
        unchecked { _usersUnclaimedRewards[user] = unclaimedRewards - amountToClaim; } // Safe due to the previous line

        _transferRewards(to, amountToClaim);
        emit RewardsClaimed(user, to, claimer, amountToClaim);

        return amountToClaim;
    }

    /**
     * @dev Abstract function to transfer rewards to the desired account
     * @param to Account address to send the rewards
     * @param amount Amount of rewards to transfer
     */
    function _transferRewards(address to, uint256 amount) internal virtual;

    function _getScaledUserBalanceAndSupply(address _asset, address _user)
        internal
        view
        virtual
        returns (uint256 userBalance, uint256 totalSupply);
}

File 6 of 10 : DistributionManager.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.13;

import {IAaveDistributionManager} from "../../interfaces/IAaveDistributionManager.sol";
import {DistributionTypes} from "../../lib/DistributionTypes.sol";

/**
 * @title DistributionManager
 * @notice Accounting contract to manage multiple staking distributions
 * @author Aave
 */
contract DistributionManager is IAaveDistributionManager {
    struct AssetData {
        uint104 emissionPerSecond;
        uint104 index;
        uint40 lastUpdateTimestamp;
        mapping(address => uint256) users;
    }

    address public immutable EMISSION_MANAGER; // solhint-disable-line var-name-mixedcase

    uint8 public constant PRECISION = 18;
    uint256 public constant TEN_POW_PRECISION = 10 ** PRECISION;

    mapping(address => AssetData) public assets;

    uint256 internal _distributionEnd;

    error OnlyEmissionManager();
    error IndexOverflow();

    modifier onlyEmissionManager() {
        if (msg.sender != EMISSION_MANAGER) revert OnlyEmissionManager();

        _;
    }

    constructor(address emissionManager) {
        EMISSION_MANAGER = emissionManager;
    }

    /// @inheritdoc IAaveDistributionManager
    function setDistributionEnd(uint256 distributionEnd) external override onlyEmissionManager {
        _distributionEnd = distributionEnd;
        emit DistributionEndUpdated(distributionEnd);
    }

    /// @inheritdoc IAaveDistributionManager
    function getDistributionEnd() external view override returns (uint256) {
        return _distributionEnd;
    }

    /// @inheritdoc IAaveDistributionManager
    function DISTRIBUTION_END() external view override returns (uint256) { // solhint-disable-line func-name-mixedcase
        return _distributionEnd;
    }

    /// @inheritdoc IAaveDistributionManager
    function getUserAssetData(address user, address asset) public view override returns (uint256) {
        return assets[asset].users[user];
    }

    /// @inheritdoc IAaveDistributionManager
    function getAssetData(address asset) public view override returns (uint256, uint256, uint256) {
        return (assets[asset].index, assets[asset].emissionPerSecond, assets[asset].lastUpdateTimestamp);
    }

    /**
     * @dev Configure the assets for a specific emission
     * @param assetsConfigInput The array of each asset configuration
     */
    function _configureAssets(DistributionTypes.AssetConfigInput[] memory assetsConfigInput) internal {
        for (uint256 i = 0; i < assetsConfigInput.length;) {
            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
            );

            unchecked { i++; }
        }
    }

    /**
     * @dev Updates the state of one distribution, mainly rewards index and timestamp
     * @param asset The address of the asset being updated
     * @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 asset,
        AssetData storage assetConfig,
        uint256 totalStaked
    ) internal returns (uint256) {
        uint256 oldIndex = assetConfig.index;
        uint256 emissionPerSecond = assetConfig.emissionPerSecond;
        uint128 lastUpdateTimestamp = assetConfig.lastUpdateTimestamp;

        if (block.timestamp == lastUpdateTimestamp) {
            return oldIndex;
        }

        uint256 newIndex = _getAssetIndex(oldIndex, emissionPerSecond, lastUpdateTimestamp, totalStaked);

        if (newIndex != oldIndex) {
            if (uint104(newIndex) != newIndex) revert IndexOverflow();

            //optimization: storing one after another saves one SSTORE
            assetConfig.index = uint104(newIndex);
            assetConfig.lastUpdateTimestamp = uint40(block.timestamp);
            emit AssetIndexUpdated(asset, newIndex);
        } else {
            assetConfig.lastUpdateTimestamp = uint40(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;) {
            accruedRewards = accruedRewards + _updateUserAssetInternal(
                    user,
                    stakes[i].underlyingAsset,
                    stakes[i].stakedByUser,
                    stakes[i].totalStaked
                );

            unchecked { i++; }
        }

        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;) {
            AssetData storage assetConfig = assets[stakes[i].underlyingAsset];

            uint256 assetIndex = _getAssetIndex(
                assetConfig.index,
                assetConfig.emissionPerSecond,
                assetConfig.lastUpdateTimestamp,
                stakes[i].totalStaked
            );

            accruedRewards = accruedRewards + _getRewards(stakes[i].stakedByUser, assetIndex, assetConfig.users[user]);

            unchecked { i++; }
        }

        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 rewards The rewards
     */
    function _getRewards(
        uint256 principalUserBalance,
        uint256 reserveIndex,
        uint256 userIndex
    ) internal pure returns (uint256 rewards) {
        rewards = principalUserBalance * (reserveIndex - userIndex);
        unchecked { rewards /= TEN_POW_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 newIndex The new index.
     */
    function _getAssetIndex(
        uint256 currentIndex,
        uint256 emissionPerSecond,
        uint128 lastUpdateTimestamp,
        uint256 totalBalance
    ) internal view returns (uint256 newIndex) {
        uint256 distributionEnd = _distributionEnd;

        if (
            emissionPerSecond == 0 ||
            totalBalance == 0 ||
            lastUpdateTimestamp == block.timestamp ||
            lastUpdateTimestamp >= distributionEnd
        ) {
            return currentIndex;
        }

        uint256 currentTimestamp = block.timestamp > distributionEnd ? distributionEnd : block.timestamp;
        uint256 timeDelta = currentTimestamp - lastUpdateTimestamp;

        newIndex = emissionPerSecond * timeDelta * TEN_POW_PRECISION;
        unchecked { newIndex /= totalBalance; }
        newIndex += currentIndex;
    }
}

File 7 of 10 : IAaveDistributionManager.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.13;

import {DistributionTypes} from "../lib/DistributionTypes.sol";

interface IAaveDistributionManager {
  
    event AssetConfigUpdated(address indexed asset, uint256 emission);
    event AssetIndexUpdated(address indexed asset, uint256 index);
    event UserIndexUpdated(address indexed user, address indexed asset, uint256 index);
    event DistributionEndUpdated(uint256 newDistributionEnd);

    /**
     * @dev Sets the end date for the distribution
     * @param distributionEnd The end date timestamp
     */
    function setDistributionEnd(uint256 distributionEnd) external;

    /**
     * @dev Gets the end date for the distribution
     * @return The end of the distribution
     */
    function getDistributionEnd() external view returns (uint256);

    /**
     * @dev for backwards compatibility with the previous DistributionManager used
     * @return The end of the distribution
     */
    function DISTRIBUTION_END() external view returns(uint256); // solhint-disable-line func-name-mixedcase

    /**
     * @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) external view returns (uint256);

    /**
     * @dev Returns the configuration of the distribution for a certain asset
     * @param asset The address of the reference asset of the distribution
     * @return The asset index, the emission per second and the last updated timestamp
     */
    function getAssetData(address asset) external view returns (uint256, uint256, uint256);
}

File 8 of 10 : IAaveIncentivesController.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.13;

import {IAaveDistributionManager} from "../interfaces/IAaveDistributionManager.sol";

interface IAaveIncentivesController is IAaveDistributionManager {
    event RewardsAccrued(address indexed user, uint256 amount);

    event RewardsClaimed(
        address indexed user,
        address indexed to,
        address indexed claimer,
        uint256 amount
    );

    event ClaimerSet(address indexed user, address indexed claimer);

    /**
     * @dev Whitelists an address to claim the rewards on behalf of another address
     * @param user The address of the user
     * @param claimer The address of the claimer
     */
    function setClaimer(address user, address claimer) external;

    /**
     * @dev Configure assets for a certain rewards emission
     * @param assets The assets to incentivize
     * @param emissionsPerSecond The emission for each asset
     */
    function configureAssets(address[] calldata assets, uint256[] calldata emissionsPerSecond) external;

    /**
     * @dev Called by the corresponding asset on any update that affects the rewards distribution
     * @param asset The address of the user
     * @param userBalance The balance of the user of the asset in the lending pool
     * @param totalSupply The total supply of the asset in the lending pool
     */
    function handleAction(
        address asset,
        uint256 userBalance,
        uint256 totalSupply
    ) external;

    /**
     * @dev Claims reward for an user to the desired address, on all the assets of the lending pool,
     * accumulating the pending rewards
     * @param amount Amount of rewards to claim
     * @param to Address that will be receiving the rewards
     * @return Rewards claimed
     */
    function claimRewards(
        address[] calldata assets,
        uint256 amount,
        address to
    ) external returns (uint256);

    /**
     * @dev Claims reward for an user on behalf, on all the assets of the lending pool, accumulating the pending
     * rewards. The caller must be whitelisted via "allowClaimOnBehalf" function by the RewardsAdmin role manager
     * @param amount Amount of rewards to claim
     * @param user Address to check and claim rewards
     * @param to Address that will be receiving the rewards
     * @return Rewards claimed
     */
    function claimRewardsOnBehalf(
        address[] calldata assets,
        uint256 amount,
        address user,
        address to
    ) external returns (uint256);

    /**
     * @dev Claims reward for msg.sender, on all the assets of the lending pool, accumulating the pending rewards
     * @param amount Amount of rewards to claim
     * @return Rewards claimed
     */
    function claimRewardsToSelf(address[] calldata assets, uint256 amount) external returns (uint256);

    /**
     * @dev Returns the whitelisted claimer for a certain address (0x0 if not set)
     * @param user The address of the user
     * @return The claimer address
     */
    function getClaimer(address user) external view returns (address);

    /**
     * @dev Returns the total of rewards of an user, already accrued + not yet accrued
     * @param user The address of the user
     * @return The rewards
     */
    function getRewardsBalance(address[] calldata assets, address user) external view 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);

    /**
     * @dev for backward compatibility with previous implementation of the Incentives controller
     */
    function REWARD_TOKEN() external view returns (address); // solhint-disable-line func-name-mixedcase
}

File 9 of 10 : DistributionTypes.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.13;

library DistributionTypes {
    struct AssetConfigInput {
        uint104 emissionPerSecond;
        uint256 totalStaked;
        address underlyingAsset;
    }

    struct UserStakeInput {
        address underlyingAsset;
        uint256 stakedByUser;
        uint256 totalStaked;
    }
}

File 10 of 10 : INotificationReceiver.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.13;

/// @title Common interface for Silo Incentive Contract
interface INotificationReceiver {
    /// @dev Informs the contract about token transfer
    /// @param _token address of the token that was transferred
    /// @param _from sender
    /// @param _to receiver
    /// @param _amount amount that was transferred
    function onAfterTransfer(address _token, address _from, address _to, uint256 _amount) external;

    /// @dev Sanity check function
    /// @return always true
    function notificationReceiverPing() external pure returns (bytes4);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"rewardToken","type":"address"},{"internalType":"address","name":"emissionManager","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ClaimerUnauthorized","type":"error"},{"inputs":[],"name":"IndexOverflow","type":"error"},{"inputs":[],"name":"IndexOverflowAtEmissionsPerSecond","type":"error"},{"inputs":[],"name":"InvalidConfiguration","type":"error"},{"inputs":[],"name":"InvalidToAddress","type":"error"},{"inputs":[],"name":"InvalidUserAddress","type":"error"},{"inputs":[],"name":"OnlyEmissionManager","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"emission","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":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"claimer","type":"address"}],"name":"ClaimerSet","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":"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":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"address","name":"claimer","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":"EMISSION_MANAGER","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRECISION","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REVISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REWARD_TOKEN","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TEN_POW_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"assets","outputs":[{"internalType":"uint104","name":"emissionPerSecond","type":"uint104"},{"internalType":"uint104","name":"index","type":"uint104"},{"internalType":"uint40","name":"lastUpdateTimestamp","type":"uint40"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"assets","type":"address[]"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"claimRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"assets","type":"address[]"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"claimRewardsOnBehalf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"assets","type":"address[]"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"claimRewardsToSelf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"assets","type":"address[]"},{"internalType":"uint256[]","name":"emissionsPerSecond","type":"uint256[]"}],"name":"configureAssets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getAssetData","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getClaimer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDistributionEnd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","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":[],"name":"notificationReceiverPing","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"onAfterTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rescueRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"caller","type":"address"}],"name":"setClaimer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"distributionEnd","type":"uint256"}],"name":"setDistributionEnd","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c06040523480156200001157600080fd5b506040516200202838038062002028833981016040819052620000349162000065565b6001600160a01b039081166080521660a052620000a4565b6001600160a01b03811681146200006257600080fd5b50565b600080604083850312156200007957600080fd5b825162000086816200004c565b602084015190925062000099816200004c565b809150509250929050565b60805160a051611f2d620000fb6000396000818161031a01528181610646015281816106bb015261166301526000818161035b015281816105e5015281816107f70152818161094b0152610d640152611f2d6000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c8063711ec9ac116100c3578063aaf5eb681161007c578063aaf5eb681461033c578063cbcbb50714610356578063cc69afec1461030d578063dde43cba1461037d578063f11b818814610385578063f5cf673b146103f757600080fd5b8063711ec9ac1461029b57806374d945ec146102a357806379f171b2146102e75780638b599f26146102fa578063919cd40f1461030d57806399248ea71461031557600080fd5b80633111e7b3116101155780633111e7b31461022957806331873e2e1461023c5780633373ee4c1461024f57806339ccbdd31461026257806341485304146102755780636d34b96e1461028857600080fd5b80630f1bf70d1461015257806311279b4a146101675780631652e7b714610181578063198fa81e146101ea5780632b6995dc14610221575b600080fd5b6101656101603660046119a9565b61040a565b005b604051630893cda560e11b81526020015b60405180910390f35b6101cf61018f3660046119f4565b6001600160a01b0316600090815260208190526040902054600160681b81046001600160681b039081169290821691600160d01b900464ffffffffff1690565b60408051938452602084019290925290820152606001610178565b6102136101f83660046119f4565b6001600160a01b031660009081526002602052604090205490565b604051908152602001610178565b6101656105da565b610213610237366004611a5b565b6106e4565b61016561024a366004611ab8565b610726565b61021361025d366004611aeb565b6107bd565b610165610270366004611b15565b6107ec565b610213610283366004611b2e565b610870565b610213610296366004611b7a565b61088a565b610213610931565b6102cf6102b13660046119f4565b6001600160a01b039081166000908152600360205260409020541690565b6040516001600160a01b039091168152602001610178565b6101656102f5366004611be8565b610940565b610213610308366004611c54565b610bd0565b600154610213565b6102cf7f000000000000000000000000000000000000000000000000000000000000000081565b610344601281565b60405160ff9091168152602001610178565b6102cf7f000000000000000000000000000000000000000000000000000000000000000081565b610213600181565b6103ca6103933660046119f4565b6000602081905290815260409020546001600160681b0380821691600160681b810490911690600160d01b900464ffffffffff1683565b604080516001600160681b03948516815293909216602084015264ffffffffff1690820152606001610178565b610165610405366004611aeb565b610d59565b33600090815260208190526040902054600160d01b900464ffffffffff16156105d4576000336001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561046d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104919190611ca8565b90506001600160a01b0384166104a9578190036104ba565b6001600160a01b0383166104ba5781015b6001600160a01b03841615610546576040516370a0823160e01b81526001600160a01b0385166004820152600090839033906370a0823190602401602060405180830381865afa158015610512573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105369190611ca8565b019050610544858383610726565b505b6001600160a01b038316156105d2576040516370a0823160e01b81526001600160a01b0384166004820152600090839033906370a0823190602401602060405180830381865afa15801561059e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c29190611ca8565b0390506105d0848383610726565b505b505b50505050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461062357604051632f1907a960e21b815260040160405180910390fd5b6040516370a0823160e01b81523060048201526106e29033906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa15801561068d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b19190611ca8565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169190610df9565b565b60006001600160a01b03821661070d57604051638aa3a72f60e01b815260040160405180910390fd5b61071b858585333387610e50565b90505b949350505050565b6000610734843384866110ec565b905080156105d4576001600160a01b038416600090815260026020526040902054610760908290611cd7565b6001600160a01b038516600081815260026020526040908190209290925590517f2468f9268c60ad90e2d49edb0032c8a001e733ae888b3ab8e982edf535be1a76906107af9084815260200190565b60405180910390a250505050565b6001600160a01b0380821660009081526020818152604080832093861683526001909301905220545b92915050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461083557604051632f1907a960e21b815260040160405180910390fd5b60018190556040518181527f1cc1849a6602c3e91f2088cadea4381cc5717f2f28584197060ed2ebb434c16f9060200160405180910390a150565b6000610880848484333333610e50565b90505b9392505050565b6001600160a01b038083166000908152600360205260408120549091339185911682146108c957604051620bb58b60e51b815260040160405180910390fd5b6001600160a01b0385166108f057604051630702b3d960e41b815260040160405180910390fd5b6001600160a01b03841661091757604051638aa3a72f60e01b815260040160405180910390fd5b610925888888338989610e50565b98975050505050505050565b61093d6012600a611dd3565b81565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461098957604051632f1907a960e21b815260040160405180910390fd5b8281146109a95760405163c52a9bd360e01b815260040160405180910390fd5b60008367ffffffffffffffff8111156109c4576109c4611de2565b604051908082528060200260200182016040528015610a0f57816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816109e25790505b50905060005b84811015610bc657838382818110610a2f57610a2f611df8565b90506020020135848483818110610a4857610a48611df8565b905060200201356001600160681b031614610a7657604051634266136760e11b815260040160405180910390fd5b858582818110610a8857610a88611df8565b9050602002016020810190610a9d91906119f4565b828281518110610aaf57610aaf611df8565b6020026020010151604001906001600160a01b031690816001600160a01b031681525050838382818110610ae557610ae5611df8565b90506020020135828281518110610afe57610afe611df8565b60209081029190910101516001600160681b039091169052858582818110610b2857610b28611df8565b9050602002016020810190610b3d91906119f4565b6001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b9e9190611ca8565b828281518110610bb057610bb0611df8565b6020908102919091018101510152600101610a15565b506105d2816111ab565b6001600160a01b038116600090815260026020526040812054818467ffffffffffffffff811115610c0357610c03611de2565b604051908082528060200260200182016040528015610c6157816020015b610c4e604051806060016040528060006001600160a01b0316815260200160008152602001600081525090565b815260200190600190039081610c215790505b50905060005b85811015610d3a57868682818110610c8157610c81611df8565b9050602002016020810190610c9691906119f4565b828281518110610ca857610ca8611df8565b60209081029190910101516001600160a01b039091169052610cf0878783818110610cd557610cd5611df8565b9050602002016020810190610cea91906119f4565b8661130f565b838381518110610d0257610d02611df8565b6020026020010151602001848481518110610d1f57610d1f611df8565b60209081029190910101516040019190915252600101610c67565b50610d4584826113eb565b610d4f9083611cd7565b9695505050505050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610da257604051632f1907a960e21b815260040160405180910390fd5b6001600160a01b0382811660008181526003602052604080822080546001600160a01b0319169486169485179055517f4925eafc82d0c4d67889898eeed64b18488ab19811e61620f387026dec126a289190a35050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610e4b9084906114fa565b505050565b600084600003610e6257506000610d4f565b6001600160a01b0383166000908152600260205260409020548086111561103d5760008767ffffffffffffffff811115610e9e57610e9e611de2565b604051908082528060200260200182016040528015610efc57816020015b610ee9604051806060016040528060006001600160a01b0316815260200160008152602001600081525090565b815260200190600190039081610ebc5790505b50905060005b88811015610fd557898982818110610f1c57610f1c611df8565b9050602002016020810190610f3191906119f4565b828281518110610f4357610f43611df8565b60209081029190910101516001600160a01b039091169052610f8b8a8a83818110610f7057610f70611df8565b9050602002016020810190610f8591906119f4565b8761130f565b838381518110610f9d57610f9d611df8565b6020026020010151602001848481518110610fba57610fba611df8565b60209081029190910101516040019190915252600101610f02565b506000610fe286836115d1565b9050801561103a57610ff48184611cd7565b9250856001600160a01b03167f2468f9268c60ad90e2d49edb0032c8a001e733ae888b3ab8e982edf535be1a768260405161103191815260200190565b60405180910390a25b50505b8060000361104f576000915050610d4f565b600081871161105e5786611060565b815b6001600160a01b0386166000908152600260205260409020818403905590506110898482611656565b856001600160a01b0316846001600160a01b0316866001600160a01b03167f5637d7f962248a7f05a7ab69eec6446e31f3d0a299d997f135a65c62806e7891846040516110d891815260200190565b60405180910390a498975050505050505050565b6001600160a01b03808416600090815260208181526040808320938816835260018401909152812054909190828061112588858861168a565b905080831461119f5786156111425761113f8782856117bb565b91505b6001600160a01b03808a1660008181526001870160205260409081902084905551918a16917fbb123b5c06d5408bbea3c4fef481578175cfb432e3b482c6186f02ed9086585b906111969085815260200190565b60405180910390a35b50979650505050505050565b60005b815181101561130b5760008060008484815181106111ce576111ce611df8565b6020026020010151604001516001600160a01b03166001600160a01b03168152602001908152602001600020905061124183838151811061121157611211611df8565b6020026020010151604001518285858151811061123057611230611df8565b60200260200101516020015161168a565b5082828151811061125457611254611df8565b60209081029190910101515181546cffffffffffffffffffffffffff19166001600160681b03909116178155825183908390811061129457611294611df8565b6020026020010151604001516001600160a01b03167f87fa03892a0556cb6b8f97e6d533a150d4d55fcbf275fff5fa003fa636bcc7fa8484815181106112dc576112dc611df8565b602090810291909101810151516040516001600160681b0390911681520160405180910390a2506001016111ae565b5050565b6040516370a0823160e01b81526001600160a01b03828116600483015260009182918516906370a0823190602401602060405180830381865afa15801561135a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061137e9190611ca8565b9150836001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113e29190611ca8565b90509250929050565b600080805b83518110156114f257600080600086848151811061141057611410611df8565b602090810291909101810151516001600160a01b0316825281019190915260400160009081208054875191935061148b91600160681b82046001600160681b039081169290811691600160d01b90910464ffffffffff16908a908890811061147a5761147a611df8565b6020026020010151604001516117e4565b90506114dc8684815181106114a2576114a2611df8565b602002602001015160200151828460010160008b6001600160a01b03166001600160a01b03168152602001908152602001600020546117bb565b6114e69085611cd7565b935050506001016113f0565b509392505050565b600061154f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166118929092919063ffffffff16565b805190915015610e4b578080602001905181019061156d9190611e0e565b610e4b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084015b60405180910390fd5b600080805b83518110156114f257611642858583815181106115f5576115f5611df8565b60200260200101516000015186848151811061161357611613611df8565b60200260200101516020015187858151811061163157611631611df8565b6020026020010151604001516110ec565b61164c9083611cd7565b91506001016115d6565b61130b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168383610df9565b81546000906001600160681b03600160681b82048116919081169064ffffffffff600160d01b90910416428190036116c757829350505050610883565b60006116d5848484896117e4565b90508381146117915780816001600160681b03161461170757604051637decd25760e01b815260040160405180910390fd5b865471ffffffffffffffffffffffffffffffffffff60681b1916600160681b6001600160681b0383160264ffffffffff60d01b191617600160d01b4264ffffffffff16021787556040518181526001600160a01b038916907f5777ca300dfe5bead41006fbce4389794dbc0ed8d6cccebfaf94630aa04184bc9060200160405180910390a26117b0565b865464ffffffffff60d01b1916600160d01b4264ffffffffff16021787555b979650505050505050565b60006117c78284611e30565b6117d19085611e47565b670de0b6b3a76400009004949350505050565b6001546000908415806117f5575082155b80611808575042846001600160801b0316145b8061181c575080846001600160801b031610155b1561182a578591505061071e565b6000814211611839574261183b565b815b905060006118526001600160801b03871683611e30565b90506118606012600a611dd3565b61186a8289611e47565b6118749190611e47565b935084848161188557611885611e66565b0493506109258885611cd7565b6060610880848460008585843b6118eb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016115c8565b600080866001600160a01b031685876040516119079190611ea8565b60006040518083038185875af1925050503d8060008114611944576040519150601f19603f3d011682016040523d82523d6000602084013e611949565b606091505b50915091506117b082828660608315611963575081610883565b8251156119735782518084602001fd5b8160405162461bcd60e51b81526004016115c89190611ec4565b80356001600160a01b03811681146119a457600080fd5b919050565b600080600080608085870312156119bf57600080fd5b6119c88561198d565b93506119d66020860161198d565b92506119e46040860161198d565b9396929550929360600135925050565b600060208284031215611a0657600080fd5b6108838261198d565b60008083601f840112611a2157600080fd5b50813567ffffffffffffffff811115611a3957600080fd5b6020830191508360208260051b8501011115611a5457600080fd5b9250929050565b60008060008060608587031215611a7157600080fd5b843567ffffffffffffffff811115611a8857600080fd5b611a9487828801611a0f565b90955093505060208501359150611aad6040860161198d565b905092959194509250565b600080600060608486031215611acd57600080fd5b611ad68461198d565b95602085013595506040909401359392505050565b60008060408385031215611afe57600080fd5b611b078361198d565b91506113e26020840161198d565b600060208284031215611b2757600080fd5b5035919050565b600080600060408486031215611b4357600080fd5b833567ffffffffffffffff811115611b5a57600080fd5b611b6686828701611a0f565b909790965060209590950135949350505050565b600080600080600060808688031215611b9257600080fd5b853567ffffffffffffffff811115611ba957600080fd5b611bb588828901611a0f565b90965094505060208601359250611bce6040870161198d565b9150611bdc6060870161198d565b90509295509295909350565b60008060008060408587031215611bfe57600080fd5b843567ffffffffffffffff80821115611c1657600080fd5b611c2288838901611a0f565b90965094506020870135915080821115611c3b57600080fd5b50611c4887828801611a0f565b95989497509550505050565b600080600060408486031215611c6957600080fd5b833567ffffffffffffffff811115611c8057600080fd5b611c8c86828701611a0f565b9094509250611c9f90506020850161198d565b90509250925092565b600060208284031215611cba57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611cea57611cea611cc1565b500190565b600181815b80851115611d2a578160001904821115611d1057611d10611cc1565b80851615611d1d57918102915b93841c9390800290611cf4565b509250929050565b600082611d41575060016107e6565b81611d4e575060006107e6565b8160018114611d645760028114611d6e57611d8a565b60019150506107e6565b60ff841115611d7f57611d7f611cc1565b50506001821b6107e6565b5060208310610133831016604e8410600b8410161715611dad575081810a6107e6565b611db78383611cef565b8060001904821115611dcb57611dcb611cc1565b029392505050565b600061088360ff841683611d32565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600060208284031215611e2057600080fd5b8151801515811461088357600080fd5b600082821015611e4257611e42611cc1565b500390565b6000816000190483118215151615611e6157611e61611cc1565b500290565b634e487b7160e01b600052601260045260246000fd5b60005b83811015611e97578181015183820152602001611e7f565b838111156105d45750506000910152565b60008251611eba818460208701611e7c565b9190910192915050565b6020815260008251806020840152611ee3816040850160208701611e7c565b601f01601f1916919091016040019291505056fea26469706673582212204b5226506ce8ed6ebe8ba106262c3693a5ce96f32fc262f8f16a68716da9fe0664736f6c634300080d00330000000000000000000000006f80310ca7f2c654691d1383149fa1a57d8ab1f8000000000000000000000000c04f84a02cc65f14f4e8c982a7a467ee88c5311e

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061014d5760003560e01c8063711ec9ac116100c3578063aaf5eb681161007c578063aaf5eb681461033c578063cbcbb50714610356578063cc69afec1461030d578063dde43cba1461037d578063f11b818814610385578063f5cf673b146103f757600080fd5b8063711ec9ac1461029b57806374d945ec146102a357806379f171b2146102e75780638b599f26146102fa578063919cd40f1461030d57806399248ea71461031557600080fd5b80633111e7b3116101155780633111e7b31461022957806331873e2e1461023c5780633373ee4c1461024f57806339ccbdd31461026257806341485304146102755780636d34b96e1461028857600080fd5b80630f1bf70d1461015257806311279b4a146101675780631652e7b714610181578063198fa81e146101ea5780632b6995dc14610221575b600080fd5b6101656101603660046119a9565b61040a565b005b604051630893cda560e11b81526020015b60405180910390f35b6101cf61018f3660046119f4565b6001600160a01b0316600090815260208190526040902054600160681b81046001600160681b039081169290821691600160d01b900464ffffffffff1690565b60408051938452602084019290925290820152606001610178565b6102136101f83660046119f4565b6001600160a01b031660009081526002602052604090205490565b604051908152602001610178565b6101656105da565b610213610237366004611a5b565b6106e4565b61016561024a366004611ab8565b610726565b61021361025d366004611aeb565b6107bd565b610165610270366004611b15565b6107ec565b610213610283366004611b2e565b610870565b610213610296366004611b7a565b61088a565b610213610931565b6102cf6102b13660046119f4565b6001600160a01b039081166000908152600360205260409020541690565b6040516001600160a01b039091168152602001610178565b6101656102f5366004611be8565b610940565b610213610308366004611c54565b610bd0565b600154610213565b6102cf7f0000000000000000000000006f80310ca7f2c654691d1383149fa1a57d8ab1f881565b610344601281565b60405160ff9091168152602001610178565b6102cf7f000000000000000000000000c04f84a02cc65f14f4e8c982a7a467ee88c5311e81565b610213600181565b6103ca6103933660046119f4565b6000602081905290815260409020546001600160681b0380821691600160681b810490911690600160d01b900464ffffffffff1683565b604080516001600160681b03948516815293909216602084015264ffffffffff1690820152606001610178565b610165610405366004611aeb565b610d59565b33600090815260208190526040902054600160d01b900464ffffffffff16156105d4576000336001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561046d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104919190611ca8565b90506001600160a01b0384166104a9578190036104ba565b6001600160a01b0383166104ba5781015b6001600160a01b03841615610546576040516370a0823160e01b81526001600160a01b0385166004820152600090839033906370a0823190602401602060405180830381865afa158015610512573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105369190611ca8565b019050610544858383610726565b505b6001600160a01b038316156105d2576040516370a0823160e01b81526001600160a01b0384166004820152600090839033906370a0823190602401602060405180830381865afa15801561059e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c29190611ca8565b0390506105d0848383610726565b505b505b50505050565b336001600160a01b037f000000000000000000000000c04f84a02cc65f14f4e8c982a7a467ee88c5311e161461062357604051632f1907a960e21b815260040160405180910390fd5b6040516370a0823160e01b81523060048201526106e29033906001600160a01b037f0000000000000000000000006f80310ca7f2c654691d1383149fa1a57d8ab1f816906370a0823190602401602060405180830381865afa15801561068d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b19190611ca8565b6001600160a01b037f0000000000000000000000006f80310ca7f2c654691d1383149fa1a57d8ab1f8169190610df9565b565b60006001600160a01b03821661070d57604051638aa3a72f60e01b815260040160405180910390fd5b61071b858585333387610e50565b90505b949350505050565b6000610734843384866110ec565b905080156105d4576001600160a01b038416600090815260026020526040902054610760908290611cd7565b6001600160a01b038516600081815260026020526040908190209290925590517f2468f9268c60ad90e2d49edb0032c8a001e733ae888b3ab8e982edf535be1a76906107af9084815260200190565b60405180910390a250505050565b6001600160a01b0380821660009081526020818152604080832093861683526001909301905220545b92915050565b336001600160a01b037f000000000000000000000000c04f84a02cc65f14f4e8c982a7a467ee88c5311e161461083557604051632f1907a960e21b815260040160405180910390fd5b60018190556040518181527f1cc1849a6602c3e91f2088cadea4381cc5717f2f28584197060ed2ebb434c16f9060200160405180910390a150565b6000610880848484333333610e50565b90505b9392505050565b6001600160a01b038083166000908152600360205260408120549091339185911682146108c957604051620bb58b60e51b815260040160405180910390fd5b6001600160a01b0385166108f057604051630702b3d960e41b815260040160405180910390fd5b6001600160a01b03841661091757604051638aa3a72f60e01b815260040160405180910390fd5b610925888888338989610e50565b98975050505050505050565b61093d6012600a611dd3565b81565b336001600160a01b037f000000000000000000000000c04f84a02cc65f14f4e8c982a7a467ee88c5311e161461098957604051632f1907a960e21b815260040160405180910390fd5b8281146109a95760405163c52a9bd360e01b815260040160405180910390fd5b60008367ffffffffffffffff8111156109c4576109c4611de2565b604051908082528060200260200182016040528015610a0f57816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816109e25790505b50905060005b84811015610bc657838382818110610a2f57610a2f611df8565b90506020020135848483818110610a4857610a48611df8565b905060200201356001600160681b031614610a7657604051634266136760e11b815260040160405180910390fd5b858582818110610a8857610a88611df8565b9050602002016020810190610a9d91906119f4565b828281518110610aaf57610aaf611df8565b6020026020010151604001906001600160a01b031690816001600160a01b031681525050838382818110610ae557610ae5611df8565b90506020020135828281518110610afe57610afe611df8565b60209081029190910101516001600160681b039091169052858582818110610b2857610b28611df8565b9050602002016020810190610b3d91906119f4565b6001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b9e9190611ca8565b828281518110610bb057610bb0611df8565b6020908102919091018101510152600101610a15565b506105d2816111ab565b6001600160a01b038116600090815260026020526040812054818467ffffffffffffffff811115610c0357610c03611de2565b604051908082528060200260200182016040528015610c6157816020015b610c4e604051806060016040528060006001600160a01b0316815260200160008152602001600081525090565b815260200190600190039081610c215790505b50905060005b85811015610d3a57868682818110610c8157610c81611df8565b9050602002016020810190610c9691906119f4565b828281518110610ca857610ca8611df8565b60209081029190910101516001600160a01b039091169052610cf0878783818110610cd557610cd5611df8565b9050602002016020810190610cea91906119f4565b8661130f565b838381518110610d0257610d02611df8565b6020026020010151602001848481518110610d1f57610d1f611df8565b60209081029190910101516040019190915252600101610c67565b50610d4584826113eb565b610d4f9083611cd7565b9695505050505050565b336001600160a01b037f000000000000000000000000c04f84a02cc65f14f4e8c982a7a467ee88c5311e1614610da257604051632f1907a960e21b815260040160405180910390fd5b6001600160a01b0382811660008181526003602052604080822080546001600160a01b0319169486169485179055517f4925eafc82d0c4d67889898eeed64b18488ab19811e61620f387026dec126a289190a35050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610e4b9084906114fa565b505050565b600084600003610e6257506000610d4f565b6001600160a01b0383166000908152600260205260409020548086111561103d5760008767ffffffffffffffff811115610e9e57610e9e611de2565b604051908082528060200260200182016040528015610efc57816020015b610ee9604051806060016040528060006001600160a01b0316815260200160008152602001600081525090565b815260200190600190039081610ebc5790505b50905060005b88811015610fd557898982818110610f1c57610f1c611df8565b9050602002016020810190610f3191906119f4565b828281518110610f4357610f43611df8565b60209081029190910101516001600160a01b039091169052610f8b8a8a83818110610f7057610f70611df8565b9050602002016020810190610f8591906119f4565b8761130f565b838381518110610f9d57610f9d611df8565b6020026020010151602001848481518110610fba57610fba611df8565b60209081029190910101516040019190915252600101610f02565b506000610fe286836115d1565b9050801561103a57610ff48184611cd7565b9250856001600160a01b03167f2468f9268c60ad90e2d49edb0032c8a001e733ae888b3ab8e982edf535be1a768260405161103191815260200190565b60405180910390a25b50505b8060000361104f576000915050610d4f565b600081871161105e5786611060565b815b6001600160a01b0386166000908152600260205260409020818403905590506110898482611656565b856001600160a01b0316846001600160a01b0316866001600160a01b03167f5637d7f962248a7f05a7ab69eec6446e31f3d0a299d997f135a65c62806e7891846040516110d891815260200190565b60405180910390a498975050505050505050565b6001600160a01b03808416600090815260208181526040808320938816835260018401909152812054909190828061112588858861168a565b905080831461119f5786156111425761113f8782856117bb565b91505b6001600160a01b03808a1660008181526001870160205260409081902084905551918a16917fbb123b5c06d5408bbea3c4fef481578175cfb432e3b482c6186f02ed9086585b906111969085815260200190565b60405180910390a35b50979650505050505050565b60005b815181101561130b5760008060008484815181106111ce576111ce611df8565b6020026020010151604001516001600160a01b03166001600160a01b03168152602001908152602001600020905061124183838151811061121157611211611df8565b6020026020010151604001518285858151811061123057611230611df8565b60200260200101516020015161168a565b5082828151811061125457611254611df8565b60209081029190910101515181546cffffffffffffffffffffffffff19166001600160681b03909116178155825183908390811061129457611294611df8565b6020026020010151604001516001600160a01b03167f87fa03892a0556cb6b8f97e6d533a150d4d55fcbf275fff5fa003fa636bcc7fa8484815181106112dc576112dc611df8565b602090810291909101810151516040516001600160681b0390911681520160405180910390a2506001016111ae565b5050565b6040516370a0823160e01b81526001600160a01b03828116600483015260009182918516906370a0823190602401602060405180830381865afa15801561135a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061137e9190611ca8565b9150836001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113e29190611ca8565b90509250929050565b600080805b83518110156114f257600080600086848151811061141057611410611df8565b602090810291909101810151516001600160a01b0316825281019190915260400160009081208054875191935061148b91600160681b82046001600160681b039081169290811691600160d01b90910464ffffffffff16908a908890811061147a5761147a611df8565b6020026020010151604001516117e4565b90506114dc8684815181106114a2576114a2611df8565b602002602001015160200151828460010160008b6001600160a01b03166001600160a01b03168152602001908152602001600020546117bb565b6114e69085611cd7565b935050506001016113f0565b509392505050565b600061154f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166118929092919063ffffffff16565b805190915015610e4b578080602001905181019061156d9190611e0e565b610e4b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084015b60405180910390fd5b600080805b83518110156114f257611642858583815181106115f5576115f5611df8565b60200260200101516000015186848151811061161357611613611df8565b60200260200101516020015187858151811061163157611631611df8565b6020026020010151604001516110ec565b61164c9083611cd7565b91506001016115d6565b61130b6001600160a01b037f0000000000000000000000006f80310ca7f2c654691d1383149fa1a57d8ab1f8168383610df9565b81546000906001600160681b03600160681b82048116919081169064ffffffffff600160d01b90910416428190036116c757829350505050610883565b60006116d5848484896117e4565b90508381146117915780816001600160681b03161461170757604051637decd25760e01b815260040160405180910390fd5b865471ffffffffffffffffffffffffffffffffffff60681b1916600160681b6001600160681b0383160264ffffffffff60d01b191617600160d01b4264ffffffffff16021787556040518181526001600160a01b038916907f5777ca300dfe5bead41006fbce4389794dbc0ed8d6cccebfaf94630aa04184bc9060200160405180910390a26117b0565b865464ffffffffff60d01b1916600160d01b4264ffffffffff16021787555b979650505050505050565b60006117c78284611e30565b6117d19085611e47565b670de0b6b3a76400009004949350505050565b6001546000908415806117f5575082155b80611808575042846001600160801b0316145b8061181c575080846001600160801b031610155b1561182a578591505061071e565b6000814211611839574261183b565b815b905060006118526001600160801b03871683611e30565b90506118606012600a611dd3565b61186a8289611e47565b6118749190611e47565b935084848161188557611885611e66565b0493506109258885611cd7565b6060610880848460008585843b6118eb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016115c8565b600080866001600160a01b031685876040516119079190611ea8565b60006040518083038185875af1925050503d8060008114611944576040519150601f19603f3d011682016040523d82523d6000602084013e611949565b606091505b50915091506117b082828660608315611963575081610883565b8251156119735782518084602001fd5b8160405162461bcd60e51b81526004016115c89190611ec4565b80356001600160a01b03811681146119a457600080fd5b919050565b600080600080608085870312156119bf57600080fd5b6119c88561198d565b93506119d66020860161198d565b92506119e46040860161198d565b9396929550929360600135925050565b600060208284031215611a0657600080fd5b6108838261198d565b60008083601f840112611a2157600080fd5b50813567ffffffffffffffff811115611a3957600080fd5b6020830191508360208260051b8501011115611a5457600080fd5b9250929050565b60008060008060608587031215611a7157600080fd5b843567ffffffffffffffff811115611a8857600080fd5b611a9487828801611a0f565b90955093505060208501359150611aad6040860161198d565b905092959194509250565b600080600060608486031215611acd57600080fd5b611ad68461198d565b95602085013595506040909401359392505050565b60008060408385031215611afe57600080fd5b611b078361198d565b91506113e26020840161198d565b600060208284031215611b2757600080fd5b5035919050565b600080600060408486031215611b4357600080fd5b833567ffffffffffffffff811115611b5a57600080fd5b611b6686828701611a0f565b909790965060209590950135949350505050565b600080600080600060808688031215611b9257600080fd5b853567ffffffffffffffff811115611ba957600080fd5b611bb588828901611a0f565b90965094505060208601359250611bce6040870161198d565b9150611bdc6060870161198d565b90509295509295909350565b60008060008060408587031215611bfe57600080fd5b843567ffffffffffffffff80821115611c1657600080fd5b611c2288838901611a0f565b90965094506020870135915080821115611c3b57600080fd5b50611c4887828801611a0f565b95989497509550505050565b600080600060408486031215611c6957600080fd5b833567ffffffffffffffff811115611c8057600080fd5b611c8c86828701611a0f565b9094509250611c9f90506020850161198d565b90509250925092565b600060208284031215611cba57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611cea57611cea611cc1565b500190565b600181815b80851115611d2a578160001904821115611d1057611d10611cc1565b80851615611d1d57918102915b93841c9390800290611cf4565b509250929050565b600082611d41575060016107e6565b81611d4e575060006107e6565b8160018114611d645760028114611d6e57611d8a565b60019150506107e6565b60ff841115611d7f57611d7f611cc1565b50506001821b6107e6565b5060208310610133831016604e8410600b8410161715611dad575081810a6107e6565b611db78383611cef565b8060001904821115611dcb57611dcb611cc1565b029392505050565b600061088360ff841683611d32565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600060208284031215611e2057600080fd5b8151801515811461088357600080fd5b600082821015611e4257611e42611cc1565b500390565b6000816000190483118215151615611e6157611e61611cc1565b500290565b634e487b7160e01b600052601260045260246000fd5b60005b83811015611e97578181015183820152602001611e7f565b838111156105d45750506000910152565b60008251611eba818460208701611e7c565b9190910192915050565b6020815260008251806020840152611ee3816040850160208701611e7c565b601f01601f1916919091016040019291505056fea26469706673582212204b5226506ce8ed6ebe8ba106262c3693a5ce96f32fc262f8f16a68716da9fe0664736f6c634300080d0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000006f80310ca7f2c654691d1383149fa1a57d8ab1f8000000000000000000000000c04f84a02cc65f14f4e8c982a7a467ee88c5311e

-----Decoded View---------------
Arg [0] : rewardToken (address): 0x6f80310CA7F2C654691D1383149Fa1A57d8AB1f8
Arg [1] : emissionManager (address): 0xC04f84A02cC65f14f4e8C982a7a467EE88c5311e

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000006f80310ca7f2c654691d1383149fa1a57d8ab1f8
Arg [1] : 000000000000000000000000c04f84a02cc65f14f4e8c982a7a467ee88c5311e


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

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.