Contract Address Details

0x9390732A73B8A2901d99b664db0edf3805897A36

Token
Solar Token (SLT)
Creator
0xce104c–7d2de2 at 0x24d939–c27765
Balance
0 EWT ( )
Tokens
Fetching tokens...
Transactions
17 Transactions
Transfers
0 Transfers
Gas Used
1,264,503
Last Balance Update
33608434
Contract name:
Staking




Optimization enabled
true
Compiler version
v0.8.12+commit.f00d7308




Optimization runs
200
EVM Version
default




Verified at
2022-04-13T15:38:06.635626Z

Constructor Arguments

00000000000000000000000023b026631a6f265d17cfee8aa6ced1b244f3920c000000000000000000000000ce104cadbbf6e5db3779f5e0921753ff1e7d2de27309fb6c9050c8da31473134bb210fe29586cbd6fe98004193a8b25d6689e29eac3d6e1fcd0ee5dd4a0a7c2405310bb9588579aeef902b5a4d070137d05033c400000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000b536f6c617220546f6b656e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003534c540000000000000000000000000000000000000000000000000000000000

Arg [0] (address) : 0x23b026631a6f265d17cfee8aa6ced1b244f3920c
Arg [1] (address) : 0xce104cadbbf6e5db3779f5e0921753ff1e7d2de2
Arg [2] (bytes32) : 7309fb6c9050c8da31473134bb210fe29586cbd6fe98004193a8b25d6689e29e
Arg [3] (bytes32) : ac3d6e1fcd0ee5dd4a0a7c2405310bb9588579aeef902b5a4d070137d05033c4
Arg [4] (string) : Solar Token
Arg [5] (string) : SLT

              

Contract source code

// File: @openzeppelin/contracts/utils/Context.sol


// 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: @openzeppelin/contracts/token/ERC20/IERC20.sol


// 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: @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol


// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;


