Sonic Blaze Testnet

Contract

0x23FEFa1d3a6C7B1F48B01882664CA0b916164268

Overview

S Balance

Sonic Blaze LogoSonic Blaze LogoSonic Blaze Logo0 S

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Start77555062024-12-28 14:12:1923 days ago1735395139IN
0x23FEFa1d...916164268
0 S0.000050161.1

Latest 11 internal transactions

Parent Transaction Hash Block From To
77556492024-12-28 14:13:0323 days ago1735395183
0x23FEFa1d...916164268
0 S
77555752024-12-28 14:12:4123 days ago1735395161
0x23FEFa1d...916164268
0 S
77543592024-12-28 14:06:2423 days ago1735394784
0x23FEFa1d...916164268
0 S
77529142024-12-28 13:59:0323 days ago1735394343
0x23FEFa1d...916164268
0 S
77529142024-12-28 13:59:0323 days ago1735394343
0x23FEFa1d...916164268
0 S
77529142024-12-28 13:59:0323 days ago1735394343
0x23FEFa1d...916164268
0 S
77529142024-12-28 13:59:0323 days ago1735394343
0x23FEFa1d...916164268
0 S
77529142024-12-28 13:59:0323 days ago1735394343
0x23FEFa1d...916164268
0 S
77529142024-12-28 13:59:0323 days ago1735394343
0x23FEFa1d...916164268
0 S
77529142024-12-28 13:59:0323 days ago1735394343
0x23FEFa1d...916164268
0 S
77529142024-12-28 13:59:0323 days ago1735394343
0x23FEFa1d...916164268
0 S
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x59535Dea...16eFCF6CB
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
ChefIncentivesController

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 2000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 9 : ChefIncentivesController.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.7.6;

import "../interfaces/IMultiFeeDistribution.sol";
import "../interfaces/IOnwardIncentivesController.sol";
import "../dependencies/openzeppelin/contracts/IERC20.sol";
import "../dependencies/openzeppelin/contracts/SafeERC20.sol";
import "../dependencies/openzeppelin/contracts/SafeMath.sol";
import "../dependencies/openzeppelin/contracts/Ownable.sol";

