ETH Price: $3,083.71 (+4.14%)

Contract

0x16D50f3df825658C0C7D846d1Deb45072C560f75
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Initialize116004372021-01-06 10:19:101403 days ago1609928350IN
0x16D50f3d...72C560f75
0 ETH0.0161921790
0x60806040116004342021-01-06 10:18:501403 days ago1609928330IN
 Create: FeeCollector
0 ETH0.2200977990

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FeeCollector

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2021-01-06
*/

pragma solidity =0.6.6;


/**
 * @title Initializable
 *
 * @dev Helper contract to support initializer functions. To use it, replace
 * the constructor with a function that has the `initializer` modifier.
 * WARNING: Unlike constructors, initializer functions must be manually
 * invoked. This applies both to deploying an Initializable contract, as well
 * as extending an Initializable contract via inheritance.
 * WARNING: When used with inheritance, manual care must be taken to not invoke
 * a parent initializer twice, or ensure that all initializers are idempotent,
 * because this is not dealt with automatically as with constructors.
 */
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 use in the initializer function of a contract.
   */
  modifier initializer() {
    require(initializing || isConstructor() || !initialized, "Contract instance has already been initialized");

    bool isTopLevelCall = !initializing;
    if (isTopLevelCall) {
      initializing = true;
      initialized = true;
    }

    _;

    if (isTopLevelCall) {
      initializing = false;
    }
  }

  /// @dev Returns true if and only if the function is running in the constructor
  function isConstructor() private view returns (bool) {
    // extcodesize checks the size of the code stored in an address, and
    // address returns the current address. Since the code is still not
    // deployed when running a constructor, any checks on its code size will
    // yield zero, making it an effective way to detect if a contract is
    // under construction or not.
    address self = address(this);
    uint256 cs;
    assembly { cs := extcodesize(self) }
    return cs == 0;
  }

  // Reserved storage space to allow for layout changes in the future.
  uint256[50] private ______gap;
}

/*
 * @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 GSN 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.
 */
contract ContextUpgradeSafe is Initializable {
    // Empty internal constructor, to prevent people from mistakenly deploying
    // an instance of this contract, which should be used via inheritance.

    function __Context_init() internal initializer {
        __Context_init_unchained();
    }

    function __Context_init_unchained() internal initializer {


    }


    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }

    uint256[50] private __gap;
}

contract OwnableUpgradeSafe is Initializable, ContextUpgradeSafe {
    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 {


        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);

    }


    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view 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 {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }

    uint256[49] private __gap;
}

