GLMR Price: $0.078796 (+9.26%)

Contract

0x9d48141B234BB9528090E915085E0e6Af5Aad42c
Transaction Hash
Method
Block
From
To
Withdraw91587342025-01-13 4:34:00100 days ago1736742840IN
Beamswap: TokenDistributor V2
0 GLMR0.077556125
Deposit91587282025-01-13 4:33:24100 days ago1736742804IN
Beamswap: TokenDistributor V2
0 GLMR0.09106125
Withdraw90392522025-01-04 17:30:30108 days ago1736011830IN
Beamswap: TokenDistributor V2
0 GLMR0.077556125
Deposit90392452025-01-04 17:29:48108 days ago1736011788IN
Beamswap: TokenDistributor V2
0 GLMR0.09106125
Withdraw86665752024-12-08 20:07:12135 days ago1733688432IN
Beamswap: TokenDistributor V2
0 GLMR0.077556125
Deposit86665692024-12-08 20:06:36135 days ago1733688396IN
Beamswap: TokenDistributor V2
0 GLMR0.09106125
Withdraw86077512024-12-04 14:26:36139 days ago1733322396IN
Beamswap: TokenDistributor V2
0 GLMR0.110524125
Withdraw85302022024-11-29 3:21:30145 days ago1732850490IN
Beamswap: TokenDistributor V2
0 GLMR0.077556125
Deposit85301922024-11-29 3:20:30145 days ago1732850430IN
Beamswap: TokenDistributor V2
0 GLMR0.09106125
Withdraw81168362024-10-30 21:47:48174 days ago1730324868IN
Beamswap: TokenDistributor V2
0 GLMR0.11140819126
Deposit80870922024-10-28 19:22:12176 days ago1730143332IN
Beamswap: TokenDistributor V2
0 GLMR0.09172396126
Withdraw68367152024-08-01 17:21:24264 days ago1722532884IN
Beamswap: TokenDistributor V2
0 GLMR0.02797876126.5
Withdraw66976452024-07-22 22:22:30274 days ago1721686950IN
Beamswap: TokenDistributor V2
0 GLMR0.0382165125
Withdraw64424332024-06-24 5:50:30303 days ago1719208230IN
Beamswap: TokenDistributor V2
0 GLMR0.02568125
Deposit64424322024-06-24 5:50:18303 days ago1719208218IN
Beamswap: TokenDistributor V2
0 GLMR0.0287495125
Withdraw63540332024-06-11 17:43:30315 days ago1718127810IN
Beamswap: TokenDistributor V2
0 GLMR0.03059456125.11066547
Deposit63540012024-06-11 17:37:00315 days ago1718127420IN
Beamswap: TokenDistributor V2
0 GLMR0.0324975125
Withdraw62938242024-06-03 5:44:36324 days ago1717393476IN
Beamswap: TokenDistributor V2
0 GLMR0.03105929126.5
Withdraw62937962024-06-03 5:39:00324 days ago1717393140IN
Beamswap: TokenDistributor V2
0 GLMR0.03941638126.5
Withdraw62937652024-06-03 5:32:48324 days ago1717392768IN
Beamswap: TokenDistributor V2
0 GLMR0.03867509126.5
Withdraw62344842024-05-25 21:22:54332 days ago1716672174IN
Beamswap: TokenDistributor V2
0 GLMR0.01962166126.5
Withdraw62344792024-05-25 21:21:54332 days ago1716672114IN
Beamswap: TokenDistributor V2
0 GLMR0.01508689126.5
Deposit62344772024-05-25 21:21:30332 days ago1716672090IN
Beamswap: TokenDistributor V2
0 GLMR0.02303818126.5
Withdraw61360982024-05-11 23:54:12346 days ago1715471652IN
Beamswap: TokenDistributor V2
0 GLMR0.0306725125
Withdraw61137652024-05-08 20:15:00349 days ago1715199300IN
Beamswap: TokenDistributor V2
0 GLMR0.01962015126.5
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BeamChefV2

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 11 : BeamChefV2.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "./rewarders/IMultipleRewards.sol";
import "./libraries/BoringERC20.sol";
import "./IBeamSwapPair.sol";
import "../interfaces/IstGlint.sol";