/**
 * @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: @openzeppelin/contracts/token/ERC20/ERC20.sol


// OpenZeppelin Contracts v4.4.1 (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;




/**
 * @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: @openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol


// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Burnable.sol)

pragma solidity ^0.8.0;



/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20Burnable is Context, ERC20 {
    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        uint256 currentAllowance = allowance(account, _msgSender());
        require(currentAllowance >= amount, "ERC20: burn amount exceeds allowance");
        unchecked {
            _approve(account, _msgSender(), currentAllowance - amount);
        }
        _burn(account, amount);
    }
}

// File: contracts/interfaces/IClaimManager.sol


pragma solidity ^0.8.12;

interface IClaimManager {
	function hasRole(
		address subject,
		bytes32 role,
		uint256 version
	) external view returns (bool);
}
// File: contracts/Staking.sol



pragma solidity ^0.8.12;



contract Staking is ERC20Burnable {
    bool public sweeped;
    bool public aborted;
    address public owner;
    uint256 public hardCap;
    uint256 public endDate;
    uint256 public signupEnd;
    uint256 public startDate;
    bytes32 public patronRole;
    uint256 public signupStart;
    uint256 public totalStaked;
    bytes32 public serviceRole;
    uint256 public totalRewards;
    uint256 public fullStopDate;
    bool private contractFunded;
    bool private isContractPaused;
    address private rewardProvider;
    uint256 public contributionLimit;
    uint256 public allRedeemedRewards;
    bool private isContractInitialized;
    address public claimManagerAddress;
    uint256 public minRequiredStake;

    mapping(address => uint256) private stakes;
    
    event CampaignAborted(uint256 _timestamp);
    event StatusChanged(string statusType, uint256 date);
    event NewStake(address indexed _user, uint256 indexed _amout, uint256 _timestamp);
    event RewardSent(address provider, uint256 amount, uint256 time);
    event Withdrawn(address indexed _user, uint256 indexed _amout, uint256 _timestamp);
    event TokenBurnt(address _user, uint256 _amout, uint256 _timestamp);
    event RefundExceeded(address _sender, uint256 amount, uint256 refunded);
    event StakingPoolInitialized(uint256 initDate, uint256 _startDate, uint256 _endDate);
    event Swept(uint256 _amount, uint256 _date);

    modifier initialized(){
        require(isContractInitialized, "Not initialized");
        _;
    }

    modifier activated(){
        require(block.timestamp >= startDate && block.timestamp < endDate, "Contract not activated");
        _;
    }
   
    constructor(
        address _claimManager,
        address _rewardProvider,
        bytes32 _serviceRole,
        bytes32 _patronRole,
        string memory tokenName,
        string memory tokenSymbol
    ) ERC20(tokenName, tokenSymbol) {
        owner = msg.sender;
        claimManagerAddress = _claimManager;
        serviceRole = _serviceRole;
        patronRole = _patronRole;
        rewardProvider = _rewardProvider;
    }

    modifier onlyOwner() {
        require(msg.sender == owner, "Must be the admin");
        _;
    }

     modifier paused(){
        require(isContractPaused, "Contract not Paused");
        _;
    }

    modifier notPaused(){
        require(!isContractPaused, "Contract is frozen");
        _;
    }

    modifier belowLimit(){
        require(msg.value > 0, "No EWT provided");
        require(block.timestamp < signupEnd, "Signup Ended");
        require(totalStaked < hardCap, "Hardcap Exceeded");
        require(stakes[msg.sender] < contributionLimit, "Contribution limit reached"); //prevent reentrency
        _;
    }

    modifier sufficientBalance(uint256 amountToWithdraw){
        require(amountToWithdraw > 0, "error: withdraw 0 EWT");
        require(balanceOf(msg.sender) != 0, "No deposit at stake");
        require(balanceOf(msg.sender) >= amountToWithdraw, "Not enough EWT at stake");
        _;
    }

    modifier withdrawsAllowed(){
        require(aborted || block.timestamp < startDate || (block.timestamp >= endDate && block.timestamp < fullStopDate), "Withdraws not allowed");
        require(hasRole(msg.sender, patronRole), "No patron role");
        _;
    }

    modifier notAborted(){
        require(!aborted, "Campaign aborted");
        _;
    }

    modifier notfunded(){
        require(contractFunded == false, "Already funded");
        _;
    }

    modifier minStaked() {
        require(msg.value >= minRequiredStake, "Value to low");
        _;
    }

    modifier sufficientReward(){
        uint256 TWELVE_PERCENT = totalStaked * (12 * 1e3 / 100);
        require(msg.value >= TWELVE_PERCENT / 1e3, "Not Enough rewards");
        _;
    }

    function depositRewards() external payable sufficientReward notAborted activated notfunded {
        require(msg.value > 0, "No rewards provided");
        require(hasRole(msg.sender, serviceRole) || (msg.sender == rewardProvider), "Not enrolled as service provider");
        totalRewards += msg.value;
        contractFunded = true;
        emit RewardSent(msg.sender, msg.value, block.timestamp);
    }

    function burn(uint256 _amount) public override {
        redeem(_amount);
    }

    function burnFrom(address account, uint256 amount) public pure override {
        revert("burnFrom Not Allowed");
    }

    //Overriding ERC20 transfer function
    function transfer(address _recipient, uint256 _amount) public override returns (bool) {
        //we need to keep track of this to avoid negative values on redeem call
        stakes[_recipient] += _amount;
        unchecked {
            stakes[_msgSender()] -= _amount;
        }
        _transfer(_msgSender(), _recipient, _amount);
        return true;
    }

    function transferFrom(address _sender, address _recipient, uint256 _amount) public override returns (bool) {
        //we need to keep track of this to avoid negative values on redeem call
        ERC20.transferFrom(_sender, _recipient, _amount);
        stakes[_recipient] += _amount;
        unchecked {
            stakes[_sender] -= _amount;
        }
        return true;
    }

    function init(
        uint256 _signupStart,
        uint256 _signupEnd,
        uint256 _startDate,
        uint256 _endDate,
        uint256 _fullStopDate,
        uint256 _hardCap,
        uint256 _contributionLimit,
        uint256 _minRequiredStake
    ) external onlyOwner {
        require(!isContractInitialized, "Already initialized");//Preventing resetting by owner
        require(_contributionLimit > 0, "wrong contribution limit");
        require(_hardCap >= _contributionLimit, "Hardcap Exceeded");
        require(_signupStart < _signupEnd, "Wrong signup config");
        require(_startDate > _signupEnd, "Start febore signup period");
        require(_fullStopDate > _endDate, "FullStop before endDate");
		endDate = _endDate;
        hardCap = _hardCap;
		startDate = _startDate;
        signupEnd = _signupEnd;
        signupStart = _signupStart;
        isContractInitialized = true;
        contributionLimit = _contributionLimit;
        minRequiredStake = _minRequiredStake;
        fullStopDate = _fullStopDate;
		emit StakingPoolInitialized(block.timestamp, _startDate, _endDate);
    }

    function pause() external onlyOwner notPaused {
        isContractPaused = true;
        emit StatusChanged("contractPaused", block.timestamp);
    }

     function unPause() public onlyOwner paused {
        isContractPaused = false;
        emit StatusChanged("contractUnpaused", block.timestamp);
    }

    function deleteParameters() internal {
		delete hardCap;
        delete signupEnd;
        delete totalRewards;
        delete isContractPaused;
		delete contributionLimit;
    }

    function terminate() external onlyOwner {
        require(aborted == false, "Already terminated");
        require(block.timestamp < endDate, "Error: canceling after campaign");
		uint256 payout = totalRewards;
        aborted = true;
        deleteParameters();
        if (payout != 0){
		    payable(rewardProvider).transfer(payout);
        }
        emit StatusChanged("campaignAborted", block.timestamp);
        emit CampaignAborted(block.timestamp);
    }

    function sweep() external {
        require(hasRole(msg.sender, serviceRole) || (msg.sender == rewardProvider), "Not allowed to sweep");
        require(!sweeped, "Already sweeped");
		require(block.timestamp >= fullStopDate, "Cannot sweep before expiry");
        uint256 remainingRewards = totalRewards - allRedeemedRewards;
        uint256 remainingFunds = totalStaked;

		sweeped = true;
        deleteParameters();
        delete totalStaked;
		payable(rewardProvider).transfer(remainingRewards + remainingFunds);
        emit Swept(remainingRewards, block.timestamp);
    }

    function getContractStatus() external view returns(bool _isContractInitialized, bool _isContractPaused, bool _isContractAborted){
        _isContractInitialized = isContractInitialized;
        _isContractPaused = isContractPaused;
        _isContractAborted = aborted;
    }

    function refund(uint256 _amount) internal {
        payable(msg.sender).transfer(_amount);
    }

     function stake() external payable notAborted initialized belowLimit notPaused minStaked {
        require(hasRole(msg.sender, patronRole), "No patron role");

        if ((stakes[msg.sender] + msg.value > contributionLimit)){

            uint256 overFlow_limit = msg.value + stakes[msg.sender] - contributionLimit;
            //Check if we overflow from hardCap
            if ((totalStaked + contributionLimit - stakes[msg.sender]) > hardCap){
                uint256 overFlow_hardCap = contributionLimit + totalStaked - stakes[msg.sender] - hardCap;
                
                _mint(msg.sender, hardCap - totalStaked);
                emit NewStake(msg.sender, hardCap - totalStaked, block.timestamp);
                emit RefundExceeded((msg.sender), msg.value, overFlow_limit + overFlow_hardCap);
                uint256 payout = msg.value + totalStaked - hardCap;
                stakes[msg.sender] += hardCap - totalStaked;
                totalStaked += hardCap - totalStaked;
                refund(payout);
            } else {
                _mint(msg.sender, contributionLimit - stakes[msg.sender]);
                emit NewStake(msg.sender, contributionLimit - stakes[msg.sender], block.timestamp);
                emit RefundExceeded((msg.sender), msg.value, overFlow_limit);
                totalStaked += contributionLimit - stakes[msg.sender];
                stakes[msg.sender] += contributionLimit - stakes[msg.sender];
                refund(overFlow_limit);
            }
        } else { 
            if (totalStaked + msg.value > hardCap){

                stakes[msg.sender] += hardCap - totalStaked;
                _mint(msg.sender, hardCap - totalStaked);
                emit NewStake(msg.sender, hardCap - totalStaked, block.timestamp);
                emit RefundExceeded((msg.sender), msg.value, msg.value - (hardCap - totalStaked));
                totalStaked += hardCap - totalStaked;
                refund(msg.value - (hardCap - totalStaked));
            } else {   
                stakes[msg.sender] += msg.value;
                emit NewStake(msg.sender, msg.value, block.timestamp);
                _mint(msg.sender, msg.value);
                totalStaked += msg.value;
            }
        }
    }

    function getDeposit() external view returns(uint256) {
        return stakes[msg.sender];
    }

    function redeemAll() external notPaused {
        redeem(balanceOf(msg.sender));
    }
    
    function redeem(uint256 _amount) public notPaused withdrawsAllowed sufficientBalance(_amount) {
        (uint256 toWithdraw, uint256 bonus) = _getRewards(_amount);
        allRedeemedRewards += bonus;

        _burn(_msgSender(), _amount);
        totalStaked -= _amount;
        stakes[msg.sender] -= _amount;
        payable(msg.sender).transfer(toWithdraw);
        emit Withdrawn(msg.sender, toWithdraw, block.timestamp);
        emit TokenBurnt(msg.sender, _amount, block.timestamp);
    }

    function hasRole(address _provider, bytes32 _role) public view returns (bool){
		IClaimManager claimManager = IClaimManager(claimManagerAddress); // Contract deployed and maintained by EnergyWeb Fondation
        return (claimManager.hasRole(_provider, _role, 1));
    }

    function _getRewards(uint256 _amount) internal view returns(uint256, uint256){

        // Preventing funds loss if redemption occurs before the campaign start (we don't have to pay 10% before the end of the campaign)
        if (!aborted && totalRewards != 0 && _amount != 0){ 
            
            /* Bonus calculation
            *   Bonus = (_amount * 1e2) / 1e3 --> Bonus = _amount / 10
            *  returns (reward, bonus)
            */
            return (_amount + _amount / 10, _amount / 10);
        }
        return (_amount, 0);
    }

    function getRewards() external view returns (uint256){
        (uint256 rewards, ) = _getRewards(balanceOf(msg.sender));
        return rewards;
    }
}
        

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_claimManager","internalType":"address"},{"type":"address","name":"_rewardProvider","internalType":"address"},{"type":"bytes32","name":"_serviceRole","internalType":"bytes32"},{"type":"bytes32","name":"_patronRole","internalType":"bytes32"},{"type":"string","name":"tokenName","internalType":"string"},{"type":"string","name":"tokenSymbol","internalType":"string"}]},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"spender","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"CampaignAborted","inputs":[{"type":"uint256","name":"_timestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"NewStake","inputs":[{"type":"address","name":"_user","internalType":"address","indexed":true},{"type":"uint256","name":"_amout","internalType":"uint256","indexed":true},{"type":"uint256","name":"_timestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"RefundExceeded","inputs":[{"type":"address","name":"_sender","internalType":"address","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false},{"type":"uint256","name":"refunded","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"RewardSent","inputs":[{"type":"address","name":"provider","internalType":"address","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false},{"type":"uint256","name":"time","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"StakingPoolInitialized","inputs":[{"type":"uint256","name":"initDate","internalType":"uint256","indexed":false},{"type":"uint256","name":"_startDate","internalType":"uint256","indexed":false},{"type":"uint256","name":"_endDate","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"StatusChanged","inputs":[{"type":"string","name":"statusType","internalType":"string","indexed":false},{"type":"uint256","name":"date","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Swept","inputs":[{"type":"uint256","name":"_amount","internalType":"uint256","indexed":false},{"type":"uint256","name":"_date","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TokenBurnt","inputs":[{"type":"address","name":"_user","internalType":"address","indexed":false},{"type":"uint256","name":"_amout","internalType":"uint256","indexed":false},{"type":"uint256","name":"_timestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Withdrawn","inputs":[{"type":"address","name":"_user","internalType":"address","indexed":true},{"type":"uint256","name":"_amout","internalType":"uint256","indexed":true},{"type":"uint256","name":"_timestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"aborted","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"allRedeemedRewards","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"allowance","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"spender","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"approve","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"burn","inputs":[{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"pure","outputs":[],"name":"burnFrom","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"claimManagerAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"contributionLimit","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"decimals","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"decreaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"subtractedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"depositRewards","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"endDate","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"fullStopDate","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"_isContractInitialized","internalType":"bool"},{"type":"bool","name":"_isContractPaused","internalType":"bool"},{"type":"bool","name":"_isContractAborted","internalType":"bool"}],"name":"getContractStatus","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getDeposit","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getRewards","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"hardCap","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"hasRole","inputs":[{"type":"address","name":"_provider","internalType":"address"},{"type":"bytes32","name":"_role","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"increaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"addedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"init","inputs":[{"type":"uint256","name":"_signupStart","internalType":"uint256"},{"type":"uint256","name":"_signupEnd","internalType":"uint256"},{"type":"uint256","name":"_startDate","internalType":"uint256"},{"type":"uint256","name":"_endDate","internalType":"uint256"},{"type":"uint256","name":"_fullStopDate","internalType":"uint256"},{"type":"uint256","name":"_hardCap","internalType":"uint256"},{"type":"uint256","name":"_contributionLimit","internalType":"uint256"},{"type":"uint256","name":"_minRequiredStake","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"minRequiredStake","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"patronRole","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"pause","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"redeem","inputs":[{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"redeemAll","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"serviceRole","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"signupEnd","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"signupStart","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"stake","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"startDate","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"sweep","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"sweeped","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"terminate","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalRewards","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalStaked","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transfer","inputs":[{"type":"address","name":"_recipient","internalType":"address"},{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transferFrom","inputs":[{"type":"address","name":"_sender","internalType":"address"},{"type":"address","name":"_recipient","internalType":"address"},{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unPause","inputs":[]}]
            

Deployed ByteCode

0x60806040526004361061025b5760003560e01c806379cc679011610144578063c032846b116100b6578063db006a751161007a578063db006a751461069b578063dd2f35e9146106bb578063dd62ed3e146106d1578063eb01393314610717578063f7b188a514610731578063fb86a4041461074657600080fd5b8063c032846b146105e4578063c11aae8c1461062d578063c24a0f8b1461064d578063c399ec8814610663578063ce45ed261461068557600080fd5b80638da5cb5b116101085780638da5cb5b1461053357806395d89b4114610559578063a457c2d71461056e578063a9059cbb1461058e578063ac4ab3fb146105ae578063af63dda4146105ce57600080fd5b806379cc6790146104b35780637c0e77ac146104d357806380b62b70146104e9578063817b1cd2146105085780638456cb591461051e57600080fd5b806323b872dd116101dd57806339509351116101a157806339509351146104095780633a4b66f11461042957806342966c68146104315780634a3642a51461045157806370a08231146104675780637332e0771461049d57600080fd5b806323b872dd1461038d5780632f4350c2146103ad578063313ce567146103c257806335faa416146103de578063386db479146103f357600080fd5b80630c08bf88116102245780630c08bf881461032d5780630e15561a14610344578063152111f71461035a57806318160ddd146103625780631aeae7ba1461037757600080fd5b806216ee16146102605780630572b0cc146102a257806306fdde03146102c5578063095ea7b3146102e75780630b97bc8614610317575b600080fd5b34801561026c57600080fd5b506013546102859061010090046001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156102ae57600080fd5b506102b761075c565b604051908152602001610299565b3480156102d157600080fd5b506102da61077e565b6040516102999190612531565b3480156102f357600080fd5b506103076103023660046125a2565b610810565b6040519015158152602001610299565b34801561032357600080fd5b506102b760095481565b34801561033957600080fd5b50610342610826565b005b34801561035057600080fd5b506102b7600e5481565b610342610a08565b34801561036e57600080fd5b506002546102b7565b34801561038357600080fd5b506102b7600d5481565b34801561039957600080fd5b506103076103a83660046125cc565b610c63565b3480156103b957600080fd5b50610342610cc7565b3480156103ce57600080fd5b5060405160128152602001610299565b3480156103ea57600080fd5b50610342610d0a565b3480156103ff57600080fd5b506102b760125481565b34801561041557600080fd5b506103076104243660046125a2565b610edd565b610342610f19565b34801561043d57600080fd5b5061034261044c366004612608565b611616565b34801561045d57600080fd5b506102b760085481565b34801561047357600080fd5b506102b7610482366004612621565b6001600160a01b031660009081526020819052604090205490565b3480156104a957600080fd5b506102b760115481565b3480156104bf57600080fd5b506103426104ce3660046125a2565b61161f565b3480156104df57600080fd5b506102b760145481565b3480156104f557600080fd5b5060055461030790610100900460ff1681565b34801561051457600080fd5b506102b7600c5481565b34801561052a57600080fd5b5061034261165e565b34801561053f57600080fd5b50600554610285906201000090046001600160a01b031681565b34801561056557600080fd5b506102da611722565b34801561057a57600080fd5b506103076105893660046125a2565b611731565b34801561059a57600080fd5b506103076105a93660046125a2565b6117ca565b3480156105ba57600080fd5b506103076105c93660046125a2565b61181a565b3480156105da57600080fd5b506102b7600b5481565b3480156105f057600080fd5b5060135460105460055460ff9283169261010092839004811692909104166040805193151584529115156020840152151590820152606001610299565b34801561063957600080fd5b50610342610648366004612643565b6118a0565b34801561065957600080fd5b506102b760075481565b34801561066f57600080fd5b50336000908152601560205260409020546102b7565b34801561069157600080fd5b506102b7600f5481565b3480156106a757600080fd5b506103426106b6366004612608565b611b0f565b3480156106c757600080fd5b506102b7600a5481565b3480156106dd57600080fd5b506102b76106ec366004612698565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b34801561072357600080fd5b506005546103079060ff1681565b34801561073d57600080fd5b50610342611e01565b34801561075257600080fd5b506102b760065481565b33600090815260208190526040812054819061077790611ee0565b5092915050565b60606003805461078d906126cb565b80601f01602080910402602001604051908101604052809291908181526020018280546107b9906126cb565b80156108065780601f106107db57610100808354040283529160200191610806565b820191906000526020600020905b8154815290600101906020018083116107e957829003601f168201915b5050505050905090565b600061081d338484611f40565b50600192915050565b6005546201000090046001600160a01b0316331461085f5760405162461bcd60e51b815260040161085690612706565b60405180910390fd5b600554610100900460ff16156108ac5760405162461bcd60e51b8152602060048201526012602482015271105b1c9958591e481d195c9b5a5b985d195960721b6044820152606401610856565b60075442106108fd5760405162461bcd60e51b815260206004820152601f60248201527f4572726f723a2063616e63656c696e672061667465722063616d706169676e006044820152606401610856565b600e546005805461ff001916610100179055610933600060068190556008819055600e8190556010805461ff0019169055601155565b801561097a57601054604051620100009091046001600160a01b0316906108fc8315029083906000818181858888f19350505050158015610978573d6000803e3d6000fd5b505b60408051818152600f818301526e18d85b5c185a59db90589bdc9d1959608a1b606082015242602082015290517f5921431fa16f8be49d0a0175ba96d394094d37c61ef3ecd3985329c254cd108a9181900360800190a16040514281527f396ef65364c652a5186a005bb7dcf6aac4d2adcb6c6d0adf39a5f13104a2e344906020015b60405180910390a150565b6000600c546078610a199190612747565b9050610a276103e882612766565b341015610a6b5760405162461bcd60e51b81526020600482015260126024820152714e6f7420456e6f756768207265776172647360701b6044820152606401610856565b600554610100900460ff1615610ab65760405162461bcd60e51b815260206004820152601060248201526f10d85b5c185a59db8818589bdc9d195960821b6044820152606401610856565b6009544210158015610ac9575060075442105b610b0e5760405162461bcd60e51b815260206004820152601660248201527510dbdb9d1c9858dd081b9bdd081858dd1a5d985d195960521b6044820152606401610856565b60105460ff1615610b525760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e48199d5b99195960921b6044820152606401610856565b60003411610b985760405162461bcd60e51b8152602060048201526013602482015272139bc81c995dd85c991cc81c1c9bdd9a591959606a1b6044820152606401610856565b610ba433600d5461181a565b80610bbf57506010546201000090046001600160a01b031633145b610c0b5760405162461bcd60e51b815260206004820181905260248201527f4e6f7420656e726f6c6c656420617320736572766963652070726f76696465726044820152606401610856565b34600e6000828254610c1d9190612788565b90915550506010805460ff191660011790556040517f6379339f0ae63e95e65fad18ca2a7ec4e7e3f05f3cc5f7079f4d8da8cec34faa906109fd903390349042906127a0565b6000610c70848484612065565b506001600160a01b03831660009081526015602052604081208054849290610c99908490612788565b9091555050506001600160a01b03831660009081526015602052604090208054829003905560019392505050565b601054610100900460ff1615610cef5760405162461bcd60e51b8152600401610856906127c1565b33600090815260208190526040902054610d0890611b0f565b565b610d1633600d5461181a565b80610d3157506010546201000090046001600160a01b031633145b610d745760405162461bcd60e51b815260206004820152601460248201527304e6f7420616c6c6f77656420746f2073776565760641b6044820152606401610856565b60055460ff1615610db95760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e481cddd9595c1959608a1b6044820152606401610856565b600f54421015610e0b5760405162461bcd60e51b815260206004820152601a60248201527f43616e6e6f74207377656570206265666f7265206578706972790000000000006044820152606401610856565b6000601254600e54610e1d91906127ed565b600c546005805460ff19166001179055909150610e54600060068190556008819055600e8190556010805461ff0019169055601155565b6000600c556010546201000090046001600160a01b03166108fc610e788385612788565b6040518115909202916000818181858888f19350505050158015610ea0573d6000803e3d6000fd5b50604080518381524260208201527f8ca6abf6b1c0bd37b098133cb9c8a94eb36b3f0f859bbca87c56b032880f5b35910160405180910390a15050565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161081d918590610f14908690612788565b611f40565b600554610100900460ff1615610f645760405162461bcd60e51b815260206004820152601060248201526f10d85b5c185a59db8818589bdc9d195960821b6044820152606401610856565b60135460ff16610fa85760405162461bcd60e51b815260206004820152600f60248201526e139bdd081a5b9a5d1a585b1a5e9959608a1b6044820152606401610856565b60003411610fea5760405162461bcd60e51b815260206004820152600f60248201526e139bc81155d5081c1c9bdd9a591959608a1b6044820152606401610856565b600854421061102a5760405162461bcd60e51b815260206004820152600c60248201526b14da59db9d5c08115b99195960a21b6044820152606401610856565b600654600c54106110705760405162461bcd60e51b815260206004820152601060248201526f12185c9918d85c08115e18d95959195960821b6044820152606401610856565b60115433600090815260156020526040902054106110d05760405162461bcd60e51b815260206004820152601a60248201527f436f6e747269627574696f6e206c696d697420726561636865640000000000006044820152606401610856565b601054610100900460ff16156110f85760405162461bcd60e51b8152600401610856906127c1565b6014543410156111395760405162461bcd60e51b815260206004820152600c60248201526b56616c756520746f206c6f7760a01b6044820152606401610856565b61114533600a5461181a565b6111825760405162461bcd60e51b815260206004820152600e60248201526d4e6f20706174726f6e20726f6c6560901b6044820152606401610856565b601154336000908152601560205260409020546111a0903490612788565b111561147a57601154336000908152601560205260408120549091906111c69034612788565b6111d091906127ed565b60065433600090815260156020526040902054601154600c54939450919290916111f991612788565b61120391906127ed565b111561135d5760065433600090815260156020526040812054600c5460115492939261122f9190612788565b61123991906127ed565b61124391906127ed565b905061125e33600c5460065461125991906127ed565b61210f565b600c5460065461126e91906127ed565b60405142815233906000805160206128278339815191529060200160405180910390a37fef3402545c3e64e30583a48b60392700e20c20e1e2406dce9d340c9b54c476fc33346112be8486612788565b6040516112cd939291906127a0565b60405180910390a16000600654600c54346112e89190612788565b6112f291906127ed565b9050600c5460065461130491906127ed565b3360009081526015602052604081208054909190611323908490612788565b9091555050600c5460065461133891906127ed565b600c60008282546113499190612788565b909155506113589050816121ef565b505050565b3360008181526015602052604090205460115461137e9291611259916127ed565b3360009081526015602052604090205460115461139b91906127ed565b60405142815233906000805160206128278339815191529060200160405180910390a37fef3402545c3e64e30583a48b60392700e20c20e1e2406dce9d340c9b54c476fc3334836040516113f1939291906127a0565b60405180910390a13360009081526015602052604090205460115461141691906127ed565b600c60008282546114279190612788565b90915550503360009081526015602052604090205460115461144991906127ed565b3360009081526015602052604081208054909190611468908490612788565b909155506114779050816121ef565b50565b60065434600c5461148b9190612788565b11156115aa57600c546006546114a191906127ed565b33600090815260156020526040812080549091906114c0908490612788565b925050819055506114db33600c5460065461125991906127ed565b600c546006546114eb91906127ed565b60405142815233906000805160206128278339815191529060200160405180910390a37fef3402545c3e64e30583a48b60392700e20c20e1e2406dce9d340c9b54c476fc3334600c5460065461154191906127ed565b61154b90346127ed565b60405161155a939291906127a0565b60405180910390a1600c5460065461157291906127ed565b600c60008282546115839190612788565b9091555050600c54600654610d089161159b916127ed565b6115a590346127ed565b6121ef565b33600090815260156020526040812080543492906115c9908490612788565b9091555050604051428152349033906000805160206128278339815191529060200160405180910390a36115fd333461210f565b34600c600082825461160f9190612788565b9091555050565b61147781611b0f565b60405162461bcd60e51b8152602060048201526014602482015273189d5c9b919c9bdb48139bdd08105b1b1bddd95960621b6044820152606401610856565b6005546201000090046001600160a01b0316331461168e5760405162461bcd60e51b815260040161085690612706565b601054610100900460ff16156116b65760405162461bcd60e51b8152600401610856906127c1565b6010805461ff00191661010017905560408051818152600e918101919091526d18dbdb9d1c9858dd14185d5cd95960921b60608201524260208201527f5921431fa16f8be49d0a0175ba96d394094d37c61ef3ecd3985329c254cd108a906080015b60405180910390a1565b60606004805461078d906126cb565b3360009081526001602090815260408083206001600160a01b0386168452909152812054828110156117b35760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610856565b6117c03385858403611f40565b5060019392505050565b6001600160a01b0382166000908152601560205260408120805483919083906117f4908490612788565b90915550503360008181526015602052604090208054849003905561081d90848461221c565b601354604051634aefbd8f60e11b815260009161010090046001600160a01b03169081906395df7b1e9061185790879087906001906004016127a0565b602060405180830381865afa158015611874573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118989190612804565b949350505050565b6005546201000090046001600160a01b031633146118d05760405162461bcd60e51b815260040161085690612706565b60135460ff16156119195760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610856565b600082116119695760405162461bcd60e51b815260206004820152601860248201527f77726f6e6720636f6e747269627574696f6e206c696d697400000000000000006044820152606401610856565b818310156119ac5760405162461bcd60e51b815260206004820152601060248201526f12185c9918d85c08115e18d95959195960821b6044820152606401610856565b8688106119f15760405162461bcd60e51b815260206004820152601360248201527257726f6e67207369676e757020636f6e66696760681b6044820152606401610856565b868611611a405760405162461bcd60e51b815260206004820152601a60248201527f5374617274206665626f7265207369676e757020706572696f640000000000006044820152606401610856565b848411611a8f5760405162461bcd60e51b815260206004820152601760248201527f46756c6c53746f70206265666f726520656e64446174650000000000000000006044820152606401610856565b6007859055600683905560098690556008879055600b8890556013805460ff1916600117905560118290556014819055600f84905560408051428152602081018890529081018690527f2942eb7be804ba7efe93e5b8f2e1b0bcde0a25deae1aabcad7ddd8b307bff90d9060600160405180910390a15050505050505050565b601054610100900460ff1615611b375760405162461bcd60e51b8152600401610856906127c1565b600554610100900460ff1680611b4e575060095442105b80611b6757506007544210158015611b675750600f5442105b611bab5760405162461bcd60e51b815260206004820152601560248201527415da5d1a191c985ddcc81b9bdd08185b1b1bddd959605a1b6044820152606401610856565b611bb733600a5461181a565b611bf45760405162461bcd60e51b815260206004820152600e60248201526d4e6f20706174726f6e20726f6c6560901b6044820152606401610856565b8060008111611c3d5760405162461bcd60e51b8152602060048201526015602482015274195c9c9bdc8e881dda5d1a191c985dc80c081155d5605a1b6044820152606401610856565b33600090815260208190526040902054611c8f5760405162461bcd60e51b81526020600482015260136024820152724e6f206465706f736974206174207374616b6560681b6044820152606401610856565b33600090815260208190526040902054811115611cee5760405162461bcd60e51b815260206004820152601760248201527f4e6f7420656e6f75676820455754206174207374616b650000000000000000006044820152606401610856565b600080611cfa84611ee0565b915091508060126000828254611d109190612788565b90915550611d20905033856123eb565b83600c6000828254611d3291906127ed565b90915550503360009081526015602052604081208054869290611d569084906127ed565b9091555050604051339083156108fc029084906000818181858888f19350505050158015611d88573d6000803e3d6000fd5b50604051428152829033907f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc69060200160405180910390a37f40ec41b547e3a769f863d660b593350eb4ce5d779b1c4e3f112eefc40c8e81d8338542604051611df3939291906127a0565b60405180910390a150505050565b6005546201000090046001600160a01b03163314611e315760405162461bcd60e51b815260040161085690612706565b601054610100900460ff16611e7e5760405162461bcd60e51b815260206004820152601360248201527210dbdb9d1c9858dd081b9bdd0814185d5cd959606a1b6044820152606401610856565b6010805461ff001916815560408051818152908101919091526f18dbdb9d1c9858dd155b9c185d5cd95960821b60608201524260208201527f5921431fa16f8be49d0a0175ba96d394094d37c61ef3ecd3985329c254cd108a90608001611718565b6005546000908190610100900460ff16158015611efe5750600e5415155b8015611f0957508215155b15611f3757611f19600a84612766565b611f239084612788565b611f2e600a85612766565b91509150915091565b50909160009150565b6001600160a01b038316611fa25760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610856565b6001600160a01b0382166120035760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610856565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b600061207284848461221c565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156120f75760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610856565b6121048533858403611f40565b506001949350505050565b6001600160a01b0382166121655760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610856565b80600260008282546121779190612788565b90915550506001600160a01b038216600090815260208190526040812080548392906121a4908490612788565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35b5050565b604051339082156108fc029083906000818181858888f193505050501580156121eb573d6000803e3d6000fd5b6001600160a01b0383166122805760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610856565b6001600160a01b0382166122e25760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610856565b6001600160a01b0383166000908152602081905260409020548181101561235a5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610856565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290612391908490612788565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516123dd91815260200190565b60405180910390a350505050565b6001600160a01b03821661244b5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610856565b6001600160a01b038216600090815260208190526040902054818110156124bf5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610856565b6001600160a01b03831660009081526020819052604081208383039055600280548492906124ee9084906127ed565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001612058565b600060208083528351808285015260005b8181101561255e57858101830151858201604001528201612542565b81811115612570576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461259d57600080fd5b919050565b600080604083850312156125b557600080fd5b6125be83612586565b946020939093013593505050565b6000806000606084860312156125e157600080fd5b6125ea84612586565b92506125f860208501612586565b9150604084013590509250925092565b60006020828403121561261a57600080fd5b5035919050565b60006020828403121561263357600080fd5b61263c82612586565b9392505050565b600080600080600080600080610100898b03121561266057600080fd5b505086359860208801359850604088013597606081013597506080810135965060a0810135955060c0810135945060e0013592509050565b600080604083850312156126ab57600080fd5b6126b483612586565b91506126c260208401612586565b90509250929050565b600181811c908216806126df57607f821691505b6020821081141561270057634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526011908201527026bab9ba103132903a34329030b236b4b760791b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561276157612761612731565b500290565b60008261278357634e487b7160e01b600052601260045260246000fd5b500490565b6000821982111561279b5761279b612731565b500190565b6001600160a01b039390931683526020830191909152604082015260600190565b60208082526012908201527121b7b73a3930b1ba1034b990333937bd32b760711b604082015260600190565b6000828210156127ff576127ff612731565b500390565b60006020828403121561281657600080fd5b8151801515811461263c57600080fdfe55595f34fd936311e65eca0a752ee70068b8992fdf64918aff1b6345689c84e4a26469706673582212206ecea8b9481c5b32b9e8aae304ec07265eea6fdfbf12b14c37503a66c971543064736f6c634300080c0033