library SafeMath {
    /**
     * @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) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @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 sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @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) {
        // 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 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts 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) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts 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) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts 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 mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

library StableMath {
    using SafeMath for uint256;

    /**
     * @dev Scaling unit for use in specific calculations,
     * where 1 * 10**18, or 1e18 represents a unit '1'
     */
    uint256 private constant FULL_SCALE = 1e18;

    /**
     * @notice Token Ratios are used when converting between units of bAsset, mAsset and MTA
     * Reasoning: Takes into account token decimals, and difference in base unit (i.e. grams to Troy oz for gold)
     * @dev bAsset ratio unit for use in exact calculations,
     * where (1 bAsset unit * bAsset.ratio) / ratioScale == x mAsset unit
     */
    uint256 private constant RATIO_SCALE = 1e8;

    /**
     * @dev Provides an interface to the scaling unit
     * @return Scaling unit (1e18 or 1 * 10**18)
     */
    function getFullScale() internal pure returns (uint256) {
        return FULL_SCALE;
    }

    /**
     * @dev Provides an interface to the ratio unit
     * @return Ratio scale unit (1e8 or 1 * 10**8)
     */
    function getRatioScale() internal pure returns (uint256) {
        return RATIO_SCALE;
    }

    /**
     * @dev Scales a given integer to the power of the full scale.
     * @param x   Simple uint256 to scale
     * @return    Scaled value a to an exact number
     */
    function scaleInteger(uint256 x) internal pure returns (uint256) {
        return x.mul(FULL_SCALE);
    }

    /***************************************
              PRECISE ARITHMETIC
    ****************************************/

    /**
     * @dev Multiplies two precise units, and then truncates by the full scale
     * @param x     Left hand input to multiplication
     * @param y     Right hand input to multiplication
     * @return      Result after multiplying the two inputs and then dividing by the shared
     *              scale unit
     */
    function mulTruncate(uint256 x, uint256 y) internal pure returns (uint256) {
        return mulTruncateScale(x, y, FULL_SCALE);
    }

    /**
     * @dev Multiplies two precise units, and then truncates by the given scale. For example,
     * when calculating 90% of 10e18, (10e18 * 9e17) / 1e18 = (9e36) / 1e18 = 9e18
     * @param x     Left hand input to multiplication
     * @param y     Right hand input to multiplication
     * @param scale Scale unit
     * @return      Result after multiplying the two inputs and then dividing by the shared
     *              scale unit
     */
    function mulTruncateScale(
        uint256 x,
        uint256 y,
        uint256 scale
    ) internal pure returns (uint256) {
        // e.g. assume scale = fullScale
        // z = 10e18 * 9e17 = 9e36
        uint256 z = x.mul(y);
        // return 9e38 / 1e18 = 9e18
        return z.div(scale);
    }

    /**
     * @dev Multiplies two precise units, and then truncates by the full scale, rounding up the result
     * @param x     Left hand input to multiplication
     * @param y     Right hand input to multiplication
     * @return      Result after multiplying the two inputs and then dividing by the shared
     *              scale unit, rounded up to the closest base unit.
     */
    function mulTruncateCeil(uint256 x, uint256 y)
        internal
        pure
        returns (uint256)
    {
        // e.g. 8e17 * 17268172638 = 138145381104e17
        uint256 scaled = x.mul(y);
        // e.g. 138145381104e17 + 9.99...e17 = 138145381113.99...e17
        uint256 ceil = scaled.add(FULL_SCALE.sub(1));
        // e.g. 13814538111.399...e18 / 1e18 = 13814538111
        return ceil.div(FULL_SCALE);
    }

    /**
     * @dev Precisely divides two units, by first scaling the left hand operand. Useful
     *      for finding percentage weightings, i.e. 8e18/10e18 = 80% (or 8e17)
     * @param x     Left hand input to division
     * @param y     Right hand input to division
     * @return      Result after multiplying the left operand by the scale, and
     *              executing the division on the right hand input.
     */
    function divPrecisely(uint256 x, uint256 y)
        internal
        pure
        returns (uint256)
    {
        // e.g. 8e18 * 1e18 = 8e36
        uint256 z = x.mul(FULL_SCALE);
        // e.g. 8e36 / 10e18 = 8e17
        return z.div(y);
    }

    /***************************************
                  RATIO FUNCS
    ****************************************/

    /**
     * @dev Multiplies and truncates a token ratio, essentially flooring the result
     *      i.e. How much mAsset is this bAsset worth?
     * @param x     Left hand operand to multiplication (i.e Exact quantity)
     * @param ratio bAsset ratio
     * @return c    Result after multiplying the two inputs and then dividing by the ratio scale
     */
    function mulRatioTruncate(uint256 x, uint256 ratio)
        internal
        pure
        returns (uint256 c)
    {
        return mulTruncateScale(x, ratio, RATIO_SCALE);
    }

    /**
     * @dev Multiplies and truncates a token ratio, rounding up the result
     *      i.e. How much mAsset is this bAsset worth?
     * @param x     Left hand input to multiplication (i.e Exact quantity)
     * @param ratio bAsset ratio
     * @return      Result after multiplying the two inputs and then dividing by the shared
     *              ratio scale, rounded up to the closest base unit.
     */
    function mulRatioTruncateCeil(uint256 x, uint256 ratio)
        internal
        pure
        returns (uint256)
    {
        // e.g. How much mAsset should I burn for this bAsset (x)?
        // 1e18 * 1e8 = 1e26
        uint256 scaled = x.mul(ratio);
        // 1e26 + 9.99e7 = 100..00.999e8
        uint256 ceil = scaled.add(RATIO_SCALE.sub(1));
        // return 100..00.999e8 / 1e8 = 1e18
        return ceil.div(RATIO_SCALE);
    }

    /**
     * @dev Precisely divides two ratioed units, by first scaling the left hand operand
     *      i.e. How much bAsset is this mAsset worth?
     * @param x     Left hand operand in division
     * @param ratio bAsset ratio
     * @return c    Result after multiplying the left operand by the scale, and
     *              executing the division on the right hand input.
     */
    function divRatioPrecisely(uint256 x, uint256 ratio)
        internal
        pure
        returns (uint256 c)
    {
        // e.g. 1e14 * 1e8 = 1e22
        uint256 y = x.mul(RATIO_SCALE);
        // return 1e22 / 1e12 = 1e10
        return y.div(ratio);
    }

    /***************************************
                    HELPERS
    ****************************************/

    /**
     * @dev Calculates minimum of two numbers
     * @param x     Left hand input
     * @param y     Right hand input
     * @return      Minimum of the two inputs
     */
    function min(uint256 x, uint256 y) internal pure returns (uint256) {
        return x > y ? y : x;
    }

    /**
     * @dev Calculated maximum of two numbers
     * @param x     Left hand input
     * @param y     Right hand input
     * @return      Maximum of the two inputs
     */
    function max(uint256 x, uint256 y) internal pure returns (uint256) {
        return x > y ? x : y;
    }

    /**
     * @dev Clamps a value to an upper bound
     * @param x           Left hand input
     * @param upperBound  Maximum possible value to return
     * @return            Input x clamped to a maximum value, upperBound
     */
    function clamp(uint256 x, uint256 upperBound)
        internal
        pure
        returns (uint256)
    {
        return x > upperBound ? upperBound : x;
    }
}

interface IFeeCollector {
    function collectTransferFee(uint256 _amount)
        external
        returns (uint256 amountAfterFee);

    function collectTransferAndStakingFees(uint256 _amount)
        external
        returns (uint256 amountAfterFee);