contract BeamChefV2 is Ownable, ReentrancyGuard {
    using BoringERC20 for IBoringERC20;

    // Info of each user.
    struct UserInfo {
        uint256 amount; // How many LP tokens the user has provided.
        uint256 rewardDebt; // Reward debt. See explanation below.
        uint256 rewardLockedUp; // Reward locked up.
        uint256 nextHarvestUntil; // When can the user harvest again.
    }

    // Info of each pool.
    struct PoolInfo {
        IBoringERC20 lpToken; // Address of LP token contract.
        uint256 allocPoint; // How many allocation points assigned to this pool. Beam to distribute per block.
        uint256 lastRewardTimestamp; // Last block number that Beam distribution occurs.
        uint256 accBeamPerShare; // Accumulated Beam per share, times 1e18. See below.
        uint16 depositFeeBP; // Deposit fee in basis points
        uint256 harvestInterval; // Harvest interval in seconds
        uint256 totalLp; // Total token in Pool
        IMultipleRewards[] rewarders; // Array of rewarder contract for pools with incentives
    }

    IBoringERC20 public beam;

    IstGlint public stGlint;

    // Beam tokens created per second
    uint256 public beamPerSec;

    // Max harvest interval: 14 days
    uint256 public constant MAXIMUM_HARVEST_INTERVAL = 14 days;

    // Maximum deposit fee rate: 10%
    uint16 public constant MAXIMUM_DEPOSIT_FEE_RATE = 1000;

    // Info of each pool
    PoolInfo[] public poolInfo;

    // Info of each user that stakes LP tokens.
    mapping(uint256 => mapping(address => UserInfo)) public userInfo;

    // Total allocation points. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint;

    // The timestamp when Beam mining starts.
    uint256 public startTimestamp;

    // Total locked up rewards
    uint256 public totalLockedUpRewards;

    // Total Beam in Beam Pools (can be multiple pools)
    uint256 public totalBeamInPools;

    // Beamshare address.
    address public beamShareAddress;

    // deposit fee address if needed
    address public feeAddress;

    // Percentage of pool rewards that goto the team.
    uint256 public beamSharePercent;

    uint256 public stGlintRatio = 25; //25% emits as stGlint

    // The precision factor
    uint256 private constant ACC_TOKEN_PRECISION = 1e12;

    modifier validatePoolByPid(uint256 _pid) {
        require(_pid < poolInfo.length, "Pool does not exist");
        _;
    }

    event Add(
        uint256 indexed pid,
        uint256 allocPoint,
        IBoringERC20 indexed lpToken,
        uint16 depositFeeBP,
        uint256 harvestInterval,
        IMultipleRewards[] indexed rewarders
    );

    event Set(
        uint256 indexed pid,
        uint256 allocPoint,
        uint16 depositFeeBP,
        uint256 harvestInterval,
        IMultipleRewards[] indexed rewarders
    );

    event UpdatePool(
        uint256 indexed pid,
        uint256 lastRewardTimestamp,
        uint256 lpSupply,
        uint256 accBeamPerShare
    );

    event Deposit(address indexed user, uint256 indexed pid, uint256 amount);

    event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);

    event EmergencyWithdraw(
        address indexed user,
        uint256 indexed pid,
        uint256 amount
    );

    event EmissionRateUpdated(
        address indexed caller,
        uint256 previousValue,
        uint256 newValue
    );

    event RewardLockedUp(
        address indexed user,
        uint256 indexed pid,
        uint256 amountLockedUp
    );

    event AllocPointsUpdated(
        address indexed caller,
        uint256 previousAmount,
        uint256 newAmount
    );

    event SetbeamShareAddress(
        address indexed oldAddress,
        address indexed newAddress
    );

    event SetFeeAddress(address indexed oldAddress, address indexed newAddress);

    event SetInvestorAddress(
        address indexed oldAddress,
        address indexed newAddress
    );

    event SetbeamSharePercent(uint256 oldPercent, uint256 newPercent);

    event StGlintRewardSent(
        address indexed user,
        uint256 indexed pid,
        uint256 amount
    );

    event GlintRewardSent(
        address indexed user,
        uint256 indexed pid,
        uint256 amount
    );

    constructor(
        IBoringERC20 _beam,
        uint256 _beamPerSec,
        address _beamShareAddress,
        uint256 _beamSharePercent,
        address _feeAddress,
        IstGlint _stGlint
    ) {
        require(
            _beamSharePercent <= 100,
            "constructor: invalid beamshare percent value"
        );

        startTimestamp = block.timestamp + (60 * 60 * 24 * 365);

        beam = _beam;
        beamPerSec = _beamPerSec;
        beamShareAddress = _beamShareAddress;
        beamSharePercent = _beamSharePercent;
        feeAddress = _feeAddress;
        stGlint = _stGlint;
        IERC20(address(_beam)).approve(address(stGlint), type(uint256).max);
    }

    // Set farming start, can call only once
    function startFarming() public onlyOwner {
        require(block.timestamp < startTimestamp, "farm already started");

        uint256 length = poolInfo.length;

        for (uint256 pid = 0; pid < length; ) {
            PoolInfo storage pool = poolInfo[pid];
            pool.lastRewardTimestamp = block.timestamp;
            unchecked {
                ++pid;
            }
        }

        startTimestamp = block.timestamp;
    }

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

    // Add a new lp to the pool. Can only be called by the owner.
    // Can add multiple pool with same lp token without messing up rewards, because each pool's balance is tracked using its own totalLp
    function add(
        uint256 _allocPoint,
        IBoringERC20 _lpToken,
        uint16 _depositFeeBP,
        uint256 _harvestInterval,
        IMultipleRewards[] calldata _rewarders
    ) public onlyOwner {
        require(_rewarders.length <= 10, "add: too many rewarders");
        require(
            _depositFeeBP <= MAXIMUM_DEPOSIT_FEE_RATE,
            "add: deposit fee too high"
        );
        require(
            _harvestInterval <= MAXIMUM_HARVEST_INTERVAL,
            "add: invalid harvest interval"
        );
        for (
            uint256 rewarderId = 0;
            rewarderId < _rewarders.length;
            ++rewarderId
        ) {
            require(
                Address.isContract(address(_rewarders[rewarderId])),
                "add: rewarder must be contract"
            );
        }

        _massUpdatePools();

        uint256 lastRewardTimestamp = block.timestamp > startTimestamp
            ? block.timestamp
            : startTimestamp;

        totalAllocPoint += _allocPoint;

        poolInfo.push(
            PoolInfo({
                lpToken: _lpToken,
                allocPoint: _allocPoint,
                lastRewardTimestamp: lastRewardTimestamp,
                accBeamPerShare: 0,
                depositFeeBP: _depositFeeBP,
                harvestInterval: _harvestInterval,
                totalLp: 0,
                rewarders: _rewarders
            })
        );

        emit Add(
            poolInfo.length - 1,
            _allocPoint,
            _lpToken,
            _depositFeeBP,
            _harvestInterval,
            _rewarders
        );
    }

    // Update the given pool's Beam allocation point and deposit fee. Can only be called by the owner.
    function set(
        uint256 _pid,
        uint256 _allocPoint,
        uint16 _depositFeeBP,
        uint256 _harvestInterval,
        IMultipleRewards[] calldata _rewarders
    ) public onlyOwner validatePoolByPid(_pid) {
        require(_rewarders.length <= 10, "set: too many rewarders");

        require(
            _depositFeeBP <= MAXIMUM_DEPOSIT_FEE_RATE,
            "set: deposit fee too high"
        );
        require(
            _harvestInterval <= MAXIMUM_HARVEST_INTERVAL,
            "set: invalid harvest interval"
        );

        for (
            uint256 rewarderId = 0;
            rewarderId < _rewarders.length;
            ++rewarderId
        ) {
            require(
                Address.isContract(address(_rewarders[rewarderId])),
                "set: rewarder must be contract"
            );
        }

        _massUpdatePools();

        totalAllocPoint =
            totalAllocPoint -
            poolInfo[_pid].allocPoint +
            _allocPoint;

        poolInfo[_pid].allocPoint = _allocPoint;
        poolInfo[_pid].depositFeeBP = _depositFeeBP;
        poolInfo[_pid].harvestInterval = _harvestInterval;
        poolInfo[_pid].rewarders = _rewarders;

        emit Set(
            _pid,
            _allocPoint,
            _depositFeeBP,
            _harvestInterval,
            _rewarders
        );
    }

    // View function to see pending rewards on frontend.
    function pendingTokens(
        uint256 _pid,
        address _user
    )
        external
        view
        validatePoolByPid(_pid)
        returns (
            address[] memory addresses,
            string[] memory symbols,
            uint256[] memory decimals,
            uint256[] memory amounts
        )
    {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accBeamPerShare = pool.accBeamPerShare;
        uint256 lpSupply = pool.totalLp;

        if (block.timestamp > pool.lastRewardTimestamp && lpSupply != 0) {
            uint256 multiplier = block.timestamp - pool.lastRewardTimestamp;
            uint256 total = 1000;
            uint256 lpPercent = total - beamSharePercent;

            uint256 beamReward = (multiplier *
                beamPerSec *
                pool.allocPoint *
                lpPercent) /
                totalAllocPoint /
                total;

            accBeamPerShare += (
                ((beamReward * ACC_TOKEN_PRECISION) / lpSupply)
            );
        }

        uint256 pendingBeam = (((user.amount * accBeamPerShare) /
            ACC_TOKEN_PRECISION) - user.rewardDebt) + user.rewardLockedUp;

        addresses = new address[](pool.rewarders.length + 1);
        symbols = new string[](pool.rewarders.length + 1);
        amounts = new uint256[](pool.rewarders.length + 1);
        decimals = new uint256[](pool.rewarders.length + 1);

        addresses[0] = address(beam);
        symbols[0] = IBoringERC20(beam).safeSymbol();
        decimals[0] = IBoringERC20(beam).safeDecimals();
        amounts[0] = pendingBeam;

        uint256 length = pool.rewarders.length;
        for (uint256 rewarderId = 0; rewarderId < length; ) {
            addresses[rewarderId + 1] = address(
                pool.rewarders[rewarderId].rewardToken()
            );

            symbols[rewarderId + 1] = IBoringERC20(
                pool.rewarders[rewarderId].rewardToken()
            ).safeSymbol();

            decimals[rewarderId + 1] = IBoringERC20(
                pool.rewarders[rewarderId].rewardToken()
            ).safeDecimals();

            amounts[rewarderId + 1] = pool.rewarders[rewarderId].pendingTokens(
                _pid,
                _user
            );
            unchecked {
                ++rewarderId;
            }
        }
    }

    /// @notice View function to see pool rewards per sec
    function poolRewardsPerSec(
        uint256 _pid
    )
        external
        view
        validatePoolByPid(_pid)
        returns (
            address[] memory addresses,
            string[] memory symbols,
            uint256[] memory decimals,
            uint256[] memory rewardsPerSec
        )
    {
        PoolInfo storage pool = poolInfo[_pid];

        addresses = new address[](pool.rewarders.length + 1);
        symbols = new string[](pool.rewarders.length + 1);
        decimals = new uint256[](pool.rewarders.length + 1);
        rewardsPerSec = new uint256[](pool.rewarders.length + 1);

        addresses[0] = address(beam);
        symbols[0] = IBoringERC20(beam).safeSymbol();
        decimals[0] = IBoringERC20(beam).safeDecimals();

        uint256 total = 1000;
        uint256 lpPercent = total - beamSharePercent;

        rewardsPerSec[0] =
            (pool.allocPoint * beamPerSec * lpPercent) /
            totalAllocPoint /
            total;
        uint256 length = pool.rewarders.length;
        for (uint256 rewarderId = 0; rewarderId < length; ) {
            addresses[rewarderId + 1] = address(
                pool.rewarders[rewarderId].rewardToken()
            );

            symbols[rewarderId + 1] = IBoringERC20(
                pool.rewarders[rewarderId].rewardToken()
            ).safeSymbol();

            decimals[rewarderId + 1] = IBoringERC20(
                pool.rewarders[rewarderId].rewardToken()
            ).safeDecimals();

            rewardsPerSec[rewarderId + 1] = pool
                .rewarders[rewarderId]
                .poolRewardsPerSec(_pid);
            unchecked {
                ++rewarderId;
            }
        }
    }

    // View function to see rewarders for a pool
    function poolRewarders(
        uint256 _pid
    )
        external
        view
        validatePoolByPid(_pid)
        returns (address[] memory rewarders)
    {
        PoolInfo storage pool = poolInfo[_pid];
        rewarders = new address[](pool.rewarders.length);
        for (
            uint256 rewarderId = 0;
            rewarderId < pool.rewarders.length;
            ++rewarderId
        ) {
            rewarders[rewarderId] = address(pool.rewarders[rewarderId]);
        }
    }

    // View function to see if user can harvest Beam.
    function canHarvest(
        uint256 _pid,
        address _user
    ) public view validatePoolByPid(_pid) returns (bool) {
        UserInfo storage user = userInfo[_pid][_user];
        return
            block.timestamp >= startTimestamp &&
            block.timestamp >= user.nextHarvestUntil;
    }

    // Update reward vairables for all pools. Be careful of gas spending!
    function massUpdatePools() external nonReentrant {
        _massUpdatePools();
    }

    // Internal method for massUpdatePools
    function _massUpdatePools() internal {
        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ) {
            _updatePool(pid);
            unchecked {
                ++pid;
            }
        }
    }

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(uint256 _pid) external nonReentrant {
        _updatePool(_pid);
    }

    // Internal method for _updatePool
    function _updatePool(uint256 _pid) internal validatePoolByPid(_pid) {
        PoolInfo storage pool = poolInfo[_pid];

        if (block.timestamp <= pool.lastRewardTimestamp) {
            return;
        }

        uint256 lpSupply = pool.totalLp;

        if (lpSupply == 0 || pool.allocPoint == 0) {
            pool.lastRewardTimestamp = block.timestamp;
            return;
        }

        uint256 multiplier = block.timestamp - pool.lastRewardTimestamp;

        uint256 beamReward = ((multiplier * beamPerSec) * pool.allocPoint) /
            totalAllocPoint;

        uint256 total = 1000;
        uint256 lpPercent = total - beamSharePercent;

        uint256 beamshareAmount = (beamReward * beamSharePercent) / total;
        if (beamshareAmount > 0) {
            beam.mint(beamShareAddress, beamshareAmount);
        }
        beam.mint(address(this), (beamReward * lpPercent) / total);

        pool.accBeamPerShare +=
            (beamReward * ACC_TOKEN_PRECISION * lpPercent) /
            pool.totalLp /
            total;

        pool.lastRewardTimestamp = block.timestamp;

        emit UpdatePool(
            _pid,
            pool.lastRewardTimestamp,
            lpSupply,
            pool.accBeamPerShare
        );
    }

    function depositWithPermit(
        uint256 pid,
        uint256 amount,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public nonReentrant validatePoolByPid(pid) {
        PoolInfo storage pool = poolInfo[pid];
        IBeamSwapPair pair = IBeamSwapPair(address(pool.lpToken));
        pair.permit(msg.sender, address(this), amount, deadline, v, r, s);
        _deposit(pid, amount);
    }

    // Deposit tokens for Beam allocation.
    function deposit(uint256 _pid, uint256 _amount) public nonReentrant {
        _deposit(_pid, _amount);
    }

    // Deposit tokens for Beam allocation.
    function _deposit(
        uint256 _pid,
        uint256 _amount
    ) internal validatePoolByPid(_pid) {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];

        _updatePool(_pid);

        payOrLockupPendingBeam(_pid);

        if (_amount > 0) {
            uint256 beforeDeposit = pool.lpToken.balanceOf(address(this));
            pool.lpToken.safeTransferFrom(msg.sender, address(this), _amount);
            uint256 afterDeposit = pool.lpToken.balanceOf(address(this));

            _amount = afterDeposit - beforeDeposit;

            if (pool.depositFeeBP > 0) {
                uint256 depositFee = (_amount * pool.depositFeeBP) / 10000;
                pool.lpToken.safeTransfer(feeAddress, depositFee);

                _amount = _amount - depositFee;
            }
            unchecked {
                user.amount += _amount;
            }

            if (address(pool.lpToken) == address(beam)) {
                totalBeamInPools += _amount;
            }
        }
        user.rewardDebt =
            (user.amount * pool.accBeamPerShare) /
            ACC_TOKEN_PRECISION;

        uint256 length = pool.rewarders.length;
        for (uint256 rewarderId = 0; rewarderId < length; ) {
            pool.rewarders[rewarderId].onBeamReward(
                _pid,
                msg.sender,
                user.amount
            );
            unchecked {
                ++rewarderId;
            }
        }

        if (_amount > 0) {
            pool.totalLp += _amount;
        }

        emit Deposit(msg.sender, _pid, _amount);
    }

    //withdraw tokens
    function withdraw(
        uint256 _pid,
        uint256 _amount
    ) public nonReentrant validatePoolByPid(_pid) {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];

        //this will make sure that user can only withdraw from his pool
        require(user.amount >= _amount, "withdraw: user amount not enough");

        //cannot withdraw more than pool's balance
        require(pool.totalLp >= _amount, "withdraw: pool total not enough");

        _updatePool(_pid);

        payOrLockupPendingBeam(_pid);

        if (_amount > 0) {
            user.amount -= _amount;
            if (address(pool.lpToken) == address(beam)) {
                totalBeamInPools -= _amount;
            }
            pool.lpToken.safeTransfer(msg.sender, _amount);
        }

        user.rewardDebt =
            (user.amount * pool.accBeamPerShare) /
            ACC_TOKEN_PRECISION;

        uint256 length = pool.rewarders.length;
        for (uint256 rewarderId = 0; rewarderId < length; ) {
            pool.rewarders[rewarderId].onBeamReward(
                _pid,
                msg.sender,
                user.amount
            );
            unchecked {
                ++rewarderId;
            }
        }

        if (_amount > 0) {
            pool.totalLp -= _amount;
        }

        emit Withdraw(msg.sender, _pid, _amount);
    }

    // Withdraw without caring about rewards. EMERGENCY ONLY.
    function emergencyWithdraw(uint256 _pid) public nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        uint256 amount = user.amount;

        //Cannot withdraw more than pool's balance
        require(
            pool.totalLp >= amount,
            "emergency withdraw: pool total not enough"
        );

        user.amount = 0;
        user.rewardDebt = 0;
        user.rewardLockedUp = 0;
        user.nextHarvestUntil = 0;
        pool.totalLp -= amount;

        for (
            uint256 rewarderId = 0;
            rewarderId < pool.rewarders.length;
            ++rewarderId
        ) {
            pool.rewarders[rewarderId].onBeamReward(_pid, msg.sender, 0);
        }

        if (address(pool.lpToken) == address(beam)) {
            totalBeamInPools -= amount;
        }

        pool.lpToken.safeTransfer(msg.sender, amount);

        emit EmergencyWithdraw(msg.sender, _pid, amount);
    }

    // Pay or lockup pending Beam.
    function payOrLockupPendingBeam(uint256 _pid) internal {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];

        if (user.nextHarvestUntil == 0 && block.timestamp >= startTimestamp) {
            user.nextHarvestUntil = block.timestamp + pool.harvestInterval;
        }

        uint256 pending = ((user.amount * pool.accBeamPerShare) /
            ACC_TOKEN_PRECISION) - user.rewardDebt;

        if (canHarvest(_pid, msg.sender)) {
            if (pending > 0 || user.rewardLockedUp > 0) {
                uint256 pendingRewards = pending + user.rewardLockedUp;

                // reset lockup
                totalLockedUpRewards -= user.rewardLockedUp;
                user.rewardLockedUp = 0;
                unchecked {
                    user.nextHarvestUntil =
                        block.timestamp +
                        pool.harvestInterval;
                }

                uint256 stGlintAmount = (pendingRewards * stGlintRatio) / 100;
                if (stGlintAmount > 0) {
                    stGlint.convertTo(msg.sender, stGlintAmount);
                    emit StGlintRewardSent(msg.sender, _pid, stGlintAmount);
                }
                // send rewards
                safeBeamTransfer(msg.sender, pendingRewards - stGlintAmount);
                emit GlintRewardSent(
                    msg.sender,
                    _pid,
                    pendingRewards - stGlintAmount
                );
            }
        } else if (pending > 0) {
            unchecked {
                totalLockedUpRewards += pending;
                user.rewardLockedUp += pending;
            }

            emit RewardLockedUp(msg.sender, _pid, pending);
        }
    }

    // Safe Beam transfer function, just in case if rounding error causes pool do not have enough Beam.
    function safeBeamTransfer(address _to, uint256 _amount) internal {
        if (beam.balanceOf(address(this)) > totalBeamInPools) {
            //beamBal = total Beam in BeamChef - total Beam in Beam pools, this will make sure that BeamDistributor never transfer rewards from deposited Beam pools
            uint256 beamBal = beam.balanceOf(address(this)) - totalBeamInPools;
            if (_amount >= beamBal) {
                beam.safeTransfer(_to, beamBal);
            } else if (_amount > 0) {
                beam.safeTransfer(_to, _amount);
            }
        }
    }

    function updateEmissionRate(uint256 _beamPerSec) public onlyOwner {
        _massUpdatePools();

        emit EmissionRateUpdated(msg.sender, beamPerSec, _beamPerSec);

        beamPerSec = _beamPerSec;
    }

    function updateAllocPoint(
        uint256 _pid,
        uint256 _allocPoint
    ) public onlyOwner {
        _massUpdatePools();

        emit AllocPointsUpdated(
            msg.sender,
            poolInfo[_pid].allocPoint,
            _allocPoint
        );

        totalAllocPoint =
            totalAllocPoint -
            poolInfo[_pid].allocPoint +
            _allocPoint;
        poolInfo[_pid].allocPoint = _allocPoint;
    }

    function poolTotalLp(uint256 pid) external view returns (uint256) {
        return poolInfo[pid].totalLp;
    }

    // Function to harvest many pools in a single transaction
    function harvestMany(uint256[] calldata _pids) public nonReentrant {
        require(_pids.length <= 30, "harvest many: too many pool ids");
        uint32 length = uint32(_pids.length);
        uint32 index = 0;
        for (; index < length; ) {
            _deposit(_pids[index], 0);
            unchecked {
                ++index;
            }
        }
    }

    // Update beamsahre address
    function setbeamShareAddress(address _beamShareAddress) public onlyOwner {
        require(
            _beamShareAddress != address(0),
            "invalid new beamshare address"
        );
        beamShareAddress = _beamShareAddress;
        emit SetbeamShareAddress(msg.sender, _beamShareAddress);
    }

    function setbeamSharePercent(
        uint256 _newbeamSharePercent
    ) public onlyOwner {
        require(_newbeamSharePercent <= 100, "invalid percent value");
        emit SetbeamSharePercent(beamSharePercent, _newbeamSharePercent);
        beamSharePercent = _newbeamSharePercent;
    }

    // Update fee address.
    function setFeeAddress(address _feeAddress) public onlyOwner {
        require(_feeAddress != address(0), "invalid new fee address");
        feeAddress = _feeAddress;
        emit SetFeeAddress(msg.sender, _feeAddress);
    }

    function updateStGlintRatio(uint256 _ratio) external onlyOwner {
        require(_ratio <= 100, "invalid ratio");
        stGlintRatio = _ratio;
    }

    function updateStGlintAddress(IstGlint _stGlint) external onlyOwner {
        stGlint = _stGlint;
    }
}

