Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 25 from a total of 1,392 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Unstake | 21986941 | 322 days ago | IN | 0 ETH | 0.00022529 | ||||
| Unstake | 20145022 | 580 days ago | IN | 0 ETH | 0.00029823 | ||||
| Unstake | 18269889 | 842 days ago | IN | 0 ETH | 0.0012836 | ||||
| Unstake | 17162206 | 998 days ago | IN | 0 ETH | 0.00453703 | ||||
| Unstake | 17048883 | 1014 days ago | IN | 0 ETH | 0.00394226 | ||||
| Unstake | 16489994 | 1092 days ago | IN | 0 ETH | 0.00196003 | ||||
| Unstake | 16075924 | 1150 days ago | IN | 0 ETH | 0.00152413 | ||||
| Unstake | 15522509 | 1228 days ago | IN | 0 ETH | 0.00203903 | ||||
| Unstake | 15497360 | 1232 days ago | IN | 0 ETH | 0.00744958 | ||||
| Unstake | 15409159 | 1246 days ago | IN | 0 ETH | 0.00167977 | ||||
| Unstake | 15400761 | 1248 days ago | IN | 0 ETH | 0.00087349 | ||||
| Unstake | 15370927 | 1252 days ago | IN | 0 ETH | 0.0010708 | ||||
| Unstake | 15298053 | 1264 days ago | IN | 0 ETH | 0.00203042 | ||||
| Unstake | 15286124 | 1266 days ago | IN | 0 ETH | 0.00103091 | ||||
| Unstake | 15187083 | 1281 days ago | IN | 0 ETH | 0.00514298 | ||||
| Unstake | 14845923 | 1338 days ago | IN | 0 ETH | 0.00311354 | ||||
| Unstake | 14730966 | 1356 days ago | IN | 0 ETH | 0.00585161 | ||||
| Unstake | 14561011 | 1383 days ago | IN | 0 ETH | 0.00284438 | ||||
| Unstake | 14519974 | 1389 days ago | IN | 0 ETH | 0.00974256 | ||||
| Unstake | 14469469 | 1397 days ago | IN | 0 ETH | 0.00407664 | ||||
| Unstake | 14426666 | 1404 days ago | IN | 0 ETH | 0.00334991 | ||||
| Unstake | 14403746 | 1407 days ago | IN | 0 ETH | 0.00324281 | ||||
| Stake | 14371151 | 1412 days ago | IN | 0 ETH | 0.00167936 | ||||
| Unstake | 14370583 | 1413 days ago | IN | 0 ETH | 0.00211575 | ||||
| Unstake | 14345788 | 1416 days ago | IN | 0 ETH | 0.00324674 |
Latest 3 internal transactions
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| - | 11776927 | 1815 days ago | Contract Creation | 0 ETH | |||
| - | 11776927 | 1815 days ago | Contract Creation | 0 ETH | |||
| - | 11776927 | 1815 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
KeepVault
Compiler Version
v0.5.17+commit.d19bba13
Contract Source Code (Solidity Standard Json-Input format)
/**
▓▓▌ ▓▓ ▐▓▓ ▓▓▓▓▓▓▓▓▓▓▌▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▄
▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▌▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓ ▓▓▓▓▓▓▓▀ ▐▓▓▓▓▓▓ ▐▓▓▓▓▓ ▓▓▓▓▓▓ ▓▓▓▓▓ ▐▓▓▓▓▓▌ ▐▓▓▓▓▓▓
▓▓▓▓▓▓▄▄▓▓▓▓▓▓▓▀ ▐▓▓▓▓▓▓▄▄▄▄ ▓▓▓▓▓▓▄▄▄▄ ▐▓▓▓▓▓▌ ▐▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓▓▓▓▓▀ ▐▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▌ ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▀▀▓▓▓▓▓▓▄ ▐▓▓▓▓▓▓▀▀▀▀ ▓▓▓▓▓▓▀▀▀▀ ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▀
▓▓▓▓▓▓ ▀▓▓▓▓▓▓▄ ▐▓▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓▓ ▓▓▓▓▓ ▐▓▓▓▓▓▌
▓▓▓▓▓▓▓▓▓▓ █▓▓▓▓▓▓▓▓▓ ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓ ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓
Trust math, not hardware.
*/
pragma solidity 0.5.17;
import "./KeepTokenGeyser.sol";
import "../KeepToken.sol";
/// @title KEEP Vault
/// @dev A smart-contract based mechanism to distribute tokens over time.
/// It accepts KEEP token as stake and distributes KEEP as rewards for staking.
contract KeepVault is KeepTokenGeyser {
/// @param _keepToken KEEP token contract address. It is a token that is accepted
/// as user's stake and that will be distributed as rewards.
/// @param _maxUnlockSchedules Max number of unlock stages, to guard against
/// hitting gas limit.
/// @param _startBonus Starting time bonus, BONUS_DECIMALS fixed point.
/// e.g. 25% means user gets 25% of max distribution tokens.
/// @param _bonusPeriodSec Length of time for bonus to increase linearly to max.
/// @param _initialSharesPerToken Number of shares to mint per staking token
/// on first stake.
/// @param _durationSec Length of time to linear unlock the rewards tokens.
constructor(
KeepToken _keepToken,
uint256 _maxUnlockSchedules,
uint256 _startBonus,
uint256 _bonusPeriodSec,
uint256 _initialSharesPerToken,
uint256 _durationSec
)
public
KeepTokenGeyser(
_keepToken,
_keepToken,
_maxUnlockSchedules,
_startBonus,
_bonusPeriodSec,
_initialSharesPerToken,
_durationSec
)
{}
}pragma solidity 0.5.17;
import "./TokenGeyser.sol";
import "../KeepToken.sol";
import {IStakerRewards, StakerRewardsBeneficiary} from "../PhasedEscrow.sol";
import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";
/// @title KEEP Token Geyser
/// @dev A smart-contract based mechanism to distribute tokens over time, based
/// on implementation of ampleforth's TokenGeyser contract (see: [token-geyser]).
///
/// Token that users stake is any ERC20 token defined on contract deployment.
/// Users are rewarded in distribution tokens, which in this case will be KEEP.
///
/// Account holding Reward Distribution role locks tokens for distribution.
/// The role can be transferred to any account or contract (e.g. Escrow) by the
/// contract owner.
///
/// [token-geyser]: https://github.com/ampleforth/token-geyser/
contract KeepTokenGeyser is TokenGeyser, IStakerRewards {
event DurationSecUpdated(uint256 oldDurationSec, uint256 newDurationSec);
uint256 public durationSec;
/// @param _stakingToken The token users deposit as a stake.
/// @param _distributionToken The token users are rewarded in and receive it
/// as they unstake.
/// @param _maxUnlockSchedules Max number of unlock stages, to guard against
/// hitting gas limit.
/// @param _startBonus Starting time bonus, BONUS_DECIMALS fixed point.
/// e.g. 25% means user gets 25% of max distribution tokens.
/// @param _bonusPeriodSec Length of time for bonus to increase linearly to max.
/// @param _initialSharesPerToken Number of shares to mint per staking token
/// on first stake.
/// @param _durationSec Length of time to linear unlock the rewards tokens.
constructor(
IERC20 _stakingToken,
KeepToken _distributionToken,
uint256 _maxUnlockSchedules,
uint256 _startBonus,
uint256 _bonusPeriodSec,
uint256 _initialSharesPerToken,
uint256 _durationSec
)
public
TokenGeyser(
_stakingToken,
_distributionToken,
_maxUnlockSchedules,
_startBonus,
_bonusPeriodSec,
_initialSharesPerToken
)
{
durationSec = _durationSec;
}
/// @notice Receives an approval of token transfer and locks the approved
/// amount for rewards.
/// @dev Requires the provided token contract to be the same as the distribution
/// token supported by this contract.
/// @param _from The owner of the tokens who approved them to stake.
/// @param _value Approved amount of tokens for the transfer.
/// @param _token Token contract address.
/// @param _extraData Ignored.
function receiveApproval(
address _from,
uint256 _value,
address _token,
bytes calldata _extraData
) external {
require(
KeepToken(_token) == getDistributionToken(),
"Token is not supported distribution token"
);
lockTokens(_value, durationSec);
}
function setDurationSec(uint256 _newDurationSec) external onlyOwner {
require(
_newDurationSec > 0,
"New duration has to be greater than zero"
);
emit DurationSecUpdated(durationSec, _newDurationSec);
durationSec = _newDurationSec;
}
}
/// @title KeepTokenGeyserRewardsEscrowBeneficiary
/// @notice Intermediate contract used to transfer tokens from PhasedEscrow to a
/// designated KeepTokenGeyser contract.
contract KeepTokenGeyserRewardsEscrowBeneficiary is StakerRewardsBeneficiary {
constructor(IERC20 _token, IStakerRewards _stakerRewards)
public
StakerRewardsBeneficiary(_token, _stakerRewards)
{}
}/**
This code is copied from:
https://github.com/ampleforth/token-geyser/tree/d8352f62a0432494c39416d090e68582e13b2b22/contracts
with some modifications:
- updated pragma to reflect the one used by the project,
- aligned functions ordering to meet project's linting requirements,
- defined a separate role for rewards tokens locking.
*/
pragma solidity 0.5.17;
import "openzeppelin-solidity/contracts/math/SafeMath.sol";
import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";
import "openzeppelin-solidity/contracts/ownership/Ownable.sol";
import "./IStaking.sol";
import "./TokenPool.sol";
/**
* @title Token Geyser
* @dev A smart-contract based mechanism to distribute tokens over time, inspired loosely by
* Compound and Uniswap.
*
* Distribution tokens are added to a locked pool in the contract and become unlocked over time
* according to a once-configurable unlock schedule. Once unlocked, they are available to be
* claimed by users.
*
* A user may deposit tokens to accrue ownership share over the unlocked pool. This owner share
* is a function of the number of tokens deposited as well as the length of time deposited.
* Specifically, a user's share of the currently-unlocked pool equals their "deposit-seconds"
* divided by the global "deposit-seconds". This aligns the new token distribution with long
* term supporters of the project, addressing one of the major drawbacks of simple airdrops.
*
* More background and motivation available at:
* https://github.com/ampleforth/RFCs/blob/master/RFCs/rfc-1.md
*/
contract TokenGeyser is IStaking, Ownable {
using SafeMath for uint256;
event Staked(
address indexed user,
uint256 amount,
uint256 total,
bytes data
);
event Unstaked(
address indexed user,
uint256 amount,
uint256 total,
bytes data
);
event TokensClaimed(address indexed user, uint256 amount);
event TokensLocked(uint256 amount, uint256 durationSec, uint256 total);
// amount: Unlocked tokens, total: Total locked tokens
event TokensUnlocked(uint256 amount, uint256 total);
event RewardDistributionRoleTransferred(
address oldRewardDistribution,
address newRewardDistribution
);
TokenPool private _stakingPool;
TokenPool private _unlockedPool;
TokenPool private _lockedPool;
// Address that is expected to fund the contract with tokens to distribute.
address public rewardDistribution;
//
// Time-bonus params
//
uint256 public constant BONUS_DECIMALS = 2;
uint256 public startBonus = 0;
uint256 public bonusPeriodSec = 0;
//
// Global accounting state
//
uint256 public totalLockedShares = 0;
uint256 public totalStakingShares = 0;
uint256 private _totalStakingShareSeconds = 0;
uint256 private _lastAccountingTimestampSec = now;
uint256 private _maxUnlockSchedules = 0;
uint256 private _initialSharesPerToken = 0;
//
// User accounting state
//
// Represents a single stake for a user. A user may have multiple.
struct Stake {
uint256 stakingShares;
uint256 timestampSec;
}
// Caches aggregated values from the User->Stake[] map to save computation.
// If lastAccountingTimestampSec is 0, there's no entry for that user.
struct UserTotals {
uint256 stakingShares;
uint256 stakingShareSeconds;
uint256 lastAccountingTimestampSec;
}
// Aggregated staking values per user
mapping(address => UserTotals) private _userTotals;
// The collection of stakes for each user. Ordered by timestamp, earliest to latest.
mapping(address => Stake[]) private _userStakes;
//
// Locked/Unlocked Accounting state
//
struct UnlockSchedule {
uint256 initialLockedShares;
uint256 unlockedShares;
uint256 lastUnlockTimestampSec;
uint256 endAtSec;
uint256 durationSec;
}
UnlockSchedule[] public unlockSchedules;
/**
* @param stakingToken The token users deposit as stake.
* @param distributionToken The token users receive as they unstake.
* @param maxUnlockSchedules Max number of unlock stages, to guard against hitting gas limit.
* @param startBonus_ Starting time bonus, BONUS_DECIMALS fixed point.
* e.g. 25% means user gets 25% of max distribution tokens.
* @param bonusPeriodSec_ Length of time for bonus to increase linearly to max.
* @param initialSharesPerToken Number of shares to mint per staking token on first stake.
*/
constructor(
IERC20 stakingToken,
IERC20 distributionToken,
uint256 maxUnlockSchedules,
uint256 startBonus_,
uint256 bonusPeriodSec_,
uint256 initialSharesPerToken
) public {
// The start bonus must be some fraction of the max. (i.e. <= 100%)
require(
startBonus_ <= 10**BONUS_DECIMALS,
"TokenGeyser: start bonus too high"
);
// If no period is desired, instead set startBonus = 100%
// and bonusPeriod to a small value like 1sec.
require(bonusPeriodSec_ != 0, "TokenGeyser: bonus period is zero");
require(
initialSharesPerToken > 0,
"TokenGeyser: initialSharesPerToken is zero"
);
_stakingPool = new TokenPool(stakingToken);
_unlockedPool = new TokenPool(distributionToken);
_lockedPool = new TokenPool(distributionToken);
startBonus = startBonus_;
bonusPeriodSec = bonusPeriodSec_;
_maxUnlockSchedules = maxUnlockSchedules;
_initialSharesPerToken = initialSharesPerToken;
rewardDistribution = owner(); // By default owner is expected to fund the contract.
}
/**
* @dev Transfers amount of deposit tokens from the user.
* @param amount Number of deposit tokens to stake.
* @param data Not used.
*/
function stake(uint256 amount, bytes calldata data) external {
_stakeFor(msg.sender, msg.sender, amount);
}
/**
* @dev Transfers amount of deposit tokens from the caller on behalf of user.
* @param user User address who gains credit for this stake operation.
* @param amount Number of deposit tokens to stake.
* @param data Not used.
*/
function stakeFor(
address user,
uint256 amount,
bytes calldata data
) external onlyOwner {
_stakeFor(msg.sender, user, amount);
}
/**
* @dev Unstakes a certain amount of previously deposited tokens. User also receives their
* alotted number of distribution tokens.
* @param amount Number of deposit tokens to unstake / withdraw.
* @param data Not used.
*/
function unstake(uint256 amount, bytes calldata data) external {
_unstake(amount);
}
/**
* @dev Note that this application has a staking token as well as a distribution token, which
* may be different. This function is required by EIP-900.
* @return The deposit token used for staking.
*/
function token() external view returns (address) {
return address(getStakingToken());
}
/**
* @dev Transfers reward distribution role to a new address.
* Can only be called by the owner.
* @param newRewardDistribution New reward distribution address.
*/
function setRewardDistribution(address newRewardDistribution)
external
onlyOwner
{
require(
newRewardDistribution != address(0),
"New reward distribution is the zero address"
);
emit RewardDistributionRoleTransferred(
rewardDistribution,
newRewardDistribution
);
rewardDistribution = newRewardDistribution;
}
/**
* @dev This function allows the reward distribution to add more locked distribution tokens, along
* with the associated "unlock schedule". These locked tokens immediately begin unlocking
* linearly over the duration of durationSec timeframe.
* @param amount Number of distribution tokens to lock. These are transferred from the caller.
* @param durationSec Length of time to linear unlock the tokens.
*/
function lockTokens(uint256 amount, uint256 durationSec)
public
onlyRewardDistribution
{
require(
unlockSchedules.length < _maxUnlockSchedules,
"TokenGeyser: reached maximum unlock schedules"
);
// Update lockedTokens amount before using it in computations after.
updateAccounting();
uint256 lockedTokens = totalLocked();
uint256 mintedLockedShares =
(lockedTokens > 0)
? totalLockedShares.mul(amount).div(lockedTokens)
: amount.mul(_initialSharesPerToken);
UnlockSchedule memory schedule;
schedule.initialLockedShares = mintedLockedShares;
schedule.lastUnlockTimestampSec = now;
schedule.endAtSec = now.add(durationSec);
schedule.durationSec = durationSec;
unlockSchedules.push(schedule);
totalLockedShares = totalLockedShares.add(mintedLockedShares);
require(
_lockedPool.token().transferFrom(
msg.sender,
address(_lockedPool),
amount
),
"TokenGeyser: transfer into locked pool failed"
);
emit TokensLocked(amount, durationSec, totalLocked());
}
/**
* @param amount Number of deposit tokens to unstake / withdraw.
* @return The total number of distribution tokens that would be rewarded.
*/
function unstakeQuery(uint256 amount) public returns (uint256) {
return _unstake(amount);
}
/**
* @return The token users deposit as stake.
*/
function getStakingToken() public view returns (IERC20) {
return _stakingPool.token();
}
/**
* @return The token users receive as they unstake.
*/
function getDistributionToken() public view returns (IERC20) {
assert(_unlockedPool.token() == _lockedPool.token());
return _unlockedPool.token();
}
/**
* @param addr The user to look up staking information for.
* @return The number of staking tokens deposited for addr.
*/
function totalStakedFor(address addr) public view returns (uint256) {
return
totalStakingShares > 0
? totalStaked().mul(_userTotals[addr].stakingShares).div(
totalStakingShares
)
: 0;
}
/**
* @return The total number of deposit tokens staked globally, by all users.
*/
function totalStaked() public view returns (uint256) {
return _stakingPool.balance();
}
/**
* @dev A globally callable function to update the accounting state of the system.
* Global state and state for the caller are updated.
* @return [0] balance of the locked pool
* @return [1] balance of the unlocked pool
* @return [2] caller's staking share seconds
* @return [3] global staking share seconds
* @return [4] Rewards caller has accumulated, optimistically assumes max time-bonus.
* @return [5] block timestamp
*/
function updateAccounting()
public
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
unlockTokens();
// Global accounting
uint256 newStakingShareSeconds =
now.sub(_lastAccountingTimestampSec).mul(totalStakingShares);
_totalStakingShareSeconds = _totalStakingShareSeconds.add(
newStakingShareSeconds
);
_lastAccountingTimestampSec = now;
// User Accounting
UserTotals storage totals = _userTotals[msg.sender];
uint256 newUserStakingShareSeconds =
now.sub(totals.lastAccountingTimestampSec).mul(
totals.stakingShares
);
totals.stakingShareSeconds = totals.stakingShareSeconds.add(
newUserStakingShareSeconds
);
totals.lastAccountingTimestampSec = now;
uint256 totalUserRewards =
(_totalStakingShareSeconds > 0)
? totalUnlocked().mul(totals.stakingShareSeconds).div(
_totalStakingShareSeconds
)
: 0;
return (
totalLocked(),
totalUnlocked(),
totals.stakingShareSeconds,
_totalStakingShareSeconds,
totalUserRewards,
now
);
}
/**
* @return Total number of locked distribution tokens.
*/
function totalLocked() public view returns (uint256) {
return _lockedPool.balance();
}
/**
* @return Total number of unlocked distribution tokens.
*/
function totalUnlocked() public view returns (uint256) {
return _unlockedPool.balance();
}
/**
* @return Number of unlock schedules.
*/
function unlockScheduleCount() public view returns (uint256) {
return unlockSchedules.length;
}
/**
* @dev Moves distribution tokens from the locked pool to the unlocked pool, according to the
* previously defined unlock schedules. Publicly callable.
* @return Number of newly unlocked distribution tokens.
*/
function unlockTokens() public returns (uint256) {
uint256 unlockedTokens = 0;
uint256 lockedTokens = totalLocked();
if (totalLockedShares == 0) {
unlockedTokens = lockedTokens;
} else {
uint256 unlockedShares = 0;
for (uint256 s = 0; s < unlockSchedules.length; s++) {
unlockedShares = unlockedShares.add(unlockScheduleShares(s));
}
unlockedTokens = unlockedShares.mul(lockedTokens).div(
totalLockedShares
);
totalLockedShares = totalLockedShares.sub(unlockedShares);
}
if (unlockedTokens > 0) {
require(
_lockedPool.transfer(address(_unlockedPool), unlockedTokens),
"TokenGeyser: transfer out of locked pool failed"
);
emit TokensUnlocked(unlockedTokens, totalLocked());
}
return unlockedTokens;
}
/**
* @dev Lets the owner rescue funds air-dropped to the staking pool.
* @param tokenToRescue Address of the token to be rescued.
* @param to Address to which the rescued funds are to be sent.
* @param amount Amount of tokens to be rescued.
* @return Transfer success.
*/
function rescueFundsFromStakingPool(
address tokenToRescue,
address to,
uint256 amount
) public onlyOwner returns (bool) {
return _stakingPool.rescueFunds(tokenToRescue, to, amount);
}
/**
* @dev Private implementation of staking methods.
* @param staker User address who deposits tokens to stake.
* @param beneficiary User address who gains credit for this stake operation.
* @param amount Number of deposit tokens to stake.
*/
function _stakeFor(
address staker,
address beneficiary,
uint256 amount
) private {
require(amount > 0, "TokenGeyser: stake amount is zero");
require(
beneficiary != address(0),
"TokenGeyser: beneficiary is zero address"
);
require(
totalStakingShares == 0 || totalStaked() > 0,
"TokenGeyser: Invalid state. Staking shares exist, but no staking tokens do"
);
uint256 mintedStakingShares =
(totalStakingShares > 0)
? totalStakingShares.mul(amount).div(totalStaked())
: amount.mul(_initialSharesPerToken);
require(
mintedStakingShares > 0,
"TokenGeyser: Stake amount is too small"
);
updateAccounting();
// 1. User Accounting
UserTotals storage totals = _userTotals[beneficiary];
totals.stakingShares = totals.stakingShares.add(mintedStakingShares);
totals.lastAccountingTimestampSec = now;
Stake memory newStake = Stake(mintedStakingShares, now);
_userStakes[beneficiary].push(newStake);
// 2. Global Accounting
totalStakingShares = totalStakingShares.add(mintedStakingShares);
// Already set in updateAccounting()
// _lastAccountingTimestampSec = now;
// interactions
require(
_stakingPool.token().transferFrom(
staker,
address(_stakingPool),
amount
),
"TokenGeyser: transfer into staking pool failed"
);
emit Staked(beneficiary, amount, totalStakedFor(beneficiary), "");
}
/**
* @dev Unstakes a certain amount of previously deposited tokens. User also receives their
* alotted number of distribution tokens.
* @param amount Number of deposit tokens to unstake / withdraw.
* @return The total number of distribution tokens rewarded.
*/
function _unstake(uint256 amount) private returns (uint256) {
updateAccounting();
// checks
require(amount > 0, "TokenGeyser: unstake amount is zero");
require(
totalStakedFor(msg.sender) >= amount,
"TokenGeyser: unstake amount is greater than total user stakes"
);
uint256 stakingSharesToBurn =
totalStakingShares.mul(amount).div(totalStaked());
require(
stakingSharesToBurn > 0,
"TokenGeyser: Unable to unstake amount this small"
);
// 1. User Accounting
UserTotals storage totals = _userTotals[msg.sender];
Stake[] storage accountStakes = _userStakes[msg.sender];
// Redeem from most recent stake and go backwards in time.
uint256 stakingShareSecondsToBurn = 0;
uint256 sharesLeftToBurn = stakingSharesToBurn;
uint256 rewardAmount = 0;
while (sharesLeftToBurn > 0) {
Stake storage lastStake = accountStakes[accountStakes.length - 1];
uint256 stakeTimeSec = now.sub(lastStake.timestampSec);
uint256 newStakingShareSecondsToBurn = 0;
if (lastStake.stakingShares <= sharesLeftToBurn) {
// fully redeem a past stake
newStakingShareSecondsToBurn = lastStake.stakingShares.mul(
stakeTimeSec
);
rewardAmount = computeNewReward(
rewardAmount,
newStakingShareSecondsToBurn,
stakeTimeSec
);
stakingShareSecondsToBurn = stakingShareSecondsToBurn.add(
newStakingShareSecondsToBurn
);
sharesLeftToBurn = sharesLeftToBurn.sub(
lastStake.stakingShares
);
accountStakes.length--;
} else {
// partially redeem a past stake
newStakingShareSecondsToBurn = sharesLeftToBurn.mul(
stakeTimeSec
);
rewardAmount = computeNewReward(
rewardAmount,
newStakingShareSecondsToBurn,
stakeTimeSec
);
stakingShareSecondsToBurn = stakingShareSecondsToBurn.add(
newStakingShareSecondsToBurn
);
lastStake.stakingShares = lastStake.stakingShares.sub(
sharesLeftToBurn
);
sharesLeftToBurn = 0;
}
}
totals.stakingShareSeconds = totals.stakingShareSeconds.sub(
stakingShareSecondsToBurn
);
totals.stakingShares = totals.stakingShares.sub(stakingSharesToBurn);
// Already set in updateAccounting
// totals.lastAccountingTimestampSec = now;
// 2. Global Accounting
_totalStakingShareSeconds = _totalStakingShareSeconds.sub(
stakingShareSecondsToBurn
);
totalStakingShares = totalStakingShares.sub(stakingSharesToBurn);
// Already set in updateAccounting
// _lastAccountingTimestampSec = now;
// interactions
require(
_stakingPool.transfer(msg.sender, amount),
"TokenGeyser: transfer out of staking pool failed"
);
require(
_unlockedPool.transfer(msg.sender, rewardAmount),
"TokenGeyser: transfer out of unlocked pool failed"
);
emit Unstaked(msg.sender, amount, totalStakedFor(msg.sender), "");
emit TokensClaimed(msg.sender, rewardAmount);
require(
totalStakingShares == 0 || totalStaked() > 0,
"TokenGeyser: Error unstaking. Staking shares exist, but no staking tokens do"
);
return rewardAmount;
}
/**
* @dev Applies an additional time-bonus to a distribution amount. This is necessary to
* encourage long-term deposits instead of constant unstake/restakes.
* The bonus-multiplier is the result of a linear function that starts at startBonus and
* ends at 100% over bonusPeriodSec, then stays at 100% thereafter.
* @param currentRewardTokens The current number of distribution tokens already alotted for this
* unstake op. Any bonuses are already applied.
* @param stakingShareSeconds The stakingShare-seconds that are being burned for new
* distribution tokens.
* @param stakeTimeSec Length of time for which the tokens were staked. Needed to calculate
* the time-bonus.
* @return Updated amount of distribution tokens to award, with any bonus included on the
* newly added tokens.
*/
function computeNewReward(
uint256 currentRewardTokens,
uint256 stakingShareSeconds,
uint256 stakeTimeSec
) private view returns (uint256) {
uint256 newRewardTokens =
totalUnlocked().mul(stakingShareSeconds).div(
_totalStakingShareSeconds
);
if (stakeTimeSec >= bonusPeriodSec) {
return currentRewardTokens.add(newRewardTokens);
}
uint256 oneHundredPct = 10**BONUS_DECIMALS;
uint256 bonusedReward =
startBonus
.add(
oneHundredPct.sub(startBonus).mul(stakeTimeSec).div(
bonusPeriodSec
)
)
.mul(newRewardTokens)
.div(oneHundredPct);
return currentRewardTokens.add(bonusedReward);
}
/**
* @dev Returns the number of unlockable shares from a given schedule. The returned value
* depends on the time since the last unlock. This function updates schedule accounting,
* but does not actually transfer any tokens.
* @param s Index of the unlock schedule.
* @return The number of unlocked shares.
*/
function unlockScheduleShares(uint256 s) private returns (uint256) {
UnlockSchedule storage schedule = unlockSchedules[s];
if (schedule.unlockedShares >= schedule.initialLockedShares) {
return 0;
}
uint256 sharesToUnlock = 0;
// Special case to handle any leftover dust from integer division
if (now >= schedule.endAtSec) {
sharesToUnlock = (
schedule.initialLockedShares.sub(schedule.unlockedShares)
);
schedule.lastUnlockTimestampSec = schedule.endAtSec;
} else {
sharesToUnlock = now
.sub(schedule.lastUnlockTimestampSec)
.mul(schedule.initialLockedShares)
.div(schedule.durationSec);
schedule.lastUnlockTimestampSec = now;
}
schedule.unlockedShares = schedule.unlockedShares.add(sharesToUnlock);
return sharesToUnlock;
}
/**
* @dev Throws if called by any account other than the reward distribution.
*/
modifier onlyRewardDistribution() {
require(
rewardDistribution == msg.sender,
"Caller is not the reward distribution"
);
_;
}
}/**
This code is copied from:
https://github.com/ampleforth/token-geyser/tree/d8352f62a0432494c39416d090e68582e13b2b22/contracts
*/
pragma solidity 0.5.17;
import "openzeppelin-solidity/contracts/ownership/Ownable.sol";
import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";
/**
* @title A simple holder of tokens.
* This is a simple contract to hold tokens. It's useful in the case where a separate contract
* needs to hold multiple distinct pools of the same token.
*/
contract TokenPool is Ownable {
IERC20 public token;
constructor(IERC20 _token) public {
token = _token;
}
function transfer(address to, uint256 value)
external
onlyOwner
returns (bool)
{
return token.transfer(to, value);
}
function rescueFunds(
address tokenToRescue,
address to,
uint256 amount
) external onlyOwner returns (bool) {
require(
address(token) != tokenToRescue,
"TokenPool: Cannot claim token held by the contract"
);
return IERC20(tokenToRescue).transfer(to, amount);
}
function balance() public view returns (uint256) {
return token.balanceOf(address(this));
}
}/**
This code is copied from:
https://github.com/ampleforth/token-geyser/tree/d8352f62a0432494c39416d090e68582e13b2b22/contracts
*/
pragma solidity 0.5.17;
/**
* @title Staking interface, as defined by EIP-900.
* @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-900.md
*/
contract IStaking {
event Staked(
address indexed user,
uint256 amount,
uint256 total,
bytes data
);
event Unstaked(
address indexed user,
uint256 amount,
uint256 total,
bytes data
);
function stake(uint256 amount, bytes calldata data) external;
function stakeFor(
address user,
uint256 amount,
bytes calldata data
) external;
function unstake(uint256 amount, bytes calldata data) external;
function token() external view returns (address);
/**
* @return False. This application does not support staking history.
*/
function supportsHistory() external pure returns (bool) {
return false;
}
function totalStakedFor(address addr) public view returns (uint256);
function totalStaked() public view returns (uint256);
}pragma solidity ^0.5.0;
import "../GSN/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.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
_owner = _msgSender();
emit OwnershipTransferred(address(0), _owner);
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(isOwner(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Returns true if the caller is the current owner.
*/
function isOwner() public view returns (bool) {
return _msgSender() == _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 onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public onlyOwner {
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
*/
function _transferOwnership(address newOwner) internal {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}pragma solidity 0.5.17;
import "openzeppelin-solidity/contracts/token/ERC20/ERC20Burnable.sol";
import "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol";
/// @dev Interface of recipient contract for approveAndCall pattern.
interface tokenRecipient {
function receiveApproval(
address _from,
uint256 _value,
address _token,
bytes calldata _extraData
) external;
}
/// @title KEEP Token
/// @dev Standard ERC20Burnable token
contract KeepToken is ERC20Burnable, ERC20Detailed {
string public constant NAME = "KEEP Token";
string public constant SYMBOL = "KEEP";
uint8 public constant DECIMALS = 18; // The number of digits after the decimal place when displaying token values on-screen.
uint256 public constant INITIAL_SUPPLY = 10**27; // 1 billion tokens, 18 decimal places.
/// @dev Gives msg.sender all of existing tokens.
constructor() public ERC20Detailed(NAME, SYMBOL, DECIMALS) {
_mint(msg.sender, INITIAL_SUPPLY);
}
/// @notice Set allowance for other address and notify.
/// Allows `_spender` to spend no more than `_value` tokens
/// on your behalf and then ping the contract about it.
/// @param _spender The address authorized to spend.
/// @param _value The max amount they can spend.
/// @param _extraData Extra information to send to the approved contract.
function approveAndCall(
address _spender,
uint256 _value,
bytes memory _extraData
) public returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(
msg.sender,
_value,
address(this),
_extraData
);
return true;
}
}
}pragma solidity 0.5.17;
import "openzeppelin-solidity/contracts/ownership/Ownable.sol";
import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";
import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol";
import "./Escrow.sol";
interface IBeneficiaryContract {
function __escrowSentTokens(uint256 amount) external;
}
/// @title PhasedEscrow
/// @notice A token holder contract allowing contract owner to set beneficiary of
/// tokens held by the contract and allowing the owner to withdraw the
/// tokens to that beneficiary in phases.
contract PhasedEscrow is Ownable {
using SafeERC20 for IERC20;
event BeneficiaryUpdated(address beneficiary);
event TokensWithdrawn(address beneficiary, uint256 amount);
IERC20 public token;
IBeneficiaryContract public beneficiary;
constructor(IERC20 _token) public {
token = _token;
}
/// @notice Sets the provided address as a beneficiary allowing it to
/// withdraw all tokens from escrow. This function can be called only
/// by escrow owner.
function setBeneficiary(IBeneficiaryContract _beneficiary)
external
onlyOwner
{
beneficiary = _beneficiary;
emit BeneficiaryUpdated(address(beneficiary));
}
/// @notice Withdraws the specified number of tokens from escrow to the
/// beneficiary. If the beneficiary is not set, or there are
/// insufficient tokens in escrow, the function fails.
function withdraw(uint256 amount) external onlyOwner {
require(address(beneficiary) != address(0), "Beneficiary not assigned");
uint256 balance = token.balanceOf(address(this));
require(amount <= balance, "Not enough tokens for withdrawal");
token.safeTransfer(address(beneficiary), amount);
emit TokensWithdrawn(address(beneficiary), amount);
beneficiary.__escrowSentTokens(amount);
}
/// @notice Funds the escrow by transferring all of the approved tokens
/// to the escrow.
function receiveApproval(
address _from,
uint256 _value,
address _token,
bytes memory
) public {
require(IERC20(_token) == token, "Unsupported token");
token.safeTransferFrom(_from, address(this), _value);
}
/// @notice Withdraws all funds from a non-phased Escrow passed as
/// a parameter. For this function to succeed, this PhasedEscrow
/// has to be set as a beneficiary of the non-phased Escrow.
function withdrawFromEscrow(Escrow _escrow) public {
_escrow.withdraw();
}
}
/// @title BatchedPhasedEscrow
/// @notice A token holder contract allowing contract owner to approve a set of
/// beneficiaries of tokens held by the contract, to appoint a separate
/// drawee role, and allowing that drawee to withdraw tokens to approved
/// beneficiaries in phases.
contract BatchedPhasedEscrow is Ownable {
using SafeERC20 for IERC20;
event BeneficiaryApproved(address beneficiary);
event TokensWithdrawn(address beneficiary, uint256 amount);
event DraweeRoleTransferred(address oldDrawee, address newDrawee);
IERC20 public token;
address public drawee;
mapping(address => bool) private approvedBeneficiaries;
modifier onlyDrawee() {
require(drawee == msg.sender, "Caller is not the drawee");
_;
}
constructor(IERC20 _token) public {
token = _token;
drawee = msg.sender;
}
/// @notice Approves the provided address as a beneficiary of tokens held by
/// the escrow. Can be called only by escrow owner.
function approveBeneficiary(IBeneficiaryContract _beneficiary)
external
onlyOwner
{
address beneficiaryAddress = address(_beneficiary);
require(
beneficiaryAddress != address(0),
"Beneficiary can not be zero address"
);
approvedBeneficiaries[beneficiaryAddress] = true;
emit BeneficiaryApproved(beneficiaryAddress);
}
/// @notice Returns `true` if the given address has been approved as a
/// beneficiary of the escrow, `false` otherwise.
function isBeneficiaryApproved(IBeneficiaryContract _beneficiary)
public
view
returns (bool)
{
return approvedBeneficiaries[address(_beneficiary)];
}
/// @notice Transfers the role of drawee to another address. Can be called
/// only by the contract owner.
function setDrawee(address newDrawee) public onlyOwner {
require(newDrawee != address(0), "New drawee can not be zero address");
emit DraweeRoleTransferred(drawee, newDrawee);
drawee = newDrawee;
}
/// @notice Funds the escrow by transferring all of the approved tokens
/// to the escrow.
function receiveApproval(
address _from,
uint256 _value,
address _token,
bytes memory
) public {
require(IERC20(_token) == token, "Unsupported token");
token.safeTransferFrom(_from, address(this), _value);
}
/// @notice Withdraws tokens from escrow to selected beneficiaries,
/// transferring to each beneficiary the amount of tokens specified
/// as a parameter. Only beneficiaries previously approved by escrow
/// owner can receive funds.
function batchedWithdraw(
IBeneficiaryContract[] memory beneficiaries,
uint256[] memory amounts
) public onlyDrawee {
require(
beneficiaries.length == amounts.length,
"Mismatched arrays length"
);
for (uint256 i = 0; i < beneficiaries.length; i++) {
IBeneficiaryContract beneficiary = beneficiaries[i];
require(
isBeneficiaryApproved(beneficiary),
"Beneficiary was not approved"
);
withdraw(beneficiary, amounts[i]);
}
}
function withdraw(IBeneficiaryContract beneficiary, uint256 amount)
private
{
token.safeTransfer(address(beneficiary), amount);
emit TokensWithdrawn(address(beneficiary), amount);
beneficiary.__escrowSentTokens(amount);
}
}
// Interface representing staking pool rewards contract such as CurveRewards
// contract deployed for Keep (0xAF379f0228ad0d46bB7B4f38f9dc9bCC1ad0360c) or
// LPRewards contract from keep-ecdsa repository deployed for Uniswap.
interface IStakingPoolRewards {
function notifyRewardAmount(uint256 amount) external;
}
/// @title StakingPoolRewardsEscrowBeneficiary
/// @notice A beneficiary contract that can receive a withdrawal phase from a
/// PhasedEscrow contract. Immediately stakes the received tokens on a
/// designated IStakingPoolRewards contract.
contract StakingPoolRewardsEscrowBeneficiary is Ownable, IBeneficiaryContract {
IERC20 public token;
IStakingPoolRewards public rewards;
constructor(IERC20 _token, IStakingPoolRewards _rewards) public {
token = _token;
rewards = _rewards;
}
function __escrowSentTokens(uint256 amount) external onlyOwner {
token.approve(address(rewards), amount);
rewards.notifyRewardAmount(amount);
}
}
/// @dev Interface of recipient contract for approveAndCall pattern.
interface IStakerRewards {
function receiveApproval(
address _from,
uint256 _value,
address _token,
bytes calldata _extraData
) external;
}
/// @title StakerRewardsBeneficiary
/// @notice An abstract beneficiary contract that can receive a withdrawal phase
/// from a PhasedEscrow contract. The received tokens are immediately
/// funded for a designated rewards escrow beneficiary contract.
contract StakerRewardsBeneficiary is Ownable {
IERC20 public token;
IStakerRewards public stakerRewards;
constructor(IERC20 _token, IStakerRewards _stakerRewards) public {
token = _token;
stakerRewards = _stakerRewards;
}
function __escrowSentTokens(uint256 amount) external onlyOwner {
bool success = token.approve(address(stakerRewards), amount);
require(success, "Token transfer approval failed");
stakerRewards.receiveApproval(
address(this),
amount,
address(token),
""
);
}
}
/// @title BeaconBackportRewardsEscrowBeneficiary
/// @notice Transfer the received tokens to a designated
/// BeaconBackportRewardsEscrowBeneficiary contract.
contract BeaconBackportRewardsEscrowBeneficiary is StakerRewardsBeneficiary {
constructor(IERC20 _token, IStakerRewards _stakerRewards)
public
StakerRewardsBeneficiary(_token, _stakerRewards)
{}
}
/// @title BeaconRewardsEscrowBeneficiary
/// @notice Transfer the received tokens to a designated
/// BeaconRewardsEscrowBeneficiary contract.
contract BeaconRewardsEscrowBeneficiary is StakerRewardsBeneficiary {
constructor(IERC20 _token, IStakerRewards _stakerRewards)
public
StakerRewardsBeneficiary(_token, _stakerRewards)
{}
}pragma solidity 0.5.17;
import "openzeppelin-solidity/contracts/ownership/Ownable.sol";
import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";
import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol";
// @title Escrow
// @notice A token holder contract allowing contract owner to set beneficiary of
// all tokens held by the contract and allowing the beneficiary to withdraw
// the tokens.
contract Escrow is Ownable {
using SafeERC20 for IERC20;
event BeneficiaryUpdated(address beneficiary);
event TokensWithdrawn(address beneficiary, uint256 amount);
IERC20 public token;
address public beneficiary;
constructor(IERC20 _token) public {
token = _token;
}
// @notice Sets the provided address as a beneficiary allowing it to
// withdraw all tokens from escrow. This function can be called only
// by escrow owner.
function setBeneficiary(address _beneficiary) public onlyOwner {
beneficiary = _beneficiary;
emit BeneficiaryUpdated(beneficiary);
}
// @notice Withdraws all tokens from escrow to the beneficiary.
// If the beneficiary is not set, caller is not the beneficiary, or there
// are no tokens in escrow, function fails.
function withdraw() public {
require(beneficiary != address(0), "Beneficiary not assigned");
require(msg.sender == beneficiary, "Caller is not the beneficiary");
uint256 amount = token.balanceOf(address(this));
require(amount > 0, "No tokens to withdraw");
token.safeTransfer(beneficiary, amount);
emit TokensWithdrawn(beneficiary, amount);
}
}pragma solidity ^0.5.0;
import "./IERC20.sol";
/**
* @dev Optional functions from the ERC20 standard.
*/
contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
*/
constructor (string memory name, string memory symbol, uint8 decimals) public {
_name = name;
_symbol = symbol;
_decimals = decimals;
}
/**
* @dev Returns the name of the token.
*/
function name() public view returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view returns (uint8) {
return _decimals;
}
}pragma solidity ^0.5.0;
import "../../GSN/Context.sol";
import "./ERC20.sol";
/**
* @dev Extension of {ERC20} that allows token holders to destroy both their own
* tokens and those that they have an allowance for, in a way that can be
* recognized off-chain (via event analysis).
*/
contract ERC20Burnable is Context, ERC20 {
/**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/
function burn(uint256 amount) public {
_burn(_msgSender(), amount);
}
/**
* @dev See {ERC20-_burnFrom}.
*/
function burnFrom(address account, uint256 amount) public {
_burnFrom(account, amount);
}
}pragma solidity ^0.5.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 GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address payable) {
return msg.sender;
}
function _msgData() internal view returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}pragma solidity ^0.5.0;
import "../../GSN/Context.sol";
import "./IERC20.sol";
import "../../math/SafeMath.sol";
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin guidelines: functions revert instead
* of returning `false` on failure. This behavior is nonetheless conventional
* and does not conflict with the expectations of ERC20 applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for `sender`'s tokens of at least
* `amount`.
*/
function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(address sender, address recipient, uint256 amount) internal {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements
*
* - `to` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal {
require(account != address(0), "ERC20: mint to the zero address");
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal {
require(account != address(0), "ERC20: burn from the zero address");
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _totalSupply.sub(amount);
emit Transfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner, address spender, uint256 amount) internal {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Destroys `amount` tokens from `account`.`amount` is then deducted
* from the caller's allowance.
*
* See {_burn} and {_approve}.
*/
function _burnFrom(address account, uint256 amount) internal {
_burn(account, amount);
_approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance"));
}
}pragma solidity ^0.5.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}pragma solidity ^0.5.0;
import "./IERC20.sol";
import "../../math/SafeMath.sol";
import "../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// solhint-disable-next-line max-line-length
require((value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).add(value);
callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves.
// A Solidity high level call has three parts:
// 1. The target address is checked to verify it contains contract code
// 2. The call itself is made, and success asserted
// 3. The return value is decoded, which in turn checks the size of the returned data.
// solhint-disable-next-line max-line-length
require(address(token).isContract(), "SafeERC20: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = address(token).call(data);
require(success, "SafeERC20: low-level call failed");
if (returndata.length > 0) { // Return data is optional
// solhint-disable-next-line max-line-length
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}pragma solidity ^0.5.5;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* This test is non-exhaustive, and there may be false-negatives: during the
* execution of a contract's constructor, its address will be reported as
* not containing 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.
*/
function isContract(address account) internal view returns (bool) {
// This method relies in extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codehash;
bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
// solhint-disable-next-line no-inline-assembly
assembly { codehash := extcodehash(account) }
return (codehash != 0x0 && codehash != accountHash);
}
/**
* @dev Converts an `address` into `address payable`. Note that this is
* simply a type cast: the actual underlying value is not changed.
*
* _Available since v2.4.0._
*/
function toPayable(address account) internal pure returns (address payable) {
return address(uint160(account));
}
/**
* @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].
*
* _Available since v2.4.0._
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-call-value
(bool success, ) = recipient.call.value(amount)("");
require(success, "Address: unable to send value, recipient may have reverted");
}
}pragma solidity ^0.5.0;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*
* _Available since v2.4.0._
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*
* _Available since v2.4.0._
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*
* _Available since v2.4.0._
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
}{
"metadata": {
"useLiteralContent": true
},
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract KeepToken","name":"_keepToken","type":"address"},{"internalType":"uint256","name":"_maxUnlockSchedules","type":"uint256"},{"internalType":"uint256","name":"_startBonus","type":"uint256"},{"internalType":"uint256","name":"_bonusPeriodSec","type":"uint256"},{"internalType":"uint256","name":"_initialSharesPerToken","type":"uint256"},{"internalType":"uint256","name":"_durationSec","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldDurationSec","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newDurationSec","type":"uint256"}],"name":"DurationSecUpdated","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":false,"internalType":"address","name":"oldRewardDistribution","type":"address"},{"indexed":false,"internalType":"address","name":"newRewardDistribution","type":"address"}],"name":"RewardDistributionRoleTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"total","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"durationSec","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"total","type":"uint256"}],"name":"TokensLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"total","type":"uint256"}],"name":"TokensUnlocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"total","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"Unstaked","type":"event"},{"constant":true,"inputs":[],"name":"BONUS_DECIMALS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"bonusPeriodSec","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"durationSec","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getDistributionToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getStakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"durationSec","type":"uint256"}],"name":"lockTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"bytes","name":"_extraData","type":"bytes"}],"name":"receiveApproval","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"tokenToRescue","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"rescueFundsFromStakingPool","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"rewardDistribution","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_newDurationSec","type":"uint256"}],"name":"setDurationSec","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newRewardDistribution","type":"address"}],"name":"setRewardDistribution","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"stake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"stakeFor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"startBonus","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"supportsHistory","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalLocked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalLockedShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"totalStakedFor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalStakingShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalUnlocked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"unlockScheduleCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"unlockSchedules","outputs":[{"internalType":"uint256","name":"initialLockedShares","type":"uint256"},{"internalType":"uint256","name":"unlockedShares","type":"uint256"},{"internalType":"uint256","name":"lastUnlockTimestampSec","type":"uint256"},{"internalType":"uint256","name":"endAtSec","type":"uint256"},{"internalType":"uint256","name":"durationSec","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unlockTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"unstake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unstakeQuery","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"updateAccounting","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60806040526000600555600060065560006007556000600855600060095542600a556000600b556000600c553480156200003857600080fd5b506040516200307438038062003074833981810160405260c08110156200005e57600080fd5b508051602082015160408301516060840151608085015160a090950151939492939192909185808686868686858086868686620000a36001600160e01b036200032516565b600080546001600160a01b0319166001600160a01b03928316178082556040519216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a360648311156200012d5760405162461bcd60e51b8152600401808060200182810382526021815260200180620030086021913960400191505060405180910390fd5b816200016b5760405162461bcd60e51b8152600401808060200182810382526021815260200180620030536021913960400191505060405180910390fd5b60008111620001ac5760405162461bcd60e51b815260040180806020018281038252602a81526020018062003029602a913960400191505060405180910390fd5b85604051620001bb9062000338565b6001600160a01b03909116815260405190819003602001906000f080158015620001e9573d6000803e3d6000fd5b50600180546001600160a01b0319166001600160a01b039290921691909117905560405185906200021a9062000338565b6001600160a01b03909116815260405190819003602001906000f08015801562000248573d6000803e3d6000fd5b50600280546001600160a01b0319166001600160a01b03929092169190911790556040518590620002799062000338565b6001600160a01b03909116815260405190819003602001906000f080158015620002a7573d6000803e3d6000fd5b50600380546001600160a01b0319166001600160a01b039290921691909117905560058390556006829055600b849055600c819055620002e662000329565b600480546001600160a01b0319166001600160a01b039290921691909117905550505060109390935550620003469d5050505050505050505050505050565b3390565b6000546001600160a01b031690565b61073680620028d283390190565b61257c80620003566000396000f3fe608060405234801561001057600080fd5b50600436106101f05760003560e01c8063715018a61161010f5780638f4ffcb1116100a2578063c8fd6ed011610071578063c8fd6ed0146105a8578063f2fde38b1461061d578063f968f49314610643578063fc0c546a1461064b576101f0565b80638f4ffcb1146105035780639f9106d114610590578063a779d08014610598578063c7ae2007146105a0576101f0565b806386805dd1116100de57806386805dd1146104b357806389158d8e146104d05780638da5cb5b146104f35780638f32d59b146104fb576101f0565b8063715018a6146104935780637c6aa6f41461049b578063817b1cd2146104a357806381c39bec146104ab576101f0565b8063494347e7116101875780635a72bbef116101565780635a72bbef146103f15780635c94bcb21461043b5780637033e4a61461048357806370c6a17e1461048b576101f0565b8063494347e7146103805780634b341aed146103bb5780634c2a178a146103e157806356891412146103e9576101f0565b8063101114cf116101c3578063101114cf146103325780631dc27fde1461035657806322c12b841461037057806338b45fde14610378576101f0565b80630611e1fd146101f55780630d68b761146102145780630e89439b1461023a5780630ef96356146102af575b600080fd5b6102126004803603602081101561020b57600080fd5b5035610653565b005b6102126004803603602081101561022a57600080fd5b50356001600160a01b031661071b565b6102126004803603604081101561025057600080fd5b81359190810190604081016020820135600160201b81111561027157600080fd5b82018360208201111561028357600080fd5b803590602001918460018302840111600160201b831117156102a457600080fd5b509092509050610811565b610212600480360360608110156102c557600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b8111156102f457600080fd5b82018360208201111561030657600080fd5b803590602001918460018302840111600160201b8311171561032757600080fd5b509092509050610821565b61033a610879565b604080516001600160a01b039092168252519081900360200190f35b61035e610888565b60408051918252519081900360200190f35b61033a61088d565b61035e610a03565b610388610a09565b604080519687526020870195909552858501939093526060850191909152608084015260a0830152519081900360c00190f35b61035e600480360360208110156103d157600080fd5b50356001600160a01b0316610b15565b61035e610b5c565b61035e610b62565b6104276004803603606081101561040757600080fd5b506001600160a01b03813581169160208101359091169060400135610ba7565b604080519115158252519081900360200190f35b6104586004803603602081101561045157600080fd5b5035610c84565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b610427610cc2565b61035e610cc7565b610212610ccd565b61035e610d5e565b61035e610d64565b61035e610da9565b61035e600480360360208110156104c957600080fd5b5035610daf565b610212600480360360408110156104e657600080fd5b5080359060200135610dba565b61033a61113a565b610427611149565b6102126004803603608081101561051957600080fd5b6001600160a01b038235811692602081013592604082013590921691810190608081016060820135600160201b81111561055257600080fd5b82018360208201111561056457600080fd5b803590602001918460018302840111600160201b8311171561058557600080fd5b50909250905061116d565b61033a6111d7565b61035e61121c565b61035e611261565b610212600480360360408110156105be57600080fd5b81359190810190604081016020820135600160201b8111156105df57600080fd5b8201836020820111156105f157600080fd5b803590602001918460018302840111600160201b8311171561061257600080fd5b509092509050611267565b6102126004803603602081101561063357600080fd5b50356001600160a01b0316611270565b61035e6112c3565b61033a611457565b61065b611149565b61069a576040805162461bcd60e51b81526020600482018190526024820152600080516020612405833981519152604482015290519081900360640190fd5b600081116106d95760405162461bcd60e51b81526004018080602001828103825260288152602001806124f06028913960400191505060405180910390fd5b601054604080519182526020820183905280517f0bbad1f9a9c966e9a1483fb95cafe4ce711c97e92885db3b08fec5da54de2d479281900390910190a1601055565b610723611149565b610762576040805162461bcd60e51b81526020600482018190526024820152600080516020612405833981519152604482015290519081900360640190fd5b6001600160a01b0381166107a75760405162461bcd60e51b815260040180806020018281038252602b81526020018061249c602b913960400191505060405180910390fd5b600454604080516001600160a01b039283168152918316602083015280517f840b9fc77a9405c32398a96e7edbf3be477e284a1f66fe9482c82b359a4baf239281900390910190a1600480546001600160a01b0319166001600160a01b0392909216919091179055565b61081c333385611466565b505050565b610829611149565b610868576040805162461bcd60e51b81526020600482018190526024820152600080516020612405833981519152604482015290519081900360640190fd5b610873338585611466565b50505050565b6004546001600160a01b031681565b600281565b60035460408051637e062a3560e11b815290516000926001600160a01b03169163fc0c546a916004808301926020929190829003018186803b1580156108d257600080fd5b505afa1580156108e6573d6000803e3d6000fd5b505050506040513d60208110156108fc57600080fd5b505160025460408051637e062a3560e11b815290516001600160a01b03938416939092169163fc0c546a91600480820192602092909190829003018186803b15801561094757600080fd5b505afa15801561095b573d6000803e3d6000fd5b505050506040513d602081101561097157600080fd5b50516001600160a01b03161461098357fe5b600260009054906101000a90046001600160a01b03166001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156109d157600080fd5b505afa1580156109e5573d6000803e3d6000fd5b505050506040513d60208110156109fb57600080fd5b505190505b90565b60055481565b600080600080600080610a1a6112c3565b506000610a44600854610a38600a544261180190919063ffffffff16565b9063ffffffff61184c16565b600954909150610a5a908263ffffffff6118a516565b60095542600a819055336000908152600d60205260408120805460028201549193610a8f92610a38919063ffffffff61180116565b6001830154909150610aa7908263ffffffff6118a516565b6001830155426002830155600954600090610ac3576000610ae5565b610ae5600954610ad98560010154610a3861121c565b9063ffffffff6118ff16565b9050610aef610b62565b610af761121c565b600190940154600954919c949b509950975095504294509092505050565b60008060085411610b27576000610b54565b6008546001600160a01b0383166000908152600d6020526040902054610b549190610ad990610a38610d64565b90505b919050565b60105481565b600354604080516316d3df1560e31b815290516000926001600160a01b03169163b69ef8a8916004808301926020929190829003018186803b1580156109d157600080fd5b6000610bb1611149565b610bf0576040805162461bcd60e51b81526020600482018190526024820152600080516020612405833981519152604482015290519081900360640190fd5b60015460408051631b32b81560e21b81526001600160a01b03878116600483015286811660248301526044820186905291519190921691636ccae0549160648083019260209291908290030181600087803b158015610c4e57600080fd5b505af1158015610c62573d6000803e3d6000fd5b505050506040513d6020811015610c7857600080fd5b505190505b9392505050565b600f8181548110610c9157fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294509092909185565b600090565b60085481565b610cd5611149565b610d14576040805162461bcd60e51b81526020600482018190526024820152600080516020612405833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60065481565b600154604080516316d3df1560e31b815290516000926001600160a01b03169163b69ef8a8916004808301926020929190829003018186803b1580156109d157600080fd5b60075481565b6000610b5482611941565b6004546001600160a01b03163314610e035760405162461bcd60e51b81526004018080602001828103825260258152602001806123246025913960400191505060405180910390fd5b600b54600f5410610e455760405162461bcd60e51b815260040180806020018281038252602d81526020018061246f602d913960400191505060405180910390fd5b610e4d610a09565b5050505050506000610e5d610b62565b90506000808211610e8157600c54610e7c90859063ffffffff61184c16565b610e9a565b610e9a82610ad98660075461184c90919063ffffffff16565b9050610ea4612101565b8181524260408201819052610ebf908563ffffffff6118a516565b6060820190815260808201858152600f805460018101825560009190915283517f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac80260059092029182015560208401517f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac80382015560408401517f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac80482015591517f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac805830155517f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac80690910155600754610fb490836118a5565b60075560035460408051637e062a3560e11b815290516001600160a01b039092169163fc0c546a91600480820192602092909190829003018186803b158015610ffc57600080fd5b505afa158015611010573d6000803e3d6000fd5b505050506040513d602081101561102657600080fd5b5051600354604080516323b872dd60e01b81523360048201526001600160a01b03928316602482015260448101899052905191909216916323b872dd9160648083019260209291908290030181600087803b15801561108457600080fd5b505af1158015611098573d6000803e3d6000fd5b505050506040513d60208110156110ae57600080fd5b50516110eb5760405162461bcd60e51b815260040180806020018281038252602d815260200180612193602d913960400191505060405180910390fd5b7ff346961af4c52f314df1b45964746280fe409abb959d4a2458d58f79408b1fe88585611116610b62565b60408051938452602084019290925282820152519081900360600190a15050505050565b6000546001600160a01b031690565b600080546001600160a01b031661115e611e10565b6001600160a01b031614905090565b61117561088d565b6001600160a01b0316836001600160a01b0316146111c45760405162461bcd60e51b81526004018080602001828103825260298152602001806124c76029913960400191505060405180910390fd5b6111d084601054610dba565b5050505050565b60015460408051637e062a3560e11b815290516000926001600160a01b03169163fc0c546a916004808301926020929190829003018186803b1580156109d157600080fd5b600254604080516316d3df1560e31b815290516000926001600160a01b03169163b69ef8a8916004808301926020929190829003018186803b1580156109d157600080fd5b600f5490565b61087383611941565b611278611149565b6112b7576040805162461bcd60e51b81526020600482018190526024820152600080516020612405833981519152604482015290519081900360640190fd5b6112c081611e14565b50565b600080806112cf610b62565b9050600754600014156112e457809150611348565b6000805b600f548110156113155761130b6112fe82611eb4565b839063ffffffff6118a516565b91506001016112e8565b5060075461132d90610ad9838563ffffffff61184c16565b600754909350611343908263ffffffff61180116565b600755505b8115611451576003546002546040805163a9059cbb60e01b81526001600160a01b039283166004820152602481018690529051919092169163a9059cbb9160448083019260209291908290030181600087803b1580156113a757600080fd5b505af11580156113bb573d6000803e3d6000fd5b505050506040513d60208110156113d157600080fd5b505161140e5760405162461bcd60e51b815260040180806020018281038252602f8152602001806122cf602f913960400191505060405180910390fd5b7f2e444eb379b177e88ce0649c6110a3b01099f03e297127919dd5e3b63a761a9c82611438610b62565b6040805192835260208301919091528051918290030190a15b50905090565b60006114616111d7565b905090565b600081116114a55760405162461bcd60e51b81526004018080602001828103825260218152602001806123c36021913960400191505060405180910390fd5b6001600160a01b0382166114ea5760405162461bcd60e51b81526004018080602001828103825260288152602001806122846028913960400191505060405180910390fd5b6008541580611500575060006114fe610d64565b115b61153b5760405162461bcd60e51b815260040180806020018281038252604a815260200180612425604a913960600191505060405180910390fd5b6000806008541161155f57600c5461155a90839063ffffffff61184c16565b61157d565b61157d61156a610d64565b600854610ad9908563ffffffff61184c16565b9050600081116115be5760405162461bcd60e51b81526004018080602001828103825260268152602001806122fe6026913960400191505060405180910390fd5b6115c6610a09565b505050506001600160a01b0385166000908152600d6020526040902080549092506115f29150836118a5565b8155426002820155611602612130565b506040805180820182528381524260208083019182526001600160a01b0388166000908152600e82529384208054600181810183559186529190942083516002909202019081559051920191909155600854611664908463ffffffff6118a516565b60085560015460408051637e062a3560e11b815290516001600160a01b039092169163fc0c546a91600480820192602092909190829003018186803b1580156116ac57600080fd5b505afa1580156116c0573d6000803e3d6000fd5b505050506040513d60208110156116d657600080fd5b5051600154604080516323b872dd60e01b81526001600160a01b038a81166004830152928316602482015260448101889052905191909216916323b872dd9160648083019260209291908290030181600087803b15801561173657600080fd5b505af115801561174a573d6000803e3d6000fd5b505050506040513d602081101561176057600080fd5b505161179d5760405162461bcd60e51b815260040180806020018281038252602e815260200180612395602e913960400191505060405180910390fd5b846001600160a01b03167fc65e53b88159e7d2c0fc12a0600072e28ae53ff73b4c1715369c30f160935142856117d288610b15565b6040805192835260208301919091526060828201819052600090830152519081900360a00190a2505050505050565b600061184383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611f77565b90505b92915050565b60008261185b57506000611846565b8282028284828161186857fe5b04146118435760405162461bcd60e51b81526004018080602001828103825260218152602001806123e46021913960400191505060405180910390fd5b600082820183811015611843576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600061184383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061200e565b600061194b610a09565b505050505050600082116119905760405162461bcd60e51b81526004018080602001828103825260238152602001806122ac6023913960400191505060405180910390fd5b8161199a33610b15565b10156119d75760405162461bcd60e51b815260040180806020018281038252603d815260200180612247603d913960400191505060405180910390fd5b60006119f76119e4610d64565b600854610ad9908663ffffffff61184c16565b905060008111611a385760405162461bcd60e51b81526004018080602001828103825260308152602001806121c06030913960400191505060405180910390fd5b336000908152600d60209081526040808320600e9092528220909183815b8115611b5b57835460009085906000198101908110611a7157fe5b906000526020600020906002020190506000611a9a82600101544261180190919063ffffffff16565b82549091506000908510611b08578254611aba908363ffffffff61184c16565b9050611ac7848284612073565b9350611ad9868263ffffffff6118a516565b8354909650611aef90869063ffffffff61180116565b8754909550611b0288600019830161214a565b50611b53565b611b18858363ffffffff61184c16565b9050611b25848284612073565b9350611b37868263ffffffff6118a516565b8354909650611b4c908663ffffffff61180116565b8355600094505b505050611a56565b6001850154611b70908463ffffffff61180116565b60018601558454611b87908763ffffffff61180116565b8555600954611b9c908463ffffffff61180116565b600955600854611bb2908763ffffffff61180116565b6008556001546040805163a9059cbb60e01b8152336004820152602481018b905290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b158015611c0957600080fd5b505af1158015611c1d573d6000803e3d6000fd5b505050506040513d6020811015611c3357600080fd5b5051611c705760405162461bcd60e51b81526004018080602001828103825260308152602001806125186030913960400191505060405180910390fd5b6002546040805163a9059cbb60e01b81523360048201526024810184905290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b158015611cc457600080fd5b505af1158015611cd8573d6000803e3d6000fd5b505050506040513d6020811015611cee57600080fd5b5051611d2b5760405162461bcd60e51b81526004018080602001828103825260318152602001806122166031913960400191505060405180910390fd5b337faf01bfc8475df280aca00b578c4a948e6d95700f0db8c13365240f7f973c875489611d5783610b15565b6040805192835260208301919091526060828201819052600090830152519081900360a00190a260408051828152905133917f896e034966eaaf1adc54acc0f257056febbd300c9e47182cf761982cf1f5e430919081900360200190a26008541580611dca57506000611dc8610d64565b115b611e055760405162461bcd60e51b815260040180806020018281038252604c815260200180612349604c913960600191505060405180910390fd5b979650505050505050565b3390565b6001600160a01b038116611e595760405162461bcd60e51b81526004018080602001828103825260268152602001806121f06026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080600f8381548110611ec457fe5b906000526020600020906005020190508060000154816001015410611eed576000915050610b57565b60038101546000904210611f225760018201548254611f119163ffffffff61180116565b600383015460028401559050611f52565b611f498260040154610ad98460000154610a3886600201544261180190919063ffffffff16565b42600284015590505b6001820154611f67908263ffffffff6118a516565b6001909201919091559050919050565b600081848411156120065760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611fcb578181015183820152602001611fb3565b50505050905090810190601f168015611ff85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000818361205d5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611fcb578181015183820152602001611fb3565b50600083858161206957fe5b0495945050505050565b600080612088600954610ad986610a3861121c565b905060065483106120ab576120a3858263ffffffff6118a516565b915050610c7d565b60006002600a0a905060006120ef82610ad985610a386120e0600654610ad98c610a386005548c61180190919063ffffffff16565b6005549063ffffffff6118a516565b9050611e05878263ffffffff6118a516565b6040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b604051806040016040528060008152602001600081525090565b81548183558181111561081c5760008381526020902061081c91610a009160029182028101918502015b8082111561218e5760008082556001820155600201612174565b509056fe546f6b656e4765797365723a207472616e7366657220696e746f206c6f636b656420706f6f6c206661696c6564546f6b656e4765797365723a20556e61626c6520746f20756e7374616b6520616d6f756e74207468697320736d616c6c4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373546f6b656e4765797365723a207472616e73666572206f7574206f6620756e6c6f636b656420706f6f6c206661696c6564546f6b656e4765797365723a20756e7374616b6520616d6f756e742069732067726561746572207468616e20746f74616c2075736572207374616b6573546f6b656e4765797365723a2062656e6566696369617279206973207a65726f2061646472657373546f6b656e4765797365723a20756e7374616b6520616d6f756e74206973207a65726f546f6b656e4765797365723a207472616e73666572206f7574206f66206c6f636b656420706f6f6c206661696c6564546f6b656e4765797365723a205374616b6520616d6f756e7420697320746f6f20736d616c6c43616c6c6572206973206e6f74207468652072657761726420646973747269627574696f6e546f6b656e4765797365723a204572726f7220756e7374616b696e672e205374616b696e67207368617265732065786973742c20627574206e6f207374616b696e6720746f6b656e7320646f546f6b656e4765797365723a207472616e7366657220696e746f207374616b696e6720706f6f6c206661696c6564546f6b656e4765797365723a207374616b6520616d6f756e74206973207a65726f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572546f6b656e4765797365723a20496e76616c69642073746174652e205374616b696e67207368617265732065786973742c20627574206e6f207374616b696e6720746f6b656e7320646f546f6b656e4765797365723a2072656163686564206d6178696d756d20756e6c6f636b207363686564756c65734e65772072657761726420646973747269627574696f6e20697320746865207a65726f2061646472657373546f6b656e206973206e6f7420737570706f7274656420646973747269627574696f6e20746f6b656e4e6577206475726174696f6e2068617320746f2062652067726561746572207468616e207a65726f546f6b656e4765797365723a207472616e73666572206f7574206f66207374616b696e6720706f6f6c206661696c6564a265627a7a72315820b8802ea545375276066258e49d9fb6d361ae69e4a1e1d15173c6e953acc79e6564736f6c63430005110032608060405234801561001057600080fd5b506040516107363803806107368339818101604052602081101561003357600080fd5b50516100466001600160e01b036100b316565b600080546001600160a01b0319166001600160a01b03928316178082556040519216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3600180546001600160a01b0319166001600160a01b03929092169190911790556100b7565b3390565b610670806100c66000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063a9059cbb1161005b578063a9059cbb1461010d578063b69ef8a814610139578063f2fde38b14610153578063fc0c546a1461017957610088565b80636ccae0541461008d578063715018a6146100d75780638da5cb5b146100e15780638f32d59b14610105575b600080fd5b6100c3600480360360608110156100a357600080fd5b506001600160a01b03813581169160208101359091169060400135610181565b604080519115158252519081900360200190f35b6100df6102ab565b005b6100e961033c565b604080516001600160a01b039092168252519081900360200190f35b6100c361034b565b6100c36004803603604081101561012357600080fd5b506001600160a01b03813516906020013561036f565b610141610441565b60408051918252519081900360200190f35b6100df6004803603602081101561016957600080fd5b50356001600160a01b03166104bd565b6100e9610510565b600061018b61034b565b6101ca576040805162461bcd60e51b815260206004820181905260248201526000805160206105ea833981519152604482015290519081900360640190fd5b6001546001600160a01b03858116911614156102175760405162461bcd60e51b815260040180806020018281038252603281526020018061060a6032913960400191505060405180910390fd5b836001600160a01b031663a9059cbb84846040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561027757600080fd5b505af115801561028b573d6000803e3d6000fd5b505050506040513d60208110156102a157600080fd5b5051949350505050565b6102b361034b565b6102f2576040805162461bcd60e51b815260206004820181905260248201526000805160206105ea833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b600080546001600160a01b031661036061051f565b6001600160a01b031614905090565b600061037961034b565b6103b8576040805162461bcd60e51b815260206004820181905260248201526000805160206105ea833981519152604482015290519081900360640190fd5b6001546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561040e57600080fd5b505af1158015610422573d6000803e3d6000fd5b505050506040513d602081101561043857600080fd5b50519392505050565b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561048c57600080fd5b505afa1580156104a0573d6000803e3d6000fd5b505050506040513d60208110156104b657600080fd5b5051905090565b6104c561034b565b610504576040805162461bcd60e51b815260206004820181905260248201526000805160206105ea833981519152604482015290519081900360640190fd5b61050d81610523565b50565b6001546001600160a01b031681565b3390565b6001600160a01b0381166105685760405162461bcd60e51b81526004018080602001828103825260268152602001806105c46026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b039290921691909117905556fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572546f6b656e506f6f6c3a2043616e6e6f7420636c61696d20746f6b656e2068656c642062792074686520636f6e7472616374a265627a7a72315820db3a633c1081079d0cc0971393919d8bf3d93acf4ca8fb8364314f92ddd7139d64736f6c63430005110032546f6b656e4765797365723a20737461727420626f6e757320746f6f2068696768546f6b656e4765797365723a20696e697469616c536861726573506572546f6b656e206973207a65726f546f6b656e4765797365723a20626f6e757320706572696f64206973207a65726f00000000000000000000000085eee30c52b0b379b046fb0f85f4f3dc3009afec000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000278d0000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000278d00
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101f05760003560e01c8063715018a61161010f5780638f4ffcb1116100a2578063c8fd6ed011610071578063c8fd6ed0146105a8578063f2fde38b1461061d578063f968f49314610643578063fc0c546a1461064b576101f0565b80638f4ffcb1146105035780639f9106d114610590578063a779d08014610598578063c7ae2007146105a0576101f0565b806386805dd1116100de57806386805dd1146104b357806389158d8e146104d05780638da5cb5b146104f35780638f32d59b146104fb576101f0565b8063715018a6146104935780637c6aa6f41461049b578063817b1cd2146104a357806381c39bec146104ab576101f0565b8063494347e7116101875780635a72bbef116101565780635a72bbef146103f15780635c94bcb21461043b5780637033e4a61461048357806370c6a17e1461048b576101f0565b8063494347e7146103805780634b341aed146103bb5780634c2a178a146103e157806356891412146103e9576101f0565b8063101114cf116101c3578063101114cf146103325780631dc27fde1461035657806322c12b841461037057806338b45fde14610378576101f0565b80630611e1fd146101f55780630d68b761146102145780630e89439b1461023a5780630ef96356146102af575b600080fd5b6102126004803603602081101561020b57600080fd5b5035610653565b005b6102126004803603602081101561022a57600080fd5b50356001600160a01b031661071b565b6102126004803603604081101561025057600080fd5b81359190810190604081016020820135600160201b81111561027157600080fd5b82018360208201111561028357600080fd5b803590602001918460018302840111600160201b831117156102a457600080fd5b509092509050610811565b610212600480360360608110156102c557600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b8111156102f457600080fd5b82018360208201111561030657600080fd5b803590602001918460018302840111600160201b8311171561032757600080fd5b509092509050610821565b61033a610879565b604080516001600160a01b039092168252519081900360200190f35b61035e610888565b60408051918252519081900360200190f35b61033a61088d565b61035e610a03565b610388610a09565b604080519687526020870195909552858501939093526060850191909152608084015260a0830152519081900360c00190f35b61035e600480360360208110156103d157600080fd5b50356001600160a01b0316610b15565b61035e610b5c565b61035e610b62565b6104276004803603606081101561040757600080fd5b506001600160a01b03813581169160208101359091169060400135610ba7565b604080519115158252519081900360200190f35b6104586004803603602081101561045157600080fd5b5035610c84565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b610427610cc2565b61035e610cc7565b610212610ccd565b61035e610d5e565b61035e610d64565b61035e610da9565b61035e600480360360208110156104c957600080fd5b5035610daf565b610212600480360360408110156104e657600080fd5b5080359060200135610dba565b61033a61113a565b610427611149565b6102126004803603608081101561051957600080fd5b6001600160a01b038235811692602081013592604082013590921691810190608081016060820135600160201b81111561055257600080fd5b82018360208201111561056457600080fd5b803590602001918460018302840111600160201b8311171561058557600080fd5b50909250905061116d565b61033a6111d7565b61035e61121c565b61035e611261565b610212600480360360408110156105be57600080fd5b81359190810190604081016020820135600160201b8111156105df57600080fd5b8201836020820111156105f157600080fd5b803590602001918460018302840111600160201b8311171561061257600080fd5b509092509050611267565b6102126004803603602081101561063357600080fd5b50356001600160a01b0316611270565b61035e6112c3565b61033a611457565b61065b611149565b61069a576040805162461bcd60e51b81526020600482018190526024820152600080516020612405833981519152604482015290519081900360640190fd5b600081116106d95760405162461bcd60e51b81526004018080602001828103825260288152602001806124f06028913960400191505060405180910390fd5b601054604080519182526020820183905280517f0bbad1f9a9c966e9a1483fb95cafe4ce711c97e92885db3b08fec5da54de2d479281900390910190a1601055565b610723611149565b610762576040805162461bcd60e51b81526020600482018190526024820152600080516020612405833981519152604482015290519081900360640190fd5b6001600160a01b0381166107a75760405162461bcd60e51b815260040180806020018281038252602b81526020018061249c602b913960400191505060405180910390fd5b600454604080516001600160a01b039283168152918316602083015280517f840b9fc77a9405c32398a96e7edbf3be477e284a1f66fe9482c82b359a4baf239281900390910190a1600480546001600160a01b0319166001600160a01b0392909216919091179055565b61081c333385611466565b505050565b610829611149565b610868576040805162461bcd60e51b81526020600482018190526024820152600080516020612405833981519152604482015290519081900360640190fd5b610873338585611466565b50505050565b6004546001600160a01b031681565b600281565b60035460408051637e062a3560e11b815290516000926001600160a01b03169163fc0c546a916004808301926020929190829003018186803b1580156108d257600080fd5b505afa1580156108e6573d6000803e3d6000fd5b505050506040513d60208110156108fc57600080fd5b505160025460408051637e062a3560e11b815290516001600160a01b03938416939092169163fc0c546a91600480820192602092909190829003018186803b15801561094757600080fd5b505afa15801561095b573d6000803e3d6000fd5b505050506040513d602081101561097157600080fd5b50516001600160a01b03161461098357fe5b600260009054906101000a90046001600160a01b03166001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156109d157600080fd5b505afa1580156109e5573d6000803e3d6000fd5b505050506040513d60208110156109fb57600080fd5b505190505b90565b60055481565b600080600080600080610a1a6112c3565b506000610a44600854610a38600a544261180190919063ffffffff16565b9063ffffffff61184c16565b600954909150610a5a908263ffffffff6118a516565b60095542600a819055336000908152600d60205260408120805460028201549193610a8f92610a38919063ffffffff61180116565b6001830154909150610aa7908263ffffffff6118a516565b6001830155426002830155600954600090610ac3576000610ae5565b610ae5600954610ad98560010154610a3861121c565b9063ffffffff6118ff16565b9050610aef610b62565b610af761121c565b600190940154600954919c949b509950975095504294509092505050565b60008060085411610b27576000610b54565b6008546001600160a01b0383166000908152600d6020526040902054610b549190610ad990610a38610d64565b90505b919050565b60105481565b600354604080516316d3df1560e31b815290516000926001600160a01b03169163b69ef8a8916004808301926020929190829003018186803b1580156109d157600080fd5b6000610bb1611149565b610bf0576040805162461bcd60e51b81526020600482018190526024820152600080516020612405833981519152604482015290519081900360640190fd5b60015460408051631b32b81560e21b81526001600160a01b03878116600483015286811660248301526044820186905291519190921691636ccae0549160648083019260209291908290030181600087803b158015610c4e57600080fd5b505af1158015610c62573d6000803e3d6000fd5b505050506040513d6020811015610c7857600080fd5b505190505b9392505050565b600f8181548110610c9157fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294509092909185565b600090565b60085481565b610cd5611149565b610d14576040805162461bcd60e51b81526020600482018190526024820152600080516020612405833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60065481565b600154604080516316d3df1560e31b815290516000926001600160a01b03169163b69ef8a8916004808301926020929190829003018186803b1580156109d157600080fd5b60075481565b6000610b5482611941565b6004546001600160a01b03163314610e035760405162461bcd60e51b81526004018080602001828103825260258152602001806123246025913960400191505060405180910390fd5b600b54600f5410610e455760405162461bcd60e51b815260040180806020018281038252602d81526020018061246f602d913960400191505060405180910390fd5b610e4d610a09565b5050505050506000610e5d610b62565b90506000808211610e8157600c54610e7c90859063ffffffff61184c16565b610e9a565b610e9a82610ad98660075461184c90919063ffffffff16565b9050610ea4612101565b8181524260408201819052610ebf908563ffffffff6118a516565b6060820190815260808201858152600f805460018101825560009190915283517f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac80260059092029182015560208401517f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac80382015560408401517f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac80482015591517f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac805830155517f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac80690910155600754610fb490836118a5565b60075560035460408051637e062a3560e11b815290516001600160a01b039092169163fc0c546a91600480820192602092909190829003018186803b158015610ffc57600080fd5b505afa158015611010573d6000803e3d6000fd5b505050506040513d602081101561102657600080fd5b5051600354604080516323b872dd60e01b81523360048201526001600160a01b03928316602482015260448101899052905191909216916323b872dd9160648083019260209291908290030181600087803b15801561108457600080fd5b505af1158015611098573d6000803e3d6000fd5b505050506040513d60208110156110ae57600080fd5b50516110eb5760405162461bcd60e51b815260040180806020018281038252602d815260200180612193602d913960400191505060405180910390fd5b7ff346961af4c52f314df1b45964746280fe409abb959d4a2458d58f79408b1fe88585611116610b62565b60408051938452602084019290925282820152519081900360600190a15050505050565b6000546001600160a01b031690565b600080546001600160a01b031661115e611e10565b6001600160a01b031614905090565b61117561088d565b6001600160a01b0316836001600160a01b0316146111c45760405162461bcd60e51b81526004018080602001828103825260298152602001806124c76029913960400191505060405180910390fd5b6111d084601054610dba565b5050505050565b60015460408051637e062a3560e11b815290516000926001600160a01b03169163fc0c546a916004808301926020929190829003018186803b1580156109d157600080fd5b600254604080516316d3df1560e31b815290516000926001600160a01b03169163b69ef8a8916004808301926020929190829003018186803b1580156109d157600080fd5b600f5490565b61087383611941565b611278611149565b6112b7576040805162461bcd60e51b81526020600482018190526024820152600080516020612405833981519152604482015290519081900360640190fd5b6112c081611e14565b50565b600080806112cf610b62565b9050600754600014156112e457809150611348565b6000805b600f548110156113155761130b6112fe82611eb4565b839063ffffffff6118a516565b91506001016112e8565b5060075461132d90610ad9838563ffffffff61184c16565b600754909350611343908263ffffffff61180116565b600755505b8115611451576003546002546040805163a9059cbb60e01b81526001600160a01b039283166004820152602481018690529051919092169163a9059cbb9160448083019260209291908290030181600087803b1580156113a757600080fd5b505af11580156113bb573d6000803e3d6000fd5b505050506040513d60208110156113d157600080fd5b505161140e5760405162461bcd60e51b815260040180806020018281038252602f8152602001806122cf602f913960400191505060405180910390fd5b7f2e444eb379b177e88ce0649c6110a3b01099f03e297127919dd5e3b63a761a9c82611438610b62565b6040805192835260208301919091528051918290030190a15b50905090565b60006114616111d7565b905090565b600081116114a55760405162461bcd60e51b81526004018080602001828103825260218152602001806123c36021913960400191505060405180910390fd5b6001600160a01b0382166114ea5760405162461bcd60e51b81526004018080602001828103825260288152602001806122846028913960400191505060405180910390fd5b6008541580611500575060006114fe610d64565b115b61153b5760405162461bcd60e51b815260040180806020018281038252604a815260200180612425604a913960600191505060405180910390fd5b6000806008541161155f57600c5461155a90839063ffffffff61184c16565b61157d565b61157d61156a610d64565b600854610ad9908563ffffffff61184c16565b9050600081116115be5760405162461bcd60e51b81526004018080602001828103825260268152602001806122fe6026913960400191505060405180910390fd5b6115c6610a09565b505050506001600160a01b0385166000908152600d6020526040902080549092506115f29150836118a5565b8155426002820155611602612130565b506040805180820182528381524260208083019182526001600160a01b0388166000908152600e82529384208054600181810183559186529190942083516002909202019081559051920191909155600854611664908463ffffffff6118a516565b60085560015460408051637e062a3560e11b815290516001600160a01b039092169163fc0c546a91600480820192602092909190829003018186803b1580156116ac57600080fd5b505afa1580156116c0573d6000803e3d6000fd5b505050506040513d60208110156116d657600080fd5b5051600154604080516323b872dd60e01b81526001600160a01b038a81166004830152928316602482015260448101889052905191909216916323b872dd9160648083019260209291908290030181600087803b15801561173657600080fd5b505af115801561174a573d6000803e3d6000fd5b505050506040513d602081101561176057600080fd5b505161179d5760405162461bcd60e51b815260040180806020018281038252602e815260200180612395602e913960400191505060405180910390fd5b846001600160a01b03167fc65e53b88159e7d2c0fc12a0600072e28ae53ff73b4c1715369c30f160935142856117d288610b15565b6040805192835260208301919091526060828201819052600090830152519081900360a00190a2505050505050565b600061184383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611f77565b90505b92915050565b60008261185b57506000611846565b8282028284828161186857fe5b04146118435760405162461bcd60e51b81526004018080602001828103825260218152602001806123e46021913960400191505060405180910390fd5b600082820183811015611843576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600061184383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061200e565b600061194b610a09565b505050505050600082116119905760405162461bcd60e51b81526004018080602001828103825260238152602001806122ac6023913960400191505060405180910390fd5b8161199a33610b15565b10156119d75760405162461bcd60e51b815260040180806020018281038252603d815260200180612247603d913960400191505060405180910390fd5b60006119f76119e4610d64565b600854610ad9908663ffffffff61184c16565b905060008111611a385760405162461bcd60e51b81526004018080602001828103825260308152602001806121c06030913960400191505060405180910390fd5b336000908152600d60209081526040808320600e9092528220909183815b8115611b5b57835460009085906000198101908110611a7157fe5b906000526020600020906002020190506000611a9a82600101544261180190919063ffffffff16565b82549091506000908510611b08578254611aba908363ffffffff61184c16565b9050611ac7848284612073565b9350611ad9868263ffffffff6118a516565b8354909650611aef90869063ffffffff61180116565b8754909550611b0288600019830161214a565b50611b53565b611b18858363ffffffff61184c16565b9050611b25848284612073565b9350611b37868263ffffffff6118a516565b8354909650611b4c908663ffffffff61180116565b8355600094505b505050611a56565b6001850154611b70908463ffffffff61180116565b60018601558454611b87908763ffffffff61180116565b8555600954611b9c908463ffffffff61180116565b600955600854611bb2908763ffffffff61180116565b6008556001546040805163a9059cbb60e01b8152336004820152602481018b905290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b158015611c0957600080fd5b505af1158015611c1d573d6000803e3d6000fd5b505050506040513d6020811015611c3357600080fd5b5051611c705760405162461bcd60e51b81526004018080602001828103825260308152602001806125186030913960400191505060405180910390fd5b6002546040805163a9059cbb60e01b81523360048201526024810184905290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b158015611cc457600080fd5b505af1158015611cd8573d6000803e3d6000fd5b505050506040513d6020811015611cee57600080fd5b5051611d2b5760405162461bcd60e51b81526004018080602001828103825260318152602001806122166031913960400191505060405180910390fd5b337faf01bfc8475df280aca00b578c4a948e6d95700f0db8c13365240f7f973c875489611d5783610b15565b6040805192835260208301919091526060828201819052600090830152519081900360a00190a260408051828152905133917f896e034966eaaf1adc54acc0f257056febbd300c9e47182cf761982cf1f5e430919081900360200190a26008541580611dca57506000611dc8610d64565b115b611e055760405162461bcd60e51b815260040180806020018281038252604c815260200180612349604c913960600191505060405180910390fd5b979650505050505050565b3390565b6001600160a01b038116611e595760405162461bcd60e51b81526004018080602001828103825260268152602001806121f06026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080600f8381548110611ec457fe5b906000526020600020906005020190508060000154816001015410611eed576000915050610b57565b60038101546000904210611f225760018201548254611f119163ffffffff61180116565b600383015460028401559050611f52565b611f498260040154610ad98460000154610a3886600201544261180190919063ffffffff16565b42600284015590505b6001820154611f67908263ffffffff6118a516565b6001909201919091559050919050565b600081848411156120065760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611fcb578181015183820152602001611fb3565b50505050905090810190601f168015611ff85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000818361205d5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611fcb578181015183820152602001611fb3565b50600083858161206957fe5b0495945050505050565b600080612088600954610ad986610a3861121c565b905060065483106120ab576120a3858263ffffffff6118a516565b915050610c7d565b60006002600a0a905060006120ef82610ad985610a386120e0600654610ad98c610a386005548c61180190919063ffffffff16565b6005549063ffffffff6118a516565b9050611e05878263ffffffff6118a516565b6040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b604051806040016040528060008152602001600081525090565b81548183558181111561081c5760008381526020902061081c91610a009160029182028101918502015b8082111561218e5760008082556001820155600201612174565b509056fe546f6b656e4765797365723a207472616e7366657220696e746f206c6f636b656420706f6f6c206661696c6564546f6b656e4765797365723a20556e61626c6520746f20756e7374616b6520616d6f756e74207468697320736d616c6c4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373546f6b656e4765797365723a207472616e73666572206f7574206f6620756e6c6f636b656420706f6f6c206661696c6564546f6b656e4765797365723a20756e7374616b6520616d6f756e742069732067726561746572207468616e20746f74616c2075736572207374616b6573546f6b656e4765797365723a2062656e6566696369617279206973207a65726f2061646472657373546f6b656e4765797365723a20756e7374616b6520616d6f756e74206973207a65726f546f6b656e4765797365723a207472616e73666572206f7574206f66206c6f636b656420706f6f6c206661696c6564546f6b656e4765797365723a205374616b6520616d6f756e7420697320746f6f20736d616c6c43616c6c6572206973206e6f74207468652072657761726420646973747269627574696f6e546f6b656e4765797365723a204572726f7220756e7374616b696e672e205374616b696e67207368617265732065786973742c20627574206e6f207374616b696e6720746f6b656e7320646f546f6b656e4765797365723a207472616e7366657220696e746f207374616b696e6720706f6f6c206661696c6564546f6b656e4765797365723a207374616b6520616d6f756e74206973207a65726f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572546f6b656e4765797365723a20496e76616c69642073746174652e205374616b696e67207368617265732065786973742c20627574206e6f207374616b696e6720746f6b656e7320646f546f6b656e4765797365723a2072656163686564206d6178696d756d20756e6c6f636b207363686564756c65734e65772072657761726420646973747269627574696f6e20697320746865207a65726f2061646472657373546f6b656e206973206e6f7420737570706f7274656420646973747269627574696f6e20746f6b656e4e6577206475726174696f6e2068617320746f2062652067726561746572207468616e207a65726f546f6b656e4765797365723a207472616e73666572206f7574206f66207374616b696e6720706f6f6c206661696c6564a265627a7a72315820b8802ea545375276066258e49d9fb6d361ae69e4a1e1d15173c6e953acc79e6564736f6c63430005110032
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000085eee30c52b0b379b046fb0f85f4f3dc3009afec000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000278d0000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000278d00
-----Decoded View---------------
Arg [0] : _keepToken (address): 0x85Eee30c52B0b379b046Fb0F85F4f3Dc3009aFEC
Arg [1] : _maxUnlockSchedules (uint256): 12
Arg [2] : _startBonus (uint256): 30
Arg [3] : _bonusPeriodSec (uint256): 2592000
Arg [4] : _initialSharesPerToken (uint256): 1
Arg [5] : _durationSec (uint256): 2592000
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 00000000000000000000000085eee30c52b0b379b046fb0f85f4f3dc3009afec
Arg [1] : 000000000000000000000000000000000000000000000000000000000000000c
Arg [2] : 000000000000000000000000000000000000000000000000000000000000001e
Arg [3] : 0000000000000000000000000000000000000000000000000000000000278d00
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [5] : 0000000000000000000000000000000000000000000000000000000000278d00
Deployed Bytecode Sourcemap
2098:1185:14:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2098:1185:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3020:295:13;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3020:295:13;;:::i;:::-;;7473:422:15;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7473:422:15;-1:-1:-1;;;;;7473:422:15;;:::i;6034:119::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6034:119:15;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;6034:119:15;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;6034:119:15;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;6034:119:15;;-1:-1:-1;6034:119:15;-1:-1:-1;6034:119:15;:::i;6417:170::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;6417:170:15;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;6417:170:15;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;6417:170:15;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;6417:170:15;;-1:-1:-1;6417:170:15;-1:-1:-1;6417:170:15;:::i;2515:33::-;;;:::i;:::-;;;;-1:-1:-1;;;;;2515:33:15;;;;;;;;;;;;;;2594:42;;;:::i;:::-;;;;;;;;;;;;;;;;10131:168;;;:::i;2642:29::-;;;:::i;11417:1392::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10449:277;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10449:277:15;-1:-1:-1;;;;;10449:277:15;;:::i;967:26:13:-;;;:::i;12890:98:15:-;;;:::i;14861:224::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;14861:224:15;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;4041:39;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4041:39:15;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;952:85:12;;;:::i;2804:37:15:-;;;:::i;1642:137:2:-;;;:::i;2677:33:15:-;;;:::i;10829:99::-;;;:::i;2762:36::-;;;:::i;9779:103::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;9779:103:15;;:::i;8353:1256::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8353:1256:15;;;;;;;:::i;857:77:2:-;;;:::i;1208:92::-;;;:::i;2678:336:13:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;2678:336:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;2678:336:13;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;2678:336:13;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;2678:336:13;;-1:-1:-1;2678:336:13;-1:-1:-1;2678:336:13;:::i;9953:100:15:-;;;:::i;13071:102::-;;;:::i;13238:107::-;;;:::i;6848:96::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6848:96:15;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;6848:96:15;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;6848:96:15;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;6848:96:15;;-1:-1:-1;6848:96:15;-1:-1:-1;6848:96:15;:::i;1928:107:2:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1928:107:2;-1:-1:-1;;;;;1928:107:2;;:::i;13594:954:15:-;;;:::i;7178:99::-;;;:::i;3020:295:13:-;1061:9:2;:7;:9::i;:::-;1053:54;;;;;-1:-1:-1;;;1053:54:2;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1053:54:2;;;;;;;;;;;;;;;3137:1:13;3119:15;:19;3098:106;;;;-1:-1:-1;;;3098:106:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3239:11;;3220:48;;;;;;;;;;;;;;;;;;;;;;;;3279:11;:29;3020:295::o;7473:422:15:-;1061:9:2;:7;:9::i;:::-;1053:54;;;;;-1:-1:-1;;;1053:54:2;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1053:54:2;;;;;;;;;;;;;;;-1:-1:-1;;;;;7605:35:15;;7584:125;;;;-1:-1:-1;;;7584:125:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7772:18;;7725:110;;;-1:-1:-1;;;;;7772:18:15;;;7725:110;;;;;;;;;;;;;;;;;;;;;7846:18;:42;;-1:-1:-1;;;;;;7846:42:15;-1:-1:-1;;;;;7846:42:15;;;;;;;;;;7473:422::o;6034:119::-;6105:41;6115:10;6127;6139:6;6105:9;:41::i;:::-;6034:119;;;:::o;6417:170::-;1061:9:2;:7;:9::i;:::-;1053:54;;;;;-1:-1:-1;;;1053:54:2;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1053:54:2;;;;;;;;;;;;;;;6545:35:15;6555:10;6567:4;6573:6;6545:9;:35::i;:::-;6417:170;;;;:::o;2515:33::-;;;-1:-1:-1;;;;;2515:33:15;;:::o;2594:42::-;2635:1;2594:42;:::o;10131:168::-;10234:11;;:19;;;-1:-1:-1;;;10234:19:15;;;;10184:6;;-1:-1:-1;;;;;10234:11:15;;:17;;:19;;;;;;;;;;;;;;:11;:19;;;5:2:-1;;;;30:1;27;20:12;5:2;10234:19:15;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10234:19:15;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10234:19:15;10209:13;;:21;;;-1:-1:-1;;;10209:21:15;;;;-1:-1:-1;;;;;10209:44:15;;;;:13;;;;:19;;:21;;;;;10234:19;;10209:21;;;;;;;;:13;:21;;;5:2:-1;;;;30:1;27;20:12;5:2;10209:21:15;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10209:21:15;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10209:21:15;-1:-1:-1;;;;;10209:44:15;;10202:52;;;;10271:13;;;;;;;;;-1:-1:-1;;;;;10271:13:15;-1:-1:-1;;;;;10271:19:15;;:21;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10271:21:15;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10271:21:15;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10271:21:15;;-1:-1:-1;10131:168:15;;:::o;2642:29::-;;;;:::o;11417:1392::-;11490:7;11511;11532;11553;11574;11595;11627:14;:12;:14::i;:::-;;11681:30;11726:60;11767:18;;11726:36;11734:27;;11726:3;:7;;:36;;;;:::i;:::-;:40;:60;:40;:60;:::i;:::-;11824:25;;11681:105;;-1:-1:-1;11824:75:15;;11681:105;11824:75;:29;:75;:::i;:::-;11796:25;:103;11939:3;11909:27;:33;;;12020:10;-1:-1:-1;12008:23:15;;;:11;:23;;;;;12154:20;;12098:33;;;;12008:23;;12090:98;;:42;;11939:3;12090:42;:7;:42;:::i;:98::-;12227:26;;;;12041:147;;-1:-1:-1;12227:80:15;;12041:147;12227:80;:30;:80;:::i;:::-;12198:26;;;:109;12353:3;12317:33;;;:39;12407:25;;-1:-1:-1;;12406:186:15;;12591:1;12406:186;;;12456:116;12529:25;;12456:47;12476:6;:26;;;12456:15;:13;:15::i;:47::-;:51;:116;:51;:116;:::i;:::-;12367:225;;12624:13;:11;:13::i;:::-;12651:15;:13;:15::i;:::-;12680:26;;;;;12720:25;;12603:199;;;;-1:-1:-1;12680:26:15;-1:-1:-1;12720:25:15;-1:-1:-1;12759:16:15;-1:-1:-1;12789:3:15;;-1:-1:-1;11417:1392:15;;-1:-1:-1;;;11417:1392:15:o;10449:277::-;10508:7;10567:1;10546:18;;:22;:173;;10718:1;10546:173;;;10663:18;;-1:-1:-1;;;;;10605:17:15;;;;;;:11;:17;;;;;:31;10587:112;;10663:18;10587:50;;:13;:11;:13::i;:112::-;10527:192;;10449:277;;;;:::o;967:26:13:-;;;;:::o;12890:98:15:-;12960:11;;:21;;;-1:-1:-1;;;12960:21:15;;;;12934:7;;-1:-1:-1;;;;;12960:11:15;;:19;;:21;;;;;;;;;;;;;;:11;:21;;;5:2:-1;;;;30:1;27;20:12;14861:224:15;15004:4;1061:9:2;:7;:9::i;:::-;1053:54;;;;;-1:-1:-1;;;1053:54:2;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1053:54:2;;;;;;;;;;;;;;;15027:12:15;;:51;;;-1:-1:-1;;;15027:51:15;;-1:-1:-1;;;;;15027:51:15;;;;;;;;;;;;;;;;;;;;;;:12;;;;;:24;;:51;;;;;;;;;;;;;;:12;;:51;;;5:2:-1;;;;30:1;27;20:12;5:2;15027:51:15;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;15027:51:15;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;15027:51:15;;-1:-1:-1;1117:1:2;14861:224:15;;;;;:::o;4041:39::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4041:39:15;;;;;:::o;952:85:12:-;1002:4;952:85;:::o;2804:37:15:-;;;;:::o;1642:137:2:-;1061:9;:7;:9::i;:::-;1053:54;;;;;-1:-1:-1;;;1053:54:2;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1053:54:2;;;;;;;;;;;;;;;1740:1;1724:6;;1703:40;;-1:-1:-1;;;;;1724:6:2;;;;1703:40;;1740:1;;1703:40;1770:1;1753:19;;-1:-1:-1;;;;;;1753:19:2;;;1642:137::o;2677:33:15:-;;;;:::o;10829:99::-;10899:12;;:22;;;-1:-1:-1;;;10899:22:15;;;;10873:7;;-1:-1:-1;;;;;10899:12:15;;:20;;:22;;;;;;;;;;;;;;:12;:22;;;5:2:-1;;;;30:1;27;20:12;2762:36:15;;;;:::o;9779:103::-;9833:7;9859:16;9868:6;9859:8;:16::i;8353:1256::-;24493:18;;-1:-1:-1;;;;;24493:18:15;24515:10;24493:32;24472:116;;;;-1:-1:-1;;;24472:116:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8516:19;;8491:15;:22;:44;8470:136;;;;-1:-1:-1;;;8470:136:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8694:18;:16;:18::i;:::-;;;;;;;8723:20;8746:13;:11;:13::i;:::-;8723:36;;8769:26;8826:1;8811:12;:16;8810:137;;8924:22;;8913:34;;:6;;:34;:10;:34;:::i;:::-;8810:137;;;8847:47;8881:12;8847:29;8869:6;8847:17;;:21;;:29;;;;:::i;:47::-;8769:178;;8958:30;;:::i;:::-;8998:49;;;9091:3;9057:31;;;:37;;;9124:20;;9132:11;9124:20;:7;:20;:::i;:::-;9104:17;;;:40;;;9154:20;;;:34;;;9198:15;27:10:-1;;39:1;23:18;;45:23;;-1:-1;9198:30:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9259:17;;:41;;9281:18;9259:21;:41::i;:::-;9239:17;:61;9332:11;;:19;;;-1:-1:-1;;;9332:19:15;;;;-1:-1:-1;;;;;9332:11:15;;;;:17;;:19;;;;;;;;;;;;;;;:11;:19;;;5:2:-1;;;;30:1;27;20:12;5:2;9332:19:15;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9332:19:15;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;9332:19:15;9418:11;;9332:136;;;-1:-1:-1;;;9332:136:15;;9382:10;9332:136;;;;-1:-1:-1;;;;;9418:11:15;;;9332:136;;;;;;;;;;;;:32;;;;;;;:136;;;;;:19;;:136;;;;;;;9418:11;9332:32;:136;;;5:2:-1;;;;30:1;27;20:12;5:2;9332:136:15;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9332:136:15;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;9332:136:15;9311:228;;;;-1:-1:-1;;;9311:228:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9554:48;9567:6;9575:11;9588:13;:11;:13::i;:::-;9554:48;;;;;;;;;;;;;;;;;;;;;;;;;;24598:1;;;8353:1256;;:::o;857:77:2:-;895:7;921:6;-1:-1:-1;;;;;921:6:2;857:77;:::o;1208:92::-;1248:4;1287:6;;-1:-1:-1;;;;;1287:6:2;1271:12;:10;:12::i;:::-;-1:-1:-1;;;;;1271:22:2;;1264:29;;1208:92;:::o;2678:336:13:-;2876:22;:20;:22::i;:::-;-1:-1:-1;;;;;2855:43:13;2865:6;-1:-1:-1;;;;;2855:43:13;;2834:131;;;;-1:-1:-1;;;2834:131:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2976:31;2987:6;2995:11;;2976:10;:31::i;:::-;2678:336;;;;;:::o;9953:100:15:-;10026:12;;:20;;;-1:-1:-1;;;10026:20:15;;;;10001:6;;-1:-1:-1;;;;;10026:12:15;;:18;;:20;;;;;;;;;;;;;;:12;:20;;;5:2:-1;;;;30:1;27;20:12;13071:102:15;13143:13;;:23;;;-1:-1:-1;;;13143:23:15;;;;13117:7;;-1:-1:-1;;;;;13143:13:15;;:21;;:23;;;;;;;;;;;;;;:13;:23;;;5:2:-1;;;;30:1;27;20:12;13238:107:15;13316:15;:22;13238:107;:::o;6848:96::-;6921:16;6930:6;6921:8;:16::i;1928:107:2:-;1061:9;:7;:9::i;:::-;1053:54;;;;;-1:-1:-1;;;1053:54:2;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1053:54:2;;;;;;;;;;;;;;;2000:28;2019:8;2000:18;:28::i;:::-;1928:107;:::o;13594:954:15:-;13634:7;;;13712:13;:11;:13::i;:::-;13689:36;;13740:17;;13761:1;13740:22;13736:485;;;13795:12;13778:29;;13736:485;;;13838:22;;13878:146;13902:15;:22;13898:26;;13878:146;;;13966:43;13985:23;14006:1;13985:20;:23::i;:::-;13966:14;;:43;:18;:43;:::i;:::-;13949:60;-1:-1:-1;13926:3:15;;13878:146;;;-1:-1:-1;14108:17:15;;14054:85;;:32;:14;14073:12;14054:32;:18;:32;:::i;:85::-;14173:17;;14037:102;;-1:-1:-1;14173:37:15;;14195:14;14173:37;:21;:37;:::i;:::-;14153:17;:57;-1:-1:-1;13736:485:15;14235:18;;14231:279;;14294:11;;14323:13;;14294:60;;;-1:-1:-1;;;14294:60:15;;-1:-1:-1;;;;;14323:13:15;;;14294:60;;;;;;;;;;;;:11;;;;;:20;;:60;;;;;;;;;;;;;;:11;;:60;;;5:2:-1;;;;30:1;27;20:12;5:2;14294:60:15;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;14294:60:15;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;14294:60:15;14269:166;;;;-1:-1:-1;;;14269:166:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14454:45;14469:14;14485:13;:11;:13::i;:::-;14454:45;;;;;;;;;;;;;;;;;;;;;;14231:279;-1:-1:-1;14527:14:15;-1:-1:-1;13594:954:15;:::o;7178:99::-;7218:7;7252:17;:15;:17::i;:::-;7237:33;;7178:99;:::o;15364:1696::-;15501:1;15492:6;:10;15484:56;;;;-1:-1:-1;;;15484:56:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;15571:25:15;;15550:112;;;;-1:-1:-1;;;15550:112:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15693:18;;:23;;:44;;;15736:1;15720:13;:11;:13::i;:::-;:17;15693:44;15672:165;;;;-1:-1:-1;;;15672:165:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15848:27;15912:1;15891:18;;:22;15890:145;;16012:22;;16001:34;;:6;;:34;:10;:34;:::i;:::-;15890:145;;;15933:49;15968:13;:11;:13::i;:::-;15933:18;;:30;;15956:6;15933:30;:22;:30;:::i;:49::-;15848:187;;16088:1;16066:19;:23;16045:108;;;;-1:-1:-1;;;16045:108:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16164:18;:16;:18::i;:::-;-1:-1:-1;;;;;;;;;16251:24:15;;16223:25;16251:24;;;:11;:24;;;;;16308:20;;16251:24;;-1:-1:-1;16308:45:15;;-1:-1:-1;16333:19:15;16308:24;:45::i;:::-;16285:68;;16399:3;16363:33;;;:39;16413:21;;:::i;:::-;-1:-1:-1;16437:31:15;;;;;;;;;;;16464:3;16437:31;;;;;;;-1:-1:-1;;;;;16478:24:15;;-1:-1:-1;16478:24:15;;;:11;:24;;;;;27:10:-1;;39:1;23:18;;;45:23;;16478:39:15;;;;;;;;;;;;;;;;;;;;;;;;;16581:18;;:43;;16443:19;16581:43;:22;:43;:::i;:::-;16560:18;:64;16771:12;;:20;;;-1:-1:-1;;;16771:20:15;;;;-1:-1:-1;;;;;16771:12:15;;;;:18;;:20;;;;;;;;;;;;;;;:12;:20;;;5:2:-1;;;;30:1;27;20:12;5:2;16771:20:15;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;16771:20:15;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;16771:20:15;16854:12;;16771:134;;;-1:-1:-1;;;16771:134:15;;-1:-1:-1;;;;;16771:134:15;;;;;;;16854:12;;;16771:134;;;;;;;;;;;;:33;;;;;;;:134;;;;;:20;;:134;;;;;;;16854:12;16771:33;:134;;;5:2:-1;;;;30:1;27;20:12;5:2;16771:134:15;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;16771:134:15;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;16771:134:15;16750:227;;;;-1:-1:-1;;;16750:227:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17000:11;-1:-1:-1;;;;;16993:60:15;;17013:6;17021:27;17036:11;17021:14;:27::i;:::-;16993:60;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16993:60:15;;;;;;;;;;;;;15364:1696;;;;;;:::o;1274:134:1:-;1332:7;1358:43;1362:1;1365;1358:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;1351:50;;1274:134;;;;;:::o;2159:459::-;2217:7;2458:6;2454:45;;-1:-1:-1;2487:1:1;2480:8;;2454:45;2521:5;;;2525:1;2521;:5;:1;2544:5;;;;;:10;2536:56;;;;-1:-1:-1;;;2536:56:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;834:176;892:7;923:5;;;946:6;;;;938:46;;;;;-1:-1:-1;;;938:46:1;;;;;;;;;;;;;;;;;;;;;;;;;;;3073:130;3131:7;3157:39;3161:1;3164;3157:39;;;;;;;;;;;;;;;;;:3;:39::i;17357:3864:15:-;17408:7;17427:18;:16;:18::i;:::-;;;;;;;17491:1;17482:6;:10;17474:58;;;;-1:-1:-1;;;17474:58:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17593:6;17563:26;17578:10;17563:14;:26::i;:::-;:36;;17542:144;;;;-1:-1:-1;;;17542:144:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17696:27;17738:49;17773:13;:11;:13::i;:::-;17738:18;;:30;;17761:6;17738:30;:22;:30;:::i;:49::-;17696:91;;17840:1;17818:19;:23;17797:118;;;;-1:-1:-1;;;17797:118:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17996:10;17956:25;17984:23;;;:11;:23;;;;;;;;18049:11;:23;;;;;17984;;18224:19;17956:25;18287:1663;18294:20;;18287:1663;;18370:20;;18330:23;;18356:13;;-1:-1:-1;;18370:24:15;;;18356:39;;;;;;;;;;;;;;;;18330:65;;18409:20;18432:31;18440:9;:22;;;18432:3;:7;;:31;;;;:::i;:::-;18535:23;;18409:54;;-1:-1:-1;18477:36:15;;18535:43;-1:-1:-1;18531:1409:15;;18674:23;;:79;;18723:12;18674:79;:27;:79;:::i;:::-;18643:110;;18786:152;18824:12;18858:28;18908:12;18786:16;:152::i;:::-;18771:167;-1:-1:-1;18984:97:15;:25;19035:28;18984:97;:29;:97;:::i;:::-;19160:23;;18956:125;;-1:-1:-1;19118:83:15;;:16;;:83;:20;:83;:::i;:::-;19219:22;;19099:102;;-1:-1:-1;19219:22:15;:13;-1:-1:-1;;19219:22:15;;;:::i;:::-;;18531:1409;;;19360:72;:16;19402:12;19360:72;:20;:72;:::i;:::-;19329:103;;19465:152;19503:12;19537:28;19587:12;19465:16;:152::i;:::-;19450:167;-1:-1:-1;19663:97:15;:25;19714:28;19663:97;:29;:97;:::i;:::-;19804:23;;19635:125;;-1:-1:-1;19804:83:15;;19853:16;19804:83;:27;:83;:::i;:::-;19778:109;;:23;;-1:-1:-1;18531:1409:15;18287:1663;;;;;;19988:26;;;;:79;;20032:25;19988:79;:30;:79;:::i;:::-;19959:26;;;:108;20100:20;;:45;;20125:19;20100:45;:24;:45;:::i;:::-;20077:68;;20311:25;;:78;;20354:25;20311:78;:29;:78;:::i;:::-;20283:25;:106;20420:18;;:43;;20443:19;20420:43;:22;:43;:::i;:::-;20399:18;:64;20608:12;;:41;;;-1:-1:-1;;;20608:41:15;;20630:10;20608:41;;;;;;;;;;;;-1:-1:-1;;;;;20608:12:15;;;;:21;;:41;;;;;;;;;;;;;;;:12;;:41;;;5:2:-1;;;;30:1;27;20:12;5:2;20608:41:15;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;20608:41:15;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;20608:41:15;20587:136;;;;-1:-1:-1;;;20587:136:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20754:13;;:48;;;-1:-1:-1;;;20754:48:15;;20777:10;20754:48;;;;;;;;;;;;-1:-1:-1;;;;;20754:13:15;;;;:22;;:48;;;;;;;;;;;;;;;:13;;:48;;;5:2:-1;;;;30:1;27;20:12;5:2;20754:48:15;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;20754:48:15;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;20754:48:15;20733:144;;;;-1:-1:-1;;;20733:144:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20902:10;20893:60;20914:6;20922:26;20902:10;20922:14;:26::i;:::-;20893:60;;;;;;;;;;;;;;;;;;;;-1:-1:-1;20893:60:15;;;;;;;;;;;;;20968:39;;;;;;;;20982:10;;20968:39;;;;;;;;;;21039:18;;:23;;:44;;;21082:1;21066:13;:11;:13::i;:::-;:17;21039:44;21018:167;;;;-1:-1:-1;;;21018:167:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21202:12;17357:3864;-1:-1:-1;;;;;;;17357:3864:15:o;788:96:0:-;867:10;788:96;:::o;2136:225:2:-;-1:-1:-1;;;;;2209:22:2;;2201:73;;;;-1:-1:-1;;;2201:73:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2310:6;;;2289:38;;-1:-1:-1;;;;;2289:38:2;;;;2310:6;;;2289:38;;;2337:6;:17;;-1:-1:-1;;;;;;2337:17:2;-1:-1:-1;;;;;2337:17:2;;;;;;;;;;2136:225::o;23379:947:15:-;23437:7;23456:31;23490:15;23506:1;23490:18;;;;;;;;;;;;;;;;;;23456:52;;23550:8;:28;;;23523:8;:23;;;:55;23519:94;;23601:1;23594:8;;;;;23519:94;23744:17;;;;23623:22;;23737:3;:24;23733:476;;23845:23;;;;23812:28;;:57;;;:32;:57;:::i;:::-;23931:17;;;;23897:31;;;:51;23777:106;-1:-1:-1;23733:476:15;;;23996:151;24126:8;:20;;;23996:108;24075:8;:28;;;23996:57;24021:8;:31;;;23996:3;:24;;:57;;;;:::i;:151::-;24195:3;24161:31;;;:37;23979:168;-1:-1:-1;23733:476:15;24245:23;;;;:43;;24273:14;24245:43;:27;:43;:::i;:::-;24219:23;;;;:69;;;;24305:14;-1:-1:-1;23379:947:15;;;:::o;1732:187:1:-;1818:7;1853:12;1845:6;;;;1837:29;;;;-1:-1:-1;;;1837:29:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1837:29:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1888:5:1;;;1732:187::o;3718:338::-;3804:7;3904:12;3897:5;3889:28;;;;-1:-1:-1;;;3889:28:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;3889:28:1;;3927:9;3943:1;3939;:5;;;;;;;3718:338;-1:-1:-1;;;;;3718:338:1:o;22181:837:15:-;22339:7;22358:23;22396:101;22458:25;;22396:40;22416:19;22396:15;:13;:15::i;:101::-;22358:139;;22528:14;;22512:12;:30;22508:108;;22565:40;:19;22589:15;22565:40;:23;:40;:::i;:::-;22558:47;;;;;22508:108;22626:21;2635:1;22650:2;:18;22626:42;;22678:21;22714:242;22942:13;22714:206;22904:15;22714:168;22763:105;22836:14;;22763:47;22797:12;22763:29;22781:10;;22763:13;:17;;:29;;;;:::i;:105::-;22714:10;;;:168;:31;:168;:::i;:242::-;22678:278;-1:-1:-1;22973:38:15;:19;22678:278;22973:38;:23;:38;:::i;2098:1185:14:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Swarm Source
bzzr://db3a633c1081079d0cc0971393919d8bf3d93acf4ca8fb8364314f92ddd7139d
Loading...
Loading
Loading...
Loading
OVERVIEW
Vault for KEEP tokensNet Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.