    function calculateTransferAndStakingFee(uint256 _amount)
        external
        view
        returns (
            uint256 totalFeeAmount,
            uint256 transferFeeAmount,
            uint256 stakingFeeAmount,
            uint256 feeToBurn,
            uint256 feeToStakers,
            uint256 amountAfterFee
        );

    function calculateTransferFee(uint256 _amount)
        external
        view
        returns (
            uint256 feeToCharge,
            uint256 feeToBurn,
            uint256 feeToStakers,
            uint256 amountAfterFee
        );
}

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);
}

interface IOracle {
    function getData() external returns (uint256, bool);

    function update() external;

    function consult() external view returns (uint256 exchangeRate);
}

interface IRocketV2 is IERC20 {
    function setMonetaryPolicy(IMonetaryPolicy _monetaryPolicy) external;

    function rebase(uint256 epoch, int256 supplyDelta)
        external
        returns (uint256 supplyAfterRebase);

    function setFeeCollector(IFeeCollector _feeCollector) external;

    function isFeeChargingEnabled() external view returns (bool stakingEnabled);

    function transferFromWithoutCollectingFee(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool success);

    function claim(uint256 rocketV1Amount) external;

    function calculateClaim(uint256 rocketV1AmountToSend)
        external
        view
        returns (uint256 rocketV2AmountToReceive);
}

interface IMonetaryPolicy {
    function rebase() external;

    function setMarketOracle(IOracle _marketOracle) external;

    function setRocket(IRocketV2 _rocket) external;

    function setDeviationThreshold(uint256 _deviationThreshold) external;

    function setRebaseLag(uint256 _rebaseLag) external;

    function setRebaseTimingParameters(
        uint256 _minRebaseTimeIntervalSec,
        uint256 _rebaseWindowOffsetSec,
        uint256 _rebaseWindowLengthSec
    ) external;

    function inRebaseWindow() external view returns (bool);
}

interface IStaking {
    struct StakingEpoch {
        uint256 totalSupply;
        uint256 totalCredits;
        uint256 profitCredits;
        bool released;
        uint256 block;
    }

    struct StakedAccount {
        uint256 calculatedProfitCredits;
        uint256 stakedCredits;
        uint256 lastEpochProcessed;
    }

    event ProfitCreditsCalculated(address _account, uint256 _fromBlock, uint256 _toBlock, uint256 earnedProfits);

    function releaseEpoch() external;
    function epochsCount() external view returns(uint256 epochs);
    function addNextEpochProfitTokens(uint256 _amount) external;

    function updateStakingProfits(address _account) external;
    function updateStakingProfitsTillEpoch(address _account, uint256 _toEpoch) external;

    function stake(uint256 _amount) external returns (uint256 creditsIssued);

    function redeem(uint256 _amount) external returns (uint256 rocketReturned);

    function tokensToCredits(uint256 _amount)
        external
        view
        returns (uint256 credits);

    function creditsToTokens(uint256 _credits)
        external
        view
        returns (uint256 rocketAmount);

    function getStakerBalance(address staker)
        external
        view
        returns (
            uint256 credits,
            uint256 toRedeem,
            uint256 toRedeemAfterFee
        );
}

