Latest 25 from a total of 4,721 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Deposit | 14219732 | 22 hrs ago | IN | 0 GLMR | 0.0180855 | ||||
| Harvest Many | 14205423 | 2 days ago | IN | 0 GLMR | 0.03094775 | ||||
| Harvest Many | 14165362 | 5 days ago | IN | 0 GLMR | 0.01704715 | ||||
| Deposit | 14153202 | 6 days ago | IN | 0 GLMR | 0.012839 | ||||
| Harvest Many | 14133991 | 7 days ago | IN | 0 GLMR | 0.03094775 | ||||
| Harvest Many | 14123335 | 8 days ago | IN | 0 GLMR | 0.03094775 | ||||
| Deposit | 14111568 | 9 days ago | IN | 0 GLMR | 0.019192 | ||||
| Harvest Many | 14093934 | 10 days ago | IN | 0 GLMR | 0.0180935 | ||||
| Deposit | 14065393 | 13 days ago | IN | 0 GLMR | 0.01170575 | ||||
| Harvest Many | 14053831 | 14 days ago | IN | 0 GLMR | 0.03094775 | ||||
| Deposit | 14032729 | 15 days ago | IN | 0 GLMR | 0.0170507 | ||||
| Harvest Many | 14011703 | 17 days ago | IN | 0 GLMR | 0.03094775 | ||||
| Harvest Many | 13976128 | 20 days ago | IN | 0 GLMR | 0.03094775 | ||||
| Deposit | 13964038 | 21 days ago | IN | 0 GLMR | 0.0222145 | ||||
| Withdraw | 13949043 | 22 days ago | IN | 0 GLMR | 0.0163605 | ||||
| Harvest Many | 13913868 | 25 days ago | IN | 0 GLMR | 0.03094775 | ||||
| Harvest Many | 13908181 | 25 days ago | IN | 0 GLMR | 0.0180935 | ||||
| Withdraw | 13900448 | 26 days ago | IN | 0 GLMR | 0.01563475 | ||||
| Harvest Many | 13890319 | 27 days ago | IN | 0 GLMR | 0.03094775 | ||||
| Deposit | 13877357 | 28 days ago | IN | 0 GLMR | 0.01703735 | ||||
| Deposit | 13877255 | 28 days ago | IN | 0 GLMR | 0.01706406 | ||||
| Harvest Many | 13851831 | 30 days ago | IN | 0 GLMR | 0.03094775 | ||||
| Withdraw | 13821149 | 33 days ago | IN | 0 GLMR | 0.02006255 | ||||
| Deposit | 13821145 | 33 days ago | IN | 0 GLMR | 0.01703735 | ||||
| Harvest Many | 13802696 | 34 days ago | IN | 0 GLMR | 0.03094775 |
View more zero value Internal Transactions in Advanced View mode
Cross-Chain Transactions
Loading...
Loading
Contract Name:
BeamChefV3
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// 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";
import "../interfaces/IFarmBooster.sol";
contract BeamChefV3 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 rewardDebtCommunity; // 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. Glint to distribute per second.
uint256 lastRewardTimestamp; // Last block number that Glint distribution occurs.
uint256 accGlintPerShare; // Accumulated Glint per share, times 1e18. See below.
uint256 accGlintPerShareCommunity; // Accumulated Glint 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
uint256 allocPointCommunity; // How many allocation points assigned to this pool. Glint to distribute per second. This value is dynamic based on user votes
uint256 stGlintRate; // How much percent of the rewards gets distributed as stGlint
bool isVoteable; // Is this pool voteable
IMultipleRewards[] rewarders; // Array of rewarder contract for pools with incentives
}
struct UserVoteInfo {
bool voted;
uint256 votedID;
uint256 votedAmount;
}
IBoringERC20 public immutable beam;
IstGlint public immutable stGlint;
// Glint tokens created per second
uint256 public beamPerSec;
//base community beam per second
uint256 public beamPerSecCommunity;
// 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;
// Total community allocation points. Must be the sum of all allocation points in all pools.
uint256 public totalAllocPointCommunity;
// The timestamp when Glint mining starts.
uint256 public startTimestamp;
// Total locked up rewards
uint256 public totalLockedUpRewards;
// Total Glint in Glint Pools (can be multiple pools)
uint256 public totalGlintInPools;
// Dev address.
address public devAddress;
address internal immutable farmBooster;
// deposit fee address if needed
address public feeAddress;
uint256 public devPercent;
uint256 public votePoolDelay;
// The precision factor
uint256 private constant ACC_TOKEN_PRECISION = 1e12;
uint256 public lastUpdatedTimeVotes;
// mapping(address => bool) public voted;
mapping(address => bool) public voteOperators;
mapping(address => UserVoteInfo) public userVoteInfo;
modifier validatePoolByPid(uint256 _pid) {
require(_pid < poolInfo.length, "Pool does not exist");
_;
}
modifier onlyFarmBooster() {
require(voteOperators[msg.sender], "only vote operators");
_;
}
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 accGlintPerShare
);
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 EmissionRateUpdatedCommunity(
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 SetFeeAddress(address indexed oldAddress, address indexed newAddress);
event SetDevPercent(uint256 oldPercent, uint256 newPercent);
event RewardPaid(address indexed user, uint256 indexed pid, uint256 amount);
event XRewardPaid(
address indexed user,
uint256 indexed pid,
uint256 amount
);
constructor(
IBoringERC20 _glint,
uint256 _glintPerSec,
address _devAddress,
uint256 _devPercent,
address _feeAddress,
IstGlint _stGlint,
address _farmBooster,
uint256 _glintPerSecCommunity
) {
require(
_devPercent <= 200,
"constructor: invalid marketing percent value"
);
startTimestamp = block.timestamp + (60 * 60 * 24 * 365);
devPercent = _devPercent;
beam = _glint;
beamPerSec = _glintPerSec;
devAddress = _devAddress;
feeAddress = _feeAddress;
stGlint = _stGlint;
IERC20(address(_glint)).approve(address(_stGlint), type(uint256).max);
voteOperators[_farmBooster] = true;
farmBooster = _farmBooster;
beamPerSecCommunity = _glintPerSecCommunity;
}
// Set farming start
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,
uint256 _allocPointCommunity,
uint256 _stGlintRate,
bool _isVoteable,
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"
);
require(_stGlintRate <= 100, "add: invalid stGlint rate");
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;
totalAllocPointCommunity += _allocPointCommunity;
poolInfo.push(
PoolInfo({
lpToken: _lpToken,
allocPoint: _allocPoint,
lastRewardTimestamp: lastRewardTimestamp,
accGlintPerShare: 0,
accGlintPerShareCommunity: 0,
depositFeeBP: _depositFeeBP,
harvestInterval: _harvestInterval,
totalLp: 0,
stGlintRate: _stGlintRate,
allocPointCommunity: _allocPointCommunity,
isVoteable: _isVoteable,
rewarders: _rewarders
})
);
emit Add(
poolInfo.length - 1,
_allocPoint,
_lpToken,
_depositFeeBP,
_harvestInterval,
_rewarders
);
}
// Update the given pool's Glint allocation point and deposit fee. Can only be called by the owner.
function set(
uint256 _pid,
uint256 _allocPoint,
uint256 _stGlintRate,
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].stGlintRate = _stGlintRate;
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 memory pool = poolInfo[_pid];
UserInfo memory user = userInfo[_pid][_user];
uint256 accGlintPerShare = pool.accGlintPerShare;
uint256 accGlintPerShareCommunity = pool.accGlintPerShareCommunity;
uint256 lpSupply = pool.totalLp;
if (block.timestamp > pool.lastRewardTimestamp && lpSupply != 0) {
uint256 multiplier = block.timestamp - pool.lastRewardTimestamp;
uint256 total = 1000;
uint256 lpPercent = total - devPercent;
uint256 glintReward = (multiplier *
beamPerSec *
pool.allocPoint *
lpPercent) /
totalAllocPoint /
total;
accGlintPerShare += (
((glintReward * ACC_TOKEN_PRECISION) / lpSupply)
);
uint256 glintRewardCommunity = pool.allocPointCommunity != 0
? ((multiplier * beamPerSecCommunity * lpPercent) *
pool.allocPointCommunity) /
totalAllocPointCommunity /
total
: 0;
accGlintPerShareCommunity += ((glintRewardCommunity *
ACC_TOKEN_PRECISION) / lpSupply);
}
uint256 pendingGlint = (((user.amount * accGlintPerShare) /
ACC_TOKEN_PRECISION) - user.rewardDebt) +
user.rewardLockedUp +
(((user.amount * accGlintPerShareCommunity) / ACC_TOKEN_PRECISION) -
user.rewardDebtCommunity);
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] = pendingGlint;
for (
uint256 rewarderId = 0;
rewarderId < pool.rewarders.length;
++rewarderId
) {
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
);
}
}
/// @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 - devPercent;
rewardsPerSec[0] =
(pool.allocPoint * beamPerSec * lpPercent) /
totalAllocPoint /
total;
for (
uint256 rewarderId = 0;
rewarderId < pool.rewarders.length;
++rewarderId
) {
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);
}
}
// 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 Glint.
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);
}
/* VOTING */
function increaseAllocation(
uint256 _pid,
uint256 _allocPointCommunity
) internal {
if (block.timestamp >= lastUpdatedTimeVotes + votePoolDelay) {
_massUpdatePools();
lastUpdatedTimeVotes = block.timestamp;
}
totalAllocPointCommunity =
totalAllocPointCommunity +
_allocPointCommunity;
poolInfo[_pid].allocPointCommunity =
poolInfo[_pid].allocPointCommunity +
_allocPointCommunity;
}
function decreaseAllocation(
uint256 _pid,
uint256 _allocPointCommunity
) internal {
if (block.timestamp >= lastUpdatedTimeVotes + votePoolDelay) {
_massUpdatePools();
lastUpdatedTimeVotes = block.timestamp;
}
totalAllocPointCommunity =
totalAllocPointCommunity -
_allocPointCommunity;
poolInfo[_pid].allocPointCommunity =
poolInfo[_pid].allocPointCommunity -
_allocPointCommunity;
}
function vote(address _user, uint256 _amount, uint256 _pid) internal {
UserVoteInfo storage voteInfo = userVoteInfo[_user];
if (_amount > voteInfo.votedAmount) {
uint256 increaseAmount = _amount - voteInfo.votedAmount;
voteInfo.votedAmount = _amount;
increaseAllocation(_pid, increaseAmount);
} else if (_amount < voteInfo.votedAmount) {
uint256 decreaseAmount = voteInfo.votedAmount - _amount;
voteInfo.votedAmount = _amount;
decreaseAllocation(_pid, decreaseAmount);
}
}
function redeemVote(address _user, uint256 _pid) internal {
UserVoteInfo storage voteInfo = userVoteInfo[_user];
decreaseAllocation(_pid, voteInfo.votedAmount);
voteInfo.votedAmount = 0;
}
function _updatePool(uint256 _pid) internal validatePoolByPid(_pid) {
// Internal method for _updatePool
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 glintReward = ((multiplier * beamPerSec) * pool.allocPoint) /
totalAllocPoint;
uint256 glintRewardCommunity = pool.allocPointCommunity != 0
? ((multiplier * beamPerSecCommunity) * pool.allocPointCommunity) /
totalAllocPointCommunity
: 0;
glintReward = glintReward + glintRewardCommunity;
uint256 total = 1000;
uint256 lpPercent = total - devPercent;
if (devPercent > 0) {
beam.mint(devAddress, (glintReward * devPercent) / total);
}
beam.mint(address(this), (glintReward * lpPercent) / total);
pool.accGlintPerShare +=
((glintReward - glintRewardCommunity) *
ACC_TOKEN_PRECISION *
lpPercent) /
pool.totalLp /
total;
pool.accGlintPerShareCommunity +=
(glintRewardCommunity * ACC_TOKEN_PRECISION * lpPercent) /
pool.totalLp /
total;
pool.lastRewardTimestamp = block.timestamp;
emit UpdatePool(
_pid,
pool.lastRewardTimestamp,
lpSupply,
pool.accGlintPerShare
);
}
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 Glint allocation.
function deposit(uint256 _pid, uint256 _amount) public nonReentrant {
_deposit(_pid, _amount);
}
// Deposit tokens for Glint allocation.
function _deposit(
uint256 _pid,
uint256 _amount
) internal validatePoolByPid(_pid) {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
_updatePool(_pid);
payOrLockupPendingGlint(_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;
}
user.amount += _amount;
if (address(pool.lpToken) == address(beam)) {
totalGlintInPools += _amount;
}
}
user.rewardDebt =
(user.amount * pool.accGlintPerShare) /
ACC_TOKEN_PRECISION;
user.rewardDebtCommunity =
(user.amount * pool.accGlintPerShareCommunity) /
ACC_TOKEN_PRECISION;
if (_amount > 0) {
pool.totalLp += _amount;
}
for (
uint256 rewarderId = 0;
rewarderId < pool.rewarders.length;
++rewarderId
) {
pool.rewarders[rewarderId].onBeamReward(
_pid,
msg.sender,
user.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);
payOrLockupPendingGlint(_pid);
if (_amount > 0) {
user.amount -= _amount;
if (address(pool.lpToken) == address(beam)) {
totalGlintInPools -= _amount;
}
pool.lpToken.safeTransfer(msg.sender, _amount);
}
user.rewardDebt =
(user.amount * pool.accGlintPerShare) /
ACC_TOKEN_PRECISION;
user.rewardDebtCommunity =
(user.amount * pool.accGlintPerShareCommunity) /
ACC_TOKEN_PRECISION;
if (_amount > 0) {
pool.totalLp -= _amount;
}
for (
uint256 rewarderId = 0;
rewarderId < pool.rewarders.length;
++rewarderId
) {
pool.rewarders[rewarderId].onBeamReward(
_pid,
msg.sender,
user.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"
);
totalLockedUpRewards -= user.rewardLockedUp;
user.amount = 0;
user.rewardDebt = 0;
user.rewardDebtCommunity = 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)) {
totalGlintInPools -= amount;
}
pool.lpToken.safeTransfer(msg.sender, amount);
emit EmergencyWithdraw(msg.sender, _pid, amount);
}
// Pay or lockup pending Glint.
function payOrLockupPendingGlint(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;
}
if (user.nextHarvestUntil != 0 && pool.harvestInterval == 0) {
user.nextHarvestUntil = 0;
}
uint256 pending = ((user.amount * pool.accGlintPerShare) /
ACC_TOKEN_PRECISION) - user.rewardDebt;
uint256 pendingCommunity = ((user.amount *
pool.accGlintPerShareCommunity) / ACC_TOKEN_PRECISION) -
user.rewardDebtCommunity;
if (canHarvest(_pid, msg.sender)) {
if (pool.isVoteable) {
_updateVotePool(msg.sender, _pid);
}
if (
pending > 0 || user.rewardLockedUp > 0 || pendingCommunity > 0
) {
uint256 pendingRewards = pending +
user.rewardLockedUp +
pendingCommunity;
totalLockedUpRewards -= user.rewardLockedUp;
user.rewardLockedUp = 0;
user.nextHarvestUntil = block.timestamp + pool.harvestInterval;
uint256 stGlintAmount = (pendingRewards * pool.stGlintRate) /
100;
uint256 glintAmount = pendingRewards - stGlintAmount;
if (stGlintAmount > 0) {
stGlint.convertTo(msg.sender, stGlintAmount);
emit XRewardPaid(msg.sender, _pid, stGlintAmount);
}
if (glintAmount > 0) {
safeGlintTransfer(msg.sender, glintAmount);
emit RewardPaid(msg.sender, _pid, glintAmount);
}
}
} else if (pending > 0 || pendingCommunity > 0) {
totalLockedUpRewards += pending + pendingCommunity;
user.rewardLockedUp += pending + pendingCommunity;
emit RewardLockedUp(msg.sender, _pid, pending);
}
}
function safeGlintTransfer(address _to, uint256 _amount) internal {
if (beam.balanceOf(address(this)) > totalGlintInPools) {
uint256 glintBal = beam.balanceOf(address(this)) -
totalGlintInPools;
if (_amount >= glintBal) {
beam.safeTransfer(_to, glintBal);
} else if (_amount > 0) {
beam.safeTransfer(_to, _amount);
}
}
}
function updateVotePool(
address _user,
uint256 _amount,
uint256 _pid
) public onlyFarmBooster {
UserVoteInfo storage voteInfo = userVoteInfo[_user];
_updatePool(_pid);
if (voteInfo.voted) {
vote(_user, _amount, _pid);
}
if (_amount == 0) {
voteInfo.voted = false;
}
}
function _updateVotePool(address _user, uint256 _pid) internal {
UserVoteInfo storage voteInfo = userVoteInfo[_user];
if (_pid != voteInfo.votedID) return;
uint256 votingPower = getTotalVotePower(_user);
if (voteInfo.voted) {
vote(_user, votingPower, _pid);
}
if (votingPower == 0) {
voteInfo.voted = false;
}
}
function getTotalVotePower(address _user) public view returns (uint256) {
return IFarmBooster(farmBooster).getVotingPower(_user);
}
function votePool(address _user, uint256 _pid) public onlyFarmBooster {
UserVoteInfo storage voteInfo = userVoteInfo[_user];
require(poolInfo[_pid].isVoteable, "vote not permitted");
require(voteInfo.voted == false);
uint256 votingPower = getTotalVotePower(_user);
if (votingPower == 0) return;
_updatePool(_pid);
vote(_user, votingPower, _pid);
voteInfo.votedID = _pid;
voteInfo.voted = true;
}
function unVotePool(address _user, uint256 _pid) public onlyFarmBooster {
UserVoteInfo storage voteInfo = userVoteInfo[_user];
_updatePool(_pid);
redeemVote(_user, voteInfo.votedID);
voteInfo.voted = false;
voteInfo.votedID = 0;
}
function votePoolMarket(
address _user,
uint256 _pid,
uint256 _amount
) public onlyFarmBooster {
UserVoteInfo storage voteInfo = userVoteInfo[_user];
require(poolInfo[_pid].isVoteable, "vote not permitted");
require(voteInfo.voted == false);
_updatePool(_pid);
vote(_user, _amount, _pid);
voteInfo.votedID = _pid;
voteInfo.voted = true;
}
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 updateEmissionRate(uint256 _glintPerSec) public onlyOwner {
_massUpdatePools();
emit EmissionRateUpdated(msg.sender, beamPerSec, _glintPerSec);
beamPerSec = _glintPerSec;
}
function updateEmissionRateCommunity(
uint256 _glintPerSec
) public onlyOwner {
_massUpdatePools();
emit EmissionRateUpdatedCommunity(msg.sender, beamPerSec, _glintPerSec);
beamPerSecCommunity = _glintPerSec;
}
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 {
uint256 length = _pids.length;
require(length <= 25, "harvest many: too many pool ids");
for (uint256 index = 0; index < length; ) {
_deposit(_pids[index], 0);
unchecked {
++index;
}
}
}
function setDevAddress(address _devAddress) public onlyOwner {
require(_devAddress != address(0), "invalid new dev address");
devAddress = _devAddress;
}
function setDevPercent(uint256 _newDevPercent) public onlyOwner {
require(_newDevPercent <= 200, "invalid percent value");
_massUpdatePools();
emit SetDevPercent(devPercent, _newDevPercent);
devPercent = _newDevPercent;
}
function setFeeAddress(address _feeAddress) public onlyOwner {
require(_feeAddress != address(0), "wrong address");
feeAddress = _feeAddress;
emit SetFeeAddress(msg.sender, _feeAddress);
}
function setStGlintRates(
uint256[] calldata _pids,
uint256[] calldata _amount
) external onlyOwner {
require(_pids.length == _amount.length);
uint256 length = _pids.length;
for (uint256 index = 0; index < length; ) {
_setStGlintRate(_pids[index], _amount[index]);
unchecked {
++index;
}
}
}
function _setStGlintRate(uint256 _pid, uint256 _amount) internal {
require(_amount <= 100);
poolInfo[_pid].stGlintRate = _amount;
}
function setVotePoolDelay(uint256 _delay) external onlyOwner {
votePoolDelay = _delay;
}
function getGlintPerSec() public view returns (uint256) {
return beamPerSec;
}
function isPoolVoteable(uint256 _pid) public view returns (bool) {
return poolInfo[_pid].isVoteable;
}
function setVotablePools(
uint256[] calldata _pids,
bool[] calldata _isVotable
) external onlyOwner {
require(_pids.length == _isVotable.length);
uint256 length = _pids.length;
for (uint256 index = 0; index < length; ) {
setVotablePool(_pids[index], _isVotable[index]);
unchecked {
++index;
}
}
}
function setVotablePool(uint256 _pid, bool _isVotable) public onlyOwner {
poolInfo[_pid].isVoteable = _isVotable;
}
function updateVoteOperator(
address _operator,
bool _status
) external onlyOwner {
voteOperators[_operator] = _status;
}
}// 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);
}
}// 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;
}
}// 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);
}// 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);
}
}
}
}// 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;
}
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
interface IFarmBooster {
function getVotingPower(
address userAddress
) external view returns (uint256);
}// 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);
}// 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;
}// 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"
);
}
}// 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;
}// 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);
}{
"optimizer": {
"enabled": true,
"runs": 1000
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract IBoringERC20","name":"_glint","type":"address"},{"internalType":"uint256","name":"_glintPerSec","type":"uint256"},{"internalType":"address","name":"_devAddress","type":"address"},{"internalType":"uint256","name":"_devPercent","type":"uint256"},{"internalType":"address","name":"_feeAddress","type":"address"},{"internalType":"contract IstGlint","name":"_stGlint","type":"address"},{"internalType":"address","name":"_farmBooster","type":"address"},{"internalType":"uint256","name":"_glintPerSecCommunity","type":"uint256"}],"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":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"EmissionRateUpdatedCommunity","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":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardPaid","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":false,"internalType":"uint256","name":"oldPercent","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newPercent","type":"uint256"}],"name":"SetDevPercent","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":"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":"accGlintPerShare","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"},{"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":"XRewardPaid","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":"uint256","name":"_allocPointCommunity","type":"uint256"},{"internalType":"uint256","name":"_stGlintRate","type":"uint256"},{"internalType":"bool","name":"_isVoteable","type":"bool"},{"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":"beamPerSecCommunity","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":[],"name":"devAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"devPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":[],"name":"getGlintPerSec","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getTotalVotePower","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_pids","type":"uint256[]"}],"name":"harvestMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"isPoolVoteable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdatedTimeVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"accGlintPerShare","type":"uint256"},{"internalType":"uint256","name":"accGlintPerShareCommunity","type":"uint256"},{"internalType":"uint16","name":"depositFeeBP","type":"uint16"},{"internalType":"uint256","name":"harvestInterval","type":"uint256"},{"internalType":"uint256","name":"totalLp","type":"uint256"},{"internalType":"uint256","name":"allocPointCommunity","type":"uint256"},{"internalType":"uint256","name":"stGlintRate","type":"uint256"},{"internalType":"bool","name":"isVoteable","type":"bool"}],"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":"uint256","name":"_stGlintRate","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":"_devAddress","type":"address"}],"name":"setDevAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newDevPercent","type":"uint256"}],"name":"setDevPercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeAddress","type":"address"}],"name":"setFeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_pids","type":"uint256[]"},{"internalType":"uint256[]","name":"_amount","type":"uint256[]"}],"name":"setStGlintRates","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"bool","name":"_isVotable","type":"bool"}],"name":"setVotablePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_pids","type":"uint256[]"},{"internalType":"bool[]","name":"_isVotable","type":"bool[]"}],"name":"setVotablePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_delay","type":"uint256"}],"name":"setVotePoolDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stGlint","outputs":[{"internalType":"contract IstGlint","name":"","type":"address"}],"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":"totalAllocPointCommunity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalGlintInPools","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":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"unVotePool","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":"_glintPerSec","type":"uint256"}],"name":"updateEmissionRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_glintPerSec","type":"uint256"}],"name":"updateEmissionRateCommunity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"updateVoteOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updateVotePool","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":"rewardDebtCommunity","type":"uint256"},{"internalType":"uint256","name":"rewardLockedUp","type":"uint256"},{"internalType":"uint256","name":"nextHarvestUntil","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userVoteInfo","outputs":[{"internalType":"bool","name":"voted","type":"bool"},{"internalType":"uint256","name":"votedID","type":"uint256"},{"internalType":"uint256","name":"votedAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"voteOperators","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"votePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"votePoolDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"votePoolMarket","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60e06040523480156200001157600080fd5b5060405162005be038038062005be0833981016040819052620000349162000214565b6200003f33620001ab565b6001805560c8851115620000ae5760405162461bcd60e51b815260206004820152602c60248201527f636f6e7374727563746f723a20696e76616c6964206d61726b6574696e67207060448201526b657263656e742076616c756560a01b606482015260840160405180910390fd5b620000be426301e13380620002b1565b600855600d8590556001600160a01b0388811660808190526002899055600b80546001600160a01b03199081168a851617909155600c805490911687841617905590841660a081905260405163095ea7b360e01b81526004810191909152600019602482015263095ea7b3906044016020604051808303816000875af11580156200014d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001739190620002d9565b506001600160a01b039091166000818152601060205260409020805460ff1916600117905560c0526003555062000304945050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146200021157600080fd5b50565b600080600080600080600080610100898b0312156200023257600080fd5b88516200023f81620001fb565b60208a015160408b015191995097506200025981620001fb565b60608a015160808b015191975095506200027381620001fb565b60a08a01519094506200028681620001fb565b60c08a01519093506200029981620001fb565b8092505060e089015190509295985092959890939650565b80820180821115620002d357634e487b7160e01b600052601160045260246000fd5b92915050565b600060208284031215620002ec57600080fd5b81518015158114620002fd57600080fd5b9392505050565b60805160a05160c05161583c620003a4600039600061299001526000818161049901526140140152600081816103a401528181610c1101528181610f9b01528181610fe9015281816110310152818161197601528181613658015281816136a6015281816136ee01528181613ba101528181613c63015281816146c9015281816149dc01528181614a7901528181614b040152614b43015261583c6000f3fe608060405234801561001057600080fd5b50600436106103835760003560e01c8063837cca83116101de578063cbc83f351161010f578063e0f403d3116100ad578063eff8976b1161007c578063eff8976b14610861578063f2fde38b14610881578063fc3c28af14610894578063ffcd42631461089d57600080fd5b8063e0f403d314610829578063e2bbb15814610832578063e6fd48bc14610845578063eddf96521461084e57600080fd5b8063d0d41fe1116100e9578063d0d41fe1146107e6578063d6d80934146107f9578063dc640ac91461080c578063de73149d1461081f57600080fd5b8063cbc83f35146107b7578063ced75c1c146107ca578063cf047a73146107dd57600080fd5b8063a0e44a781161017c578063afbcfea111610156578063afbcfea114610776578063b63ccfe51461077e578063c5e88e9314610791578063c7ca0d47146107a457600080fd5b8063a0e44a7814610747578063a2cd70841461075a578063a5e090d01461076d57600080fd5b80638da5cb5b116101b85780638da5cb5b146106905780638fbc55e9146106a157806393f1a40b146106b457806399392ea61461072457600080fd5b8063837cca831461065757806385dd790a1461066a5780638705fcd41461067d57600080fd5b80634c1716f3116102b8578063630b5ba111610256578063715018a611610230578063715018a614610617578063764cba0b1461061f5780637bb5b9da14610628578063812c64f11461063b57600080fd5b8063630b5ba1146105e9578063654c9ece146105f15780636eaddad21461060457600080fd5b806351eb05a61161029257806351eb05a6146105b25780635312ea8e146105c557806353b7b038146105d857806360e772e1146105e057600080fd5b80634c1716f31461058357806350d4a4011461058c578063515bc3231461059f57600080fd5b80633931889b11610325578063441a3e70116102ff578063441a3e7014610531578063465e81ec14610544578063474fa630146105675780634852644f1461057057600080fd5b80633931889b146104bb5780633ad10ef61461050b578063412753581461051e57600080fd5b80631526fe27116103615780631526fe27146103f357806317caf6f1146104685780632e6c998d1461047157806335034c851461049457600080fd5b8063081e3eda146103885780630867bacf1461039f5780630ba84cd2146103de575b600080fd5b6004545b6040519081526020015b60405180910390f35b6103c67f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610396565b6103f16103ec366004615038565b6108b0565b005b610406610401366004615038565b610948565b604080516001600160a01b03909c168c5260208c019a909a52988a01979097526060890195909552608088019390935261ffff90911660a087015260c086015260e0850152610100840152610120830152151561014082015261016001610396565b61038c60065481565b61048461047f366004615066565b6109c5565b6040519015158152602001610396565b6103c67f000000000000000000000000000000000000000000000000000000000000000081565b6104ee6104c9366004615096565b60116020526000908152604090208054600182015460029092015460ff909116919083565b604080519315158452602084019290925290820152606001610396565b600b546103c6906001600160a01b031681565b600c546103c6906001600160a01b031681565b6103f161053f3660046150b3565b610a52565b610557610552366004615038565b610dc2565b604051610396949392919061516d565b61038c60095481565b6103f161057e36600461526b565b611424565b61038c600e5481565b6103f161059a3660046152d7565b6114d7565b6103f16105ad366004615312565b61156f565b6103f16105c0366004615038565b6116f0565b6103f16105d3366004615038565b611757565b60025461038c565b61038c60025481565b6103f1611a0d565b61038c6105ff366004615038565b611a72565b6103f1610612366004615038565b611aa0565b6103f1611b82565b61038c600f5481565b6103f1610636366004615365565b611bd6565b6106446103e881565b60405161ffff9091168152602001610396565b6103f16106653660046153ba565b611cf6565b6103f161067836600461545d565b612176565b6103f161068b366004615096565b6121e9565b6000546001600160a01b03166103c6565b6103f16106af36600461548b565b6122d3565b6106fc6106c2366004615066565b6005602090815260009283526040808420909152908252902080546001820154600283015460038401546004909401549293919290919085565b604080519586526020860194909452928401919091526060830152608082015260a001610396565b610484610732366004615096565b60106020526000908152604090205460ff1681565b6103f1610755366004615506565b61267b565b6103f1610768366004615365565b6126fd565b61038c60075481565b6103f161279f565b61048461078c366004615038565b612881565b6103f161079f36600461526b565b6128b3565b61038c6107b2366004615096565b612955565b6103f16107c5366004615038565b612a03565b6103f16107d83660046152d7565b612a96565b61038c600a5481565b6103f16107f4366004615096565b612bcf565b6103f1610807366004615038565b612c8f565b6103f161081a36600461552b565b612cdc565b61038c6212750081565b61038c60035481565b6103f16108403660046150b3565b612dc5565b61038c60085481565b6103f161085c3660046150b3565b612e2e565b61087461086f366004615038565b612f5e565b604051610396919061556d565b6103f161088f366004615096565b61309f565b61038c600d5481565b6105576108ab366004615066565b61316f565b6000546001600160a01b031633146108fd5760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064015b60405180910390fd5b610905613a21565b600254604080519182526020820183905233917feedc6338c9c1ad8f3cd6c90dd09dbe98dbd57e610d3e59a17996d07acb0d9511910160405180910390a2600255565b6004818154811061095857600080fd5b60009182526020909120600c9091020180546001820154600283015460038401546004850154600586015460068701546007880154600889015460098a0154600a909a01546001600160a01b039099169a50969895979496939561ffff9093169491939092909160ff168b565b60045460009083908110610a115760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b60448201526064016108f4565b60008481526005602090815260408083206001600160a01b038716845290915290206008544210801590610a49575080600401544210155b95945050505050565b600260015403610aa45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108f4565b600260015560045482908110610af25760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b60448201526064016108f4565b600060048481548110610b0757610b07615580565b6000918252602080832087845260058252604080852033865290925292208054600c9092029092019250841115610b805760405162461bcd60e51b815260206004820181905260248201527f77697468647261773a207573657220616d6f756e74206e6f7420656e6f75676860448201526064016108f4565b8382600701541015610bd45760405162461bcd60e51b815260206004820152601f60248201527f77697468647261773a20706f6f6c20746f74616c206e6f7420656e6f7567680060448201526064016108f4565b610bdd85613a40565b610be685613e11565b8315610c675783816000016000828254610c0091906155ac565b909155505081546001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911603610c515783600a6000828254610c4b91906155ac565b90915550505b8154610c67906001600160a01b03163386614198565b6003820154815464e8d4a5100091610c7e916155bf565b610c8891906155d6565b60018201556004820154815464e8d4a5100091610ca4916155bf565b610cae91906155d6565b60028201558315610cd35783826007016000828254610ccd91906155ac565b90915550505b60005b600b830154811015610d7f5782600b018181548110610cf757610cf7615580565b600091825260209091200154825460405163075bbb7f60e41b81526004810189905233602482015260448101919091526001600160a01b03909116906375bbb7f090606401600060405180830381600087803b158015610d5657600080fd5b505af1158015610d6a573d6000803e3d6000fd5b5050505080610d78906155f8565b9050610cd6565b50604051848152859033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a3505060018055505050565b606080606080846004805490508110610e135760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b60448201526064016108f4565b600060048781548110610e2857610e28615580565b90600052602060002090600c0201905080600b01805490506001610e4c9190615611565b67ffffffffffffffff811115610e6457610e64615624565b604051908082528060200260200182016040528015610e8d578160200160208202803683370190505b50600b820154909650610ea1906001615611565b67ffffffffffffffff811115610eb957610eb9615624565b604051908082528060200260200182016040528015610eec57816020015b6060815260200190600190039081610ed75790505b50600b820154909550610f00906001615611565b67ffffffffffffffff811115610f1857610f18615624565b604051908082528060200260200182016040528015610f41578160200160208202803683370190505b50600b820154909450610f55906001615611565b67ffffffffffffffff811115610f6d57610f6d615624565b604051908082528060200260200182016040528015610f96578160200160208202803683370190505b5092507f000000000000000000000000000000000000000000000000000000000000000086600081518110610fcd57610fcd615580565b6001600160a01b03928316602091820292909201015261100e907f0000000000000000000000000000000000000000000000000000000000000000166142c5565b8560008151811061102157611021615580565b602002602001018190525061105e7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166143a1565b60ff168460008151811061107457611074615580565b6020908102919091010152600d546103e89060009061109390836155ac565b9050816006548260025486600101546110ac91906155bf565b6110b691906155bf565b6110c091906155d6565b6110ca91906155d6565b856000815181106110dd576110dd615580565b60200260200101818152505060005b600b8401548110156114185783600b01818154811061110d5761110d615580565b600091825260209182902001546040805163f7c618c160e01b815290516001600160a01b039092169263f7c618c1926004808401938290030181865afa15801561115b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061117f919061563a565b8961118b836001615611565b8151811061119b5761119b615580565b60200260200101906001600160a01b031690816001600160a01b03168152505061125384600b0182815481106111d3576111d3615580565b600091825260209182902001546040805163f7c618c160e01b815290516001600160a01b039092169263f7c618c1926004808401938290030181865afa158015611221573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611245919061563a565b6001600160a01b03166142c5565b8861125f836001615611565b8151811061126f5761126f615580565b602002602001018190525061131284600b01828154811061129257611292615580565b600091825260209182902001546040805163f7c618c160e01b815290516001600160a01b039092169263f7c618c1926004808401938290030181865afa1580156112e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611304919061563a565b6001600160a01b03166143a1565b60ff1687611321836001615611565b8151811061133157611331615580565b60200260200101818152505083600b01818154811061135257611352615580565b6000918252602090912001546040517f465e81ec000000000000000000000000000000000000000000000000000000008152600481018c90526001600160a01b039091169063465e81ec90602401602060405180830381865afa1580156113bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113e19190615657565b866113ed836001615611565b815181106113fd576113fd615580565b6020908102919091010152611411816155f8565b90506110ec565b50505050509193509193565b6000546001600160a01b0316331461146c5760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b82811461147857600080fd5b8260005b818110156114cf576114c786868381811061149957611499615580565b905060200201358585848181106114b2576114b2615580565b90506020020160208101906107559190615670565b60010161147c565b505050505050565b3360009081526010602052604090205460ff1661152c5760405162461bcd60e51b81526020600482015260136024820152726f6e6c7920766f7465206f70657261746f727360681b60448201526064016108f4565b6001600160a01b038216600090815260116020526040902061154d82613a40565b61155b838260010154614472565b805460ff1916815560006001909101555050565b6002600154036115c15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108f4565b60026001556004548690811061160f5760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b60448201526064016108f4565b60006004888154811061162457611624615580565b60009182526020909120600c9091020180546040517fd505accf000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018a90526064810189905260ff8816608482015260a4810187905260c481018690529192506001600160a01b031690819063d505accf9060e401600060405180830381600087803b1580156116bf57600080fd5b505af11580156116d3573d6000803e3d6000fd5b505050506116e189896144a6565b50506001805550505050505050565b6002600154036117425760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108f4565b600260015561175081613a40565b5060018055565b6002600154036117a95760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108f4565b60026001819055506000600482815481106117c6576117c6615580565b6000918252602080832085845260058252604080852033865290925292208054600c92909202909201600781015490935081111561186c5760405162461bcd60e51b815260206004820152602960248201527f656d657267656e63792077697468647261773a20706f6f6c20746f74616c206e60448201527f6f7420656e6f756768000000000000000000000000000000000000000000000060648201526084016108f4565b81600301546009600082825461188291906155ac565b90915550506000808355600183018190556002830181905560038301819055600483018190556007840180548392906118bc9084906155ac565b90915550600090505b600b8401548110156119695783600b0181815481106118e6576118e6615580565b600091825260208220015460405163075bbb7f60e41b81526004810188905233602482015260448101929092526001600160a01b0316906375bbb7f090606401600060405180830381600087803b15801561194057600080fd5b505af1158015611954573d6000803e3d6000fd5b5050505080611962906155f8565b90506118c5565b5082546001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169116036119b65780600a60008282546119b091906155ac565b90915550505b82546119cc906001600160a01b03163383614198565b604051818152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959060200160405180910390a35050600180555050565b600260015403611a5f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108f4565b6002600155611a6c613a21565b60018055565b600060048281548110611a8757611a87615580565b90600052602060002090600c0201600701549050919050565b6000546001600160a01b03163314611ae85760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b60c8811115611b395760405162461bcd60e51b815260206004820152601560248201527f696e76616c69642070657263656e742076616c7565000000000000000000000060448201526064016108f4565b611b41613a21565b600d5460408051918252602082018390527ff96ddc0c23d27d019385d4fd77df683374ccc84d253e2e5d8abf153eee48f44e910160405180910390a1600d55565b6000546001600160a01b03163314611bca5760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b611bd46000614859565b565b3360009081526010602052604090205460ff16611c2b5760405162461bcd60e51b81526020600482015260136024820152726f6e6c7920766f7465206f70657261746f727360681b60448201526064016108f4565b6001600160a01b03831660009081526011602052604090206004805484908110611c5757611c57615580565b60009182526020909120600a600c90920201015460ff16611cba5760405162461bcd60e51b815260206004820152601260248201527f766f7465206e6f74207065726d6974746564000000000000000000000000000060448201526064016108f4565b805460ff1615611cc957600080fd5b611cd283613a40565b611cdd8483856148a9565b600180820193909355805460ff19169092179091555050565b6000546001600160a01b03163314611d3e5760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b600a811115611d8f5760405162461bcd60e51b815260206004820152601760248201527f6164643a20746f6f206d616e792072657761726465727300000000000000000060448201526064016108f4565b6103e861ffff88161115611de55760405162461bcd60e51b815260206004820152601960248201527f6164643a206465706f7369742066656520746f6f20686967680000000000000060448201526064016108f4565b62127500861115611e385760405162461bcd60e51b815260206004820152601d60248201527f6164643a20696e76616c6964206861727665737420696e74657276616c00000060448201526064016108f4565b6064841115611e895760405162461bcd60e51b815260206004820152601960248201527f6164643a20696e76616c6964207374476c696e7420726174650000000000000060448201526064016108f4565b60005b81811015611f2957611ecd838383818110611ea957611ea9615580565b9050602002016020810190611ebe9190615096565b6001600160a01b03163b151590565b611f195760405162461bcd60e51b815260206004820152601e60248201527f6164643a207265776172646572206d75737420626520636f6e7472616374000060448201526064016108f4565b611f22816155f8565b9050611e8c565b50611f32613a21565b60006008544211611f4557600854611f47565b425b90508960066000828254611f5b9190615611565b925050819055508560076000828254611f749190615611565b9250508190555060046040518061018001604052808b6001600160a01b031681526020018c815260200183815260200160008152602001600081526020018a61ffff16815260200189815260200160008152602001888152602001878152602001861515815260200185858080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509390945250508354600180820186559482526020918290208451600c9092020180546001600160a01b0319166001600160a01b03909216919091178155838201519481019490945560408301516002850155606083015160038501556080830151600485015560a083015160058501805461ffff191661ffff90921691909117905560c0830151600685015560e0830151600785015561010083015160088501556101208301516009850155610140830151600a8501805460ff191691151591909117905561016083015180519394936120f09350600b8501929190910190614f6b565b505050828260405161210392919061568d565b6040519081900390206004546001600160a01b038b1690612126906001906155ac565b604080518e815261ffff8d1660208201529081018b90527f5ed295c4f5af5aeb1ccd905e1cd55a86ab3bb9fc1fe2346ff64ac47dbef366619060600160405180910390a450505050505050505050565b6000546001600160a01b031633146121be5760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b6001600160a01b03919091166000908152601060205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146122315760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b6001600160a01b0381166122875760405162461bcd60e51b815260206004820152600d60248201527f77726f6e6720616464726573730000000000000000000000000000000000000060448201526064016108f4565b600c80546001600160a01b0319166001600160a01b03831690811790915560405133907fd44190acf9d04bdb5d3a1aafff7e6dee8b40b93dfb8c5d3f0eea4b9f4539c3f790600090a350565b6000546001600160a01b0316331461231b5760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b600454879081106123645760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b60448201526064016108f4565b600a8211156123b55760405162461bcd60e51b815260206004820152601760248201527f7365743a20746f6f206d616e792072657761726465727300000000000000000060448201526064016108f4565b6103e861ffff8616111561240b5760405162461bcd60e51b815260206004820152601960248201527f7365743a206465706f7369742066656520746f6f20686967680000000000000060448201526064016108f4565b6212750084111561245e5760405162461bcd60e51b815260206004820152601d60248201527f7365743a20696e76616c6964206861727665737420696e74657276616c00000060448201526064016108f4565b60005b828110156124da5761247e848483818110611ea957611ea9615580565b6124ca5760405162461bcd60e51b815260206004820152601e60248201527f7365743a207265776172646572206d75737420626520636f6e7472616374000060448201526064016108f4565b6124d3816155f8565b9050612461565b506124e3613a21565b86600489815481106124f7576124f7615580565b90600052602060002090600c02016001015460065461251691906155ac565b6125209190615611565b600681905550866004898154811061253a5761253a615580565b90600052602060002090600c020160010181905550846004898154811061256357612563615580565b90600052602060002090600c020160050160006101000a81548161ffff021916908361ffff16021790555083600489815481106125a2576125a2615580565b90600052602060002090600c02016006018190555085600489815481106125cb576125cb615580565b90600052602060002090600c020160090181905550828260048a815481106125f5576125f5615580565b90600052602060002090600c0201600b019190612613929190614fd0565b50828260405161262492919061568d565b6040805191829003822089835261ffff881660208401529082018690529089907f5ed6f0deef9ab49d02900b40d596df4cd637a2a7fbfa56bbcb377389d3ce8d289060600160405180910390a35050505050505050565b6000546001600160a01b031633146126c35760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b80600483815481106126d7576126d7615580565b60009182526020909120600c90910201600a01805460ff19169115159190911790555050565b3360009081526010602052604090205460ff166127525760405162461bcd60e51b81526020600482015260136024820152726f6e6c7920766f7465206f70657261746f727360681b60448201526064016108f4565b6001600160a01b038316600090815260116020526040902061277382613a40565b805460ff1615612788576127888484846148a9565b8260000361279957805460ff191681555b50505050565b6000546001600160a01b031633146127e75760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b60085442106128385760405162461bcd60e51b815260206004820152601460248201527f6661726d20616c7265616479207374617274656400000000000000000000000060448201526064016108f4565b60045460005b818110156128795760006004828154811061285b5761285b615580565b6000918252602090912042600c90920201600201555060010161283e565b505042600855565b60006004828154811061289657612896615580565b60009182526020909120600a600c90920201015460ff1692915050565b6000546001600160a01b031633146128fb5760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b82811461290757600080fd5b8260005b818110156114cf5761294d86868381811061292857612928615580565b9050602002013585858481811061294157612941615580565b90506020020135614929565b60010161290b565b6040517fbb4d44360000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301526000917f00000000000000000000000000000000000000000000000000000000000000009091169063bb4d443690602401602060405180830381865afa1580156129d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129fd9190615657565b92915050565b6000546001600160a01b03163314612a4b5760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b612a53613a21565b600254604080519182526020820183905233917f05b10e9fd7f02807ae1b400bca46772cfeb4890b484d12c1325136d6121e0f4e910160405180910390a2600355565b3360009081526010602052604090205460ff16612aeb5760405162461bcd60e51b81526020600482015260136024820152726f6e6c7920766f7465206f70657261746f727360681b60448201526064016108f4565b6001600160a01b03821660009081526011602052604090206004805483908110612b1757612b17615580565b60009182526020909120600a600c90920201015460ff16612b7a5760405162461bcd60e51b815260206004820152601260248201527f766f7465206e6f74207065726d6974746564000000000000000000000000000060448201526064016108f4565b805460ff1615612b8957600080fd5b6000612b9484612955565b905080600003612ba45750505050565b612bad83613a40565b612bb88482856148a9565b506001808201839055815460ff19161790555b5050565b6000546001600160a01b03163314612c175760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b6001600160a01b038116612c6d5760405162461bcd60e51b815260206004820152601760248201527f696e76616c6964206e657720646576206164647265737300000000000000000060448201526064016108f4565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314612cd75760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b600e55565b600260015403612d2e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108f4565b6002600155806019811115612d855760405162461bcd60e51b815260206004820152601f60248201527f68617276657374206d616e793a20746f6f206d616e7920706f6f6c206964730060448201526064016108f4565b60005b81811015612dbb57612db3848483818110612da557612da5615580565b9050602002013560006144a6565b600101612d88565b5050600180555050565b600260015403612e175760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108f4565b6002600155612e2682826144a6565b505060018055565b6000546001600160a01b03163314612e765760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b612e7e613a21565b336001600160a01b03167f802633c8d26237616d81bdac01bc40fcdf36e098832601582ec19d7e431c5ef360048481548110612ebc57612ebc615580565b90600052602060002090600c02016001015483604051612ee6929190918252602082015260400190565b60405180910390a28060048381548110612f0257612f02615580565b90600052602060002090600c020160010154600654612f2191906155ac565b612f2b9190615611565b6006819055508060048381548110612f4557612f45615580565b90600052602060002090600c0201600101819055505050565b60045460609082908110612faa5760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b60448201526064016108f4565b600060048481548110612fbf57612fbf615580565b90600052602060002090600c0201905080600b018054905067ffffffffffffffff811115612fef57612fef615624565b604051908082528060200260200182016040528015613018578160200160208202803683370190505b50925060005b600b8201548110156130975781600b01818154811061303f5761303f615580565b9060005260206000200160009054906101000a90046001600160a01b031684828151811061306f5761306f615580565b6001600160a01b0390921660209283029190910190910152613090816155f8565b905061301e565b505050919050565b6000546001600160a01b031633146130e75760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b6001600160a01b0381166131635760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016108f4565b61316c81614859565b50565b6060806060808560048054905081106131c05760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b60448201526064016108f4565b6000600488815481106131d5576131d5615580565b60009182526020918290206040805161018081018252600c90930290910180546001600160a01b031683526001810154838501526002810154838301526003810154606084015260048101546080840152600581015461ffff1660a0840152600681015460c0840152600781015460e084015260088101546101008401526009810154610120840152600a81015460ff161515610140840152600b8101805483518187028101870190945280845293949193610160860193928301828280156132c757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116132a9575b5050509190925250505060008981526005602090815260408083206001600160a01b038c168452825291829020825160a081018452815481526001820154928101929092526002810154828401526003810154606080840191909152600490910154608080840191909152908401519084015160e08501519385015194955091939092904211801561335857508015155b1561347757600085604001514261336f91906155ac565b600d549091506103e89060009061338690836155ac565b9050600082600654838b60200151600254886133a291906155bf565b6133ac91906155bf565b6133b691906155bf565b6133c091906155d6565b6133ca91906155d6565b9050846133dc64e8d4a51000836155bf565b6133e691906155d6565b6133f09088615611565b96506000896101000151600003613408576000613449565b836007548b6101000151856003548961342191906155bf565b61342b91906155bf565b61343591906155bf565b61343f91906155d6565b61344991906155d6565b90508561345b64e8d4a51000836155bf565b61346591906155d6565b61346f9088615611565b965050505050505b6000846040015164e8d4a5100084876000015161349491906155bf565b61349e91906155d6565b6134a891906155ac565b60608601516020870151875164e8d4a51000906134c69089906155bf565b6134d091906155d6565b6134da91906155ac565b6134e49190615611565b6134ee9190615611565b90508561016001515160016135039190615611565b67ffffffffffffffff81111561351b5761351b615624565b604051908082528060200260200182016040528015613544578160200160208202803683370190505b509a5085610160015151600161355a9190615611565b67ffffffffffffffff81111561357257613572615624565b6040519080825280602002602001820160405280156135a557816020015b60608152602001906001900390816135905790505b5099508561016001515160016135bb9190615611565b67ffffffffffffffff8111156135d3576135d3615624565b6040519080825280602002602001820160405280156135fc578160200160208202803683370190505b5097508561016001515160016136129190615611565b67ffffffffffffffff81111561362a5761362a615624565b604051908082528060200260200182016040528015613653578160200160208202803683370190505b5098507f00000000000000000000000000000000000000000000000000000000000000008b60008151811061368a5761368a615580565b6001600160a01b0392831660209182029290920101526136cb907f0000000000000000000000000000000000000000000000000000000000000000166142c5565b8a6000815181106136de576136de615580565b602002602001018190525061371b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166143a1565b60ff168960008151811061373157613731615580565b602002602001018181525050808860008151811061375157613751615580565b60200260200101818152505060005b86610160015151811015613a1057866101600151818151811061378557613785615580565b60200260200101516001600160a01b031663f7c618c16040518163ffffffff1660e01b8152600401602060405180830381865afa1580156137ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137ee919061563a565b8c6137fa836001615611565b8151811061380a5761380a615580565b60200260200101906001600160a01b031690816001600160a01b031681525050613889876101600151828151811061384457613844615580565b60200260200101516001600160a01b031663f7c618c16040518163ffffffff1660e01b8152600401602060405180830381865afa158015611221573d6000803e3d6000fd5b8b613895836001615611565b815181106138a5576138a5615580565b602002602001018190525061390f87610160015182815181106138ca576138ca615580565b60200260200101516001600160a01b031663f7c618c16040518163ffffffff1660e01b8152600401602060405180830381865afa1580156112e0573d6000803e3d6000fd5b60ff168a61391e836001615611565b8151811061392e5761392e615580565b602002602001018181525050866101600151818151811061395157613951615580565b60200260200101516001600160a01b031663ffcd42638f8f6040518363ffffffff1660e01b81526004016139989291909182526001600160a01b0316602082015260400190565b602060405180830381865afa1580156139b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139d99190615657565b896139e5836001615611565b815181106139f5576139f5615580565b6020908102919091010152613a09816155f8565b9050613760565b505050505050505092959194509250565b60045460005b81811015612bcb57613a3881613a40565b600101613a27565b60045481908110613a895760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b60448201526064016108f4565b600060048381548110613a9e57613a9e615580565b90600052602060002090600c0201905080600201544211613abe57505050565b6007810154801580613ad257506001820154155b15613ae35750426002909101555050565b6000826002015442613af591906155ac565b90506000600654846001015460025484613b0f91906155bf565b613b1991906155bf565b613b2391906155d6565b905060008460080154600003613b3a576000613b63565b6007546008860154600354613b4f90866155bf565b613b5991906155bf565b613b6391906155d6565b9050613b6f8183615611565b600d549092506103e890600090613b8690836155ac565b600d5490915015613c5957600b54600d546001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116926340c10f19929116908590613bd890896155bf565b613be291906155d6565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015613c4057600080fd5b505af1158015613c54573d6000803e3d6000fd5b505050505b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166340c10f193084613c9485896155bf565b613c9e91906155d6565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015613cfc57600080fd5b505af1158015613d10573d6000803e3d6000fd5b50505060078801548391508264e8d4a51000613d2c87896155ac565b613d3691906155bf565b613d4091906155bf565b613d4a91906155d6565b613d5491906155d6565b876003016000828254613d679190615611565b90915550506007870154829082613d8364e8d4a51000876155bf565b613d8d91906155bf565b613d9791906155d6565b613da191906155d6565b876004016000828254613db49190615611565b909155505042600288018190556003880154604080519283526020830189905282015289907f3be3541fc42237d611b30329040bfa4569541d156560acdbbae57640d20b8f469060600160405180910390a2505050505050505050565b600060048281548110613e2657613e26615580565b6000918252602080832085845260058252604080852033865290925292206004810154600c9092029092019250158015613e6257506008544210155b15613e7c576006820154613e769042615611565b60048201555b600481015415801590613e9157506006820154155b15613e9e57600060048201555b6000816001015464e8d4a5100084600301548460000154613ebf91906155bf565b613ec991906155d6565b613ed391906155ac565b90506000826002015464e8d4a5100085600401548560000154613ef691906155bf565b613f0091906155d6565b613f0a91906155ac565b9050613f1685336109c5565b1561410157600a84015460ff1615613f3257613f323386614964565b6000821180613f45575060008360030154115b80613f505750600081115b156140fc57600081846003015484613f689190615611565b613f729190615611565b9050836003015460096000828254613f8a91906155ac565b9091555050600060038501556006850154613fa59042615611565b60048501556009850154600090606490613fbf90846155bf565b613fc991906155d6565b90506000613fd782846155ac565b905081156140b0576040517f9bfa5181000000000000000000000000000000000000000000000000000000008152336004820152602481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690639bfa518190604401600060405180830381600087803b15801561406057600080fd5b505af1158015614074573d6000803e3d6000fd5b50506040518481528a92503391507f8876fd73bef34a989f5076e307c96af47d13fe1753d5903fe198dc58afc207319060200160405180910390a35b80156140f8576140c033826149c4565b604051818152889033907fd6f2c8500df5b44f11e9e48b91ff9f1b9d81bc496d55570c2b1b75bf65243f519060200160405180910390a35b5050505b614191565b60008211806141105750600081115b156141915761411f8183615611565b600960008282546141309190615611565b9091555061414090508183615611565b8360030160008282546141539190615611565b9091555050604051828152859033907fee470483107f579a55c754fa00613c45a9a3b617a418b39cb0be97e5381ba7c1906020015b60405180910390a35b5050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03167fa9059cbb00000000000000000000000000000000000000000000000000000000179052915160009283929087169161420d91906156cf565b6000604051808303816000865af19150503d806000811461424a576040519150601f19603f3d011682016040523d82523d6000602084013e61424f565b606091505b509150915081801561427957508051158061427957508080602001905181019061427991906156eb565b6141915760405162461bcd60e51b815260206004820152601c60248201527f426f72696e6745524332303a205472616e73666572206661696c65640000000060448201526064016108f4565b60408051600481526024810182526020810180516001600160e01b03167f95d89b4100000000000000000000000000000000000000000000000000000000179052905160609160009182916001600160a01b0386169161432591906156cf565b600060405180830381855afa9150503d8060008114614360576040519150601f19603f3d011682016040523d82523d6000602084013e614365565b606091505b50915091508161439057604051806040016040528060038152602001623f3f3f60e81b815250614399565b61439981614b6a565b949350505050565b60408051600481526024810182526020810180516001600160e01b03167f313ce567000000000000000000000000000000000000000000000000000000001790529051600091829182916001600160a01b0386169161440091906156cf565b600060405180830381855afa9150503d806000811461443b576040519150601f19603f3d011682016040523d82523d6000602084013e614440565b606091505b5091509150818015614453575080516020145b61445e576012614399565b808060200190518101906143999190615708565b6001600160a01b0382166000908152601160205260409020600281015461449a908390614d3c565b60006002909101555050565b600454829081106144ef5760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b60448201526064016108f4565b60006004848154811061450457614504615580565b600091825260208083208784526005825260408085203386529092529220600c909102909101915061453585613a40565b61453e85613e11565b831561470c5781546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561458c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145b09190615657565b83549091506145ca906001600160a01b0316333088614dcf565b82546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015614612573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906146369190615657565b905061464282826155ac565b600585015490965061ffff16156146a45760058401546000906127109061466d9061ffff16896155bf565b61467791906155d6565b600c548654919250614696916001600160a01b03908116911683614198565b6146a081886155ac565b9650505b858360000160008282546146b89190615611565b909155505083546001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169116036147095785600a60008282546147039190615611565b90915550505b50505b6003820154815464e8d4a5100091614723916155bf565b61472d91906155d6565b60018201556004820154815464e8d4a5100091614749916155bf565b61475391906155d6565b6002820155831561477857838260070160008282546147729190615611565b90915550505b60005b600b8301548110156148245782600b01818154811061479c5761479c615580565b600091825260209091200154825460405163075bbb7f60e41b81526004810189905233602482015260448101919091526001600160a01b03909116906375bbb7f090606401600060405180830381600087803b1580156147fb57600080fd5b505af115801561480f573d6000803e3d6000fd5b505050508061481d906155f8565b905061477b565b50604051848152859033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1590602001614188565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038316600090815260116020526040902060028101548311156148f85760008160020154846148df91906155ac565b6002830185905590506148f28382614f04565b50612799565b806002015483101561279957600083826002015461491691906155ac565b6002830185905590506141918382614d3c565b606481111561493757600080fd5b806004838154811061494b5761494b615580565b90600052602060002090600c0201600901819055505050565b6001600160a01b03821660009081526011602052604090206001810154821461498c57505050565b600061499784612955565b825490915060ff16156149af576149af8482856148a9565b806000036127995750805460ff191690555050565b600a546040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015614a2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a4f9190615657565b1115612bcb57600a546040516370a0823160e01b8152306004820152600091906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015614ac0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614ae49190615657565b614aee91906155ac565b9050808210614b3057614b2b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483614198565b505050565b8115614b2b57614b2b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168484614198565b60606040825110614b8957818060200190518101906129fd9190615725565b8151602003614d185760005b60208160ff16108015614be25750828160ff1681518110614bb857614bb8615580565b01602001517fff000000000000000000000000000000000000000000000000000000000000001615155b15614bf95780614bf1816157c7565b915050614b95565b60008160ff1667ffffffffffffffff811115614c1757614c17615624565b6040519080825280601f01601f191660200182016040528015614c41576020820181803683370190505b509050600091505b60208260ff16108015614c965750838260ff1681518110614c6c57614c6c615580565b01602001517fff000000000000000000000000000000000000000000000000000000000000001615155b15614d1157838260ff1681518110614cb057614cb0615580565b602001015160f81c60f81b818360ff1681518110614cd057614cd0615580565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535081614d09816157c7565b925050614c49565b9392505050565b50506040805180820190915260038152623f3f3f60e81b602082015290565b919050565b600e54600f54614d4c9190615611565b4210614d5f57614d5a613a21565b42600f555b80600754614d6d91906155ac565b6007819055508060048381548110614d8757614d87615580565b90600052602060002090600c020160080154614da391906155ac565b60048381548110614db657614db6615580565b90600052602060002090600c0201600801819055505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03167f23b872dd000000000000000000000000000000000000000000000000000000001790529151600092839290881691614e4c91906156cf565b6000604051808303816000865af19150503d8060008114614e89576040519150601f19603f3d011682016040523d82523d6000602084013e614e8e565b606091505b5091509150818015614eb8575080511580614eb8575080806020019051810190614eb891906156eb565b6114cf5760405162461bcd60e51b815260206004820181905260248201527f426f72696e6745524332303a205472616e7366657246726f6d206661696c656460448201526064016108f4565b600e54600f54614f149190615611565b4210614f2757614f22613a21565b42600f555b80600754614f359190615611565b6007819055508060048381548110614f4f57614f4f615580565b90600052602060002090600c020160080154614da39190615611565b828054828255906000526020600020908101928215614fc0579160200282015b82811115614fc057825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614f8b565b50614fcc929150615023565b5090565b828054828255906000526020600020908101928215614fc0579160200282015b82811115614fc05781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190614ff0565b5b80821115614fcc5760008155600101615024565b60006020828403121561504a57600080fd5b5035919050565b6001600160a01b038116811461316c57600080fd5b6000806040838503121561507957600080fd5b82359150602083013561508b81615051565b809150509250929050565b6000602082840312156150a857600080fd5b8135614d1181615051565b600080604083850312156150c657600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b8381101561510e5781516001600160a01b0316875295820195908201906001016150e9565b509495945050505050565b60005b8381101561513457818101518382015260200161511c565b50506000910152565b600081518084526020808501945080840160005b8381101561510e57815187529582019590820190600101615151565b60808152600061518060808301876150d5565b6020838203818501528187518084528284019150828160051b850101838a0160005b838110156151e857601f1980888503018652825180518086526151ca818a88018b8501615119565b96880196601f019091169390930186019250908501906001016151a2565b505086810360408801526151fc818a61513d565b9450505050508281036060840152615214818561513d565b979650505050505050565b60008083601f84011261523157600080fd5b50813567ffffffffffffffff81111561524957600080fd5b6020830191508360208260051b850101111561526457600080fd5b9250929050565b6000806000806040858703121561528157600080fd5b843567ffffffffffffffff8082111561529957600080fd5b6152a58883890161521f565b909650945060208701359150808211156152be57600080fd5b506152cb8782880161521f565b95989497509550505050565b600080604083850312156152ea57600080fd5b82356152f581615051565b946020939093013593505050565b60ff8116811461316c57600080fd5b60008060008060008060c0878903121561532b57600080fd5b863595506020870135945060408701359350606087013561534b81615303565b9598949750929560808101359460a0909101359350915050565b60008060006060848603121561537a57600080fd5b833561538581615051565b95602085013595506040909401359392505050565b803561ffff81168114614d3757600080fd5b801515811461316c57600080fd5b60008060008060008060008060006101008a8c0312156153d957600080fd5b8935985060208a01356153eb81615051565b97506153f960408b0161539a565b965060608a0135955060808a0135945060a08a0135935060c08a013561541e816153ac565b925060e08a013567ffffffffffffffff81111561543a57600080fd5b6154468c828d0161521f565b915080935050809150509295985092959850929598565b6000806040838503121561547057600080fd5b823561547b81615051565b9150602083013561508b816153ac565b600080600080600080600060c0888a0312156154a657600080fd5b8735965060208801359550604088013594506154c46060890161539a565b93506080880135925060a088013567ffffffffffffffff8111156154e757600080fd5b6154f38a828b0161521f565b989b979a50959850939692959293505050565b6000806040838503121561551957600080fd5b82359150602083013561508b816153ac565b6000806020838503121561553e57600080fd5b823567ffffffffffffffff81111561555557600080fd5b6155618582860161521f565b90969095509350505050565b602081526000614d1160208301846150d5565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156129fd576129fd615596565b80820281158282048414176129fd576129fd615596565b6000826155f357634e487b7160e01b600052601260045260246000fd5b500490565b60006001820161560a5761560a615596565b5060010190565b808201808211156129fd576129fd615596565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561564c57600080fd5b8151614d1181615051565b60006020828403121561566957600080fd5b5051919050565b60006020828403121561568257600080fd5b8135614d11816153ac565b60008184825b858110156156c45781356156a681615051565b6001600160a01b031683526020928301929190910190600101615693565b509095945050505050565b600082516156e1818460208701615119565b9190910192915050565b6000602082840312156156fd57600080fd5b8151614d11816153ac565b60006020828403121561571a57600080fd5b8151614d1181615303565b60006020828403121561573757600080fd5b815167ffffffffffffffff8082111561574f57600080fd5b818401915084601f83011261576357600080fd5b81518181111561577557615775615624565b604051601f8201601f19908116603f0116810190838211818310171561579d5761579d615624565b816040528281528760208487010111156157b657600080fd5b615214836020830160208801615119565b600060ff821660ff81036157dd576157dd615596565b6001019291505056fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a26469706673582212207aa8914cfbfd2758fa3cbd40485c111df039e52645f2d36f56bded91361fd79e64736f6c63430008130033000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d58000000000000000000000000000000000000000000000000214e8348c4f000000000000000000000000000000a68f81fe8c23cf19fd0f90be3734f68ff2ef45100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a68f81fe8c23cf19fd0f90be3734f68ff2ef45100000000000000000000000063d43d0edda7de4b5ed9b2f2aa855f81fbd716970000000000000000000000005d3b7043b1ec69ff9f21f70da68ab74d50731e260000000000000000000000000000000000000000000000000853a0d2313c0000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106103835760003560e01c8063837cca83116101de578063cbc83f351161010f578063e0f403d3116100ad578063eff8976b1161007c578063eff8976b14610861578063f2fde38b14610881578063fc3c28af14610894578063ffcd42631461089d57600080fd5b8063e0f403d314610829578063e2bbb15814610832578063e6fd48bc14610845578063eddf96521461084e57600080fd5b8063d0d41fe1116100e9578063d0d41fe1146107e6578063d6d80934146107f9578063dc640ac91461080c578063de73149d1461081f57600080fd5b8063cbc83f35146107b7578063ced75c1c146107ca578063cf047a73146107dd57600080fd5b8063a0e44a781161017c578063afbcfea111610156578063afbcfea114610776578063b63ccfe51461077e578063c5e88e9314610791578063c7ca0d47146107a457600080fd5b8063a0e44a7814610747578063a2cd70841461075a578063a5e090d01461076d57600080fd5b80638da5cb5b116101b85780638da5cb5b146106905780638fbc55e9146106a157806393f1a40b146106b457806399392ea61461072457600080fd5b8063837cca831461065757806385dd790a1461066a5780638705fcd41461067d57600080fd5b80634c1716f3116102b8578063630b5ba111610256578063715018a611610230578063715018a614610617578063764cba0b1461061f5780637bb5b9da14610628578063812c64f11461063b57600080fd5b8063630b5ba1146105e9578063654c9ece146105f15780636eaddad21461060457600080fd5b806351eb05a61161029257806351eb05a6146105b25780635312ea8e146105c557806353b7b038146105d857806360e772e1146105e057600080fd5b80634c1716f31461058357806350d4a4011461058c578063515bc3231461059f57600080fd5b80633931889b11610325578063441a3e70116102ff578063441a3e7014610531578063465e81ec14610544578063474fa630146105675780634852644f1461057057600080fd5b80633931889b146104bb5780633ad10ef61461050b578063412753581461051e57600080fd5b80631526fe27116103615780631526fe27146103f357806317caf6f1146104685780632e6c998d1461047157806335034c851461049457600080fd5b8063081e3eda146103885780630867bacf1461039f5780630ba84cd2146103de575b600080fd5b6004545b6040519081526020015b60405180910390f35b6103c67f000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d5881565b6040516001600160a01b039091168152602001610396565b6103f16103ec366004615038565b6108b0565b005b610406610401366004615038565b610948565b604080516001600160a01b03909c168c5260208c019a909a52988a01979097526060890195909552608088019390935261ffff90911660a087015260c086015260e0850152610100840152610120830152151561014082015261016001610396565b61038c60065481565b61048461047f366004615066565b6109c5565b6040519015158152602001610396565b6103c67f00000000000000000000000063d43d0edda7de4b5ed9b2f2aa855f81fbd7169781565b6104ee6104c9366004615096565b60116020526000908152604090208054600182015460029092015460ff909116919083565b604080519315158452602084019290925290820152606001610396565b600b546103c6906001600160a01b031681565b600c546103c6906001600160a01b031681565b6103f161053f3660046150b3565b610a52565b610557610552366004615038565b610dc2565b604051610396949392919061516d565b61038c60095481565b6103f161057e36600461526b565b611424565b61038c600e5481565b6103f161059a3660046152d7565b6114d7565b6103f16105ad366004615312565b61156f565b6103f16105c0366004615038565b6116f0565b6103f16105d3366004615038565b611757565b60025461038c565b61038c60025481565b6103f1611a0d565b61038c6105ff366004615038565b611a72565b6103f1610612366004615038565b611aa0565b6103f1611b82565b61038c600f5481565b6103f1610636366004615365565b611bd6565b6106446103e881565b60405161ffff9091168152602001610396565b6103f16106653660046153ba565b611cf6565b6103f161067836600461545d565b612176565b6103f161068b366004615096565b6121e9565b6000546001600160a01b03166103c6565b6103f16106af36600461548b565b6122d3565b6106fc6106c2366004615066565b6005602090815260009283526040808420909152908252902080546001820154600283015460038401546004909401549293919290919085565b604080519586526020860194909452928401919091526060830152608082015260a001610396565b610484610732366004615096565b60106020526000908152604090205460ff1681565b6103f1610755366004615506565b61267b565b6103f1610768366004615365565b6126fd565b61038c60075481565b6103f161279f565b61048461078c366004615038565b612881565b6103f161079f36600461526b565b6128b3565b61038c6107b2366004615096565b612955565b6103f16107c5366004615038565b612a03565b6103f16107d83660046152d7565b612a96565b61038c600a5481565b6103f16107f4366004615096565b612bcf565b6103f1610807366004615038565b612c8f565b6103f161081a36600461552b565b612cdc565b61038c6212750081565b61038c60035481565b6103f16108403660046150b3565b612dc5565b61038c60085481565b6103f161085c3660046150b3565b612e2e565b61087461086f366004615038565b612f5e565b604051610396919061556d565b6103f161088f366004615096565b61309f565b61038c600d5481565b6105576108ab366004615066565b61316f565b6000546001600160a01b031633146108fd5760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064015b60405180910390fd5b610905613a21565b600254604080519182526020820183905233917feedc6338c9c1ad8f3cd6c90dd09dbe98dbd57e610d3e59a17996d07acb0d9511910160405180910390a2600255565b6004818154811061095857600080fd5b60009182526020909120600c9091020180546001820154600283015460038401546004850154600586015460068701546007880154600889015460098a0154600a909a01546001600160a01b039099169a50969895979496939561ffff9093169491939092909160ff168b565b60045460009083908110610a115760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b60448201526064016108f4565b60008481526005602090815260408083206001600160a01b038716845290915290206008544210801590610a49575080600401544210155b95945050505050565b600260015403610aa45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108f4565b600260015560045482908110610af25760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b60448201526064016108f4565b600060048481548110610b0757610b07615580565b6000918252602080832087845260058252604080852033865290925292208054600c9092029092019250841115610b805760405162461bcd60e51b815260206004820181905260248201527f77697468647261773a207573657220616d6f756e74206e6f7420656e6f75676860448201526064016108f4565b8382600701541015610bd45760405162461bcd60e51b815260206004820152601f60248201527f77697468647261773a20706f6f6c20746f74616c206e6f7420656e6f7567680060448201526064016108f4565b610bdd85613a40565b610be685613e11565b8315610c675783816000016000828254610c0091906155ac565b909155505081546001600160a01b037f000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d588116911603610c515783600a6000828254610c4b91906155ac565b90915550505b8154610c67906001600160a01b03163386614198565b6003820154815464e8d4a5100091610c7e916155bf565b610c8891906155d6565b60018201556004820154815464e8d4a5100091610ca4916155bf565b610cae91906155d6565b60028201558315610cd35783826007016000828254610ccd91906155ac565b90915550505b60005b600b830154811015610d7f5782600b018181548110610cf757610cf7615580565b600091825260209091200154825460405163075bbb7f60e41b81526004810189905233602482015260448101919091526001600160a01b03909116906375bbb7f090606401600060405180830381600087803b158015610d5657600080fd5b505af1158015610d6a573d6000803e3d6000fd5b5050505080610d78906155f8565b9050610cd6565b50604051848152859033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a3505060018055505050565b606080606080846004805490508110610e135760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b60448201526064016108f4565b600060048781548110610e2857610e28615580565b90600052602060002090600c0201905080600b01805490506001610e4c9190615611565b67ffffffffffffffff811115610e6457610e64615624565b604051908082528060200260200182016040528015610e8d578160200160208202803683370190505b50600b820154909650610ea1906001615611565b67ffffffffffffffff811115610eb957610eb9615624565b604051908082528060200260200182016040528015610eec57816020015b6060815260200190600190039081610ed75790505b50600b820154909550610f00906001615611565b67ffffffffffffffff811115610f1857610f18615624565b604051908082528060200260200182016040528015610f41578160200160208202803683370190505b50600b820154909450610f55906001615611565b67ffffffffffffffff811115610f6d57610f6d615624565b604051908082528060200260200182016040528015610f96578160200160208202803683370190505b5092507f000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d5886600081518110610fcd57610fcd615580565b6001600160a01b03928316602091820292909201015261100e907f000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d58166142c5565b8560008151811061102157611021615580565b602002602001018190525061105e7f000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d586001600160a01b03166143a1565b60ff168460008151811061107457611074615580565b6020908102919091010152600d546103e89060009061109390836155ac565b9050816006548260025486600101546110ac91906155bf565b6110b691906155bf565b6110c091906155d6565b6110ca91906155d6565b856000815181106110dd576110dd615580565b60200260200101818152505060005b600b8401548110156114185783600b01818154811061110d5761110d615580565b600091825260209182902001546040805163f7c618c160e01b815290516001600160a01b039092169263f7c618c1926004808401938290030181865afa15801561115b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061117f919061563a565b8961118b836001615611565b8151811061119b5761119b615580565b60200260200101906001600160a01b031690816001600160a01b03168152505061125384600b0182815481106111d3576111d3615580565b600091825260209182902001546040805163f7c618c160e01b815290516001600160a01b039092169263f7c618c1926004808401938290030181865afa158015611221573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611245919061563a565b6001600160a01b03166142c5565b8861125f836001615611565b8151811061126f5761126f615580565b602002602001018190525061131284600b01828154811061129257611292615580565b600091825260209182902001546040805163f7c618c160e01b815290516001600160a01b039092169263f7c618c1926004808401938290030181865afa1580156112e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611304919061563a565b6001600160a01b03166143a1565b60ff1687611321836001615611565b8151811061133157611331615580565b60200260200101818152505083600b01818154811061135257611352615580565b6000918252602090912001546040517f465e81ec000000000000000000000000000000000000000000000000000000008152600481018c90526001600160a01b039091169063465e81ec90602401602060405180830381865afa1580156113bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113e19190615657565b866113ed836001615611565b815181106113fd576113fd615580565b6020908102919091010152611411816155f8565b90506110ec565b50505050509193509193565b6000546001600160a01b0316331461146c5760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b82811461147857600080fd5b8260005b818110156114cf576114c786868381811061149957611499615580565b905060200201358585848181106114b2576114b2615580565b90506020020160208101906107559190615670565b60010161147c565b505050505050565b3360009081526010602052604090205460ff1661152c5760405162461bcd60e51b81526020600482015260136024820152726f6e6c7920766f7465206f70657261746f727360681b60448201526064016108f4565b6001600160a01b038216600090815260116020526040902061154d82613a40565b61155b838260010154614472565b805460ff1916815560006001909101555050565b6002600154036115c15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108f4565b60026001556004548690811061160f5760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b60448201526064016108f4565b60006004888154811061162457611624615580565b60009182526020909120600c9091020180546040517fd505accf000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018a90526064810189905260ff8816608482015260a4810187905260c481018690529192506001600160a01b031690819063d505accf9060e401600060405180830381600087803b1580156116bf57600080fd5b505af11580156116d3573d6000803e3d6000fd5b505050506116e189896144a6565b50506001805550505050505050565b6002600154036117425760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108f4565b600260015561175081613a40565b5060018055565b6002600154036117a95760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108f4565b60026001819055506000600482815481106117c6576117c6615580565b6000918252602080832085845260058252604080852033865290925292208054600c92909202909201600781015490935081111561186c5760405162461bcd60e51b815260206004820152602960248201527f656d657267656e63792077697468647261773a20706f6f6c20746f74616c206e60448201527f6f7420656e6f756768000000000000000000000000000000000000000000000060648201526084016108f4565b81600301546009600082825461188291906155ac565b90915550506000808355600183018190556002830181905560038301819055600483018190556007840180548392906118bc9084906155ac565b90915550600090505b600b8401548110156119695783600b0181815481106118e6576118e6615580565b600091825260208220015460405163075bbb7f60e41b81526004810188905233602482015260448101929092526001600160a01b0316906375bbb7f090606401600060405180830381600087803b15801561194057600080fd5b505af1158015611954573d6000803e3d6000fd5b5050505080611962906155f8565b90506118c5565b5082546001600160a01b037f000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d5881169116036119b65780600a60008282546119b091906155ac565b90915550505b82546119cc906001600160a01b03163383614198565b604051818152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959060200160405180910390a35050600180555050565b600260015403611a5f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108f4565b6002600155611a6c613a21565b60018055565b600060048281548110611a8757611a87615580565b90600052602060002090600c0201600701549050919050565b6000546001600160a01b03163314611ae85760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b60c8811115611b395760405162461bcd60e51b815260206004820152601560248201527f696e76616c69642070657263656e742076616c7565000000000000000000000060448201526064016108f4565b611b41613a21565b600d5460408051918252602082018390527ff96ddc0c23d27d019385d4fd77df683374ccc84d253e2e5d8abf153eee48f44e910160405180910390a1600d55565b6000546001600160a01b03163314611bca5760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b611bd46000614859565b565b3360009081526010602052604090205460ff16611c2b5760405162461bcd60e51b81526020600482015260136024820152726f6e6c7920766f7465206f70657261746f727360681b60448201526064016108f4565b6001600160a01b03831660009081526011602052604090206004805484908110611c5757611c57615580565b60009182526020909120600a600c90920201015460ff16611cba5760405162461bcd60e51b815260206004820152601260248201527f766f7465206e6f74207065726d6974746564000000000000000000000000000060448201526064016108f4565b805460ff1615611cc957600080fd5b611cd283613a40565b611cdd8483856148a9565b600180820193909355805460ff19169092179091555050565b6000546001600160a01b03163314611d3e5760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b600a811115611d8f5760405162461bcd60e51b815260206004820152601760248201527f6164643a20746f6f206d616e792072657761726465727300000000000000000060448201526064016108f4565b6103e861ffff88161115611de55760405162461bcd60e51b815260206004820152601960248201527f6164643a206465706f7369742066656520746f6f20686967680000000000000060448201526064016108f4565b62127500861115611e385760405162461bcd60e51b815260206004820152601d60248201527f6164643a20696e76616c6964206861727665737420696e74657276616c00000060448201526064016108f4565b6064841115611e895760405162461bcd60e51b815260206004820152601960248201527f6164643a20696e76616c6964207374476c696e7420726174650000000000000060448201526064016108f4565b60005b81811015611f2957611ecd838383818110611ea957611ea9615580565b9050602002016020810190611ebe9190615096565b6001600160a01b03163b151590565b611f195760405162461bcd60e51b815260206004820152601e60248201527f6164643a207265776172646572206d75737420626520636f6e7472616374000060448201526064016108f4565b611f22816155f8565b9050611e8c565b50611f32613a21565b60006008544211611f4557600854611f47565b425b90508960066000828254611f5b9190615611565b925050819055508560076000828254611f749190615611565b9250508190555060046040518061018001604052808b6001600160a01b031681526020018c815260200183815260200160008152602001600081526020018a61ffff16815260200189815260200160008152602001888152602001878152602001861515815260200185858080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509390945250508354600180820186559482526020918290208451600c9092020180546001600160a01b0319166001600160a01b03909216919091178155838201519481019490945560408301516002850155606083015160038501556080830151600485015560a083015160058501805461ffff191661ffff90921691909117905560c0830151600685015560e0830151600785015561010083015160088501556101208301516009850155610140830151600a8501805460ff191691151591909117905561016083015180519394936120f09350600b8501929190910190614f6b565b505050828260405161210392919061568d565b6040519081900390206004546001600160a01b038b1690612126906001906155ac565b604080518e815261ffff8d1660208201529081018b90527f5ed295c4f5af5aeb1ccd905e1cd55a86ab3bb9fc1fe2346ff64ac47dbef366619060600160405180910390a450505050505050505050565b6000546001600160a01b031633146121be5760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b6001600160a01b03919091166000908152601060205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146122315760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b6001600160a01b0381166122875760405162461bcd60e51b815260206004820152600d60248201527f77726f6e6720616464726573730000000000000000000000000000000000000060448201526064016108f4565b600c80546001600160a01b0319166001600160a01b03831690811790915560405133907fd44190acf9d04bdb5d3a1aafff7e6dee8b40b93dfb8c5d3f0eea4b9f4539c3f790600090a350565b6000546001600160a01b0316331461231b5760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b600454879081106123645760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b60448201526064016108f4565b600a8211156123b55760405162461bcd60e51b815260206004820152601760248201527f7365743a20746f6f206d616e792072657761726465727300000000000000000060448201526064016108f4565b6103e861ffff8616111561240b5760405162461bcd60e51b815260206004820152601960248201527f7365743a206465706f7369742066656520746f6f20686967680000000000000060448201526064016108f4565b6212750084111561245e5760405162461bcd60e51b815260206004820152601d60248201527f7365743a20696e76616c6964206861727665737420696e74657276616c00000060448201526064016108f4565b60005b828110156124da5761247e848483818110611ea957611ea9615580565b6124ca5760405162461bcd60e51b815260206004820152601e60248201527f7365743a207265776172646572206d75737420626520636f6e7472616374000060448201526064016108f4565b6124d3816155f8565b9050612461565b506124e3613a21565b86600489815481106124f7576124f7615580565b90600052602060002090600c02016001015460065461251691906155ac565b6125209190615611565b600681905550866004898154811061253a5761253a615580565b90600052602060002090600c020160010181905550846004898154811061256357612563615580565b90600052602060002090600c020160050160006101000a81548161ffff021916908361ffff16021790555083600489815481106125a2576125a2615580565b90600052602060002090600c02016006018190555085600489815481106125cb576125cb615580565b90600052602060002090600c020160090181905550828260048a815481106125f5576125f5615580565b90600052602060002090600c0201600b019190612613929190614fd0565b50828260405161262492919061568d565b6040805191829003822089835261ffff881660208401529082018690529089907f5ed6f0deef9ab49d02900b40d596df4cd637a2a7fbfa56bbcb377389d3ce8d289060600160405180910390a35050505050505050565b6000546001600160a01b031633146126c35760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b80600483815481106126d7576126d7615580565b60009182526020909120600c90910201600a01805460ff19169115159190911790555050565b3360009081526010602052604090205460ff166127525760405162461bcd60e51b81526020600482015260136024820152726f6e6c7920766f7465206f70657261746f727360681b60448201526064016108f4565b6001600160a01b038316600090815260116020526040902061277382613a40565b805460ff1615612788576127888484846148a9565b8260000361279957805460ff191681555b50505050565b6000546001600160a01b031633146127e75760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b60085442106128385760405162461bcd60e51b815260206004820152601460248201527f6661726d20616c7265616479207374617274656400000000000000000000000060448201526064016108f4565b60045460005b818110156128795760006004828154811061285b5761285b615580565b6000918252602090912042600c90920201600201555060010161283e565b505042600855565b60006004828154811061289657612896615580565b60009182526020909120600a600c90920201015460ff1692915050565b6000546001600160a01b031633146128fb5760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b82811461290757600080fd5b8260005b818110156114cf5761294d86868381811061292857612928615580565b9050602002013585858481811061294157612941615580565b90506020020135614929565b60010161290b565b6040517fbb4d44360000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301526000917f0000000000000000000000005d3b7043b1ec69ff9f21f70da68ab74d50731e269091169063bb4d443690602401602060405180830381865afa1580156129d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129fd9190615657565b92915050565b6000546001600160a01b03163314612a4b5760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b612a53613a21565b600254604080519182526020820183905233917f05b10e9fd7f02807ae1b400bca46772cfeb4890b484d12c1325136d6121e0f4e910160405180910390a2600355565b3360009081526010602052604090205460ff16612aeb5760405162461bcd60e51b81526020600482015260136024820152726f6e6c7920766f7465206f70657261746f727360681b60448201526064016108f4565b6001600160a01b03821660009081526011602052604090206004805483908110612b1757612b17615580565b60009182526020909120600a600c90920201015460ff16612b7a5760405162461bcd60e51b815260206004820152601260248201527f766f7465206e6f74207065726d6974746564000000000000000000000000000060448201526064016108f4565b805460ff1615612b8957600080fd5b6000612b9484612955565b905080600003612ba45750505050565b612bad83613a40565b612bb88482856148a9565b506001808201839055815460ff19161790555b5050565b6000546001600160a01b03163314612c175760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b6001600160a01b038116612c6d5760405162461bcd60e51b815260206004820152601760248201527f696e76616c6964206e657720646576206164647265737300000000000000000060448201526064016108f4565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314612cd75760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b600e55565b600260015403612d2e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108f4565b6002600155806019811115612d855760405162461bcd60e51b815260206004820152601f60248201527f68617276657374206d616e793a20746f6f206d616e7920706f6f6c206964730060448201526064016108f4565b60005b81811015612dbb57612db3848483818110612da557612da5615580565b9050602002013560006144a6565b600101612d88565b5050600180555050565b600260015403612e175760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108f4565b6002600155612e2682826144a6565b505060018055565b6000546001600160a01b03163314612e765760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b612e7e613a21565b336001600160a01b03167f802633c8d26237616d81bdac01bc40fcdf36e098832601582ec19d7e431c5ef360048481548110612ebc57612ebc615580565b90600052602060002090600c02016001015483604051612ee6929190918252602082015260400190565b60405180910390a28060048381548110612f0257612f02615580565b90600052602060002090600c020160010154600654612f2191906155ac565b612f2b9190615611565b6006819055508060048381548110612f4557612f45615580565b90600052602060002090600c0201600101819055505050565b60045460609082908110612faa5760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b60448201526064016108f4565b600060048481548110612fbf57612fbf615580565b90600052602060002090600c0201905080600b018054905067ffffffffffffffff811115612fef57612fef615624565b604051908082528060200260200182016040528015613018578160200160208202803683370190505b50925060005b600b8201548110156130975781600b01818154811061303f5761303f615580565b9060005260206000200160009054906101000a90046001600160a01b031684828151811061306f5761306f615580565b6001600160a01b0390921660209283029190910190910152613090816155f8565b905061301e565b505050919050565b6000546001600160a01b031633146130e75760405162461bcd60e51b815260206004820181905260248201526000805160206157e783398151915260448201526064016108f4565b6001600160a01b0381166131635760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016108f4565b61316c81614859565b50565b6060806060808560048054905081106131c05760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b60448201526064016108f4565b6000600488815481106131d5576131d5615580565b60009182526020918290206040805161018081018252600c90930290910180546001600160a01b031683526001810154838501526002810154838301526003810154606084015260048101546080840152600581015461ffff1660a0840152600681015460c0840152600781015460e084015260088101546101008401526009810154610120840152600a81015460ff161515610140840152600b8101805483518187028101870190945280845293949193610160860193928301828280156132c757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116132a9575b5050509190925250505060008981526005602090815260408083206001600160a01b038c168452825291829020825160a081018452815481526001820154928101929092526002810154828401526003810154606080840191909152600490910154608080840191909152908401519084015160e08501519385015194955091939092904211801561335857508015155b1561347757600085604001514261336f91906155ac565b600d549091506103e89060009061338690836155ac565b9050600082600654838b60200151600254886133a291906155bf565b6133ac91906155bf565b6133b691906155bf565b6133c091906155d6565b6133ca91906155d6565b9050846133dc64e8d4a51000836155bf565b6133e691906155d6565b6133f09088615611565b96506000896101000151600003613408576000613449565b836007548b6101000151856003548961342191906155bf565b61342b91906155bf565b61343591906155bf565b61343f91906155d6565b61344991906155d6565b90508561345b64e8d4a51000836155bf565b61346591906155d6565b61346f9088615611565b965050505050505b6000846040015164e8d4a5100084876000015161349491906155bf565b61349e91906155d6565b6134a891906155ac565b60608601516020870151875164e8d4a51000906134c69089906155bf565b6134d091906155d6565b6134da91906155ac565b6134e49190615611565b6134ee9190615611565b90508561016001515160016135039190615611565b67ffffffffffffffff81111561351b5761351b615624565b604051908082528060200260200182016040528015613544578160200160208202803683370190505b509a5085610160015151600161355a9190615611565b67ffffffffffffffff81111561357257613572615624565b6040519080825280602002602001820160405280156135a557816020015b60608152602001906001900390816135905790505b5099508561016001515160016135bb9190615611565b67ffffffffffffffff8111156135d3576135d3615624565b6040519080825280602002602001820160405280156135fc578160200160208202803683370190505b5097508561016001515160016136129190615611565b67ffffffffffffffff81111561362a5761362a615624565b604051908082528060200260200182016040528015613653578160200160208202803683370190505b5098507f000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d588b60008151811061368a5761368a615580565b6001600160a01b0392831660209182029290920101526136cb907f000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d58166142c5565b8a6000815181106136de576136de615580565b602002602001018190525061371b7f000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d586001600160a01b03166143a1565b60ff168960008151811061373157613731615580565b602002602001018181525050808860008151811061375157613751615580565b60200260200101818152505060005b86610160015151811015613a1057866101600151818151811061378557613785615580565b60200260200101516001600160a01b031663f7c618c16040518163ffffffff1660e01b8152600401602060405180830381865afa1580156137ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137ee919061563a565b8c6137fa836001615611565b8151811061380a5761380a615580565b60200260200101906001600160a01b031690816001600160a01b031681525050613889876101600151828151811061384457613844615580565b60200260200101516001600160a01b031663f7c618c16040518163ffffffff1660e01b8152600401602060405180830381865afa158015611221573d6000803e3d6000fd5b8b613895836001615611565b815181106138a5576138a5615580565b602002602001018190525061390f87610160015182815181106138ca576138ca615580565b60200260200101516001600160a01b031663f7c618c16040518163ffffffff1660e01b8152600401602060405180830381865afa1580156112e0573d6000803e3d6000fd5b60ff168a61391e836001615611565b8151811061392e5761392e615580565b602002602001018181525050866101600151818151811061395157613951615580565b60200260200101516001600160a01b031663ffcd42638f8f6040518363ffffffff1660e01b81526004016139989291909182526001600160a01b0316602082015260400190565b602060405180830381865afa1580156139b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139d99190615657565b896139e5836001615611565b815181106139f5576139f5615580565b6020908102919091010152613a09816155f8565b9050613760565b505050505050505092959194509250565b60045460005b81811015612bcb57613a3881613a40565b600101613a27565b60045481908110613a895760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b60448201526064016108f4565b600060048381548110613a9e57613a9e615580565b90600052602060002090600c0201905080600201544211613abe57505050565b6007810154801580613ad257506001820154155b15613ae35750426002909101555050565b6000826002015442613af591906155ac565b90506000600654846001015460025484613b0f91906155bf565b613b1991906155bf565b613b2391906155d6565b905060008460080154600003613b3a576000613b63565b6007546008860154600354613b4f90866155bf565b613b5991906155bf565b613b6391906155d6565b9050613b6f8183615611565b600d549092506103e890600090613b8690836155ac565b600d5490915015613c5957600b54600d546001600160a01b037f000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d588116926340c10f19929116908590613bd890896155bf565b613be291906155d6565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015613c4057600080fd5b505af1158015613c54573d6000803e3d6000fd5b505050505b6001600160a01b037f000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d58166340c10f193084613c9485896155bf565b613c9e91906155d6565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015613cfc57600080fd5b505af1158015613d10573d6000803e3d6000fd5b50505060078801548391508264e8d4a51000613d2c87896155ac565b613d3691906155bf565b613d4091906155bf565b613d4a91906155d6565b613d5491906155d6565b876003016000828254613d679190615611565b90915550506007870154829082613d8364e8d4a51000876155bf565b613d8d91906155bf565b613d9791906155d6565b613da191906155d6565b876004016000828254613db49190615611565b909155505042600288018190556003880154604080519283526020830189905282015289907f3be3541fc42237d611b30329040bfa4569541d156560acdbbae57640d20b8f469060600160405180910390a2505050505050505050565b600060048281548110613e2657613e26615580565b6000918252602080832085845260058252604080852033865290925292206004810154600c9092029092019250158015613e6257506008544210155b15613e7c576006820154613e769042615611565b60048201555b600481015415801590613e9157506006820154155b15613e9e57600060048201555b6000816001015464e8d4a5100084600301548460000154613ebf91906155bf565b613ec991906155d6565b613ed391906155ac565b90506000826002015464e8d4a5100085600401548560000154613ef691906155bf565b613f0091906155d6565b613f0a91906155ac565b9050613f1685336109c5565b1561410157600a84015460ff1615613f3257613f323386614964565b6000821180613f45575060008360030154115b80613f505750600081115b156140fc57600081846003015484613f689190615611565b613f729190615611565b9050836003015460096000828254613f8a91906155ac565b9091555050600060038501556006850154613fa59042615611565b60048501556009850154600090606490613fbf90846155bf565b613fc991906155d6565b90506000613fd782846155ac565b905081156140b0576040517f9bfa5181000000000000000000000000000000000000000000000000000000008152336004820152602481018390527f00000000000000000000000063d43d0edda7de4b5ed9b2f2aa855f81fbd716976001600160a01b031690639bfa518190604401600060405180830381600087803b15801561406057600080fd5b505af1158015614074573d6000803e3d6000fd5b50506040518481528a92503391507f8876fd73bef34a989f5076e307c96af47d13fe1753d5903fe198dc58afc207319060200160405180910390a35b80156140f8576140c033826149c4565b604051818152889033907fd6f2c8500df5b44f11e9e48b91ff9f1b9d81bc496d55570c2b1b75bf65243f519060200160405180910390a35b5050505b614191565b60008211806141105750600081115b156141915761411f8183615611565b600960008282546141309190615611565b9091555061414090508183615611565b8360030160008282546141539190615611565b9091555050604051828152859033907fee470483107f579a55c754fa00613c45a9a3b617a418b39cb0be97e5381ba7c1906020015b60405180910390a35b5050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03167fa9059cbb00000000000000000000000000000000000000000000000000000000179052915160009283929087169161420d91906156cf565b6000604051808303816000865af19150503d806000811461424a576040519150601f19603f3d011682016040523d82523d6000602084013e61424f565b606091505b509150915081801561427957508051158061427957508080602001905181019061427991906156eb565b6141915760405162461bcd60e51b815260206004820152601c60248201527f426f72696e6745524332303a205472616e73666572206661696c65640000000060448201526064016108f4565b60408051600481526024810182526020810180516001600160e01b03167f95d89b4100000000000000000000000000000000000000000000000000000000179052905160609160009182916001600160a01b0386169161432591906156cf565b600060405180830381855afa9150503d8060008114614360576040519150601f19603f3d011682016040523d82523d6000602084013e614365565b606091505b50915091508161439057604051806040016040528060038152602001623f3f3f60e81b815250614399565b61439981614b6a565b949350505050565b60408051600481526024810182526020810180516001600160e01b03167f313ce567000000000000000000000000000000000000000000000000000000001790529051600091829182916001600160a01b0386169161440091906156cf565b600060405180830381855afa9150503d806000811461443b576040519150601f19603f3d011682016040523d82523d6000602084013e614440565b606091505b5091509150818015614453575080516020145b61445e576012614399565b808060200190518101906143999190615708565b6001600160a01b0382166000908152601160205260409020600281015461449a908390614d3c565b60006002909101555050565b600454829081106144ef5760405162461bcd60e51b8152602060048201526013602482015272141bdbdb08191bd95cc81b9bdd08195e1a5cdd606a1b60448201526064016108f4565b60006004848154811061450457614504615580565b600091825260208083208784526005825260408085203386529092529220600c909102909101915061453585613a40565b61453e85613e11565b831561470c5781546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561458c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145b09190615657565b83549091506145ca906001600160a01b0316333088614dcf565b82546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015614612573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906146369190615657565b905061464282826155ac565b600585015490965061ffff16156146a45760058401546000906127109061466d9061ffff16896155bf565b61467791906155d6565b600c548654919250614696916001600160a01b03908116911683614198565b6146a081886155ac565b9650505b858360000160008282546146b89190615611565b909155505083546001600160a01b037f000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d5881169116036147095785600a60008282546147039190615611565b90915550505b50505b6003820154815464e8d4a5100091614723916155bf565b61472d91906155d6565b60018201556004820154815464e8d4a5100091614749916155bf565b61475391906155d6565b6002820155831561477857838260070160008282546147729190615611565b90915550505b60005b600b8301548110156148245782600b01818154811061479c5761479c615580565b600091825260209091200154825460405163075bbb7f60e41b81526004810189905233602482015260448101919091526001600160a01b03909116906375bbb7f090606401600060405180830381600087803b1580156147fb57600080fd5b505af115801561480f573d6000803e3d6000fd5b505050508061481d906155f8565b905061477b565b50604051848152859033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1590602001614188565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038316600090815260116020526040902060028101548311156148f85760008160020154846148df91906155ac565b6002830185905590506148f28382614f04565b50612799565b806002015483101561279957600083826002015461491691906155ac565b6002830185905590506141918382614d3c565b606481111561493757600080fd5b806004838154811061494b5761494b615580565b90600052602060002090600c0201600901819055505050565b6001600160a01b03821660009081526011602052604090206001810154821461498c57505050565b600061499784612955565b825490915060ff16156149af576149af8482856148a9565b806000036127995750805460ff191690555050565b600a546040516370a0823160e01b81523060048201527f000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d586001600160a01b0316906370a0823190602401602060405180830381865afa158015614a2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a4f9190615657565b1115612bcb57600a546040516370a0823160e01b8152306004820152600091906001600160a01b037f000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d5816906370a0823190602401602060405180830381865afa158015614ac0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614ae49190615657565b614aee91906155ac565b9050808210614b3057614b2b6001600160a01b037f000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d58168483614198565b505050565b8115614b2b57614b2b6001600160a01b037f000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d58168484614198565b60606040825110614b8957818060200190518101906129fd9190615725565b8151602003614d185760005b60208160ff16108015614be25750828160ff1681518110614bb857614bb8615580565b01602001517fff000000000000000000000000000000000000000000000000000000000000001615155b15614bf95780614bf1816157c7565b915050614b95565b60008160ff1667ffffffffffffffff811115614c1757614c17615624565b6040519080825280601f01601f191660200182016040528015614c41576020820181803683370190505b509050600091505b60208260ff16108015614c965750838260ff1681518110614c6c57614c6c615580565b01602001517fff000000000000000000000000000000000000000000000000000000000000001615155b15614d1157838260ff1681518110614cb057614cb0615580565b602001015160f81c60f81b818360ff1681518110614cd057614cd0615580565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535081614d09816157c7565b925050614c49565b9392505050565b50506040805180820190915260038152623f3f3f60e81b602082015290565b919050565b600e54600f54614d4c9190615611565b4210614d5f57614d5a613a21565b42600f555b80600754614d6d91906155ac565b6007819055508060048381548110614d8757614d87615580565b90600052602060002090600c020160080154614da391906155ac565b60048381548110614db657614db6615580565b90600052602060002090600c0201600801819055505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03167f23b872dd000000000000000000000000000000000000000000000000000000001790529151600092839290881691614e4c91906156cf565b6000604051808303816000865af19150503d8060008114614e89576040519150601f19603f3d011682016040523d82523d6000602084013e614e8e565b606091505b5091509150818015614eb8575080511580614eb8575080806020019051810190614eb891906156eb565b6114cf5760405162461bcd60e51b815260206004820181905260248201527f426f72696e6745524332303a205472616e7366657246726f6d206661696c656460448201526064016108f4565b600e54600f54614f149190615611565b4210614f2757614f22613a21565b42600f555b80600754614f359190615611565b6007819055508060048381548110614f4f57614f4f615580565b90600052602060002090600c020160080154614da39190615611565b828054828255906000526020600020908101928215614fc0579160200282015b82811115614fc057825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614f8b565b50614fcc929150615023565b5090565b828054828255906000526020600020908101928215614fc0579160200282015b82811115614fc05781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190614ff0565b5b80821115614fcc5760008155600101615024565b60006020828403121561504a57600080fd5b5035919050565b6001600160a01b038116811461316c57600080fd5b6000806040838503121561507957600080fd5b82359150602083013561508b81615051565b809150509250929050565b6000602082840312156150a857600080fd5b8135614d1181615051565b600080604083850312156150c657600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b8381101561510e5781516001600160a01b0316875295820195908201906001016150e9565b509495945050505050565b60005b8381101561513457818101518382015260200161511c565b50506000910152565b600081518084526020808501945080840160005b8381101561510e57815187529582019590820190600101615151565b60808152600061518060808301876150d5565b6020838203818501528187518084528284019150828160051b850101838a0160005b838110156151e857601f1980888503018652825180518086526151ca818a88018b8501615119565b96880196601f019091169390930186019250908501906001016151a2565b505086810360408801526151fc818a61513d565b9450505050508281036060840152615214818561513d565b979650505050505050565b60008083601f84011261523157600080fd5b50813567ffffffffffffffff81111561524957600080fd5b6020830191508360208260051b850101111561526457600080fd5b9250929050565b6000806000806040858703121561528157600080fd5b843567ffffffffffffffff8082111561529957600080fd5b6152a58883890161521f565b909650945060208701359150808211156152be57600080fd5b506152cb8782880161521f565b95989497509550505050565b600080604083850312156152ea57600080fd5b82356152f581615051565b946020939093013593505050565b60ff8116811461316c57600080fd5b60008060008060008060c0878903121561532b57600080fd5b863595506020870135945060408701359350606087013561534b81615303565b9598949750929560808101359460a0909101359350915050565b60008060006060848603121561537a57600080fd5b833561538581615051565b95602085013595506040909401359392505050565b803561ffff81168114614d3757600080fd5b801515811461316c57600080fd5b60008060008060008060008060006101008a8c0312156153d957600080fd5b8935985060208a01356153eb81615051565b97506153f960408b0161539a565b965060608a0135955060808a0135945060a08a0135935060c08a013561541e816153ac565b925060e08a013567ffffffffffffffff81111561543a57600080fd5b6154468c828d0161521f565b915080935050809150509295985092959850929598565b6000806040838503121561547057600080fd5b823561547b81615051565b9150602083013561508b816153ac565b600080600080600080600060c0888a0312156154a657600080fd5b8735965060208801359550604088013594506154c46060890161539a565b93506080880135925060a088013567ffffffffffffffff8111156154e757600080fd5b6154f38a828b0161521f565b989b979a50959850939692959293505050565b6000806040838503121561551957600080fd5b82359150602083013561508b816153ac565b6000806020838503121561553e57600080fd5b823567ffffffffffffffff81111561555557600080fd5b6155618582860161521f565b90969095509350505050565b602081526000614d1160208301846150d5565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156129fd576129fd615596565b80820281158282048414176129fd576129fd615596565b6000826155f357634e487b7160e01b600052601260045260246000fd5b500490565b60006001820161560a5761560a615596565b5060010190565b808201808211156129fd576129fd615596565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561564c57600080fd5b8151614d1181615051565b60006020828403121561566957600080fd5b5051919050565b60006020828403121561568257600080fd5b8135614d11816153ac565b60008184825b858110156156c45781356156a681615051565b6001600160a01b031683526020928301929190910190600101615693565b509095945050505050565b600082516156e1818460208701615119565b9190910192915050565b6000602082840312156156fd57600080fd5b8151614d11816153ac565b60006020828403121561571a57600080fd5b8151614d1181615303565b60006020828403121561573757600080fd5b815167ffffffffffffffff8082111561574f57600080fd5b818401915084601f83011261576357600080fd5b81518181111561577557615775615624565b604051601f8201601f19908116603f0116810190838211818310171561579d5761579d615624565b816040528281528760208487010111156157b657600080fd5b615214836020830160208801615119565b600060ff821660ff81036157dd576157dd615596565b6001019291505056fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a26469706673582212207aa8914cfbfd2758fa3cbd40485c111df039e52645f2d36f56bded91361fd79e64736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d58000000000000000000000000000000000000000000000000214e8348c4f000000000000000000000000000000a68f81fe8c23cf19fd0f90be3734f68ff2ef45100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a68f81fe8c23cf19fd0f90be3734f68ff2ef45100000000000000000000000063d43d0edda7de4b5ed9b2f2aa855f81fbd716970000000000000000000000005d3b7043b1ec69ff9f21f70da68ab74d50731e260000000000000000000000000000000000000000000000000853a0d2313c0000
-----Decoded View---------------
Arg [0] : _glint (address): 0xcd3B51D98478D53F4515A306bE565c6EebeF1D58
Arg [1] : _glintPerSec (uint256): 2400000000000000000
Arg [2] : _devAddress (address): 0x0a68f81Fe8c23cF19FD0f90be3734F68FF2EF451
Arg [3] : _devPercent (uint256): 0
Arg [4] : _feeAddress (address): 0x0a68f81Fe8c23cF19FD0f90be3734F68FF2EF451
Arg [5] : _stGlint (address): 0x63d43D0EDda7DE4B5ed9B2F2AA855f81FBd71697
Arg [6] : _farmBooster (address): 0x5D3b7043b1Ec69fF9F21F70da68aB74d50731E26
Arg [7] : _glintPerSecCommunity (uint256): 600000000000000000
-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d58
Arg [1] : 000000000000000000000000000000000000000000000000214e8348c4f00000
Arg [2] : 0000000000000000000000000a68f81fe8c23cf19fd0f90be3734f68ff2ef451
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [4] : 0000000000000000000000000a68f81fe8c23cf19fd0f90be3734f68ff2ef451
Arg [5] : 00000000000000000000000063d43d0edda7de4b5ed9b2f2aa855f81fbd71697
Arg [6] : 0000000000000000000000005d3b7043b1ec69ff9f21f70da68ab74d50731e26
Arg [7] : 0000000000000000000000000000000000000000000000000853a0d2313c0000
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$1,476.81
Net Worth in GLMR
Token Allocations
GLINT
100.00%
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| GLMR | 100.00% | $0.000034 | 43,848,358.1844 | $1,476.81 |
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.