// based on the Sushi MasterChef
// https://github.com/sushiswap/sushiswap/blob/master/contracts/MasterChef.sol
contract ChefIncentivesController is Ownable {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    // Info of each user.
    struct UserInfo {
        uint256 amount;
        uint256 rewardDebt;
    }
    // Info of each pool.
    struct PoolInfo {
        uint256 totalSupply;
        uint256 allocPoint; // How many allocation points assigned to this pool.
        uint256 lastRewardTime; // Last second that reward distribution occurs.
        uint256 accRewardPerShare; // Accumulated rewards per share, times 1e12. See below.
        IOnwardIncentivesController onwardIncentives;
    }
    // Info about token emissions for a given time period.
    struct EmissionPoint {
        uint128 startTimeOffset;
        uint128 rewardsPerSecond;
    }

    address public poolConfigurator;

    IMultiFeeDistribution public rewardMinter;
    uint256 public rewardsPerSecond;
    uint256 public immutable maxMintableTokens;
    uint256 public mintedTokens;

    // Info of each pool.
    address[] public registeredTokens;
    mapping(address => PoolInfo) public poolInfo;

    // Data about the future reward rates. emissionSchedule stored in reverse chronological order,
    // whenever the number of blocks since the start block exceeds the next block offset a new
    // reward rate is applied.
    EmissionPoint[] public emissionSchedule;
    // token => user => Info of each user that stakes LP tokens.
    mapping(address => mapping(address => UserInfo)) public userInfo;
    // user => base claimable balance
    mapping(address => uint256) public userBaseClaimable;
    // Total allocation poitns. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint = 0;
    // The block number when reward mining starts.
    uint256 public startTime;

    // account earning rewards => receiver of rewards for this account
    // if receiver is set to address(0), rewards are paid to the earner
    // this is used to aid 3rd party contract integrations
    mapping (address => address) public claimReceiver;

    event BalanceUpdated(
        address indexed token,
        address indexed user,
        uint256 balance,
        uint256 totalSupply
    );

    constructor(
        uint128[] memory _startTimeOffset,
        uint128[] memory _rewardsPerSecond,
        address _poolConfigurator,
        IMultiFeeDistribution _rewardMinter,
        uint256 _maxMintable
    )
        Ownable()
    {
        poolConfigurator = _poolConfigurator;
        rewardMinter = _rewardMinter;
        uint256 length = _startTimeOffset.length;
        for (uint256 i = length - 1; i + 1 != 0; i--) {
            emissionSchedule.push(
                EmissionPoint({
                    startTimeOffset: _startTimeOffset[i],
                    rewardsPerSecond: _rewardsPerSecond[i]
                })
            );
        }
        maxMintableTokens = _maxMintable;
    }

    // Start the party
    function start() public onlyOwner {
        require(startTime == 0);
        startTime = block.timestamp;
    }

    // Add a new lp to the pool. Can only be called by the poolConfigurator.
    function addPool(address _token, uint256 _allocPoint) external {
        require(msg.sender == poolConfigurator);
        require(poolInfo[_token].lastRewardTime == 0);
        _updateEmissions();
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        registeredTokens.push(_token);
        poolInfo[_token] = PoolInfo({
            totalSupply: 0,
            allocPoint: _allocPoint,
            lastRewardTime: block.timestamp,
            accRewardPerShare: 0,
            onwardIncentives: IOnwardIncentivesController(0)
        });
    }

    // Update the given pool's allocation point. Can only be called by the owner.
    function batchUpdateAllocPoint(
        address[] calldata _tokens,
        uint256[] calldata _allocPoints
    ) public onlyOwner {
        require(_tokens.length == _allocPoints.length);
        _massUpdatePools();
        uint256 _totalAllocPoint = totalAllocPoint;
        for (uint256 i = 0; i < _tokens.length; i++) {
            PoolInfo storage pool = poolInfo[_tokens[i]];
            require(pool.lastRewardTime > 0);
            _totalAllocPoint = _totalAllocPoint.sub(pool.allocPoint).add(_allocPoints[i]);
            pool.allocPoint = _allocPoints[i];
        }
        totalAllocPoint = _totalAllocPoint;
    }

    function setOnwardIncentives(
        address _token,
        IOnwardIncentivesController _incentives
    )
        external
        onlyOwner
    {
        require(poolInfo[_token].lastRewardTime != 0);
        poolInfo[_token].onwardIncentives = _incentives;
    }

    function setClaimReceiver(address _user, address _receiver) external {
        require(msg.sender == _user || msg.sender == owner());
        claimReceiver[_user] = _receiver;
    }

    function poolLength() external view returns (uint256) {
        return registeredTokens.length;
    }

    function claimableReward(address _user, address[] calldata _tokens)
        external
        view
        returns (uint256[] memory)
    {
        uint256[] memory claimable = new uint256[](_tokens.length);
        for (uint256 i = 0; i < _tokens.length; i++) {
            address token = _tokens[i];
            PoolInfo storage pool = poolInfo[token];
            UserInfo storage user = userInfo[token][_user];
            uint256 accRewardPerShare = pool.accRewardPerShare;
            uint256 lpSupply = pool.totalSupply;
            if (block.timestamp > pool.lastRewardTime && lpSupply != 0) {
                uint256 duration = block.timestamp.sub(pool.lastRewardTime);
                uint256 reward = duration.mul(rewardsPerSecond).mul(pool.allocPoint).div(totalAllocPoint);
                accRewardPerShare = accRewardPerShare.add(reward.mul(1e12).div(lpSupply));
            }
            claimable[i] = user.amount.mul(accRewardPerShare).div(1e12).sub(user.rewardDebt);
        }
        return claimable;
    }


    function _updateEmissions() internal {
        uint256 length = emissionSchedule.length;
        if (startTime > 0 && length > 0) {
            EmissionPoint memory e = emissionSchedule[length-1];
            if (block.timestamp.sub(startTime) > e.startTimeOffset) {
                 _massUpdatePools();
                rewardsPerSecond = uint256(e.rewardsPerSecond);
                emissionSchedule.pop();
            }
        }
    }

    // Update reward variables for all pools
    function _massUpdatePools() internal {
        uint256 totalAP = totalAllocPoint;
        uint256 length = registeredTokens.length;
        for (uint256 i = 0; i < length; ++i) {
            _updatePool(poolInfo[registeredTokens[i]], totalAP);
        }
    }

    // Update reward variables of the given pool to be up-to-date.
    function _updatePool(PoolInfo storage pool, uint256 _totalAllocPoint) internal {
        if (block.timestamp <= pool.lastRewardTime) {
            return;
        }
        uint256 lpSupply = pool.totalSupply;
        if (lpSupply == 0) {
            pool.lastRewardTime = block.timestamp;
            return;
        }
        uint256 duration = block.timestamp.sub(pool.lastRewardTime);
        uint256 reward = duration.mul(rewardsPerSecond).mul(pool.allocPoint).div(_totalAllocPoint);
        pool.accRewardPerShare = pool.accRewardPerShare.add(reward.mul(1e12).div(lpSupply));
        pool.lastRewardTime = block.timestamp;
    }

    function _mint(address _user, uint256 _amount) internal {
        uint256 minted = mintedTokens;
        if (minted.add(_amount) > maxMintableTokens) {
            _amount = maxMintableTokens.sub(minted);
        }
        if (_amount > 0) {
            mintedTokens = minted.add(_amount);
            address receiver = claimReceiver[_user];
            if (receiver == address(0)) receiver = _user;
            rewardMinter.mint(receiver, _amount, true);
        }
    }

    function handleAction(address _user, uint256 _balance, uint256 _totalSupply) external {
        PoolInfo storage pool = poolInfo[msg.sender];
        require(pool.lastRewardTime > 0);
        _updateEmissions();
        _updatePool(pool, totalAllocPoint);
        UserInfo storage user = userInfo[msg.sender][_user];
        uint256 amount = user.amount;
        uint256 accRewardPerShare = pool.accRewardPerShare;
        if (amount > 0) {
            uint256 pending = amount.mul(accRewardPerShare).div(1e12).sub(user.rewardDebt);
            if (pending > 0) {
                userBaseClaimable[_user] = userBaseClaimable[_user].add(pending);
            }
        }
        user.amount = _balance;
        user.rewardDebt = _balance.mul(accRewardPerShare).div(1e12);
        pool.totalSupply = _totalSupply;
        if (pool.onwardIncentives != IOnwardIncentivesController(0)) {
            pool.onwardIncentives.handleAction(msg.sender, _user, _balance, _totalSupply);
        }
        emit BalanceUpdated(msg.sender, _user, _balance, _totalSupply);
    }

    // Claim pending rewards for one or more pools.
    // Rewards are not received directly, they are minted by the rewardMinter.
    function claim(address _user, address[] calldata _tokens) external {
        _updateEmissions();
        uint256 pending = userBaseClaimable[_user];
        userBaseClaimable[_user] = 0;
        uint256 _totalAllocPoint = totalAllocPoint;
        for (uint i = 0; i < _tokens.length; i++) {
            PoolInfo storage pool = poolInfo[_tokens[i]];
            require(pool.lastRewardTime > 0);
            _updatePool(pool, _totalAllocPoint);
            UserInfo storage user = userInfo[_tokens[i]][_user];
            uint256 rewardDebt = user.amount.mul(pool.accRewardPerShare).div(1e12);
            pending = pending.add(rewardDebt.sub(user.rewardDebt));
            user.rewardDebt = rewardDebt;
        }
        _mint(_user, pending);
    }

}