// SPDX-License-Identifier: MIT
contract FeeCollector is OwnableUpgradeSafe, IFeeCollector {
    using SafeMath for uint256;
    using StableMath for uint256;

    uint256 public stakingFeeToCharge;
    uint256 public transferFeeToCharge;
    uint256 public burnFeeToCharge;

    IRocketV2 private rocket;
    IStaking private staking;

    address
        private constant BURN_ADDRESS = 0xdeaDDeADDEaDdeaDdEAddEADDEAdDeadDEADDEaD;

    event RocketUpdated(address rocket);
    event StakingUpdated(address staking);
    event FeesUpdated(
        uint256 stakingFeeToCharge,
        uint256 transferFeeToCharge,
        uint256 burnFeeToCharge
    );
    event TokensStaked(uint256 amount);
    event TokensBurned(uint256 amount);

    modifier depositToStakers() {
        _;
        uint256 amount = rocket.balanceOf(address(this));
        if (amount > 0) {
            rocket.approve(address(staking), amount);
            require(
                rocket.transferFromWithoutCollectingFee(
                    address(this),
                    address(staking),
                    amount
                ),
                "FeeCollector: Must deposit tokens to stakers"
            );
            rocket.approve(address(staking), 0);
            emit TokensStaked(amount);
        }
    }

    function initialize(IRocketV2 _rocket, IStaking _staking)
        public
        initializer
    {
        require(
            address(_rocket) != address(0),
            "Staking: rocket address can't be zero"
        );
        OwnableUpgradeSafe.__Ownable_init();

        rocket = _rocket;
        staking = _staking;

        stakingFeeToCharge = 2E16; // 2%
        transferFeeToCharge = 3E16; // 3%
        burnFeeToCharge = 33E16; // 33%
    }

    function setFees(
        uint256 _stakingFee,
        uint256 _transferFee,
        uint256 _burnFee
    ) public onlyOwner {
        stakingFeeToCharge = _stakingFee;
        transferFeeToCharge = _transferFee;
        burnFeeToCharge = _burnFee;

        emit FeesUpdated(
            stakingFeeToCharge,
            transferFeeToCharge,
            burnFeeToCharge
        );
    }

    function setRocket(IRocketV2 _rocket) public onlyOwner {
        require(
            address(_rocket) != address(0),
            "Staking: rocket address can't be zero"
        );
        rocket = _rocket;
        emit RocketUpdated(address(_rocket));
    }

    function setStaking(IStaking _staking) public onlyOwner {
        require(
            address(_staking) != address(0),
            "Staking: rocket address can't be zero"
        );
        staking = _staking;
        emit StakingUpdated(address(_staking));
    }

    function collectTransferFee(uint256 _amount)
        public
        override
        depositToStakers
        returns (uint256 amountAfterFee)
    {
        if (!rocket.isFeeChargingEnabled()) {
            return _amount;
        }

        (
            uint256 feeToCharge,
            uint256 feeToBurn,
            uint256 feeToStakers,

        ) = calculateTransferFee(_amount);

        require(
            rocket.transferFromWithoutCollectingFee(
                _msgSender(),
                address(this),
                feeToStakers
            ),
            "FeeCollector: Must receive tokens"
        );

        require(
            rocket.transferFromWithoutCollectingFee(
                _msgSender(),
                BURN_ADDRESS,
                feeToBurn
            ),
            "FeeCollector: Burn transfer failed"
        );
        emit TokensBurned(feeToBurn);

        amountAfterFee = _amount.sub(feeToCharge);

        staking.addNextEpochProfitTokens(feeToStakers);
    }

    function collectTransferAndStakingFees(uint256 _amount)
        external
        override
        depositToStakers
        returns (uint256)
    {
        if (!rocket.isFeeChargingEnabled()) {
            return _amount;
        }

        collectTransferFee(_amount);

        (
            ,
            ,
            uint256 stakingFeeToCharge,
            ,
            ,
            uint256 amountAfterFee
        ) = calculateTransferAndStakingFee(_amount);
        require(
            rocket.transferFromWithoutCollectingFee(
                _msgSender(),
                address(this),
                stakingFeeToCharge
            ),
            "FeeCollector: Must receive tokens"
        );

        staking.addNextEpochProfitTokens(stakingFeeToCharge);

        return amountAfterFee;
    }

    function calculateTransferFee(uint256 _amount)
        public
        override
        view
        returns (
            uint256 feeToCharge,
            uint256 feeToBurn,
            uint256 feeToStakers,
            uint256 amountAfterFee
        )
    {
        if (!rocket.isFeeChargingEnabled()) {
            feeToCharge = 0;
            feeToBurn = 0;
            feeToStakers = 0;
            amountAfterFee = _amount;
        } else {
            feeToCharge = _amount.mulTruncate(transferFeeToCharge);
            feeToBurn = feeToCharge.mulTruncate(burnFeeToCharge);
            feeToStakers = feeToCharge.sub(feeToBurn);
            amountAfterFee = _amount.sub(feeToCharge);
        }
    }

    function calculateTransferAndStakingFee(uint256 _amount)
        public
        override
        view
        returns (
            uint256 totalFeeAmount,
            uint256 transferFeeAmount,
            uint256 stakingFeeAmount,
            uint256 feeToBurn,
            uint256 feeToStakers,
            uint256 amountAfterFee
        )
    {
        if (!rocket.isFeeChargingEnabled()) {
            totalFeeAmount = 0;
            transferFeeAmount = 0;
            stakingFeeAmount = 0;
            feeToBurn = 0;
            feeToStakers = 0;
            amountAfterFee = _amount;
        } else {
            (transferFeeAmount, feeToBurn, , ) = calculateTransferFee(_amount);
            stakingFeeAmount = _amount.mulTruncate(stakingFeeToCharge);
            totalFeeAmount = transferFeeAmount.add(stakingFeeAmount);
            feeToStakers = totalFeeAmount.sub(feeToBurn);
            amountAfterFee = _amount.sub(totalFeeAmount);
        }
    }
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"stakingFeeToCharge","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"transferFeeToCharge","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"burnFeeToCharge","type":"uint256"}],"name":"FeesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"rocket","type":"address"}],"name":"RocketUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"staking","type":"address"}],"name":"StakingUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensStaked","type":"event"},{"inputs":[],"name":"burnFeeToCharge","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"calculateTransferAndStakingFee","outputs":[{"internalType":"uint256","name":"totalFeeAmount","type":"uint256"},{"internalType":"uint256","name":"transferFeeAmount","type":"uint256"},{"internalType":"uint256","name":"stakingFeeAmount","type":"uint256"},{"internalType":"uint256","name":"feeToBurn","type":"uint256"},{"internalType":"uint256","name":"feeToStakers","type":"uint256"},{"internalType":"uint256","name":"amountAfterFee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"calculateTransferFee","outputs":[{"internalType":"uint256","name":"feeToCharge","type":"uint256"},{"internalType":"uint256","name":"feeToBurn","type":"uint256"},{"internalType":"uint256","name":"feeToStakers","type":"uint256"},{"internalType":"uint256","name":"amountAfterFee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"collectTransferAndStakingFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"collectTransferFee","outputs":[{"internalType":"uint256","name":"amountAfterFee","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IRocketV2","name":"_rocket","type":"address"},{"internalType":"contract IStaking","name":"_staking","type":"address"}],"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":"_stakingFee","type":"uint256"},{"internalType":"uint256","name":"_transferFee","type":"uint256"},{"internalType":"uint256","name":"_burnFee","type":"uint256"}],"name":"setFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IRocketV2","name":"_rocket","type":"address"}],"name":"setRocket","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IStaking","name":"_staking","type":"address"}],"name":"setStaking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingFeeToCharge","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"transferFeeToCharge","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50612b6b806100206000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063715018a61161008c57806390519f6f1161006657806390519f6f1461036957806390a587b5146103ab578063cec10c11146103c9578063f2fde38b1461040b576100ea565b8063715018a6146102d15780638da5cb5b146102db5780638ff3909914610325576100ea565b8063361255bd116100c8578063361255bd146101b457806337800bde146101d2578063485cc955146102295780635c11d01e1461028d576100ea565b806305d871e5146100ef57806327d3a137146101315780632c18d5531461014f575b600080fd5b61011b6004803603602081101561010557600080fd5b810190808035906020019092919050505061044f565b6040518082815260200191505060405180910390f35b610139610db1565b6040518082815260200191505060405180910390f35b61017b6004803603602081101561016557600080fd5b8101908080359060200190929190505050610db7565b60405180878152602001868152602001858152602001848152602001838152602001828152602001965050505050505060405180910390f35b6101bc610ef7565b6040518082815260200191505060405180910390f35b6101fe600480360360208110156101e857600080fd5b8101908080359060200190929190505050610efd565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b61028b6004803603604081101561023f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061101e565b005b6102cf600480360360208110156102a357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061125a565b005b6102d9611451565b005b6102e36115dc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103676004803603602081101561033b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611606565b005b6103956004803603602081101561037f57600080fd5b81019080803590602001909291905050506117fd565b6040518082815260200191505060405180910390f35b6103b3611f96565b6040518082815260200191505060405180910390f35b610409600480360360608110156103df57600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050611f9c565b005b61044d6004803603602081101561042157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506120cd565b005b6000609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634363d40e6040518163ffffffff1660e01b815260040160206040518083038186803b1580156104b957600080fd5b505afa1580156104cd573d6000803e3d6000fd5b505050506040513d60208110156104e357600080fd5b8101908080519060200190929190505050610500578190506108ee565b600080600061050e85610efd565b50925092509250609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166334122e7161055b6122dd565b30846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156105f957600080fd5b505af115801561060d573d6000803e3d6000fd5b505050506040513d602081101561062357600080fd5b8101908080519060200190929190505050610689576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612a536021913960400191505060405180910390fd5b609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166334122e716106cf6122dd565b73deaddeaddeaddeaddeaddeaddeaddeaddeaddead856040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561078157600080fd5b505af1158015610795573d6000803e3d6000fd5b505050506040513d60208110156107ab57600080fd5b8101908080519060200190929190505050610811576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180612a746022913960400191505060405180910390fd5b7f6ef4855b666dcc7884561072e4358b28dfe01feb1b7f4dcebc00e62d50394ac7826040518082815260200191505060405180910390a161085b83866122e590919063ffffffff16565b9350609b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fcd7a1ec826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156108d257600080fd5b505af11580156108e6573d6000803e3d6000fd5b505050505050505b6000609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561098f57600080fd5b505afa1580156109a3573d6000803e3d6000fd5b505050506040513d60208110156109b957600080fd5b810190808051906020019092919050505090506000811115610dab57609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3609b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610aa057600080fd5b505af1158015610ab4573d6000803e3d6000fd5b505050506040513d6020811015610aca57600080fd5b810190808051906020019092919050505050609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166334122e7130609b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015610bdb57600080fd5b505af1158015610bef573d6000803e3d6000fd5b505050506040513d6020811015610c0557600080fd5b8101908080519060200190929190505050610c6b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180612a96602c913960400191505060405180910390fd5b609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3609b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660006040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610d3757600080fd5b505af1158015610d4b573d6000803e3d6000fd5b505050506040513d6020811015610d6157600080fd5b8101908080519060200190929190505050507fcc798def5ea8391b2b007a1f8935700fad05d4c50d52ceaeb9e8e87c03138616816040518082815260200191505060405180910390a15b50919050565b60985481565b600080600080600080609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634363d40e6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e2857600080fd5b505afa158015610e3c573d6000803e3d6000fd5b505050506040513d6020811015610e5257600080fd5b8101908080519060200190929190505050610e83576000955060009450600093506000925060009150869050610eee565b610e8c87610efd565b9050508094508196505050610eac6097548861232f90919063ffffffff16565b9350610ec1848661234c90919063ffffffff16565b9550610ed683876122e590919063ffffffff16565b9150610eeb86886122e590919063ffffffff16565b90505b91939550919395565b60995481565b600080600080609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634363d40e6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f6b57600080fd5b505afa158015610f7f573d6000803e3d6000fd5b505050506040513d6020811015610f9557600080fd5b8101908080519060200190929190505050610fbe57600093506000925060009150849050611017565b610fd36098548661232f90919063ffffffff16565b9350610fea6099548561232f90919063ffffffff16565b9250610fff83856122e590919063ffffffff16565b915061101484866122e590919063ffffffff16565b90505b9193509193565b600060019054906101000a900460ff168061103d575061103c6123d4565b5b8061105457506000809054906101000a900460ff16155b6110a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180612b08602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156110f9576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561117f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ac26025913960400191505060405180910390fd5b6111876123eb565b82609a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081609b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555066470de4df820000609781905550666a94d74f430000609881905550670494654067e1000060998190555080156112555760008060016101000a81548160ff0219169083151502179055505b505050565b6112626122dd565b73ffffffffffffffffffffffffffffffffffffffff16606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611324576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156113aa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ac26025913960400191505060405180910390fd5b80609a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507ff78fd4e970a308c17b1281c5fbcd339722301b3e937ef3ac24a978d198c0f86581604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b6114596122dd565b73ffffffffffffffffffffffffffffffffffffffff16606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461151b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61160e6122dd565b73ffffffffffffffffffffffffffffffffffffffff16606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146116d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611756576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ac26025913960400191505060405180910390fd5b80609b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe189a719dae2bf18df1013cfa028ecce01f9fafdbd456a862fa18e6d0143e3c281604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b6000609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634363d40e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561186757600080fd5b505afa15801561187b573d6000803e3d6000fd5b505050506040513d602081101561189157600080fd5b81019080805190602001909291905050506118ae57819050611ad3565b6118b78261044f565b506000806118c484610db7565b9550505093505050609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166334122e716119126122dd565b30856040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156119b057600080fd5b505af11580156119c4573d6000803e3d6000fd5b505050506040513d60208110156119da57600080fd5b8101908080519060200190929190505050611a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612a536021913960400191505060405180910390fd5b609b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fcd7a1ec836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015611ab557600080fd5b505af1158015611ac9573d6000803e3d6000fd5b5050505080925050505b6000609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611b7457600080fd5b505afa158015611b88573d6000803e3d6000fd5b505050506040513d6020811015611b9e57600080fd5b810190808051906020019092919050505090506000811115611f9057609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3609b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611c8557600080fd5b505af1158015611c99573d6000803e3d6000fd5b505050506040513d6020811015611caf57600080fd5b810190808051906020019092919050505050609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166334122e7130609b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015611dc057600080fd5b505af1158015611dd4573d6000803e3d6000fd5b505050506040513d6020811015611dea57600080fd5b8101908080519060200190929190505050611e50576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180612a96602c913960400191505060405180910390fd5b609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3609b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660006040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611f1c57600080fd5b505af1158015611f30573d6000803e3d6000fd5b505050506040513d6020811015611f4657600080fd5b8101908080519060200190929190505050507fcc798def5ea8391b2b007a1f8935700fad05d4c50d52ceaeb9e8e87c03138616816040518082815260200191505060405180910390a15b50919050565b60975481565b611fa46122dd565b73ffffffffffffffffffffffffffffffffffffffff16606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612066576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b8260978190555081609881905550806099819055507fcf8a1e1d5f09cf3c97dbb653cd9a4d7aace9292fbc1bb8211febf2d400febbdd60975460985460995460405180848152602001838152602001828152602001935050505060405180910390a1505050565b6120d56122dd565b73ffffffffffffffffffffffffffffffffffffffff16606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612197576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561221d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612a2d6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600061232783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506124fa565b905092915050565b60006123448383670de0b6b3a76400006125ba565b905092915050565b6000808284019050838110156123ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000803090506000813b9050600081149250505090565b600060019054906101000a900460ff168061240a57506124096123d4565b5b8061242157506000809054906101000a900460ff16155b612476576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180612b08602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156124c6576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6124ce6125ef565b6124d66126ee565b80156124f75760008060016101000a81548160ff0219169083151502179055505b50565b60008383111582906125a7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561256c578082015181840152602081019050612551565b50505050905090810190601f1680156125995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b6000806125d0848661289690919063ffffffff16565b90506125e5838261291c90919063ffffffff16565b9150509392505050565b600060019054906101000a900460ff168061260e575061260d6123d4565b5b8061262557506000809054906101000a900460ff16155b61267a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180612b08602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156126ca576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b80156126eb5760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff168061270d575061270c6123d4565b5b8061272457506000809054906101000a900460ff16155b612779576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180612b08602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156127c9576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b60006127d36122dd565b905080606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35080156128935760008060016101000a81548160ff0219169083151502179055505b50565b6000808314156128a95760009050612916565b60008284029050828482816128ba57fe5b0414612911576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612ae76021913960400191505060405180910390fd5b809150505b92915050565b600061295e83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612966565b905092915050565b60008083118290612a12576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156129d75780820151818401526020810190506129bc565b50505050905090810190601f168015612a045780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581612a1e57fe5b04905080915050939250505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373466565436f6c6c6563746f723a204d757374207265636569766520746f6b656e73466565436f6c6c6563746f723a204275726e207472616e73666572206661696c6564466565436f6c6c6563746f723a204d757374206465706f73697420746f6b656e7320746f207374616b6572735374616b696e673a20726f636b657420616464726573732063616e2774206265207a65726f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a264697066735822122036742e6f09bc1fe8a2abee57546367d11e7726714157ea978d0b67001848ed3564736f6c63430006060033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063715018a61161008c57806390519f6f1161006657806390519f6f1461036957806390a587b5146103ab578063cec10c11146103c9578063f2fde38b1461040b576100ea565b8063715018a6146102d15780638da5cb5b146102db5780638ff3909914610325576100ea565b8063361255bd116100c8578063361255bd146101b457806337800bde146101d2578063485cc955146102295780635c11d01e1461028d576100ea565b806305d871e5146100ef57806327d3a137146101315780632c18d5531461014f575b600080fd5b61011b6004803603602081101561010557600080fd5b810190808035906020019092919050505061044f565b6040518082815260200191505060405180910390f35b610139610db1565b6040518082815260200191505060405180910390f35b61017b6004803603602081101561016557600080fd5b8101908080359060200190929190505050610db7565b60405180878152602001868152602001858152602001848152602001838152602001828152602001965050505050505060405180910390f35b6101bc610ef7565b6040518082815260200191505060405180910390f35b6101fe600480360360208110156101e857600080fd5b8101908080359060200190929190505050610efd565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b61028b6004803603604081101561023f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061101e565b005b6102cf600480360360208110156102a357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061125a565b005b6102d9611451565b005b6102e36115dc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103676004803603602081101561033b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611606565b005b6103956004803603602081101561037f57600080fd5b81019080803590602001909291905050506117fd565b6040518082815260200191505060405180910390f35b6103b3611f96565b6040518082815260200191505060405180910390f35b610409600480360360608110156103df57600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050611f9c565b005b61044d6004803603602081101561042157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506120cd565b005b6000609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634363d40e6040518163ffffffff1660e01b815260040160206040518083038186803b1580156104b957600080fd5b505afa1580156104cd573d6000803e3d6000fd5b505050506040513d60208110156104e357600080fd5b8101908080519060200190929190505050610500578190506108ee565b600080600061050e85610efd565b50925092509250609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166334122e7161055b6122dd565b30846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156105f957600080fd5b505af115801561060d573d6000803e3d6000fd5b505050506040513d602081101561062357600080fd5b8101908080519060200190929190505050610689576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612a536021913960400191505060405180910390fd5b609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166334122e716106cf6122dd565b73deaddeaddeaddeaddeaddeaddeaddeaddeaddead856040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561078157600080fd5b505af1158015610795573d6000803e3d6000fd5b505050506040513d60208110156107ab57600080fd5b8101908080519060200190929190505050610811576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180612a746022913960400191505060405180910390fd5b7f6ef4855b666dcc7884561072e4358b28dfe01feb1b7f4dcebc00e62d50394ac7826040518082815260200191505060405180910390a161085b83866122e590919063ffffffff16565b9350609b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fcd7a1ec826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156108d257600080fd5b505af11580156108e6573d6000803e3d6000fd5b505050505050505b6000609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561098f57600080fd5b505afa1580156109a3573d6000803e3d6000fd5b505050506040513d60208110156109b957600080fd5b810190808051906020019092919050505090506000811115610dab57609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3609b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610aa057600080fd5b505af1158015610ab4573d6000803e3d6000fd5b505050506040513d6020811015610aca57600080fd5b810190808051906020019092919050505050609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166334122e7130609b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015610bdb57600080fd5b505af1158015610bef573d6000803e3d6000fd5b505050506040513d6020811015610c0557600080fd5b8101908080519060200190929190505050610c6b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180612a96602c913960400191505060405180910390fd5b609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3609b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660006040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610d3757600080fd5b505af1158015610d4b573d6000803e3d6000fd5b505050506040513d6020811015610d6157600080fd5b8101908080519060200190929190505050507fcc798def5ea8391b2b007a1f8935700fad05d4c50d52ceaeb9e8e87c03138616816040518082815260200191505060405180910390a15b50919050565b60985481565b600080600080600080609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634363d40e6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e2857600080fd5b505afa158015610e3c573d6000803e3d6000fd5b505050506040513d6020811015610e5257600080fd5b8101908080519060200190929190505050610e83576000955060009450600093506000925060009150869050610eee565b610e8c87610efd565b9050508094508196505050610eac6097548861232f90919063ffffffff16565b9350610ec1848661234c90919063ffffffff16565b9550610ed683876122e590919063ffffffff16565b9150610eeb86886122e590919063ffffffff16565b90505b91939550919395565b60995481565b600080600080609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634363d40e6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f6b57600080fd5b505afa158015610f7f573d6000803e3d6000fd5b505050506040513d6020811015610f9557600080fd5b8101908080519060200190929190505050610fbe57600093506000925060009150849050611017565b610fd36098548661232f90919063ffffffff16565b9350610fea6099548561232f90919063ffffffff16565b9250610fff83856122e590919063ffffffff16565b915061101484866122e590919063ffffffff16565b90505b9193509193565b600060019054906101000a900460ff168061103d575061103c6123d4565b5b8061105457506000809054906101000a900460ff16155b6110a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180612b08602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156110f9576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561117f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ac26025913960400191505060405180910390fd5b6111876123eb565b82609a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081609b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555066470de4df820000609781905550666a94d74f430000609881905550670494654067e1000060998190555080156112555760008060016101000a81548160ff0219169083151502179055505b505050565b6112626122dd565b73ffffffffffffffffffffffffffffffffffffffff16606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611324576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156113aa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ac26025913960400191505060405180910390fd5b80609a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507ff78fd4e970a308c17b1281c5fbcd339722301b3e937ef3ac24a978d198c0f86581604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b6114596122dd565b73ffffffffffffffffffffffffffffffffffffffff16606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461151b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61160e6122dd565b73ffffffffffffffffffffffffffffffffffffffff16606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146116d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611756576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ac26025913960400191505060405180910390fd5b80609b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fe189a719dae2bf18df1013cfa028ecce01f9fafdbd456a862fa18e6d0143e3c281604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b6000609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634363d40e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561186757600080fd5b505afa15801561187b573d6000803e3d6000fd5b505050506040513d602081101561189157600080fd5b81019080805190602001909291905050506118ae57819050611ad3565b6118b78261044f565b506000806118c484610db7565b9550505093505050609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166334122e716119126122dd565b30856040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156119b057600080fd5b505af11580156119c4573d6000803e3d6000fd5b505050506040513d60208110156119da57600080fd5b8101908080519060200190929190505050611a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612a536021913960400191505060405180910390fd5b609b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fcd7a1ec836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015611ab557600080fd5b505af1158015611ac9573d6000803e3d6000fd5b5050505080925050505b6000609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611b7457600080fd5b505afa158015611b88573d6000803e3d6000fd5b505050506040513d6020811015611b9e57600080fd5b810190808051906020019092919050505090506000811115611f9057609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3609b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611c8557600080fd5b505af1158015611c99573d6000803e3d6000fd5b505050506040513d6020811015611caf57600080fd5b810190808051906020019092919050505050609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166334122e7130609b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015611dc057600080fd5b505af1158015611dd4573d6000803e3d6000fd5b505050506040513d6020811015611dea57600080fd5b8101908080519060200190929190505050611e50576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180612a96602c913960400191505060405180910390fd5b609a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3609b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660006040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611f1c57600080fd5b505af1158015611f30573d6000803e3d6000fd5b505050506040513d6020811015611f4657600080fd5b8101908080519060200190929190505050507fcc798def5ea8391b2b007a1f8935700fad05d4c50d52ceaeb9e8e87c03138616816040518082815260200191505060405180910390a15b50919050565b60975481565b611fa46122dd565b73ffffffffffffffffffffffffffffffffffffffff16606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612066576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b8260978190555081609881905550806099819055507fcf8a1e1d5f09cf3c97dbb653cd9a4d7aace9292fbc1bb8211febf2d400febbdd60975460985460995460405180848152602001838152602001828152602001935050505060405180910390a1505050565b6120d56122dd565b73ffffffffffffffffffffffffffffffffffffffff16606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612197576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561221d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612a2d6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600061232783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506124fa565b905092915050565b60006123448383670de0b6b3a76400006125ba565b905092915050565b6000808284019050838110156123ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000803090506000813b9050600081149250505090565b600060019054906101000a900460ff168061240a57506124096123d4565b5b8061242157506000809054906101000a900460ff16155b612476576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180612b08602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156124c6576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6124ce6125ef565b6124d66126ee565b80156124f75760008060016101000a81548160ff0219169083151502179055505b50565b60008383111582906125a7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561256c578082015181840152602081019050612551565b50505050905090810190601f1680156125995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b6000806125d0848661289690919063ffffffff16565b90506125e5838261291c90919063ffffffff16565b9150509392505050565b600060019054906101000a900460ff168061260e575061260d6123d4565b5b8061262557506000809054906101000a900460ff16155b61267a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180612b08602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156126ca576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b80156126eb5760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff168061270d575061270c6123d4565b5b8061272457506000809054906101000a900460ff16155b612779576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180612b08602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156127c9576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b60006127d36122dd565b905080606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35080156128935760008060016101000a81548160ff0219169083151502179055505b50565b6000808314156128a95760009050612916565b60008284029050828482816128ba57fe5b0414612911576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612ae76021913960400191505060405180910390fd5b809150505b92915050565b600061295e83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612966565b905092915050565b60008083118290612a12576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156129d75780820151818401526020810190506129bc565b50505050905090810190601f168015612a045780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581612a1e57fe5b04905080915050939250505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373466565436f6c6c6563746f723a204d757374207265636569766520746f6b656e73466565436f6c6c6563746f723a204275726e207472616e73666572206661696c6564466565436f6c6c6563746f723a204d757374206465706f73697420746f6b656e7320746f207374616b6572735374616b696e673a20726f636b657420616464726573732063616e2774206265207a65726f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a264697066735822122036742e6f09bc1fe8a2abee57546367d11e7726714157ea978d0b67001848ed3564736f6c63430006060033

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.