File 2 of 11 : 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 3 of 11 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 4 of 11 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        uint256 amount
    ) external returns (bool);

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

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

File 5 of 11 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 6 of 11 : 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 7 of 11 : IstGlint.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IstGlint is IERC20 {
  function usageAllocations(address userAddress, address usageAddress) external view returns (uint256 allocation);

  function allocateFromUsage(address userAddress, uint256 amount) external;
  function convertTo(address to,uint256 amount ) external;
  function deallocateFromUsage(address userAddress, uint256 amount) external;

  function isTransferWhitelisted(address account) external view returns (bool);
}

File 8 of 11 : IBeamSwapPair.sol
// SPDX-License-Identifier: MIT
pragma solidity >0.8.0;

interface IBeamSwapPair {
    function initialize(address, address) external;

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;
}

File 9 of 11 : BoringERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity >0.8.0;

// solhint-disable avoid-low-level-calls
import "./IBoringERC20.sol";

library BoringERC20 {
    bytes4 private constant SIG_SYMBOL = 0x95d89b41; // symbol()
    bytes4 private constant SIG_NAME = 0x06fdde03; // name()
    bytes4 private constant SIG_DECIMALS = 0x313ce567; // decimals()
    bytes4 private constant SIG_TRANSFER = 0xa9059cbb; // transfer(address,uint256)
    bytes4 private constant SIG_TRANSFER_FROM = 0x23b872dd; // transferFrom(address,address,uint256)

    function returnDataToString(bytes memory data)
        internal
        pure
        returns (string memory)
    {
        if (data.length >= 64) {
            return abi.decode(data, (string));
        } else if (data.length == 32) {
            uint8 i = 0;
            while (i < 32 && data[i] != 0) {
                i++;
            }
            bytes memory bytesArray = new bytes(i);
            for (i = 0; i < 32 && data[i] != 0; i++) {
                bytesArray[i] = data[i];
            }
            return string(bytesArray);
        } else {
            return "???";
        }
    }

    /// @notice Provides a safe ERC20.symbol version which returns '???' as fallback string.
    /// @param token The address of the ERC-20 token contract.
    /// @return (string) Token symbol.
    function safeSymbol(IBoringERC20 token)
        internal
        view
        returns (string memory)
    {
        (bool success, bytes memory data) = address(token).staticcall(
            abi.encodeWithSelector(SIG_SYMBOL)
        );
        return success ? returnDataToString(data) : "???";
    }

    /// @notice Provides a safe ERC20.name version which returns '???' as fallback string.
    /// @param token The address of the ERC-20 token contract.
    /// @return (string) Token name.
    function safeName(IBoringERC20 token)
        internal
        view
        returns (string memory)
    {
        (bool success, bytes memory data) = address(token).staticcall(
            abi.encodeWithSelector(SIG_NAME)
        );
        return success ? returnDataToString(data) : "???";
    }

    /// @notice Provides a safe ERC20.decimals version which returns '18' as fallback value.
    /// @param token The address of the ERC-20 token contract.
    /// @return (uint8) Token decimals.
    function safeDecimals(IBoringERC20 token) internal view returns (uint8) {
        (bool success, bytes memory data) = address(token).staticcall(
            abi.encodeWithSelector(SIG_DECIMALS)
        );
        return success && data.length == 32 ? abi.decode(data, (uint8)) : 18;
    }

    /// @notice Provides a safe ERC20.transfer version for different ERC-20 implementations.
    /// Reverts on a failed transfer.
    /// @param token The address of the ERC-20 token.
    /// @param to Transfer tokens to.
    /// @param amount The token amount.
    function safeTransfer(
        IBoringERC20 token,
        address to,
        uint256 amount
    ) internal {
        (bool success, bytes memory data) = address(token).call(
            abi.encodeWithSelector(SIG_TRANSFER, to, amount)
        );
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "BoringERC20: Transfer failed"
        );
    }

    /// @notice Provides a safe ERC20.transferFrom version for different ERC-20 implementations.
    /// Reverts on a failed transfer.
    /// @param token The address of the ERC-20 token.
    /// @param from Transfer tokens from.
    /// @param to Transfer tokens to.
    /// @param amount The token amount.
    function safeTransferFrom(
        IBoringERC20 token,
        address from,
        address to,
        uint256 amount
    ) internal {
        (bool success, bytes memory data) = address(token).call(
            abi.encodeWithSelector(SIG_TRANSFER_FROM, from, to, amount)
        );
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "BoringERC20: TransferFrom failed"
        );
    }
}

File 10 of 11 : IBoringERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity >0.8.0;

interface IBoringERC20 {
    function mint(address to, uint256 amount) external;

    function totalSupply() external view returns (uint256);

    function balanceOf(address account) external view returns (uint256);

    function allowance(address owner, address spender)
        external
        view
        returns (uint256);

    function approve(address spender, uint256 amount) external returns (bool);

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );

    /// @notice EIP 2612
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;
}

File 11 of 11 : IMultipleRewards.sol
// SPDX-License-Identifier: MIT
pragma solidity >0.8.0;

import "../libraries/IBoringERC20.sol";

interface IMultipleRewards {
    function onBeamReward(
        uint256 pid,
        address user,
        uint256 newLpAmount
    ) external;

    function pendingTokens(uint256 pid, address user)
        external
        view
        returns (uint256 pending);

    function rewardToken() external view returns (IBoringERC20);