File 2 of 9 : Address.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.7.6;

/**
 * @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) {
    // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
    // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
    // for accounts without code, i.e. `keccak256('')`
    bytes32 codehash;
    bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
    // solhint-disable-next-line no-inline-assembly
    assembly {
      codehash := extcodehash(account)
    }
    return (codehash != accountHash && codehash != 0x0);
  }

  /**
   * @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');

    // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
    (bool success, ) = recipient.call{value: amount}('');
    require(success, 'Address: unable to send value, recipient may have reverted');
  }
}

File 3 of 9 : Context.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.7.6;

/*
 * @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.
 */
abstract contract Context {
  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;
  }
}

File 4 of 9 : IERC20.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.7.6;

/**
 * @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 5 of 9 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.7.6;

import './Context.sol';

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
contract Ownable is Context {
  address private _owner;

  event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

  /**
   * @dev Initializes the contract setting the deployer as the initial owner.
   */
  constructor() {
    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;
  }
}

File 6 of 9 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.7.6;

import {IERC20} from './IERC20.sol';
import {SafeMath} from './SafeMath.sol';
import {Address} from './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 SafeMath for uint256;
  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));
  }

  function safeApprove(
    IERC20 token,
    address spender,
    uint256 value
  ) internal {
    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 callOptionalReturn(IERC20 token, bytes memory data) private {
    require(address(token).isContract(), 'SafeERC20: call to non-contract');

    // solhint-disable-next-line avoid-low-level-calls
    (bool success, bytes memory returndata) = address(token).call(data);
    require(success, 'SafeERC20: low-level call failed');

    if (returndata.length > 0) {
      // Return data is optional
      // solhint-disable-next-line max-line-length
      require(abi.decode(returndata, (bool)), 'SafeERC20: ERC20 operation did not succeed');
    }
  }
}

