ETH Price: $3,829.98 (+5.87%)

Token

ERC-20: veSOS (veSOS)
 

Overview

Max Total Supply

3,296,444,371,859.917456373165705027 veSOS

Holders

10,053

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Filtered by Token Holder
knoxis.eth
Balance
63,841,812.80530372814129286 veSOS

Value
$0.00
0x54B065B3a70157F5e120CDB9F0CA8fCA8F664e53
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
OpenDAOStaking

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 800 runs

Other Settings:
default evmVersion
File 1 of 9 : OpenDAOStaking.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeCast.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract OpenDAOStaking is ERC20("veSOS", "veSOS"), Ownable {
    using SafeERC20 for IERC20;
    using SafeCast for int256;
    using SafeCast for uint256;

    struct Config {
        // Timestamp in seconds is small enough to fit into uint64
        uint64 periodFinish;
        uint64 periodStart;

        // Staking incentive rewards to distribute in a steady rate
        uint128 totalReward;
    }

    IERC20 public sos;
    Config public config;

    /*
     * Construct an OpenDAOStaking contract.
     *
     * @param _sos the contract address of SOS token
     * @param _periodStart the initial start time of rewards period
     * @param _rewardsDuration the duration of rewards in seconds
     */
    constructor(IERC20 _sos, uint64 _periodStart, uint64 _rewardsDuration) {
        require(address(_sos) != address(0), "OpenDAOStaking: _sos cannot be the zero address");
        sos = _sos;
        setPeriod(_periodStart, _rewardsDuration);
    }

    /*
     * Add SOS tokens to the reward pool.
     *
     * @param _sosAmount the amount of SOS tokens to add to the reward pool
     */
    function addRewardSOS(uint256 _sosAmount) external {
        Config memory cfg = config;
        require(block.timestamp < cfg.periodFinish, "OpenDAOStaking: Adding rewards is forbidden");

        sos.safeTransferFrom(msg.sender, address(this), _sosAmount);
        cfg.totalReward += _sosAmount.toUint128();
        config = cfg;
    }

    /*
     * Set the reward peroid. If only possible to set the reward period after last rewards have been
     * expired.
     *
     * @param _periodStart timestamp of reward starting time
     * @param _rewardsDuration the duration of rewards in seconds
     */
    function setPeriod(uint64 _periodStart, uint64 _rewardsDuration) public onlyOwner {
        require(_periodStart >= block.timestamp, "OpenDAOStaking: _periodStart shouldn't be in the past");
        require(_rewardsDuration > 0, "OpenDAOStaking: Invalid rewards duration");

        Config memory cfg = config;
        require(cfg.periodFinish < block.timestamp, "OpenDAOStaking: The last reward period should be finished before setting a new one");

        uint64 _periodFinish = _periodStart + _rewardsDuration;
        config.periodStart = _periodStart;
        config.periodFinish = _periodFinish;
        config.totalReward = 0;
    }

    /*
     * Returns the staked sos + release rewards
     *
     * @returns amount of available sos
     */
    function getSOSPool() public view returns(uint256) {
        return sos.balanceOf(address(this)) - frozenRewards();
    }

    /*
     * Returns the frozen rewards
     *
     * @returns amount of frozen rewards
     */
    function frozenRewards() public view returns(uint256) {
        Config memory cfg = config;

        uint256 time = block.timestamp;
        uint256 remainingTime;
        uint256 duration = uint256(cfg.periodFinish) - uint256(cfg.periodStart);

        if (time <= cfg.periodStart) {
            remainingTime = duration;
        } else if (time >= cfg.periodFinish) {
            remainingTime = 0;
        } else {
            remainingTime = cfg.periodFinish - time;
        }

        return remainingTime * uint256(cfg.totalReward) / duration;
    }

    /*
     * Staking specific amount of SOS token and get corresponding amount of veSOS
     * as the user's share in the pool
     *
     * @param _sosAmount
     */
    function enter(uint256 _sosAmount) external {
        require(_sosAmount > 0, "OpenDAOStaking: Should at least stake something");

        uint256 totalSOS = getSOSPool();
        uint256 totalShares = totalSupply();

        sos.safeTransferFrom(msg.sender, address(this), _sosAmount);

        if (totalShares == 0 || totalSOS == 0) {
            _mint(msg.sender, _sosAmount);
        } else {
            uint256 _share = _sosAmount * totalShares / totalSOS;
            _mint(msg.sender, _share);
        }
    }

    /*
     * Redeem specific amount of veSOS to SOS tokens according to the user's share in the pool.
     * veSOS will be burnt.
     *
     * @param _share
     */
    function leave(uint256 _share) external {
        require(_share > 0, "OpenDAOStaking: Should at least unstake something");

        uint256 totalSOS = getSOSPool();
        uint256 totalShares = totalSupply();

        _burn(msg.sender, _share);

        uint256 _sosAmount = _share * totalSOS / totalShares;
        sos.safeTransfer(msg.sender, _sosAmount);
    }
}

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

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - amount);
        }

        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

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

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

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

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 5 of 9 : SafeCast.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol)