    function poolRewardsPerSec(uint256 pid) external view returns (uint256);
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"contract IBoringERC20","name":"_beam","type":"address"},{"internalType":"uint256","name":"_beamPerSec","type":"uint256"},{"internalType":"address","name":"_beamShareAddress","type":"address"},{"internalType":"uint256","name":"_beamSharePercent","type":"uint256"},{"internalType":"address","name":"_feeAddress","type":"address"},{"internalType":"contract IstGlint","name":"_stGlint","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"allocPoint","type":"uint256"},{"indexed":true,"internalType":"contract IBoringERC20","name":"lpToken","type":"address"},{"indexed":false,"internalType":"uint16","name":"depositFeeBP","type":"uint16"},{"indexed":false,"internalType":"uint256","name":"harvestInterval","type":"uint256"},{"indexed":true,"internalType":"contract IMultipleRewards[]","name":"rewarders","type":"address[]"}],"name":"Add","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newAmount","type":"uint256"}],"name":"AllocPointsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"EmissionRateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"GlintRewardSent","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":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountLockedUp","type":"uint256"}],"name":"RewardLockedUp","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"allocPoint","type":"uint256"},{"indexed":false,"internalType":"uint16","name":"depositFeeBP","type":"uint16"},{"indexed":false,"internalType":"uint256","name":"harvestInterval","type":"uint256"},{"indexed":true,"internalType":"contract IMultipleRewards[]","name":"rewarders","type":"address[]"}],"name":"Set","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldAddress","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"SetFeeAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldAddress","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"SetInvestorAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldAddress","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"SetbeamShareAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldPercent","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newPercent","type":"uint256"}],"name":"SetbeamSharePercent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"StGlintRewardSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lastRewardTimestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lpSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"accBeamPerShare","type":"uint256"}],"name":"UpdatePool","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"MAXIMUM_DEPOSIT_FEE_RATE","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAXIMUM_HARVEST_INTERVAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IBoringERC20","name":"_lpToken","type":"address"},{"internalType":"uint16","name":"_depositFeeBP","type":"uint16"},{"internalType":"uint256","name":"_harvestInterval","type":"uint256"},{"internalType":"contract IMultipleRewards[]","name":"_rewarders","type":"address[]"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"beam","outputs":[{"internalType":"contract IBoringERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beamPerSec","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beamShareAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beamSharePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"canHarvest","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"depositWithPermit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_pids","type":"uint256[]"}],"name":"harvestMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingTokens","outputs":[{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"string[]","name":"symbols","type":"string[]"},{"internalType":"uint256[]","name":"decimals","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IBoringERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardTimestamp","type":"uint256"},{"internalType":"uint256","name":"accBeamPerShare","type":"uint256"},{"internalType":"uint16","name":"depositFeeBP","type":"uint16"},{"internalType":"uint256","name":"harvestInterval","type":"uint256"},{"internalType":"uint256","name":"totalLp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"poolRewarders","outputs":[{"internalType":"address[]","name":"rewarders","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"poolRewardsPerSec","outputs":[{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"string[]","name":"symbols","type":"string[]"},{"internalType":"uint256[]","name":"decimals","type":"uint256[]"},{"internalType":"uint256[]","name":"rewardsPerSec","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"}],"name":"poolTotalLp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"uint16","name":"_depositFeeBP","type":"uint16"},{"internalType":"uint256","name":"_harvestInterval","type":"uint256"},{"internalType":"contract IMultipleRewards[]","name":"_rewarders","type":"address[]"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeAddress","type":"address"}],"name":"setFeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_beamShareAddress","type":"address"}],"name":"setbeamShareAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newbeamSharePercent","type":"uint256"}],"name":"setbeamSharePercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stGlint","outputs":[{"internalType":"contract IstGlint","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stGlintRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startFarming","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBeamInPools","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalLockedUpRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"}],"name":"updateAllocPoint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_beamPerSec","type":"uint256"}],"name":"updateEmissionRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IstGlint","name":"_stGlint","type":"address"}],"name":"updateStGlintAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_ratio","type":"uint256"}],"name":"updateStGlintRatio","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"},{"internalType":"uint256","name":"rewardLockedUp","type":"uint256"},{"internalType":"uint256","name":"nextHarvestUntil","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526019600e553480156200001657600080fd5b5060405162004727380380620047278339810160408190526200003991620001f8565b62000044336200018f565b600180556064831115620000b35760405162461bcd60e51b815260206004820152602c60248201527f636f6e7374727563746f723a20696e76616c6964206265616d7368617265207060448201526b657263656e742076616c756560a01b606482015260840160405180910390fd5b620000c3426301e1338062000274565b600855600280546001600160a01b038881166001600160a01b031992831681179093556004888155600b8054898416908516179055600d879055600c80548784169085161790556003805492861692909316821790925560405163095ea7b360e01b815291820152600019602482015263095ea7b3906044016020604051808303816000875af11580156200015c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200018291906200029c565b50505050505050620002c7565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381168114620001f557600080fd5b50565b60008060008060008060c087890312156200021257600080fd5b86516200021f81620001df565b6020880151604089015191975095506200023981620001df565b6060880151608089015191955093506200025381620001df565b60a08801519092506200026681620001df565b809150509295509295509295565b808201808211156200029657634e487b7160e01b600052601160045260246000fd5b92915050565b600060208284031215620002af57600080fd5b81518015158114620002c057600080fd5b9392505050565b61445080620002d76000396000f3fe608060405234801561001057600080fd5b50600436106102d35760003560e01c8063715018a611610186578063afbcfea1116100e3578063e6fd48bc11610097578063f155beaa11610071578063f155beaa14610626578063f2fde38b1461062f578063ffcd42631461064257600080fd5b8063e6fd48bc146105ea578063eddf9652146105f3578063eff8976b1461060657600080fd5b8063dc640ac9116100c8578063dc640ac9146105ba578063de73149d146105cd578063e2bbb158146105d757600080fd5b8063afbcfea1146105a9578063bc4a9f28146105b157600080fd5b80638da5cb5b1161013a578063913653231161011f578063913653231461052d57806393f1a40b14610536578063a854f0771461059657600080fd5b80638da5cb5b146105095780638f9247d71461051a57600080fd5b8063812c64f11161016b578063812c64f1146104c7578063838f66a1146104e35780638705fcd4146104f657600080fd5b8063715018a6146104ac5780637c823a29146104b457600080fd5b8063441a3e701161023457806351eb05a6116101e857806360e772e1116101cd57806360e772e114610488578063630b5ba114610491578063654c9ece1461049957600080fd5b806351eb05a6146104625780635312ea8e1461047557600080fd5b8063474fa63011610219578063474fa63014610433578063508593ab1461043c578063515bc3231461044f57600080fd5b8063441a3e70146103fd578063465e81ec1461041057600080fd5b806317caf6f11161028b5780632e6c998d116102705780632e6c998d146103b457806335034c85146103d757806341275358146103ea57600080fd5b806317caf6f1146103985780632081ccc4146103a157600080fd5b80630867bacf116102bc5780630867bacf146103045780630ba84cd21461032f5780631526fe271461034257600080fd5b806301e864e5146102d8578063081e3eda146102ed575b600080fd5b6102eb6102e6366004613e06565b610655565b005b6005545b6040519081526020015b60405180910390f35b600254610317906001600160a01b031681565b6040516001600160a01b0390911681526020016102fb565b6102eb61033d366004613e06565b610734565b610355610350366004613e06565b6107c7565b604080516001600160a01b039098168852602088019690965294860193909352606085019190915261ffff16608084015260a083015260c082015260e0016102fb565b6102f160075481565b6102eb6103af366004613e7d565b610824565b6103c76103c2366004613f03565b610bc6565b60405190151581526020016102fb565b600354610317906001600160a01b031681565b600c54610317906001600160a01b031681565b6102eb61040b366004613f33565b610c53565b61042361041e366004613e06565b610f7c565b6040516102fb9493929190613fed565b6102f160095481565b6102eb61044a36600461409f565b611589565b6102eb61045d3660046140e7565b611923565b6102eb610470366004613e06565b611aa4565b6102eb610483366004613e06565b611b0b565b6102f160045481565b6102eb611d83565b6102f16104a7366004613e06565b611de8565b6102eb611e16565b6102eb6104c2366004613e06565b611e6a565b6104d06103e881565b60405161ffff90911681526020016102fb565b600b54610317906001600160a01b031681565b6102eb61050436600461413a565b611f08565b6000546001600160a01b0316610317565b6102eb61052836600461413a565b611ff2565b6102f1600a5481565b610576610544366004613f03565b600660209081526000928352604080842090915290825290208054600182015460028301546003909301549192909184565b6040805194855260208501939093529183015260608201526080016102fb565b6102eb6105a436600461413a565b61205c565b6102eb612146565b6102f1600d5481565b6102eb6105c8366004614157565b612228565b6102f16212750081565b6102eb6105e5366004613f33565b612323565b6102f160085481565b6102eb610601366004613f33565b61238c565b610619610614366004613e06565b6124bc565b6040516102fb9190614199565b6102f1600e5481565b6102eb61063d36600461413a565b6125fd565b610423610650366004613f03565b6126cd565b6000546001600160a01b031633146106a25760405162461bcd60e51b815260206004820181905260248201526000805160206143fb83398151915260448201526064015b60405180910390fd5b60648111156106f35760405162461bcd60e51b815260206004820152601560248201527f696e76616c69642070657263656e742076616c756500000000000000000000006044820152606401610699565b600d5460408051918252602082018390527f77d156628aead9f389392cb58cd732d7cc8221f9f559b29495fa2586a20cb393910160405180910390a1600d55565b6000546001600160a01b0316331461077c5760405162461bcd60e51b815260206004820181905260248201526000805160206143fb8339815191526044820152606401610699565b610784612cc5565b600454604080519182526020820183905233917feedc6338c9c1ad8f3cd6c90dd09dbe98dbd57e610d3e59a17996d07acb0d9511910160405180910390a2600455565b600581815481106107d757600080fd5b600091825260209091206008909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b03909516965092949193909261ffff16919087565b6000546001600160a01b0316331461086c5760405162461bcd60e51b815260206004820181905260248201526000805160206143fb8339815191526044820152606401610699565b600554869081106108b55760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b6044820152606401610699565b600a8211156109065760405162461bcd60e51b815260206004820152601760248201527f7365743a20746f6f206d616e79207265776172646572730000000000000000006044820152606401610699565b6103e861ffff8616111561095c5760405162461bcd60e51b815260206004820152601960248201527f7365743a206465706f7369742066656520746f6f2068696768000000000000006044820152606401610699565b621275008411156109af5760405162461bcd60e51b815260206004820152601d60248201527f7365743a20696e76616c6964206861727665737420696e74657276616c0000006044820152606401610699565b60005b82811015610a4f576109f38484838181106109cf576109cf6141ac565b90506020020160208101906109e4919061413a565b6001600160a01b03163b151590565b610a3f5760405162461bcd60e51b815260206004820152601e60248201527f7365743a207265776172646572206d75737420626520636f6e747261637400006044820152606401610699565b610a48816141d8565b90506109b2565b50610a58612cc5565b8560058881548110610a6c57610a6c6141ac565b906000526020600020906008020160010154600754610a8b91906141f1565b610a959190614204565b6007819055508560058881548110610aaf57610aaf6141ac565b9060005260206000209060080201600101819055508460058881548110610ad857610ad86141ac565b906000526020600020906008020160040160006101000a81548161ffff021916908361ffff1602179055508360058881548110610b1757610b176141ac565b906000526020600020906008020160050181905550828260058981548110610b4157610b416141ac565b90600052602060002090600802016007019190610b5f929190613d39565b508282604051610b70929190614217565b6040805191829003822088835261ffff881660208401529082018690529088907f5ed6f0deef9ab49d02900b40d596df4cd637a2a7fbfa56bbcb377389d3ce8d289060600160405180910390a350505050505050565b60055460009083908110610c125760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b6044820152606401610699565b60008481526006602090815260408083206001600160a01b038716845290915290206008544210801590610c4a575080600301544210155b95945050505050565b600260015403610ca55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610699565b600260015560055482908110610cf35760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b6044820152606401610699565b600060058481548110610d0857610d086141ac565b600091825260208083208784526006825260408085203386529092529220805460089092029092019250841115610d815760405162461bcd60e51b815260206004820181905260248201527f77697468647261773a207573657220616d6f756e74206e6f7420656e6f7567686044820152606401610699565b8382600601541015610dd55760405162461bcd60e51b815260206004820152601f60248201527f77697468647261773a20706f6f6c20746f74616c206e6f7420656e6f756768006044820152606401610699565b610dde85612ce8565b610de785612fcb565b8315610e4b5783816000016000828254610e0191906141f1565b909155505060025482546001600160a01b03918216911603610e355783600a6000828254610e2f91906141f1565b90915550505b8154610e4b906001600160a01b0316338661325e565b6003820154815464e8d4a5100091610e6291614259565b610e6c9190614270565b6001820155600782015460005b81811015610f1857836007018181548110610e9657610e966141ac565b600091825260209091200154835460405163075bbb7f60e41b8152600481018a905233602482015260448101919091526001600160a01b03909116906375bbb7f090606401600060405180830381600087803b158015610ef557600080fd5b505af1158015610f09573d6000803e3d6000fd5b50505050806001019050610e79565b508415610f395784836006016000828254610f3391906141f1565b90915550505b604051858152869033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a350506001805550505050565b606080606080846005805490508110610fcd5760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b6044820152606401610699565b600060058781548110610fe257610fe26141ac565b90600052602060002090600802019050806007018054905060016110069190614204565b67ffffffffffffffff81111561101e5761101e614292565b604051908082528060200260200182016040528015611047578160200160208202803683370190505b50600782015490965061105b906001614204565b67ffffffffffffffff81111561107357611073614292565b6040519080825280602002602001820160405280156110a657816020015b60608152602001906001900390816110915790505b5060078201549095506110ba906001614204565b67ffffffffffffffff8111156110d2576110d2614292565b6040519080825280602002602001820160405280156110fb578160200160208202803683370190505b50600782015490945061110f906001614204565b67ffffffffffffffff81111561112757611127614292565b604051908082528060200260200182016040528015611150578160200160208202803683370190505b5060025487519194506001600160a01b0316908790600090611174576111746141ac565b6001600160a01b0392831660209182029290920101526002546111979116613392565b856000815181106111aa576111aa6141ac565b60209081029190910101526002546111ca906001600160a01b031661346e565b60ff16846000815181106111e0576111e06141ac565b6020908102919091010152600d546103e8906000906111ff90836141f1565b9050816007548260045486600101546112189190614259565b6112229190614259565b61122c9190614270565b6112369190614270565b85600081518110611249576112496141ac565b6020908102919091010152600783015460005b8181101561157c57846007018181548110611279576112796141ac565b600091825260209182902001546040805163f7c618c160e01b815290516001600160a01b039092169263f7c618c1926004808401938290030181865afa1580156112c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112eb91906142a8565b8a6112f7836001614204565b81518110611307576113076141ac565b60200260200101906001600160a01b031690816001600160a01b0316815250506113bf85600701828154811061133f5761133f6141ac565b600091825260209182902001546040805163f7c618c160e01b815290516001600160a01b039092169263f7c618c1926004808401938290030181865afa15801561138d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b191906142a8565b6001600160a01b0316613392565b896113cb836001614204565b815181106113db576113db6141ac565b602002602001018190525061147e8560070182815481106113fe576113fe6141ac565b600091825260209182902001546040805163f7c618c160e01b815290516001600160a01b039092169263f7c618c1926004808401938290030181865afa15801561144c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061147091906142a8565b6001600160a01b031661346e565b60ff168861148d836001614204565b8151811061149d5761149d6141ac565b6020026020010181815250508460070181815481106114be576114be6141ac565b6000918252602090912001546040517f465e81ec000000000000000000000000000000000000000000000000000000008152600481018d90526001600160a01b039091169063465e81ec90602401602060405180830381865afa158015611529573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154d91906142c5565b87611559836001614204565b81518110611569576115696141ac565b602090810291909101015260010161125c565b5050505050509193509193565b6000546001600160a01b031633146115d15760405162461bcd60e51b815260206004820181905260248201526000805160206143fb8339815191526044820152606401610699565b600a8111156116225760405162461bcd60e51b815260206004820152601760248201527f6164643a20746f6f206d616e79207265776172646572730000000000000000006044820152606401610699565b6103e861ffff851611156116785760405162461bcd60e51b815260206004820152601960248201527f6164643a206465706f7369742066656520746f6f2068696768000000000000006044820152606401610699565b621275008311156116cb5760405162461bcd60e51b815260206004820152601d60248201527f6164643a20696e76616c6964206861727665737420696e74657276616c0000006044820152606401610699565b60005b81811015611747576116eb8383838181106109cf576109cf6141ac565b6117375760405162461bcd60e51b815260206004820152601e60248201527f6164643a207265776172646572206d75737420626520636f6e747261637400006044820152606401610699565b611740816141d8565b90506116ce565b50611750612cc5565b6000600854421161176357600854611765565b425b905086600760008282546117799190614204565b925050819055506005604051806101000160405280886001600160a01b03168152602001898152602001838152602001600081526020018761ffff168152602001868152602001600081526020018585808060200260200160405190810160405280939291908181526020018383602002808284376000920182905250939094525050835460018082018655948252602091829020845160089092020180546001600160a01b0319166001600160a01b0390921691909117815583820151948101949094556040830151600285015560608301516003850155608083015160048501805461ffff191661ffff90921691909117905560a0830151600585015560c0830151600685015560e083015180519394936118a0935060078501929190910190613d9c565b50505082826040516118b3929190614217565b6040519081900390206005546001600160a01b038816906118d6906001906141f1565b604080518b815261ffff8a1660208201529081018890527f5ed295c4f5af5aeb1ccd905e1cd55a86ab3bb9fc1fe2346ff64ac47dbef366619060600160405180910390a450505050505050565b6002600154036119755760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610699565b6002600155600554869081106119c35760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b6044820152606401610699565b6000600588815481106119d8576119d86141ac565b6000918252602090912060089091020180546040517fd505accf000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018a90526064810189905260ff8816608482015260a4810187905260c481018690529192506001600160a01b031690819063d505accf9060e401600060405180830381600087803b158015611a7357600080fd5b505af1158015611a87573d6000803e3d6000fd5b50505050611a95898961353f565b50506001805550505050505050565b600260015403611af65760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610699565b6002600155611b0481612ce8565b5060018055565b600260015403611b5d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610699565b6002600181905550600060058281548110611b7a57611b7a6141ac565b6000918252602080832085845260068083526040808620338752909352919093208054600890930290930190810154909350811115611c215760405162461bcd60e51b815260206004820152602960248201527f656d657267656e63792077697468647261773a20706f6f6c20746f74616c206e60448201527f6f7420656e6f75676800000000000000000000000000000000000000000000006064820152608401610699565b6000808355600183018190556002830181905560038301819055600684018054839290611c4f9084906141f1565b90915550600090505b6007840154811015611cfc57836007018181548110611c7957611c796141ac565b600091825260208220015460405163075bbb7f60e41b81526004810188905233602482015260448101929092526001600160a01b0316906375bbb7f090606401600060405180830381600087803b158015611cd357600080fd5b505af1158015611ce7573d6000803e3d6000fd5b5050505080611cf5906141d8565b9050611c58565b5060025483546001600160a01b03918216911603611d2c5780600a6000828254611d2691906141f1565b90915550505b8254611d42906001600160a01b0316338361325e565b604051818152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959060200160405180910390a35050600180555050565b600260015403611dd55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610699565b6002600155611de2612cc5565b60018055565b600060058281548110611dfd57611dfd6141ac565b9060005260206000209060080201600601549050919050565b6000546001600160a01b03163314611e5e5760405162461bcd60e51b815260206004820181905260248201526000805160206143fb8339815191526044820152606401610699565b611e6860006138a2565b565b6000546001600160a01b03163314611eb25760405162461bcd60e51b815260206004820181905260248201526000805160206143fb8339815191526044820152606401610699565b6064811115611f035760405162461bcd60e51b815260206004820152600d60248201527f696e76616c696420726174696f000000000000000000000000000000000000006044820152606401610699565b600e55565b6000546001600160a01b03163314611f505760405162461bcd60e51b815260206004820181905260248201526000805160206143fb8339815191526044820152606401610699565b6001600160a01b038116611fa65760405162461bcd60e51b815260206004820152601760248201527f696e76616c6964206e65772066656520616464726573730000000000000000006044820152606401610699565b600c80546001600160a01b0319166001600160a01b03831690811790915560405133907fd44190acf9d04bdb5d3a1aafff7e6dee8b40b93dfb8c5d3f0eea4b9f4539c3f790600090a350565b6000546001600160a01b0316331461203a5760405162461bcd60e51b815260206004820181905260248201526000805160206143fb8339815191526044820152606401610699565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146120a45760405162461bcd60e51b815260206004820181905260248201526000805160206143fb8339815191526044820152606401610699565b6001600160a01b0381166120fa5760405162461bcd60e51b815260206004820152601d60248201527f696e76616c6964206e6577206265616d736861726520616464726573730000006044820152606401610699565b600b80546001600160a01b0319166001600160a01b03831690811790915560405133907f736e203d68f636addd45749829b5856e056583dc3cd03c2132290db98abcd5b890600090a350565b6000546001600160a01b0316331461218e5760405162461bcd60e51b815260206004820181905260248201526000805160206143fb8339815191526044820152606401610699565b60085442106121df5760405162461bcd60e51b815260206004820152601460248201527f6661726d20616c726561647920737461727465640000000000000000000000006044820152606401610699565b60055460005b8181101561222057600060058281548110612202576122026141ac565b600091825260209091204260089092020160020155506001016121e5565b505042600855565b60026001540361227a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610699565b6002600155601e8111156122d05760405162461bcd60e51b815260206004820152601f60248201527f68617276657374206d616e793a20746f6f206d616e7920706f6f6c20696473006044820152606401610699565b8060005b8163ffffffff168163ffffffff1610156123195761231184848363ffffffff16818110612303576123036141ac565b90506020020135600061353f565b6001016122d4565b5050600180555050565b6002600154036123755760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610699565b6002600155612384828261353f565b505060018055565b6000546001600160a01b031633146123d45760405162461bcd60e51b815260206004820181905260248201526000805160206143fb8339815191526044820152606401610699565b6123dc612cc5565b336001600160a01b03167f802633c8d26237616d81bdac01bc40fcdf36e098832601582ec19d7e431c5ef36005848154811061241a5761241a6141ac565b90600052602060002090600802016001015483604051612444929190918252602082015260400190565b60405180910390a28060058381548110612460576124606141ac565b90600052602060002090600802016001015460075461247f91906141f1565b6124899190614204565b60078190555080600583815481106124a3576124a36141ac565b9060005260206000209060080201600101819055505050565b600554606090829081106125085760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b6044820152606401610699565b60006005848154811061251d5761251d6141ac565b90600052602060002090600802019050806007018054905067ffffffffffffffff81111561254d5761254d614292565b604051908082528060200260200182016040528015612576578160200160208202803683370190505b50925060005b60078201548110156125f55781600701818154811061259d5761259d6141ac565b9060005260206000200160009054906101000a90046001600160a01b03168482815181106125cd576125cd6141ac565b6001600160a01b03909216602092830291909101909101526125ee816141d8565b905061257c565b505050919050565b6000546001600160a01b031633146126455760405162461bcd60e51b815260206004820181905260248201526000805160206143fb8339815191526044820152606401610699565b6001600160a01b0381166126c15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610699565b6126ca816138a2565b50565b60608060608085600580549050811061271e5760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b6044820152606401610699565b600060058881548110612733576127336141ac565b600091825260208083208b8452600680835260408086206001600160a01b038e16875290935291909320600360089093029093019182015490820154600283015492945090914211801561278657508015155b1561282557600084600201544261279d91906141f1565b600d549091506103e8906000906127b490836141f1565b9050600082600754838a60010154600454886127d09190614259565b6127da9190614259565b6127e49190614259565b6127ee9190614270565b6127f89190614270565b90508461280a64e8d4a5100083614259565b6128149190614270565b61281e9087614204565b9550505050505b60008360020154846001015464e8d4a510008587600001546128479190614259565b6128519190614270565b61285b91906141f1565b6128659190614204565b6007860154909150612878906001614204565b67ffffffffffffffff81111561289057612890614292565b6040519080825280602002602001820160405280156128b9578160200160208202803683370190505b506007860154909a506128cd906001614204565b67ffffffffffffffff8111156128e5576128e5614292565b60405190808252806020026020018201604052801561291857816020015b60608152602001906001900390816129035790505b50600786015490995061292c906001614204565b67ffffffffffffffff81111561294457612944614292565b60405190808252806020026020018201604052801561296d578160200160208202803683370190505b506007860154909750612981906001614204565b67ffffffffffffffff81111561299957612999614292565b6040519080825280602002602001820160405280156129c2578160200160208202803683370190505b506002548b519199506001600160a01b0316908b906000906129e6576129e66141ac565b6001600160a01b039283166020918202929092010152600254612a099116613392565b89600081518110612a1c57612a1c6141ac565b6020908102919091010152600254612a3c906001600160a01b031661346e565b60ff1688600081518110612a5257612a526141ac565b6020026020010181815250508087600081518110612a7257612a726141ac565b6020908102919091010152600785015460005b81811015612cb457866007018181548110612aa257612aa26141ac565b600091825260209182902001546040805163f7c618c160e01b815290516001600160a01b039092169263f7c618c1926004808401938290030181865afa158015612af0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b1491906142a8565b8c612b20836001614204565b81518110612b3057612b306141ac565b60200260200101906001600160a01b031690816001600160a01b031681525050612b6887600701828154811061133f5761133f6141ac565b8b612b74836001614204565b81518110612b8457612b846141ac565b6020026020010181905250612ba78760070182815481106113fe576113fe6141ac565b60ff168a612bb6836001614204565b81518110612bc657612bc66141ac565b602002602001018181525050866007018181548110612be757612be76141ac565b9060005260206000200160009054906101000a90046001600160a01b03166001600160a01b031663ffcd42638f8f6040518363ffffffff1660e01b8152600401612c449291909182526001600160a01b0316602082015260400190565b602060405180830381865afa158015612c61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c8591906142c5565b89612c91836001614204565b81518110612ca157612ca16141ac565b6020908102919091010152600101612a85565b505050505050505092959194509250565b60055460005b81811015612ce457612cdc81612ce8565b600101612ccb565b5050565b60055481908110612d315760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b6044820152606401610699565b600060058381548110612d4657612d466141ac565b9060005260206000209060080201905080600201544211612d6657505050565b6006810154801580612d7a57506001820154155b15612d8b5750426002909101555050565b6000826002015442612d9d91906141f1565b90506000600754846001015460045484612db79190614259565b612dc19190614259565b612dcb9190614270565b600d549091506103e890600090612de290836141f1565b9050600082600d5485612df59190614259565b612dff9190614270565b90508015612e8957600254600b546040517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152602481018490529116906340c10f1990604401600060405180830381600087803b158015612e7057600080fd5b505af1158015612e84573d6000803e3d6000fd5b505050505b6002546001600160a01b03166340c10f193085612ea68689614259565b612eb09190614270565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015612f0e57600080fd5b505af1158015612f22573d6000803e3d6000fd5b505050600688015484915083612f3d64e8d4a5100088614259565b612f479190614259565b612f519190614270565b612f5b9190614270565b876003016000828254612f6e9190614204565b909155505042600288018190556003880154604080519283526020830189905282015289907f3be3541fc42237d611b30329040bfa4569541d156560acdbbae57640d20b8f469060600160405180910390a2505050505050505050565b600060058281548110612fe057612fe06141ac565b60009182526020808320858452600682526040808520338652909252922060038101546008909202909201925015801561301c57506008544210155b156130365760058201546130309042614204565b60038201555b6000816001015464e8d4a51000846003015484600001546130579190614259565b6130619190614270565b61306b91906141f1565b90506130778433610bc6565b1561320857600081118061308f575060008260020154115b156132035760008260020154826130a69190614204565b90508260020154600960008282546130be91906141f1565b9091555050600060028401819055600585015442016003850155600e546064906130e89084614259565b6130f29190614270565b905080156131af576003546040517f9bfa5181000000000000000000000000000000000000000000000000000000008152336004820152602481018390526001600160a01b0390911690639bfa518190604401600060405180830381600087803b15801561315f57600080fd5b505af1158015613173573d6000803e3d6000fd5b50506040518381528892503391507fde25734680566233c8d604b2693ce423027f1dffde8c16b59900d409eab8729b9060200160405180910390a35b6131c2336131bd83856141f1565b6138f2565b85337f5b1dc9c14e155190a63d4318514bbaa2dbca5a5112613540138506b480d05c546131ef84866141f1565b60405190815260200160405180910390a350505b613258565b801561325857600980548201905560028201805482019055604051818152849033907fee470483107f579a55c754fa00613c45a9a3b617a418b39cb0be97e5381ba7c19060200160405180910390a35b50505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03167fa9059cbb0000000000000000000000000000000000000000000000000000000017905291516000928392908716916132d391906142de565b6000604051808303816000865af19150503d8060008114613310576040519150601f19603f3d011682016040523d82523d6000602084013e613315565b606091505b509150915081801561333f57508051158061333f57508080602001905181019061333f91906142fa565b61338b5760405162461bcd60e51b815260206004820152601c60248201527f426f72696e6745524332303a205472616e73666572206661696c6564000000006044820152606401610699565b5050505050565b60408051600481526024810182526020810180516001600160e01b03167f95d89b4100000000000000000000000000000000000000000000000000000000179052905160609160009182916001600160a01b038616916133f291906142de565b600060405180830381855afa9150503d806000811461342d576040519150601f19603f3d011682016040523d82523d6000602084013e613432565b606091505b50915091508161345d57604051806040016040528060038152602001623f3f3f60e81b815250613466565b61346681613a24565b949350505050565b60408051600481526024810182526020810180516001600160e01b03167f313ce567000000000000000000000000000000000000000000000000000000001790529051600091829182916001600160a01b038616916134cd91906142de565b600060405180830381855afa9150503d8060008114613508576040519150601f19603f3d011682016040523d82523d6000602084013e61350d565b606091505b5091509150818015613520575080516020145b61352b576012613466565b80806020019051810190613466919061431c565b600554829081106135885760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b6044820152606401610699565b60006005848154811061359d5761359d6141ac565b600091825260208083208784526006825260408085203386529092529220600890910290910191506135ce85612ce8565b6135d785612fcb565b83156137755781546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015613625573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061364991906142c5565b8354909150613663906001600160a01b0316333088613bfc565b82546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156136ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136cf91906142c5565b90506136db82826141f1565b600485015490965061ffff161561373d576004840154600090612710906137069061ffff1689614259565b6137109190614270565b600c54865491925061372f916001600160a01b0390811691168361325e565b61373981886141f1565b9650505b82548601835560025484546001600160a01b039182169116036137725785600a600082825461376c9190614204565b90915550505b50505b6003820154815464e8d4a510009161378c91614259565b6137969190614270565b6001820155600782015460005b81811015613842578360070181815481106137c0576137c06141ac565b600091825260209091200154835460405163075bbb7f60e41b8152600481018a905233602482015260448101919091526001600160a01b03909116906375bbb7f090606401600060405180830381600087803b15801561381f57600080fd5b505af1158015613833573d6000803e3d6000fd5b505050508060010190506137a3565b508415613863578483600601600082825461385d9190614204565b90915550505b604051858152869033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159060200160405180910390a3505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600a546002546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa15801561393d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061396191906142c5565b1115612ce457600a546002546040516370a0823160e01b8152306004820152600092916001600160a01b0316906370a0823190602401602060405180830381865afa1580156139b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139d891906142c5565b6139e291906141f1565b9050808210613a0757600254613a02906001600160a01b0316848361325e565b505050565b8115613a0257600254613a02906001600160a01b0316848461325e565b60606040825110613a495781806020019051810190613a439190614339565b92915050565b8151602003613bd85760005b60208160ff16108015613aa25750828160ff1681518110613a7857613a786141ac565b01602001517fff000000000000000000000000000000000000000000000000000000000000001615155b15613ab95780613ab1816143db565b915050613a55565b60008160ff1667ffffffffffffffff811115613ad757613ad7614292565b6040519080825280601f01601f191660200182016040528015613b01576020820181803683370190505b509050600091505b60208260ff16108015613b565750838260ff1681518110613b2c57613b2c6141ac565b01602001517fff000000000000000000000000000000000000000000000000000000000000001615155b15613bd157838260ff1681518110613b7057613b706141ac565b602001015160f81c60f81b818360ff1681518110613b9057613b906141ac565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535081613bc9816143db565b925050613b09565b9392505050565b50506040805180820190915260038152623f3f3f60e81b602082015290565b919050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03167f23b872dd000000000000000000000000000000000000000000000000000000001790529151600092839290881691613c7991906142de565b6000604051808303816000865af19150503d8060008114613cb6576040519150601f19603f3d011682016040523d82523d6000602084013e613cbb565b606091505b5091509150818015613ce5575080511580613ce5575080806020019051810190613ce591906142fa565b613d315760405162461bcd60e51b815260206004820181905260248201527f426f72696e6745524332303a205472616e7366657246726f6d206661696c65646044820152606401610699565b505050505050565b828054828255906000526020600020908101928215613d8c579160200282015b82811115613d8c5781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190613d59565b50613d98929150613df1565b5090565b828054828255906000526020600020908101928215613d8c579160200282015b82811115613d8c57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190613dbc565b5b80821115613d985760008155600101613df2565b600060208284031215613e1857600080fd5b5035919050565b803561ffff81168114613bf757600080fd5b60008083601f840112613e4357600080fd5b50813567ffffffffffffffff811115613e5b57600080fd5b6020830191508360208260051b8501011115613e7657600080fd5b9250929050565b60008060008060008060a08789031215613e9657600080fd5b8635955060208701359450613ead60408801613e1f565b935060608701359250608087013567ffffffffffffffff811115613ed057600080fd5b613edc89828a01613e31565b979a9699509497509295939492505050565b6001600160a01b03811681146126ca57600080fd5b60008060408385031215613f1657600080fd5b823591506020830135613f2881613eee565b809150509250929050565b60008060408385031215613f4657600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b83811015613f8e5781516001600160a01b031687529582019590820190600101613f69565b509495945050505050565b60005b83811015613fb4578181015183820152602001613f9c565b50506000910152565b600081518084526020808501945080840160005b83811015613f8e57815187529582019590820190600101613fd1565b6080815260006140006080830187613f55565b6020838203818501528187518084528284019150828160051b850101838a0160005b8381101561406857601f19808885030186528251805180865261404a818a88018b8501613f99565b96880196601f01909116939093018601925090850190600101614022565b5050868103604088015261407c818a613fbd565b94505050505082810360608401526140948185613fbd565b979650505050505050565b60008060008060008060a087890312156140b857600080fd5b8635955060208701356140ca81613eee565b9450613ead60408801613e1f565b60ff811681146126ca57600080fd5b60008060008060008060c0878903121561410057600080fd5b8635955060208701359450604087013593506060870135614120816140d8565b9598949750929560808101359460a0909101359350915050565b60006020828403121561414c57600080fd5b8135613bd181613eee565b6000806020838503121561416a57600080fd5b823567ffffffffffffffff81111561418157600080fd5b61418d85828601613e31565b90969095509350505050565b602081526000613bd16020830184613f55565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016141ea576141ea6141c2565b5060010190565b81810381811115613a4357613a436141c2565b80820180821115613a4357613a436141c2565b60008184825b8581101561424e57813561423081613eee565b6001600160a01b03168352602092830192919091019060010161421d565b509095945050505050565b8082028115828204841417613a4357613a436141c2565b60008261428d57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156142ba57600080fd5b8151613bd181613eee565b6000602082840312156142d757600080fd5b5051919050565b600082516142f0818460208701613f99565b9190910192915050565b60006020828403121561430c57600080fd5b81518015158114613bd157600080fd5b60006020828403121561432e57600080fd5b8151613bd1816140d8565b60006020828403121561434b57600080fd5b815167ffffffffffffffff8082111561436357600080fd5b818401915084601f83011261437757600080fd5b81518181111561438957614389614292565b604051601f8201601f19908116603f011681019083821181831017156143b1576143b1614292565b816040528281528760208487010111156143ca57600080fd5b614094836020830160208801613f99565b600060ff821660ff81036143f1576143f16141c2565b6001019291505056fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a264697066735822122045b7bf39e08a4f1d7390219f72810942a57a51adb73caa45da5dfd46155144fa64736f6c63430008130033000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d580000000000000000000000000000000000000000000000001d7d843dc3b480000000000000000000000000000a68f81fe8c23cf19fd0f90be3734f68ff2ef45100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a68f81fe8c23cf19fd0f90be3734f68ff2ef45100000000000000000000000063d43d0edda7de4b5ed9b2f2aa855f81fbd71697

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102d35760003560e01c8063715018a611610186578063afbcfea1116100e3578063e6fd48bc11610097578063f155beaa11610071578063f155beaa14610626578063f2fde38b1461062f578063ffcd42631461064257600080fd5b8063e6fd48bc146105ea578063eddf9652146105f3578063eff8976b1461060657600080fd5b8063dc640ac9116100c8578063dc640ac9146105ba578063de73149d146105cd578063e2bbb158146105d757600080fd5b8063afbcfea1146105a9578063bc4a9f28146105b157600080fd5b80638da5cb5b1161013a578063913653231161011f578063913653231461052d57806393f1a40b14610536578063a854f0771461059657600080fd5b80638da5cb5b146105095780638f9247d71461051a57600080fd5b8063812c64f11161016b578063812c64f1146104c7578063838f66a1146104e35780638705fcd4146104f657600080fd5b8063715018a6146104ac5780637c823a29146104b457600080fd5b8063441a3e701161023457806351eb05a6116101e857806360e772e1116101cd57806360e772e114610488578063630b5ba114610491578063654c9ece1461049957600080fd5b806351eb05a6146104625780635312ea8e1461047557600080fd5b8063474fa63011610219578063474fa63014610433578063508593ab1461043c578063515bc3231461044f57600080fd5b8063441a3e70146103fd578063465e81ec1461041057600080fd5b806317caf6f11161028b5780632e6c998d116102705780632e6c998d146103b457806335034c85146103d757806341275358146103ea57600080fd5b806317caf6f1146103985780632081ccc4146103a157600080fd5b80630867bacf116102bc5780630867bacf146103045780630ba84cd21461032f5780631526fe271461034257600080fd5b806301e864e5146102d8578063081e3eda146102ed575b600080fd5b6102eb6102e6366004613e06565b610655565b005b6005545b6040519081526020015b60405180910390f35b600254610317906001600160a01b031681565b6040516001600160a01b0390911681526020016102fb565b6102eb61033d366004613e06565b610734565b610355610350366004613e06565b6107c7565b604080516001600160a01b039098168852602088019690965294860193909352606085019190915261ffff16608084015260a083015260c082015260e0016102fb565b6102f160075481565b6102eb6103af366004613e7d565b610824565b6103c76103c2366004613f03565b610bc6565b60405190151581526020016102fb565b600354610317906001600160a01b031681565b600c54610317906001600160a01b031681565b6102eb61040b366004613f33565b610c53565b61042361041e366004613e06565b610f7c565b6040516102fb9493929190613fed565b6102f160095481565b6102eb61044a36600461409f565b611589565b6102eb61045d3660046140e7565b611923565b6102eb610470366004613e06565b611aa4565b6102eb610483366004613e06565b611b0b565b6102f160045481565b6102eb611d83565b6102f16104a7366004613e06565b611de8565b6102eb611e16565b6102eb6104c2366004613e06565b611e6a565b6104d06103e881565b60405161ffff90911681526020016102fb565b600b54610317906001600160a01b031681565b6102eb61050436600461413a565b611f08565b6000546001600160a01b0316610317565b6102eb61052836600461413a565b611ff2565b6102f1600a5481565b610576610544366004613f03565b600660209081526000928352604080842090915290825290208054600182015460028301546003909301549192909184565b6040805194855260208501939093529183015260608201526080016102fb565b6102eb6105a436600461413a565b61205c565b6102eb612146565b6102f1600d5481565b6102eb6105c8366004614157565b612228565b6102f16212750081565b6102eb6105e5366004613f33565b612323565b6102f160085481565b6102eb610601366004613f33565b61238c565b610619610614366004613e06565b6124bc565b6040516102fb9190614199565b6102f1600e5481565b6102eb61063d36600461413a565b6125fd565b610423610650366004613f03565b6126cd565b6000546001600160a01b031633146106a25760405162461bcd60e51b815260206004820181905260248201526000805160206143fb83398151915260448201526064015b60405180910390fd5b60648111156106f35760405162461bcd60e51b815260206004820152601560248201527f696e76616c69642070657263656e742076616c756500000000000000000000006044820152606401610699565b600d5460408051918252602082018390527f77d156628aead9f389392cb58cd732d7cc8221f9f559b29495fa2586a20cb393910160405180910390a1600d55565b6000546001600160a01b0316331461077c5760405162461bcd60e51b815260206004820181905260248201526000805160206143fb8339815191526044820152606401610699565b610784612cc5565b600454604080519182526020820183905233917feedc6338c9c1ad8f3cd6c90dd09dbe98dbd57e610d3e59a17996d07acb0d9511910160405180910390a2600455565b600581815481106107d757600080fd5b600091825260209091206008909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b03909516965092949193909261ffff16919087565b6000546001600160a01b0316331461086c5760405162461bcd60e51b815260206004820181905260248201526000805160206143fb8339815191526044820152606401610699565b600554869081106108b55760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b6044820152606401610699565b600a8211156109065760405162461bcd60e51b815260206004820152601760248201527f7365743a20746f6f206d616e79207265776172646572730000000000000000006044820152606401610699565b6103e861ffff8616111561095c5760405162461bcd60e51b815260206004820152601960248201527f7365743a206465706f7369742066656520746f6f2068696768000000000000006044820152606401610699565b621275008411156109af5760405162461bcd60e51b815260206004820152601d60248201527f7365743a20696e76616c6964206861727665737420696e74657276616c0000006044820152606401610699565b60005b82811015610a4f576109f38484838181106109cf576109cf6141ac565b90506020020160208101906109e4919061413a565b6001600160a01b03163b151590565b610a3f5760405162461bcd60e51b815260206004820152601e60248201527f7365743a207265776172646572206d75737420626520636f6e747261637400006044820152606401610699565b610a48816141d8565b90506109b2565b50610a58612cc5565b8560058881548110610a6c57610a6c6141ac565b906000526020600020906008020160010154600754610a8b91906141f1565b610a959190614204565b6007819055508560058881548110610aaf57610aaf6141ac565b9060005260206000209060080201600101819055508460058881548110610ad857610ad86141ac565b906000526020600020906008020160040160006101000a81548161ffff021916908361ffff1602179055508360058881548110610b1757610b176141ac565b906000526020600020906008020160050181905550828260058981548110610b4157610b416141ac565b90600052602060002090600802016007019190610b5f929190613d39565b508282604051610b70929190614217565b6040805191829003822088835261ffff881660208401529082018690529088907f5ed6f0deef9ab49d02900b40d596df4cd637a2a7fbfa56bbcb377389d3ce8d289060600160405180910390a350505050505050565b60055460009083908110610c125760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b6044820152606401610699565b60008481526006602090815260408083206001600160a01b038716845290915290206008544210801590610c4a575080600301544210155b95945050505050565b600260015403610ca55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610699565b600260015560055482908110610cf35760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b6044820152606401610699565b600060058481548110610d0857610d086141ac565b600091825260208083208784526006825260408085203386529092529220805460089092029092019250841115610d815760405162461bcd60e51b815260206004820181905260248201527f77697468647261773a207573657220616d6f756e74206e6f7420656e6f7567686044820152606401610699565b8382600601541015610dd55760405162461bcd60e51b815260206004820152601f60248201527f77697468647261773a20706f6f6c20746f74616c206e6f7420656e6f756768006044820152606401610699565b610dde85612ce8565b610de785612fcb565b8315610e4b5783816000016000828254610e0191906141f1565b909155505060025482546001600160a01b03918216911603610e355783600a6000828254610e2f91906141f1565b90915550505b8154610e4b906001600160a01b0316338661325e565b6003820154815464e8d4a5100091610e6291614259565b610e6c9190614270565b6001820155600782015460005b81811015610f1857836007018181548110610e9657610e966141ac565b600091825260209091200154835460405163075bbb7f60e41b8152600481018a905233602482015260448101919091526001600160a01b03909116906375bbb7f090606401600060405180830381600087803b158015610ef557600080fd5b505af1158015610f09573d6000803e3d6000fd5b50505050806001019050610e79565b508415610f395784836006016000828254610f3391906141f1565b90915550505b604051858152869033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a350506001805550505050565b606080606080846005805490508110610fcd5760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b6044820152606401610699565b600060058781548110610fe257610fe26141ac565b90600052602060002090600802019050806007018054905060016110069190614204565b67ffffffffffffffff81111561101e5761101e614292565b604051908082528060200260200182016040528015611047578160200160208202803683370190505b50600782015490965061105b906001614204565b67ffffffffffffffff81111561107357611073614292565b6040519080825280602002602001820160405280156110a657816020015b60608152602001906001900390816110915790505b5060078201549095506110ba906001614204565b67ffffffffffffffff8111156110d2576110d2614292565b6040519080825280602002602001820160405280156110fb578160200160208202803683370190505b50600782015490945061110f906001614204565b67ffffffffffffffff81111561112757611127614292565b604051908082528060200260200182016040528015611150578160200160208202803683370190505b5060025487519194506001600160a01b0316908790600090611174576111746141ac565b6001600160a01b0392831660209182029290920101526002546111979116613392565b856000815181106111aa576111aa6141ac565b60209081029190910101526002546111ca906001600160a01b031661346e565b60ff16846000815181106111e0576111e06141ac565b6020908102919091010152600d546103e8906000906111ff90836141f1565b9050816007548260045486600101546112189190614259565b6112229190614259565b61122c9190614270565b6112369190614270565b85600081518110611249576112496141ac565b6020908102919091010152600783015460005b8181101561157c57846007018181548110611279576112796141ac565b600091825260209182902001546040805163f7c618c160e01b815290516001600160a01b039092169263f7c618c1926004808401938290030181865afa1580156112c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112eb91906142a8565b8a6112f7836001614204565b81518110611307576113076141ac565b60200260200101906001600160a01b031690816001600160a01b0316815250506113bf85600701828154811061133f5761133f6141ac565b600091825260209182902001546040805163f7c618c160e01b815290516001600160a01b039092169263f7c618c1926004808401938290030181865afa15801561138d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b191906142a8565b6001600160a01b0316613392565b896113cb836001614204565b815181106113db576113db6141ac565b602002602001018190525061147e8560070182815481106113fe576113fe6141ac565b600091825260209182902001546040805163f7c618c160e01b815290516001600160a01b039092169263f7c618c1926004808401938290030181865afa15801561144c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061147091906142a8565b6001600160a01b031661346e565b60ff168861148d836001614204565b8151811061149d5761149d6141ac565b6020026020010181815250508460070181815481106114be576114be6141ac565b6000918252602090912001546040517f465e81ec000000000000000000000000000000000000000000000000000000008152600481018d90526001600160a01b039091169063465e81ec90602401602060405180830381865afa158015611529573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154d91906142c5565b87611559836001614204565b81518110611569576115696141ac565b602090810291909101015260010161125c565b5050505050509193509193565b6000546001600160a01b031633146115d15760405162461bcd60e51b815260206004820181905260248201526000805160206143fb8339815191526044820152606401610699565b600a8111156116225760405162461bcd60e51b815260206004820152601760248201527f6164643a20746f6f206d616e79207265776172646572730000000000000000006044820152606401610699565b6103e861ffff851611156116785760405162461bcd60e51b815260206004820152601960248201527f6164643a206465706f7369742066656520746f6f2068696768000000000000006044820152606401610699565b621275008311156116cb5760405162461bcd60e51b815260206004820152601d60248201527f6164643a20696e76616c6964206861727665737420696e74657276616c0000006044820152606401610699565b60005b81811015611747576116eb8383838181106109cf576109cf6141ac565b6117375760405162461bcd60e51b815260206004820152601e60248201527f6164643a207265776172646572206d75737420626520636f6e747261637400006044820152606401610699565b611740816141d8565b90506116ce565b50611750612cc5565b6000600854421161176357600854611765565b425b905086600760008282546117799190614204565b925050819055506005604051806101000160405280886001600160a01b03168152602001898152602001838152602001600081526020018761ffff168152602001868152602001600081526020018585808060200260200160405190810160405280939291908181526020018383602002808284376000920182905250939094525050835460018082018655948252602091829020845160089092020180546001600160a01b0319166001600160a01b0390921691909117815583820151948101949094556040830151600285015560608301516003850155608083015160048501805461ffff191661ffff90921691909117905560a0830151600585015560c0830151600685015560e083015180519394936118a0935060078501929190910190613d9c565b50505082826040516118b3929190614217565b6040519081900390206005546001600160a01b038816906118d6906001906141f1565b604080518b815261ffff8a1660208201529081018890527f5ed295c4f5af5aeb1ccd905e1cd55a86ab3bb9fc1fe2346ff64ac47dbef366619060600160405180910390a450505050505050565b6002600154036119755760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610699565b6002600155600554869081106119c35760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b6044820152606401610699565b6000600588815481106119d8576119d86141ac565b6000918252602090912060089091020180546040517fd505accf000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018a90526064810189905260ff8816608482015260a4810187905260c481018690529192506001600160a01b031690819063d505accf9060e401600060405180830381600087803b158015611a7357600080fd5b505af1158015611a87573d6000803e3d6000fd5b50505050611a95898961353f565b50506001805550505050505050565b600260015403611af65760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610699565b6002600155611b0481612ce8565b5060018055565b600260015403611b5d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610699565b6002600181905550600060058281548110611b7a57611b7a6141ac565b6000918252602080832085845260068083526040808620338752909352919093208054600890930290930190810154909350811115611c215760405162461bcd60e51b815260206004820152602960248201527f656d657267656e63792077697468647261773a20706f6f6c20746f74616c206e60448201527f6f7420656e6f75676800000000000000000000000000000000000000000000006064820152608401610699565b6000808355600183018190556002830181905560038301819055600684018054839290611c4f9084906141f1565b90915550600090505b6007840154811015611cfc57836007018181548110611c7957611c796141ac565b600091825260208220015460405163075bbb7f60e41b81526004810188905233602482015260448101929092526001600160a01b0316906375bbb7f090606401600060405180830381600087803b158015611cd357600080fd5b505af1158015611ce7573d6000803e3d6000fd5b5050505080611cf5906141d8565b9050611c58565b5060025483546001600160a01b03918216911603611d2c5780600a6000828254611d2691906141f1565b90915550505b8254611d42906001600160a01b0316338361325e565b604051818152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959060200160405180910390a35050600180555050565b600260015403611dd55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610699565b6002600155611de2612cc5565b60018055565b600060058281548110611dfd57611dfd6141ac565b9060005260206000209060080201600601549050919050565b6000546001600160a01b03163314611e5e5760405162461bcd60e51b815260206004820181905260248201526000805160206143fb8339815191526044820152606401610699565b611e6860006138a2565b565b6000546001600160a01b03163314611eb25760405162461bcd60e51b815260206004820181905260248201526000805160206143fb8339815191526044820152606401610699565b6064811115611f035760405162461bcd60e51b815260206004820152600d60248201527f696e76616c696420726174696f000000000000000000000000000000000000006044820152606401610699565b600e55565b6000546001600160a01b03163314611f505760405162461bcd60e51b815260206004820181905260248201526000805160206143fb8339815191526044820152606401610699565b6001600160a01b038116611fa65760405162461bcd60e51b815260206004820152601760248201527f696e76616c6964206e65772066656520616464726573730000000000000000006044820152606401610699565b600c80546001600160a01b0319166001600160a01b03831690811790915560405133907fd44190acf9d04bdb5d3a1aafff7e6dee8b40b93dfb8c5d3f0eea4b9f4539c3f790600090a350565b6000546001600160a01b0316331461203a5760405162461bcd60e51b815260206004820181905260248201526000805160206143fb8339815191526044820152606401610699565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146120a45760405162461bcd60e51b815260206004820181905260248201526000805160206143fb8339815191526044820152606401610699565b6001600160a01b0381166120fa5760405162461bcd60e51b815260206004820152601d60248201527f696e76616c6964206e6577206265616d736861726520616464726573730000006044820152606401610699565b600b80546001600160a01b0319166001600160a01b03831690811790915560405133907f736e203d68f636addd45749829b5856e056583dc3cd03c2132290db98abcd5b890600090a350565b6000546001600160a01b0316331461218e5760405162461bcd60e51b815260206004820181905260248201526000805160206143fb8339815191526044820152606401610699565b60085442106121df5760405162461bcd60e51b815260206004820152601460248201527f6661726d20616c726561647920737461727465640000000000000000000000006044820152606401610699565b60055460005b8181101561222057600060058281548110612202576122026141ac565b600091825260209091204260089092020160020155506001016121e5565b505042600855565b60026001540361227a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610699565b6002600155601e8111156122d05760405162461bcd60e51b815260206004820152601f60248201527f68617276657374206d616e793a20746f6f206d616e7920706f6f6c20696473006044820152606401610699565b8060005b8163ffffffff168163ffffffff1610156123195761231184848363ffffffff16818110612303576123036141ac565b90506020020135600061353f565b6001016122d4565b5050600180555050565b6002600154036123755760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610699565b6002600155612384828261353f565b505060018055565b6000546001600160a01b031633146123d45760405162461bcd60e51b815260206004820181905260248201526000805160206143fb8339815191526044820152606401610699565b6123dc612cc5565b336001600160a01b03167f802633c8d26237616d81bdac01bc40fcdf36e098832601582ec19d7e431c5ef36005848154811061241a5761241a6141ac565b90600052602060002090600802016001015483604051612444929190918252602082015260400190565b60405180910390a28060058381548110612460576124606141ac565b90600052602060002090600802016001015460075461247f91906141f1565b6124899190614204565b60078190555080600583815481106124a3576124a36141ac565b9060005260206000209060080201600101819055505050565b600554606090829081106125085760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b6044820152606401610699565b60006005848154811061251d5761251d6141ac565b90600052602060002090600802019050806007018054905067ffffffffffffffff81111561254d5761254d614292565b604051908082528060200260200182016040528015612576578160200160208202803683370190505b50925060005b60078201548110156125f55781600701818154811061259d5761259d6141ac565b9060005260206000200160009054906101000a90046001600160a01b03168482815181106125cd576125cd6141ac565b6001600160a01b03909216602092830291909101909101526125ee816141d8565b905061257c565b505050919050565b6000546001600160a01b031633146126455760405162461bcd60e51b815260206004820181905260248201526000805160206143fb8339815191526044820152606401610699565b6001600160a01b0381166126c15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610699565b6126ca816138a2565b50565b60608060608085600580549050811061271e5760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b6044820152606401610699565b600060058881548110612733576127336141ac565b600091825260208083208b8452600680835260408086206001600160a01b038e16875290935291909320600360089093029093019182015490820154600283015492945090914211801561278657508015155b1561282557600084600201544261279d91906141f1565b600d549091506103e8906000906127b490836141f1565b9050600082600754838a60010154600454886127d09190614259565b6127da9190614259565b6127e49190614259565b6127ee9190614270565b6127f89190614270565b90508461280a64e8d4a5100083614259565b6128149190614270565b61281e9087614204565b9550505050505b60008360020154846001015464e8d4a510008587600001546128479190614259565b6128519190614270565b61285b91906141f1565b6128659190614204565b6007860154909150612878906001614204565b67ffffffffffffffff81111561289057612890614292565b6040519080825280602002602001820160405280156128b9578160200160208202803683370190505b506007860154909a506128cd906001614204565b67ffffffffffffffff8111156128e5576128e5614292565b60405190808252806020026020018201604052801561291857816020015b60608152602001906001900390816129035790505b50600786015490995061292c906001614204565b67ffffffffffffffff81111561294457612944614292565b60405190808252806020026020018201604052801561296d578160200160208202803683370190505b506007860154909750612981906001614204565b67ffffffffffffffff81111561299957612999614292565b6040519080825280602002602001820160405280156129c2578160200160208202803683370190505b506002548b519199506001600160a01b0316908b906000906129e6576129e66141ac565b6001600160a01b039283166020918202929092010152600254612a099116613392565b89600081518110612a1c57612a1c6141ac565b6020908102919091010152600254612a3c906001600160a01b031661346e565b60ff1688600081518110612a5257612a526141ac565b6020026020010181815250508087600081518110612a7257612a726141ac565b6020908102919091010152600785015460005b81811015612cb457866007018181548110612aa257612aa26141ac565b600091825260209182902001546040805163f7c618c160e01b815290516001600160a01b039092169263f7c618c1926004808401938290030181865afa158015612af0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b1491906142a8565b8c612b20836001614204565b81518110612b3057612b306141ac565b60200260200101906001600160a01b031690816001600160a01b031681525050612b6887600701828154811061133f5761133f6141ac565b8b612b74836001614204565b81518110612b8457612b846141ac565b6020026020010181905250612ba78760070182815481106113fe576113fe6141ac565b60ff168a612bb6836001614204565b81518110612bc657612bc66141ac565b602002602001018181525050866007018181548110612be757612be76141ac565b9060005260206000200160009054906101000a90046001600160a01b03166001600160a01b031663ffcd42638f8f6040518363ffffffff1660e01b8152600401612c449291909182526001600160a01b0316602082015260400190565b602060405180830381865afa158015612c61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c8591906142c5565b89612c91836001614204565b81518110612ca157612ca16141ac565b6020908102919091010152600101612a85565b505050505050505092959194509250565b60055460005b81811015612ce457612cdc81612ce8565b600101612ccb565b5050565b60055481908110612d315760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b6044820152606401610699565b600060058381548110612d4657612d466141ac565b9060005260206000209060080201905080600201544211612d6657505050565b6006810154801580612d7a57506001820154155b15612d8b5750426002909101555050565b6000826002015442612d9d91906141f1565b90506000600754846001015460045484612db79190614259565b612dc19190614259565b612dcb9190614270565b600d549091506103e890600090612de290836141f1565b9050600082600d5485612df59190614259565b612dff9190614270565b90508015612e8957600254600b546040517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152602481018490529116906340c10f1990604401600060405180830381600087803b158015612e7057600080fd5b505af1158015612e84573d6000803e3d6000fd5b505050505b6002546001600160a01b03166340c10f193085612ea68689614259565b612eb09190614270565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015612f0e57600080fd5b505af1158015612f22573d6000803e3d6000fd5b505050600688015484915083612f3d64e8d4a5100088614259565b612f479190614259565b612f519190614270565b612f5b9190614270565b876003016000828254612f6e9190614204565b909155505042600288018190556003880154604080519283526020830189905282015289907f3be3541fc42237d611b30329040bfa4569541d156560acdbbae57640d20b8f469060600160405180910390a2505050505050505050565b600060058281548110612fe057612fe06141ac565b60009182526020808320858452600682526040808520338652909252922060038101546008909202909201925015801561301c57506008544210155b156130365760058201546130309042614204565b60038201555b6000816001015464e8d4a51000846003015484600001546130579190614259565b6130619190614270565b61306b91906141f1565b90506130778433610bc6565b1561320857600081118061308f575060008260020154115b156132035760008260020154826130a69190614204565b90508260020154600960008282546130be91906141f1565b9091555050600060028401819055600585015442016003850155600e546064906130e89084614259565b6130f29190614270565b905080156131af576003546040517f9bfa5181000000000000000000000000000000000000000000000000000000008152336004820152602481018390526001600160a01b0390911690639bfa518190604401600060405180830381600087803b15801561315f57600080fd5b505af1158015613173573d6000803e3d6000fd5b50506040518381528892503391507fde25734680566233c8d604b2693ce423027f1dffde8c16b59900d409eab8729b9060200160405180910390a35b6131c2336131bd83856141f1565b6138f2565b85337f5b1dc9c14e155190a63d4318514bbaa2dbca5a5112613540138506b480d05c546131ef84866141f1565b60405190815260200160405180910390a350505b613258565b801561325857600980548201905560028201805482019055604051818152849033907fee470483107f579a55c754fa00613c45a9a3b617a418b39cb0be97e5381ba7c19060200160405180910390a35b50505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03167fa9059cbb0000000000000000000000000000000000000000000000000000000017905291516000928392908716916132d391906142de565b6000604051808303816000865af19150503d8060008114613310576040519150601f19603f3d011682016040523d82523d6000602084013e613315565b606091505b509150915081801561333f57508051158061333f57508080602001905181019061333f91906142fa565b61338b5760405162461bcd60e51b815260206004820152601c60248201527f426f72696e6745524332303a205472616e73666572206661696c6564000000006044820152606401610699565b5050505050565b60408051600481526024810182526020810180516001600160e01b03167f95d89b4100000000000000000000000000000000000000000000000000000000179052905160609160009182916001600160a01b038616916133f291906142de565b600060405180830381855afa9150503d806000811461342d576040519150601f19603f3d011682016040523d82523d6000602084013e613432565b606091505b50915091508161345d57604051806040016040528060038152602001623f3f3f60e81b815250613466565b61346681613a24565b949350505050565b60408051600481526024810182526020810180516001600160e01b03167f313ce567000000000000000000000000000000000000000000000000000000001790529051600091829182916001600160a01b038616916134cd91906142de565b600060405180830381855afa9150503d8060008114613508576040519150601f19603f3d011682016040523d82523d6000602084013e61350d565b606091505b5091509150818015613520575080516020145b61352b576012613466565b80806020019051810190613466919061431c565b600554829081106135885760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b6044820152606401610699565b60006005848154811061359d5761359d6141ac565b600091825260208083208784526006825260408085203386529092529220600890910290910191506135ce85612ce8565b6135d785612fcb565b83156137755781546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015613625573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061364991906142c5565b8354909150613663906001600160a01b0316333088613bfc565b82546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156136ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136cf91906142c5565b90506136db82826141f1565b600485015490965061ffff161561373d576004840154600090612710906137069061ffff1689614259565b6137109190614270565b600c54865491925061372f916001600160a01b0390811691168361325e565b61373981886141f1565b9650505b82548601835560025484546001600160a01b039182169116036137725785600a600082825461376c9190614204565b90915550505b50505b6003820154815464e8d4a510009161378c91614259565b6137969190614270565b6001820155600782015460005b81811015613842578360070181815481106137c0576137c06141ac565b600091825260209091200154835460405163075bbb7f60e41b8152600481018a905233602482015260448101919091526001600160a01b03909116906375bbb7f090606401600060405180830381600087803b15801561381f57600080fd5b505af1158015613833573d6000803e3d6000fd5b505050508060010190506137a3565b508415613863578483600601600082825461385d9190614204565b90915550505b604051858152869033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159060200160405180910390a3505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600a546002546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa15801561393d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061396191906142c5565b1115612ce457600a546002546040516370a0823160e01b8152306004820152600092916001600160a01b0316906370a0823190602401602060405180830381865afa1580156139b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139d891906142c5565b6139e291906141f1565b9050808210613a0757600254613a02906001600160a01b0316848361325e565b505050565b8115613a0257600254613a02906001600160a01b0316848461325e565b60606040825110613a495781806020019051810190613a439190614339565b92915050565b8151602003613bd85760005b60208160ff16108015613aa25750828160ff1681518110613a7857613a786141ac565b01602001517fff000000000000000000000000000000000000000000000000000000000000001615155b15613ab95780613ab1816143db565b915050613a55565b60008160ff1667ffffffffffffffff811115613ad757613ad7614292565b6040519080825280601f01601f191660200182016040528015613b01576020820181803683370190505b509050600091505b60208260ff16108015613b565750838260ff1681518110613b2c57613b2c6141ac565b01602001517fff000000000000000000000000000000000000000000000000000000000000001615155b15613bd157838260ff1681518110613b7057613b706141ac565b602001015160f81c60f81b818360ff1681518110613b9057613b906141ac565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535081613bc9816143db565b925050613b09565b9392505050565b50506040805180820190915260038152623f3f3f60e81b602082015290565b919050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03167f23b872dd000000000000000000000000000000000000000000000000000000001790529151600092839290881691613c7991906142de565b6000604051808303816000865af19150503d8060008114613cb6576040519150601f19603f3d011682016040523d82523d6000602084013e613cbb565b606091505b5091509150818015613ce5575080511580613ce5575080806020019051810190613ce591906142fa565b613d315760405162461bcd60e51b815260206004820181905260248201527f426f72696e6745524332303a205472616e7366657246726f6d206661696c65646044820152606401610699565b505050505050565b828054828255906000526020600020908101928215613d8c579160200282015b82811115613d8c5781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190613d59565b50613d98929150613df1565b5090565b828054828255906000526020600020908101928215613d8c579160200282015b82811115613d8c57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190613dbc565b5b80821115613d985760008155600101613df2565b600060208284031215613e1857600080fd5b5035919050565b803561ffff81168114613bf757600080fd5b60008083601f840112613e4357600080fd5b50813567ffffffffffffffff811115613e5b57600080fd5b6020830191508360208260051b8501011115613e7657600080fd5b9250929050565b60008060008060008060a08789031215613e9657600080fd5b8635955060208701359450613ead60408801613e1f565b935060608701359250608087013567ffffffffffffffff811115613ed057600080fd5b613edc89828a01613e31565b979a9699509497509295939492505050565b6001600160a01b03811681146126ca57600080fd5b60008060408385031215613f1657600080fd5b823591506020830135613f2881613eee565b809150509250929050565b60008060408385031215613f4657600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b83811015613f8e5781516001600160a01b031687529582019590820190600101613f69565b509495945050505050565b60005b83811015613fb4578181015183820152602001613f9c565b50506000910152565b600081518084526020808501945080840160005b83811015613f8e57815187529582019590820190600101613fd1565b6080815260006140006080830187613f55565b6020838203818501528187518084528284019150828160051b850101838a0160005b8381101561406857601f19808885030186528251805180865261404a818a88018b8501613f99565b96880196601f01909116939093018601925090850190600101614022565b5050868103604088015261407c818a613fbd565b94505050505082810360608401526140948185613fbd565b979650505050505050565b60008060008060008060a087890312156140b857600080fd5b8635955060208701356140ca81613eee565b9450613ead60408801613e1f565b60ff811681146126ca57600080fd5b60008060008060008060c0878903121561410057600080fd5b8635955060208701359450604087013593506060870135614120816140d8565b9598949750929560808101359460a0909101359350915050565b60006020828403121561414c57600080fd5b8135613bd181613eee565b6000806020838503121561416a57600080fd5b823567ffffffffffffffff81111561418157600080fd5b61418d85828601613e31565b90969095509350505050565b602081526000613bd16020830184613f55565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016141ea576141ea6141c2565b5060010190565b81810381811115613a4357613a436141c2565b80820180821115613a4357613a436141c2565b60008184825b8581101561424e57813561423081613eee565b6001600160a01b03168352602092830192919091019060010161421d565b509095945050505050565b8082028115828204841417613a4357613a436141c2565b60008261428d57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156142ba57600080fd5b8151613bd181613eee565b6000602082840312156142d757600080fd5b5051919050565b600082516142f0818460208701613f99565b9190910192915050565b60006020828403121561430c57600080fd5b81518015158114613bd157600080fd5b60006020828403121561432e57600080fd5b8151613bd1816140d8565b60006020828403121561434b57600080fd5b815167ffffffffffffffff8082111561436357600080fd5b818401915084601f83011261437757600080fd5b81518181111561438957614389614292565b604051601f8201601f19908116603f011681019083821181831017156143b1576143b1614292565b816040528281528760208487010111156143ca57600080fd5b614094836020830160208801613f99565b600060ff821660ff81036143f1576143f16141c2565b6001019291505056fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a264697066735822122045b7bf39e08a4f1d7390219f72810942a57a51adb73caa45da5dfd46155144fa64736f6c63430008130033

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

000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d580000000000000000000000000000000000000000000000001d7d843dc3b480000000000000000000000000000a68f81fe8c23cf19fd0f90be3734f68ff2ef45100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a68f81fe8c23cf19fd0f90be3734f68ff2ef45100000000000000000000000063d43d0edda7de4b5ed9b2f2aa855f81fbd71697

-----Decoded View---------------
Arg [0] : _beam (address): 0xcd3B51D98478D53F4515A306bE565c6EebeF1D58
Arg [1] : _beamPerSec (uint256): 2125000000000000000
Arg [2] : _beamShareAddress (address): 0x0a68f81Fe8c23cF19FD0f90be3734F68FF2EF451
Arg [3] : _beamSharePercent (uint256): 0
Arg [4] : _feeAddress (address): 0x0a68f81Fe8c23cF19FD0f90be3734F68FF2EF451
Arg [5] : _stGlint (address): 0x63d43D0EDda7DE4B5ed9B2F2AA855f81FBd71697

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d58
Arg [1] : 0000000000000000000000000000000000000000000000001d7d843dc3b48000
Arg [2] : 0000000000000000000000000a68f81fe8c23cf19fd0f90be3734f68ff2ef451
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [4] : 0000000000000000000000000a68f81fe8c23cf19fd0f90be3734f68ff2ef451
Arg [5] : 00000000000000000000000063d43d0edda7de4b5ed9b2f2aa855f81fbd71697


Block Transaction Gas Used Reward
view all blocks collator

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

Validator Index Block Amount
View All Withdrawals

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

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.