File 7 of 9 : SafeMath.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.7.6;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
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;
  }
}

File 8 of 9 : IMultiFeeDistribution.sol
pragma solidity 0.7.6;

interface IMultiFeeDistribution {

    function addReward(address rewardsToken) external;
    function mint(address user, uint256 amount, bool withPenalty) external;

}

File 9 of 9 : IOnwardIncentivesController.sol
pragma solidity 0.7.6;

interface IOnwardIncentivesController {
    function handleAction(
        address _token,
        address _user,
        uint256 _balance,
        uint256 _totalSupply
    ) external;
}

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

Contract ABI

[{"inputs":[{"internalType":"uint128[]","name":"_startTimeOffset","type":"uint128[]"},{"internalType":"uint128[]","name":"_rewardsPerSecond","type":"uint128[]"},{"internalType":"address","name":"_poolConfigurator","type":"address"},{"internalType":"contract IMultiFeeDistribution","name":"_rewardMinter","type":"address"},{"internalType":"uint256","name":"_maxMintable","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"balance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalSupply","type":"uint256"}],"name":"BalanceUpdated","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"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"}],"name":"addPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"},{"internalType":"uint256[]","name":"_allocPoints","type":"uint256[]"}],"name":"batchUpdateAllocPoint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"address[]","name":"_tokens","type":"address[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"address[]","name":"_tokens","type":"address[]"}],"name":"claimableReward","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"emissionSchedule","outputs":[{"internalType":"uint128","name":"startTimeOffset","type":"uint128"},{"internalType":"uint128","name":"rewardsPerSecond","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_balance","type":"uint256"},{"internalType":"uint256","name":"_totalSupply","type":"uint256"}],"name":"handleAction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxMintableTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintedTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolConfigurator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"poolInfo","outputs":[{"internalType":"uint256","name":"totalSupply","type":"uint256"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardTime","type":"uint256"},{"internalType":"uint256","name":"accRewardPerShare","type":"uint256"},{"internalType":"contract IOnwardIncentivesController","name":"onwardIncentives","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"registeredTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardMinter","outputs":[{"internalType":"contract IMultiFeeDistribution","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsPerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"address","name":"_receiver","type":"address"}],"name":"setClaimReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"contract IOnwardIncentivesController","name":"_incentives","type":"address"}],"name":"setOnwardIncentives","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"start","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userBaseClaimable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101a35760003560e01c80638da5cb5b116100ee578063bfccff4511610097578063e20c5a8a11610071578063e20c5a8a14610566578063e5b534981461058c578063eacdaabc1461065c578063f2fde38b14610664576101a3565b8063bfccff451461050a578063cd1a4d8614610530578063de7e410c1461055e576101a3565b80639a7b5f11116100c85780639a7b5f11146104a05780639b8e5563146104fa578063be9a655514610502576101a3565b80638da5cb5b146103df5780638e2eba09146104035780639a0ba2ea14610483576101a3565b80633328756411610150578063715018a61161012a578063715018a6146103c757806378e97925146103cf5780638d75fe05146103d7576101a3565b80633328756414610279578063334d0bbd146102a757806334c5423014610305576101a3565b80631a848e01116101815780631a848e011461021157806331873e2e1461021957806332a9caba1461024d576101a3565b8063081e3eda146101a85780630f208beb146101c257806317caf6f114610209575b600080fd5b6101b061068a565b60408051918252519081900360200190f35b6101f0600480360360408110156101d857600080fd5b506001600160a01b0381358116916020013516610690565b6040805192835260208301919091528051918290030190f35b6101b06106b4565b6101b06106ba565b61024b6004803603606081101561022f57600080fd5b506001600160a01b0381351690602081013590604001356106de565b005b61024b6004803603604081101561026357600080fd5b506001600160a01b0381351690602001356108ca565b61024b6004803603604081101561028f57600080fd5b506001600160a01b03813581169160200135166109dd565b6102c4600480360360208110156102bd57600080fd5b5035610a50565b60405180836fffffffffffffffffffffffffffffffff168152602001826fffffffffffffffffffffffffffffffff1681526020019250505060405180910390f35b61024b6004803603604081101561031b57600080fd5b81019060208101813564010000000081111561033657600080fd5b82018360208201111561034857600080fd5b8035906020019184602083028401116401000000008311171561036a57600080fd5b91939092909160208101903564010000000081111561038857600080fd5b82018360208201111561039a57600080fd5b803590602001918460208302840111640100000000831117156103bc57600080fd5b509092509050610a9b565b61024b610bdc565b6101b0610c9d565b6101b0610ca3565b6103e7610ca9565b604080516001600160a01b039092168252519081900360200190f35b61024b6004803603604081101561041957600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561044457600080fd5b82018360208201111561045657600080fd5b8035906020019184602083028401116401000000008311171561047857600080fd5b509092509050610cb8565b6103e76004803603602081101561049957600080fd5b5035610df8565b6104c6600480360360208110156104b657600080fd5b50356001600160a01b0316610e22565b6040805195865260208601949094528484019290925260608401526001600160a01b03166080830152519081900360a00190f35b6103e7610e5a565b61024b610e69565b6101b06004803603602081101561052057600080fd5b50356001600160a01b0316610ee6565b61024b6004803603604081101561054657600080fd5b506001600160a01b0381358116916020013516610ef8565b6103e7610fc5565b6103e76004803603602081101561057c57600080fd5b50356001600160a01b0316610fd4565b61060c600480360360408110156105a257600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156105cd57600080fd5b8201836020820111156105df57600080fd5b8035906020019184602083028401116401000000008311171561060157600080fd5b509092509050610fef565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610648578181015183820152602001610630565b505050509050019250505060405180910390f35b6101b061116e565b61024b6004803603602081101561067a57600080fd5b50356001600160a01b0316611174565b60055490565b60086020908152600092835260408084209091529082529020805460019091015482565b600a5481565b7f000000000000000000000000000000000000000000069e10de76676d0800000081565b33600090815260066020526040902060028101546106fb57600080fd5b61070361128b565b61070f81600a54611382565b3360009081526008602090815260408083206001600160a01b038816845290915290208054600383015481156107b157600183015460009061076a9061076464e8d4a5100061075e8787611418565b9061147a565b906114bc565b905080156107af576001600160a01b03881660009081526009602052604090205461079590826114fe565b6001600160a01b0389166000908152600960205260409020555b505b8583556107c764e8d4a5100061075e8884611418565b600184015584845560048401546001600160a01b03161561087957600480850154604080517fae0b537100000000000000000000000000000000000000000000000000000000815233938101939093526001600160a01b038a81166024850152604484018a905260648401899052905191169163ae0b537191608480830192600092919082900301818387803b15801561086057600080fd5b505af1158015610874573d6000803e3d6000fd5b505050505b604080518781526020810187905281516001600160a01b038a169233927f526824944047da5b81071fb6349412005c5da81380b336103fbe5dd34556c776929081900390910190a350505050505050565b6001546001600160a01b031633146108e157600080fd5b6001600160a01b0382166000908152600660205260409020600201541561090757600080fd5b61090f61128b565b600a5461091c90826114fe565b600a556005805460018181019092557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b0394851673ffffffffffffffffffffffffffffffffffffffff1991821681179092556040805160a0810182526000808252602082810197885242838501908152606084018381526080850184815297845260069092529390912091518255955194810194909455516002840155925160038301555160049091018054919093169116179055565b336001600160a01b0383161480610a0c57506109f7610ca9565b6001600160a01b0316336001600160a01b0316145b610a1557600080fd5b6001600160a01b039182166000908152600c60205260409020805473ffffffffffffffffffffffffffffffffffffffff191691909216179055565b60078181548110610a6057600080fd5b6000918252602090912001546fffffffffffffffffffffffffffffffff80821692507001000000000000000000000000000000009091041682565b610aa3611558565b6000546001600160a01b03908116911614610b05576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b828114610b1157600080fd5b610b1961155c565b600a5460005b84811015610bd257600060066000888885818110610b3957fe5b905060200201356001600160a01b03166001600160a01b03166001600160a01b0316815260200190815260200160002090506000816002015411610b7c57600080fd5b610baf858584818110610b8b57fe5b90506020020135610ba98360010154866114bc90919063ffffffff16565b906114fe565b9250848483818110610bbd57fe5b60200291909101356001928301555001610b1f565b50600a5550505050565b610be4611558565b6000546001600160a01b03908116911614610c46576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600b5481565b60045481565b6000546001600160a01b031690565b610cc061128b565b6001600160a01b0383166000908152600960205260408120805490829055600a5490915b83811015610de657600060066000878785818110610cfe57fe5b905060200201356001600160a01b03166001600160a01b03166001600160a01b0316815260200190815260200160002090506000816002015411610d4157600080fd5b610d4b8184611382565b600060086000888886818110610d5d57fe5b6001600160a01b036020918202939093013583168452838101949094525060409182016000908120918c1681529252812060038401548154919350610dad9164e8d4a510009161075e9190611418565b9050610dd0610dc98360010154836114bc90919063ffffffff16565b87906114fe565b6001928301919091559450919091019050610ce4565b50610df185836115b8565b5050505050565b60058181548110610e0857600080fd5b6000918252602090912001546001600160a01b0316905081565b60066020526000908152604090208054600182015460028301546003840154600490940154929391929091906001600160a01b031685565b6002546001600160a01b031681565b610e71611558565b6000546001600160a01b03908116911614610ed3576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600b5415610ee057600080fd5b42600b55565b60096020526000908152604090205481565b610f00611558565b6000546001600160a01b03908116911614610f62576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038216600090815260066020526040902060020154610f8757600080fd5b6001600160a01b039182166000908152600660205260409020600401805473ffffffffffffffffffffffffffffffffffffffff191691909216179055565b6001546001600160a01b031681565b600c602052600090815260409020546001600160a01b031681565b606060008267ffffffffffffffff8111801561100a57600080fd5b50604051908082528060200260200182016040528015611034578160200160208202803683370190505b50905060005b8381101561116557600085858381811061105057fe5b6001600160a01b03602091820293909301358316600081815260068352604080822060088552818320968e168352959093529190912060038401548454600286015493965091935091421180156110a657508015155b156111155760006110c48560020154426114bc90919063ffffffff16565b905060006110f1600a5461075e88600101546110eb6003548761141890919063ffffffff16565b90611418565b90506111106111098461075e8464e8d4a51000611418565b85906114fe565b935050505b61113d836001015461076464e8d4a5100061075e86886000015461141890919063ffffffff16565b87878151811061114957fe5b602090810291909101015250506001909301925061103a915050565b50949350505050565b60035481565b61117c611558565b6000546001600160a01b039081169116146111de576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166112235760405162461bcd60e51b81526004018080602001828103825260268152602001806117df6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600754600b541580159061129f5750600081115b1561137f576000600760018303815481106112b657fe5b6000918252602091829020604080518082019091529101546fffffffffffffffffffffffffffffffff8082168084527001000000000000000000000000000000009092041692820192909252600b549092506113139042906114bc565b111561137d5761132161155c565b60208101516fffffffffffffffffffffffffffffffff16600355600780548061134657fe5b60008281526020812082017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff908101919091550190555b505b50565b816002015442116113925761137d565b8154806113a5575042600283015561137d565b60006113be8460020154426114bc90919063ffffffff16565b905060006113e38461075e87600101546110eb6003548761141890919063ffffffff16565b90506114066113fb8461075e8464e8d4a51000611418565b6003870154906114fe565b60038601555050426002840155505050565b60008261142757506000611474565b8282028284828161143457fe5b04146114715760405162461bcd60e51b81526004018080602001828103825260218152602001806118056021913960400191505060405180910390fd5b90505b92915050565b600061147183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506116e2565b600061147183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611784565b600082820183811015611471576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b600a5460055460005b818110156115b3576115ab600660006005848154811061158157fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902084611382565b600101611565565b505050565b6004547f000000000000000000000000000000000000000000069e10de76676d080000006115e682846114fe565b1115611619576116167f000000000000000000000000000000000000000000069e10de76676d08000000826114bc565b91505b81156115b35761162981836114fe565b6004556001600160a01b038084166000908152600c6020526040902054168061164f5750825b600254604080517fd1a1beb40000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015260248201879052600160448301529151919092169163d1a1beb491606480830192600092919082900301818387803b1580156116c457600080fd5b505af11580156116d8573d6000803e3d6000fd5b5050505050505050565b6000818361176e5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561173357818101518382015260200161171b565b50505050905090810190601f1680156117605780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161177a57fe5b0495945050505050565b600081848411156117d65760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561173357818101518382015260200161171b565b50505090039056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220ca6909468d486ef42370280f9209677c915eff682ca4e5cfe667e2709977d32064736f6c63430007060033

Block Transaction 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
[ Download: CSV Export  ]
[ 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.