pragma solidity ^0.8.0;

/**
 * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow
 * checks.
 *
 * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
 * easily result in undesired exploitation or bugs, since developers usually
 * assume that overflows raise errors. `SafeCast` restores this intuition by
 * reverting the transaction when such an operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 *
 * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing
 * all math on `uint256` and `int256` and then downcasting.
 */
library SafeCast {
    /**
     * @dev Returns the downcasted uint224 from uint256, reverting on
     * overflow (when the input is greater than largest uint224).
     *
     * Counterpart to Solidity's `uint224` operator.
     *
     * Requirements:
     *
     * - input must fit into 224 bits
     */
    function toUint224(uint256 value) internal pure returns (uint224) {
        require(value <= type(uint224).max, "SafeCast: value doesn't fit in 224 bits");
        return uint224(value);
    }

    /**
     * @dev Returns the downcasted uint128 from uint256, reverting on
     * overflow (when the input is greater than largest uint128).
     *
     * Counterpart to Solidity's `uint128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     */
    function toUint128(uint256 value) internal pure returns (uint128) {
        require(value <= type(uint128).max, "SafeCast: value doesn't fit in 128 bits");
        return uint128(value);
    }

    /**
     * @dev Returns the downcasted uint96 from uint256, reverting on
     * overflow (when the input is greater than largest uint96).
     *
     * Counterpart to Solidity's `uint96` operator.
     *
     * Requirements:
     *
     * - input must fit into 96 bits
     */
    function toUint96(uint256 value) internal pure returns (uint96) {
        require(value <= type(uint96).max, "SafeCast: value doesn't fit in 96 bits");
        return uint96(value);
    }

    /**
     * @dev Returns the downcasted uint64 from uint256, reverting on
     * overflow (when the input is greater than largest uint64).
     *
     * Counterpart to Solidity's `uint64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     */
    function toUint64(uint256 value) internal pure returns (uint64) {
        require(value <= type(uint64).max, "SafeCast: value doesn't fit in 64 bits");
        return uint64(value);
    }

    /**
     * @dev Returns the downcasted uint32 from uint256, reverting on
     * overflow (when the input is greater than largest uint32).
     *
     * Counterpart to Solidity's `uint32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     */
    function toUint32(uint256 value) internal pure returns (uint32) {
        require(value <= type(uint32).max, "SafeCast: value doesn't fit in 32 bits");
        return uint32(value);
    }

    /**
     * @dev Returns the downcasted uint16 from uint256, reverting on
     * overflow (when the input is greater than largest uint16).
     *
     * Counterpart to Solidity's `uint16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     */
    function toUint16(uint256 value) internal pure returns (uint16) {
        require(value <= type(uint16).max, "SafeCast: value doesn't fit in 16 bits");
        return uint16(value);
    }

    /**
     * @dev Returns the downcasted uint8 from uint256, reverting on
     * overflow (when the input is greater than largest uint8).
     *
     * Counterpart to Solidity's `uint8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits.
     */
    function toUint8(uint256 value) internal pure returns (uint8) {
        require(value <= type(uint8).max, "SafeCast: value doesn't fit in 8 bits");
        return uint8(value);
    }

    /**
     * @dev Converts a signed int256 into an unsigned uint256.
     *
     * Requirements:
     *
     * - input must be greater than or equal to 0.
     */
    function toUint256(int256 value) internal pure returns (uint256) {
        require(value >= 0, "SafeCast: value must be positive");
        return uint256(value);
    }

    /**
     * @dev Returns the downcasted int128 from int256, reverting on
     * overflow (when the input is less than smallest int128 or
     * greater than largest int128).
     *
     * Counterpart to Solidity's `int128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     *
     * _Available since v3.1._
     */
    function toInt128(int256 value) internal pure returns (int128) {
        require(value >= type(int128).min && value <= type(int128).max, "SafeCast: value doesn't fit in 128 bits");
        return int128(value);
    }

    /**
     * @dev Returns the downcasted int64 from int256, reverting on
     * overflow (when the input is less than smallest int64 or
     * greater than largest int64).
     *
     * Counterpart to Solidity's `int64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     *
     * _Available since v3.1._
     */
    function toInt64(int256 value) internal pure returns (int64) {
        require(value >= type(int64).min && value <= type(int64).max, "SafeCast: value doesn't fit in 64 bits");
        return int64(value);
    }

    /**
     * @dev Returns the downcasted int32 from int256, reverting on
     * overflow (when the input is less than smallest int32 or
     * greater than largest int32).
     *
     * Counterpart to Solidity's `int32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     *
     * _Available since v3.1._
     */
    function toInt32(int256 value) internal pure returns (int32) {
        require(value >= type(int32).min && value <= type(int32).max, "SafeCast: value doesn't fit in 32 bits");
        return int32(value);
    }

    /**
     * @dev Returns the downcasted int16 from int256, reverting on
     * overflow (when the input is less than smallest int16 or
     * greater than largest int16).
     *
     * Counterpart to Solidity's `int16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     *
     * _Available since v3.1._
     */
    function toInt16(int256 value) internal pure returns (int16) {
        require(value >= type(int16).min && value <= type(int16).max, "SafeCast: value doesn't fit in 16 bits");
        return int16(value);
    }

    /**
     * @dev Returns the downcasted int8 from int256, reverting on
     * overflow (when the input is less than smallest int8 or
     * greater than largest int8).
     *
     * Counterpart to Solidity's `int8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits.
     *
     * _Available since v3.1._
     */
    function toInt8(int256 value) internal pure returns (int8) {
        require(value >= type(int8).min && value <= type(int8).max, "SafeCast: value doesn't fit in 8 bits");
        return int8(value);
    }

    /**
     * @dev Converts an unsigned uint256 into a signed int256.
     *
     * Requirements:
     *
     * - input must be less than or equal to maxInt256.
     */
    function toInt256(uint256 value) internal pure returns (int256) {
        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive
        require(value <= uint256(type(int256).max), "SafeCast: value doesn't fit in an int256");
        return int256(value);
    }
}

File 6 of 9 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/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.
 */
abstract 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() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 7 of 9 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 8 of 9 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

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

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

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

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

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

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_sos","type":"address"},{"internalType":"uint64","name":"_periodStart","type":"uint64"},{"internalType":"uint64","name":"_rewardsDuration","type":"uint64"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"uint256","name":"_sosAmount","type":"uint256"}],"name":"addRewardSOS","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"config","outputs":[{"internalType":"uint64","name":"periodFinish","type":"uint64"},{"internalType":"uint64","name":"periodStart","type":"uint64"},{"internalType":"uint128","name":"totalReward","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_sosAmount","type":"uint256"}],"name":"enter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"frozenRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSOSPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_share","type":"uint256"}],"name":"leave","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","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":"uint64","name":"_periodStart","type":"uint64"},{"internalType":"uint64","name":"_rewardsDuration","type":"uint64"}],"name":"setPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sos","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620020a5380380620020a58339810160408190526200003491620004ca565b6040805180820182526005808252647665534f5360d81b602080840182815285518087019096529285528401528151919291620000749160039162000407565b5080516200008a90600490602084019062000407565b505050620000a7620000a16200014b60201b60201c565b6200014f565b6001600160a01b0383166200011b5760405162461bcd60e51b815260206004820152602f60248201527f4f70656e44414f5374616b696e673a205f736f732063616e6e6f74206265207460448201526e6865207a65726f206164647265737360881b60648201526084015b60405180910390fd5b600680546001600160a01b0319166001600160a01b038516179055620001428282620001a1565b50505062000598565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6005546001600160a01b03163314620001fd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640162000112565b42826001600160401b031610156200027e5760405162461bcd60e51b815260206004820152603560248201527f4f70656e44414f5374616b696e673a205f706572696f6453746172742073686f60448201527f756c646e277420626520696e2074686520706173740000000000000000000000606482015260840162000112565b6000816001600160401b031611620002ea5760405162461bcd60e51b815260206004820152602860248201527f4f70656e44414f5374616b696e673a20496e76616c6964207265776172647320604482015267323ab930ba34b7b760c11b606482015260840162000112565b604080516060810182526007546001600160401b038082168084526801000000000000000083049091166020840152600160801b9091046001600160801b031692820192909252904211620003c35760405162461bcd60e51b815260206004820152605260248201527f4f70656e44414f5374616b696e673a20546865206c617374207265776172642060448201527f706572696f642073686f756c642062652066696e6973686564206265666f72656064820152712073657474696e672061206e6577206f6e6560701b608482015260a40162000112565b6000620003d1838562000521565b6001600160401b0394851668010000000000000000026fffffffffffffffff000000000000000016941693909317600755505050565b82805462000415906200055b565b90600052602060002090601f01602090048101928262000439576000855562000484565b82601f106200045457805160ff191683800117855562000484565b8280016001018555821562000484579182015b828111156200048457825182559160200191906001019062000467565b506200049292915062000496565b5090565b5b8082111562000492576000815560010162000497565b80516001600160401b0381168114620004c557600080fd5b919050565b600080600060608486031215620004e057600080fd5b83516001600160a01b0381168114620004f857600080fd5b92506200050860208501620004ad565b91506200051860408501620004ad565b90509250925092565b60006001600160401b038281168482168083038211156200055257634e487b7160e01b600052601160045260246000fd5b01949350505050565b600181811c908216806200057057607f821691505b602082108114156200059257634e487b7160e01b600052602260045260246000fd5b50919050565b611afd80620005a86000396000f3fe608060405234801561001057600080fd5b50600436106101825760003560e01c806379502c55116100d8578063a457c2d71161008c578063d69a108211610066578063d69a108214610357578063dd62ed3e1461036a578063f2fde38b146103a357600080fd5b8063a457c2d71461031e578063a59f3e0c14610331578063a9059cbb1461034457600080fd5b80638da5cb5b116100bd5780638da5cb5b146102fd57806395d89b411461030e5780639b84163f1461031657600080fd5b806379502c55146102705780638a7e26dd146102d257600080fd5b8063313ce5671161013a57806370a082311161011457806370a082311461022c578063715018a614610255578063788f11bb1461025d57600080fd5b8063313ce567146101f5578063395093511461020457806367dfd4c91461021757600080fd5b806318160ddd1161016b57806318160ddd146101c857806323b872dd146101da5780632faf795e146101ed57600080fd5b806306fdde0314610187578063095ea7b3146101a5575b600080fd5b61018f6103b6565b60405161019c9190611803565b60405180910390f35b6101b86101b3366004611852565b610448565b604051901515815260200161019c565b6002545b60405190815260200161019c565b6101b86101e836600461187c565b61045e565b6101cc610524565b6040516012815260200161019c565b6101b8610212366004611852565b6105fc565b61022a6102253660046118b8565b610638565b005b6101cc61023a3660046118d1565b6001600160a01b031660009081526020819052604090205490565b61022a610708565b61022a61026b366004611904565b61076e565b6007546102a29067ffffffffffffffff80821691600160401b810490911690600160801b90046001600160801b031683565b6040805167ffffffffffffffff94851681529390921660208401526001600160801b03169082015260600161019c565b6006546102e5906001600160a01b031681565b6040516001600160a01b03909116815260200161019c565b6005546001600160a01b03166102e5565b61018f6109e4565b6101cc6109f3565b6101b861032c366004611852565b610a87565b61022a61033f3660046118b8565b610b38565b6101b8610352366004611852565b610c22565b61022a6103653660046118b8565b610c2f565b6101cc610378366004611937565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61022a6103b13660046118d1565b610d7e565b6060600380546103c590611961565b80601f01602080910402602001604051908101604052809291908181526020018280546103f190611961565b801561043e5780601f106104135761010080835404028352916020019161043e565b820191906000526020600020905b81548152906001019060200180831161042157829003601f168201915b5050505050905090565b6000610455338484610e60565b50600192915050565b600061046b848484610f84565b6001600160a01b03841660009081526001602090815260408083203384529091529020548281101561050a5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6105178533858403610e60565b60019150505b9392505050565b6040805160608101825260075467ffffffffffffffff808216808452600160401b830490911660208401819052600160801b9092046001600160801b03169383019390935260009242918491829161057b916119b2565b9050836020015167ffffffffffffffff16831161059a578091506105cf565b835167ffffffffffffffff1683106105b557600091506105cf565b83516105cc90849067ffffffffffffffff166119b2565b91505b8084604001516001600160801b0316836105e991906119c9565b6105f391906119e8565b94505050505090565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610455918590610633908690611a0a565b610e60565b600081116106ae5760405162461bcd60e51b815260206004820152603160248201527f4f70656e44414f5374616b696e673a2053686f756c64206174206c656173742060448201527f756e7374616b6520736f6d657468696e670000000000000000000000000000006064820152608401610501565b60006106b86109f3565b905060006106c560025490565b90506106d13384611181565b6000816106de84866119c9565b6106e891906119e8565b600654909150610702906001600160a01b031633836112cf565b50505050565b6005546001600160a01b031633146107625760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610501565b61076c600061135f565b565b6005546001600160a01b031633146107c85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610501565b428267ffffffffffffffff1610156108485760405162461bcd60e51b815260206004820152603560248201527f4f70656e44414f5374616b696e673a205f706572696f6453746172742073686f60448201527f756c646e277420626520696e20746865207061737400000000000000000000006064820152608401610501565b60008167ffffffffffffffff16116108c85760405162461bcd60e51b815260206004820152602860248201527f4f70656e44414f5374616b696e673a20496e76616c696420726577617264732060448201527f6475726174696f6e0000000000000000000000000000000000000000000000006064820152608401610501565b6040805160608101825260075467ffffffffffffffff808216808452600160401b83049091166020840152600160801b9091046001600160801b0316928201929092529042116109a65760405162461bcd60e51b815260206004820152605260248201527f4f70656e44414f5374616b696e673a20546865206c617374207265776172642060448201527f706572696f642073686f756c642062652066696e6973686564206265666f726560648201527f2073657474696e672061206e6577206f6e650000000000000000000000000000608482015260a401610501565b60006109b28385611a22565b67ffffffffffffffff948516600160401b026fffffffffffffffff000000000000000016941693909317600755505050565b6060600480546103c590611961565b60006109fd610524565b6006546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015610a4057600080fd5b505afa158015610a54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a789190611a4e565b610a8291906119b2565b905090565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610b215760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610501565b610b2e3385858403610e60565b5060019392505050565b60008111610bae5760405162461bcd60e51b815260206004820152602f60248201527f4f70656e44414f5374616b696e673a2053686f756c64206174206c656173742060448201527f7374616b6520736f6d657468696e6700000000000000000000000000000000006064820152608401610501565b6000610bb86109f3565b90506000610bc560025490565b600654909150610be0906001600160a01b03163330866113c9565b801580610beb575081155b15610bff57610bfa3384611401565b505050565b600082610c0c83866119c9565b610c1691906119e8565b90506107023382611401565b6000610455338484610f84565b6040805160608101825260075467ffffffffffffffff808216808452600160401b83049091166020840152600160801b9091046001600160801b031692820192909252904210610ce75760405162461bcd60e51b815260206004820152602b60248201527f4f70656e44414f5374616b696e673a20416464696e672072657761726473206960448201527f7320666f7262696464656e0000000000000000000000000000000000000000006064820152608401610501565b600654610cff906001600160a01b03163330856113c9565b610d08826114e0565b81604001818151610d199190611a67565b6001600160801b0390811690915282516007805460208601516040909601518416600160801b0267ffffffffffffffff968716600160401b026fffffffffffffffffffffffffffffffff19909216969093169590951794909417909116179091555050565b6005546001600160a01b03163314610dd85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610501565b6001600160a01b038116610e545760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610501565b610e5d8161135f565b50565b6001600160a01b038316610ec25760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610501565b6001600160a01b038216610f235760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610501565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166110005760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610501565b6001600160a01b0382166110625760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610501565b6001600160a01b038316600090815260208190526040902054818110156110f15760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610501565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290611128908490611a0a565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161117491815260200190565b60405180910390a3610702565b6001600160a01b0382166111e15760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610501565b6001600160a01b038216600090815260208190526040902054818110156112555760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610501565b6001600160a01b03831660009081526020819052604081208383039055600280548492906112849084906119b2565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6040516001600160a01b038316602482015260448101829052610bfa90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611563565b600580546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526107029085906323b872dd60e01b906084016112fb565b6001600160a01b0382166114575760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610501565b80600260008282546114699190611a0a565b90915550506001600160a01b03821660009081526020819052604081208054839290611496908490611a0a565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006001600160801b0382111561155f5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610501565b5090565b60006115b8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166116489092919063ffffffff16565b805190915015610bfa57808060200190518101906115d69190611a89565b610bfa5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610501565b6060611657848460008561165f565b949350505050565b6060824710156116d75760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610501565b843b6117255760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610501565b600080866001600160a01b031685876040516117419190611aab565b60006040518083038185875af1925050503d806000811461177e576040519150601f19603f3d011682016040523d82523d6000602084013e611783565b606091505b509150915061179382828661179e565b979650505050505050565b606083156117ad57508161051d565b8251156117bd5782518084602001fd5b8160405162461bcd60e51b81526004016105019190611803565b60005b838110156117f25781810151838201526020016117da565b838111156107025750506000910152565b60208152600082518060208401526118228160408501602087016117d7565b601f01601f19169190910160400192915050565b80356001600160a01b038116811461184d57600080fd5b919050565b6000806040838503121561186557600080fd5b61186e83611836565b946020939093013593505050565b60008060006060848603121561189157600080fd5b61189a84611836565b92506118a860208501611836565b9150604084013590509250925092565b6000602082840312156118ca57600080fd5b5035919050565b6000602082840312156118e357600080fd5b61051d82611836565b803567ffffffffffffffff8116811461184d57600080fd5b6000806040838503121561191757600080fd5b611920836118ec565b915061192e602084016118ec565b90509250929050565b6000806040838503121561194a57600080fd5b61195383611836565b915061192e60208401611836565b600181811c9082168061197557607f821691505b6020821081141561199657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000828210156119c4576119c461199c565b500390565b60008160001904831182151516156119e3576119e361199c565b500290565b600082611a0557634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115611a1d57611a1d61199c565b500190565b600067ffffffffffffffff808316818516808303821115611a4557611a4561199c565b01949350505050565b600060208284031215611a6057600080fd5b5051919050565b60006001600160801b03808316818516808303821115611a4557611a4561199c565b600060208284031215611a9b57600080fd5b8151801515811461051d57600080fd5b60008251611abd8184602087016117d7565b919091019291505056fea264697066735822122011d4dad9be6de1c86f4689f1a30a43de726ee2a48ae1d240ba9e57985f879b8564736f6c634300080900330000000000000000000000003b484b82567a09e2588a13d54d032153f0c0aee00000000000000000000000000000000000000000000000000000000061d57a300000000000000000000000000000000000000000000000000000000001e13380

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101825760003560e01c806379502c55116100d8578063a457c2d71161008c578063d69a108211610066578063d69a108214610357578063dd62ed3e1461036a578063f2fde38b146103a357600080fd5b8063a457c2d71461031e578063a59f3e0c14610331578063a9059cbb1461034457600080fd5b80638da5cb5b116100bd5780638da5cb5b146102fd57806395d89b411461030e5780639b84163f1461031657600080fd5b806379502c55146102705780638a7e26dd146102d257600080fd5b8063313ce5671161013a57806370a082311161011457806370a082311461022c578063715018a614610255578063788f11bb1461025d57600080fd5b8063313ce567146101f5578063395093511461020457806367dfd4c91461021757600080fd5b806318160ddd1161016b57806318160ddd146101c857806323b872dd146101da5780632faf795e146101ed57600080fd5b806306fdde0314610187578063095ea7b3146101a5575b600080fd5b61018f6103b6565b60405161019c9190611803565b60405180910390f35b6101b86101b3366004611852565b610448565b604051901515815260200161019c565b6002545b60405190815260200161019c565b6101b86101e836600461187c565b61045e565b6101cc610524565b6040516012815260200161019c565b6101b8610212366004611852565b6105fc565b61022a6102253660046118b8565b610638565b005b6101cc61023a3660046118d1565b6001600160a01b031660009081526020819052604090205490565b61022a610708565b61022a61026b366004611904565b61076e565b6007546102a29067ffffffffffffffff80821691600160401b810490911690600160801b90046001600160801b031683565b6040805167ffffffffffffffff94851681529390921660208401526001600160801b03169082015260600161019c565b6006546102e5906001600160a01b031681565b6040516001600160a01b03909116815260200161019c565b6005546001600160a01b03166102e5565b61018f6109e4565b6101cc6109f3565b6101b861032c366004611852565b610a87565b61022a61033f3660046118b8565b610b38565b6101b8610352366004611852565b610c22565b61022a6103653660046118b8565b610c2f565b6101cc610378366004611937565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61022a6103b13660046118d1565b610d7e565b6060600380546103c590611961565b80601f01602080910402602001604051908101604052809291908181526020018280546103f190611961565b801561043e5780601f106104135761010080835404028352916020019161043e565b820191906000526020600020905b81548152906001019060200180831161042157829003601f168201915b5050505050905090565b6000610455338484610e60565b50600192915050565b600061046b848484610f84565b6001600160a01b03841660009081526001602090815260408083203384529091529020548281101561050a5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6105178533858403610e60565b60019150505b9392505050565b6040805160608101825260075467ffffffffffffffff808216808452600160401b830490911660208401819052600160801b9092046001600160801b03169383019390935260009242918491829161057b916119b2565b9050836020015167ffffffffffffffff16831161059a578091506105cf565b835167ffffffffffffffff1683106105b557600091506105cf565b83516105cc90849067ffffffffffffffff166119b2565b91505b8084604001516001600160801b0316836105e991906119c9565b6105f391906119e8565b94505050505090565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610455918590610633908690611a0a565b610e60565b600081116106ae5760405162461bcd60e51b815260206004820152603160248201527f4f70656e44414f5374616b696e673a2053686f756c64206174206c656173742060448201527f756e7374616b6520736f6d657468696e670000000000000000000000000000006064820152608401610501565b60006106b86109f3565b905060006106c560025490565b90506106d13384611181565b6000816106de84866119c9565b6106e891906119e8565b600654909150610702906001600160a01b031633836112cf565b50505050565b6005546001600160a01b031633146107625760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610501565b61076c600061135f565b565b6005546001600160a01b031633146107c85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610501565b428267ffffffffffffffff1610156108485760405162461bcd60e51b815260206004820152603560248201527f4f70656e44414f5374616b696e673a205f706572696f6453746172742073686f60448201527f756c646e277420626520696e20746865207061737400000000000000000000006064820152608401610501565b60008167ffffffffffffffff16116108c85760405162461bcd60e51b815260206004820152602860248201527f4f70656e44414f5374616b696e673a20496e76616c696420726577617264732060448201527f6475726174696f6e0000000000000000000000000000000000000000000000006064820152608401610501565b6040805160608101825260075467ffffffffffffffff808216808452600160401b83049091166020840152600160801b9091046001600160801b0316928201929092529042116109a65760405162461bcd60e51b815260206004820152605260248201527f4f70656e44414f5374616b696e673a20546865206c617374207265776172642060448201527f706572696f642073686f756c642062652066696e6973686564206265666f726560648201527f2073657474696e672061206e6577206f6e650000000000000000000000000000608482015260a401610501565b60006109b28385611a22565b67ffffffffffffffff948516600160401b026fffffffffffffffff000000000000000016941693909317600755505050565b6060600480546103c590611961565b60006109fd610524565b6006546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015610a4057600080fd5b505afa158015610a54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a789190611a4e565b610a8291906119b2565b905090565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610b215760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610501565b610b2e3385858403610e60565b5060019392505050565b60008111610bae5760405162461bcd60e51b815260206004820152602f60248201527f4f70656e44414f5374616b696e673a2053686f756c64206174206c656173742060448201527f7374616b6520736f6d657468696e6700000000000000000000000000000000006064820152608401610501565b6000610bb86109f3565b90506000610bc560025490565b600654909150610be0906001600160a01b03163330866113c9565b801580610beb575081155b15610bff57610bfa3384611401565b505050565b600082610c0c83866119c9565b610c1691906119e8565b90506107023382611401565b6000610455338484610f84565b6040805160608101825260075467ffffffffffffffff808216808452600160401b83049091166020840152600160801b9091046001600160801b031692820192909252904210610ce75760405162461bcd60e51b815260206004820152602b60248201527f4f70656e44414f5374616b696e673a20416464696e672072657761726473206960448201527f7320666f7262696464656e0000000000000000000000000000000000000000006064820152608401610501565b600654610cff906001600160a01b03163330856113c9565b610d08826114e0565b81604001818151610d199190611a67565b6001600160801b0390811690915282516007805460208601516040909601518416600160801b0267ffffffffffffffff968716600160401b026fffffffffffffffffffffffffffffffff19909216969093169590951794909417909116179091555050565b6005546001600160a01b03163314610dd85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610501565b6001600160a01b038116610e545760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610501565b610e5d8161135f565b50565b6001600160a01b038316610ec25760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610501565b6001600160a01b038216610f235760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610501565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166110005760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610501565b6001600160a01b0382166110625760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610501565b6001600160a01b038316600090815260208190526040902054818110156110f15760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610501565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290611128908490611a0a565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161117491815260200190565b60405180910390a3610702565b6001600160a01b0382166111e15760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610501565b6001600160a01b038216600090815260208190526040902054818110156112555760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610501565b6001600160a01b03831660009081526020819052604081208383039055600280548492906112849084906119b2565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6040516001600160a01b038316602482015260448101829052610bfa90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611563565b600580546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526107029085906323b872dd60e01b906084016112fb565b6001600160a01b0382166114575760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610501565b80600260008282546114699190611a0a565b90915550506001600160a01b03821660009081526020819052604081208054839290611496908490611a0a565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006001600160801b0382111561155f5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610501565b5090565b60006115b8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166116489092919063ffffffff16565b805190915015610bfa57808060200190518101906115d69190611a89565b610bfa5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610501565b6060611657848460008561165f565b949350505050565b6060824710156116d75760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610501565b843b6117255760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610501565b600080866001600160a01b031685876040516117419190611aab565b60006040518083038185875af1925050503d806000811461177e576040519150601f19603f3d011682016040523d82523d6000602084013e611783565b606091505b509150915061179382828661179e565b979650505050505050565b606083156117ad57508161051d565b8251156117bd5782518084602001fd5b8160405162461bcd60e51b81526004016105019190611803565b60005b838110156117f25781810151838201526020016117da565b838111156107025750506000910152565b60208152600082518060208401526118228160408501602087016117d7565b601f01601f19169190910160400192915050565b80356001600160a01b038116811461184d57600080fd5b919050565b6000806040838503121561186557600080fd5b61186e83611836565b946020939093013593505050565b60008060006060848603121561189157600080fd5b61189a84611836565b92506118a860208501611836565b9150604084013590509250925092565b6000602082840312156118ca57600080fd5b5035919050565b6000602082840312156118e357600080fd5b61051d82611836565b803567ffffffffffffffff8116811461184d57600080fd5b6000806040838503121561191757600080fd5b611920836118ec565b915061192e602084016118ec565b90509250929050565b6000806040838503121561194a57600080fd5b61195383611836565b915061192e60208401611836565b600181811c9082168061197557607f821691505b6020821081141561199657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000828210156119c4576119c461199c565b500390565b60008160001904831182151516156119e3576119e361199c565b500290565b600082611a0557634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115611a1d57611a1d61199c565b500190565b600067ffffffffffffffff808316818516808303821115611a4557611a4561199c565b01949350505050565b600060208284031215611a6057600080fd5b5051919050565b60006001600160801b03808316818516808303821115611a4557611a4561199c565b600060208284031215611a9b57600080fd5b8151801515811461051d57600080fd5b60008251611abd8184602087016117d7565b919091019291505056fea264697066735822122011d4dad9be6de1c86f4689f1a30a43de726ee2a48ae1d240ba9e57985f879b8564736f6c63430008090033

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

0000000000000000000000003b484b82567a09e2588a13d54d032153f0c0aee00000000000000000000000000000000000000000000000000000000061d57a300000000000000000000000000000000000000000000000000000000001e13380

-----Decoded View---------------
Arg [0] : _sos (address): 0x3b484b82567a09e2588A13D54D032153f0c0aEe0
Arg [1] : _periodStart (uint64): 1641380400
Arg [2] : _rewardsDuration (uint64): 31536000

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000003b484b82567a09e2588a13d54d032153f0c0aee0
Arg [1] : 0000000000000000000000000000000000000000000000000000000061d57a30
Arg [2] : 0000000000000000000000000000000000000000000000000000000001e13380


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.