Source Code
More Info
Private Name Tags
ContractCreator
TokenTracker
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
ConvexStakingWrapper
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
// slither-disable-start reentrancy-no-eth
import "@openzeppelin/contracts-v0.7/math/SafeMath.sol";
import "@openzeppelin/contracts-v0.7/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts-v0.7/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts-v0.7/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts-v0.7/utils/ReentrancyGuard.sol";
import "./IRewardStaking.sol";
interface IBooster {
function poolInfo(uint256 _pid)
external
view
returns (
address _lptoken,
address _token,
address _gauge,
address _crvRewards,
address _stash,
bool _shutdown
);
function earmarkRewards(uint256 _pid) external returns (bool);
}
interface IConvexDeposits {
function deposit(
uint256 _pid,
uint256 _amount,
bool _stake
) external returns (bool);
function deposit(
uint256 _amount,
bool _lock,
address _stakeAddress
) external;
}
interface ITokenWrapper {
function token() external view returns (address);
}
// if used as collateral some modifications will be needed to fit the specific platform
// Based on audited contracts: https://github.com/convex-eth/platform/blob/933ace34d896e6684345c6795bf33d4089fbd8f6/contracts/contracts/wrappers/ConvexStakingWrapper.sol
contract ConvexStakingWrapper is ERC20, ReentrancyGuard {
using SafeERC20 for IERC20;
using SafeMath for uint256;
struct EarnedData {
address token;
uint256 amount;
}
struct RewardType {
address reward_token;
address reward_pool;
uint256 reward_integral;
uint256 reward_remaining;
mapping(address => uint256) reward_integral_for;
mapping(address => uint256) claimable_reward;
}
//constants/immutables
address public constant convexBooster = address(0xF403C135812408BFbE8713b5A23a04b3D48AAE31);
address public constant crv = address(0xD533a949740bb3306d119CC777fa900bA034cd52);
address public constant cvx = address(0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B);
address public curveToken;
address public convexToken;
address public convexPool;
uint256 public convexPoolId;
address public collateralVault;
uint256 private constant CRV_INDEX = 0;
uint256 private constant CVX_INDEX = 1;
//rewards
RewardType[] public rewards;
mapping(address => uint256) public registeredRewards;
mapping(address => address) public rewardRedirect;
//management
bool public isInit;
string internal _tokenname;
string internal _tokensymbol;
event Deposited(
address indexed _user,
address indexed _account,
uint256 _amount,
bool _wrapped
);
event Withdrawn(address indexed _user, uint256 _amount, bool _unwrapped);
event RewardRedirected(address indexed _account, address _forward);
event RewardAdded(address _token);
event UserCheckpoint(address _userA, address _userB);
event RewardsClaimed(IERC20 indexed erc20, uint256 indexed amount);
constructor() public ERC20("StakedConvexToken", "stkCvx") {}
function initialize(uint256 _poolId) external virtual {
require(!isInit, "already init");
(address _lptoken, address _token, , address _rewards, , ) = IBooster(convexBooster)
.poolInfo(_poolId);
curveToken = _lptoken;
convexToken = _token;
convexPool = _rewards;
convexPoolId = _poolId;
_tokenname = string(abi.encodePacked("Staked ", ERC20(_token).name()));
_tokensymbol = string(abi.encodePacked("stk", ERC20(_token).symbol()));
isInit = true;
// collateralVault = _vault;
//add rewards
addRewards();
setApprovals();
}
function name() public view override returns (string memory) {
return _tokenname;
}
function symbol() public view override returns (string memory) {
return _tokensymbol;
}
function decimals() public view override returns (uint8) {
return 18;
}
function setApprovals() public {
IERC20(curveToken).safeApprove(convexBooster, 0);
IERC20(curveToken).safeApprove(convexBooster, uint256(-1));
IERC20(convexToken).safeApprove(convexPool, 0);
IERC20(convexToken).safeApprove(convexPool, uint256(-1));
}
function addRewards() public {
address mainPool = convexPool;
if (rewards.length == 0) {
rewards.push(
RewardType({
reward_token: crv,
reward_pool: mainPool,
reward_integral: 0,
reward_remaining: 0
})
);
rewards.push(
RewardType({
reward_token: cvx,
reward_pool: address(0),
reward_integral: 0,
reward_remaining: 0
})
);
registeredRewards[crv] = CRV_INDEX + 1; //mark registered at index+1
registeredRewards[cvx] = CVX_INDEX + 1; //mark registered at index+1
//send to self to warmup state
//slither-disable-next-line unchecked-transfer
IERC20(crv).transfer(address(this), 0);
//send to self to warmup state
//slither-disable-next-line unchecked-transfer
IERC20(cvx).transfer(address(this), 0);
emit RewardAdded(crv);
emit RewardAdded(cvx);
}
uint256 extraCount = IRewardStaking(mainPool).extraRewardsLength();
for (uint256 i = 0; i < extraCount; ++i) {
address extraPool = IRewardStaking(mainPool).extraRewards(i);
address extraToken = IRewardStaking(extraPool).rewardToken();
//from pool 151, extra reward tokens are wrapped
if (convexPoolId >= 151) {
extraToken = ITokenWrapper(extraToken).token();
}
if (extraToken == cvx) {
//update cvx reward pool address
rewards[CVX_INDEX].reward_pool = extraPool;
} else if (registeredRewards[extraToken] == 0) {
//add new token to list
rewards.push(
RewardType({
reward_token: extraToken,
reward_pool: extraPool,
reward_integral: 0,
reward_remaining: 0
})
);
registeredRewards[extraToken] = rewards.length; //mark registered at index+1
emit RewardAdded(extraToken);
}
}
}
function rewardLength() external view returns (uint256) {
return rewards.length;
}
function _getDepositedBalance(address _account) internal view virtual returns (uint256) {
if (_account == address(0) || _account == collateralVault) {
return 0;
}
//get balance from collateralVault
return balanceOf(_account);
}
function _getTotalSupply() internal view virtual returns (uint256) {
//override and add any supply needed (interest based growth)
return totalSupply();
}
//internal transfer function to transfer rewards out on claim
function _transferReward(
address _token,
address _to,
uint256 _amount
) internal virtual {
IERC20(_token).safeTransfer(_to, _amount);
}
function _calcRewardIntegral(
uint256 _index,
address[2] memory _accounts,
uint256[2] memory _balances,
uint256 _supply,
bool _isClaim
) internal {
RewardType storage reward = rewards[_index];
if (reward.reward_token == address(0)) {
return;
}
//get difference in balance and remaining rewards
//getReward is unguarded so we use reward_remaining to keep track of how much was actually claimed
uint256 bal = IERC20(reward.reward_token).balanceOf(address(this));
//check that balance increased and update integral
if (_supply != 0 && bal > reward.reward_remaining) {
reward.reward_integral =
reward.reward_integral +
(bal.sub(reward.reward_remaining).mul(1e20).div(_supply));
}
//update user integrals
for (uint256 u = 0; u < _accounts.length; ++u) {
//do not give rewards to address 0
if (_accounts[u] == address(0)) continue;
if (_accounts[u] == collateralVault) continue;
if (_isClaim && u != 0) continue; //only update/claim for first address and use second as forwarding
uint256 userI = reward.reward_integral_for[_accounts[u]];
if (_isClaim || userI < reward.reward_integral) {
if (_isClaim) {
uint256 receiveable = reward.claimable_reward[_accounts[u]].add(
_balances[u].mul(reward.reward_integral.sub(userI)).div(1e20)
);
if (receiveable != 0) {
reward.claimable_reward[_accounts[u]] = 0;
//cheat for gas savings by transfering to the second index in accounts list
//if claiming only the 0 index will update so 1 index can hold forwarding info
//guaranteed to have an address in u+1 so no need to check
_transferReward(reward.reward_token, _accounts[u + 1], receiveable);
bal = bal.sub(receiveable);
}
} else {
reward.claimable_reward[_accounts[u]] = reward
.claimable_reward[_accounts[u]]
.add(_balances[u].mul(reward.reward_integral.sub(userI)).div(1e20));
}
reward.reward_integral_for[_accounts[u]] = reward.reward_integral;
}
}
//update remaining reward here since balance could have changed if claiming
if (bal != reward.reward_remaining) {
reward.reward_remaining = bal;
}
}
function _checkpoint(address[2] memory _accounts) internal nonReentrant {
uint256 supply = _getTotalSupply();
uint256[2] memory depositedBalance;
depositedBalance[0] = _getDepositedBalance(_accounts[0]);
depositedBalance[1] = _getDepositedBalance(_accounts[1]);
IRewardStaking(convexPool).getReward(address(this), true);
uint256 rewardCount = rewards.length;
for (uint256 i = 0; i < rewardCount; ++i) {
_calcRewardIntegral(i, _accounts, depositedBalance, supply, false);
}
emit UserCheckpoint(_accounts[0], _accounts[1]);
}
function _checkpointAndClaim(address[2] memory _accounts) internal nonReentrant {
uint256 supply = _getTotalSupply();
uint256[2] memory depositedBalance;
depositedBalance[0] = _getDepositedBalance(_accounts[0]); //only do first slot
IRewardStaking(convexPool).getReward(address(this), true);
uint256 rewardCount = rewards.length;
for (uint256 i = 0; i < rewardCount; ++i) {
_calcRewardIntegral(i, _accounts, depositedBalance, supply, true);
}
emit UserCheckpoint(_accounts[0], _accounts[1]);
}
function user_checkpoint(address _account) external returns (bool) {
_checkpoint([_account, address(0)]);
return true;
}
function totalBalanceOf(address _account) external view returns (uint256) {
return _getDepositedBalance(_account);
}
//run earned as a mutable function to claim everything before calculating earned rewards
function earned(address _account) external returns (EarnedData[] memory claimable) {
//checkpoint to pull in and tally new rewards
_checkpoint([_account, address(0)]);
return _earned(_account);
}
function _earned(address _account) internal view returns (EarnedData[] memory claimable) {
uint256 rewardCount = rewards.length;
claimable = new EarnedData[](rewardCount);
for (uint256 i = 0; i < rewardCount; ++i) {
RewardType storage reward = rewards[i];
if (reward.reward_token == address(0)) {
continue;
}
claimable[i].amount = reward.claimable_reward[_account];
claimable[i].token = reward.reward_token;
}
return claimable;
}
function claimRewards() external {
address _account = rewardRedirect[msg.sender] == address(0)
? msg.sender
: rewardRedirect[msg.sender];
uint256 cvxOldBal = IERC20(cvx).balanceOf(_account);
uint256 crvOldBal = IERC20(crv).balanceOf(_account);
_checkpointAndClaim([msg.sender, _account]);
emit RewardsClaimed(IERC20(cvx), IERC20(cvx).balanceOf(_account) - cvxOldBal);
emit RewardsClaimed(IERC20(crv), IERC20(crv).balanceOf(_account) - crvOldBal);
}
//set any claimed rewards to automatically go to a different address
//set address to zero to disable
function setRewardRedirect(address _to) external nonReentrant {
rewardRedirect[msg.sender] = _to;
emit RewardRedirected(msg.sender, _to);
}
function getReward(address _account) external {
//check if there is a redirect address
if (rewardRedirect[_account] != address(0)) {
_checkpointAndClaim([_account, rewardRedirect[_account]]);
} else {
//claim directly in checkpoint logic to save a bit of gas
_checkpointAndClaim([_account, _account]);
}
}
function getReward(address _account, address _forwardTo) external {
require(msg.sender == _account, "!self");
//claim directly in checkpoint logic to save a bit of gas
//pack forwardTo into account array to save gas so that a proxy etc doesnt have to double transfer
_checkpointAndClaim([_account, _forwardTo]);
}
//deposit a curve token
function deposit(uint256 _amount, address _to) external {
//dont need to call checkpoint since _mint() will
if (_amount != 0) {
_mint(_to, _amount);
IERC20(curveToken).safeTransferFrom(msg.sender, address(this), _amount);
IConvexDeposits(convexBooster).deposit(convexPoolId, _amount, true);
}
emit Deposited(msg.sender, _to, _amount, true);
}
//stake a convex token
function stake(uint256 _amount, address _to) external {
//dont need to call checkpoint since _mint() will
if (_amount != 0) {
_mint(_to, _amount);
IERC20(convexToken).safeTransferFrom(msg.sender, address(this), _amount);
IRewardStaking(convexPool).stake(_amount);
}
emit Deposited(msg.sender, _to, _amount, false);
}
//withdraw to convex deposit token
function withdraw(uint256 _amount) external {
//dont need to call checkpoint since _burn() will
if (_amount != 0) {
_burn(msg.sender, _amount);
IRewardStaking(convexPool).withdraw(_amount, false);
IERC20(convexToken).safeTransfer(msg.sender, _amount);
}
emit Withdrawn(msg.sender, _amount, false);
}
//withdraw to underlying curve lp token
function withdrawAndUnwrap(uint256 _amount) external {
//dont need to call checkpoint since _burn() will
if (_amount != 0) {
_burn(msg.sender, _amount);
IRewardStaking(convexPool).withdrawAndUnwrap(_amount, false);
IERC20(curveToken).safeTransfer(msg.sender, _amount);
}
//events
emit Withdrawn(msg.sender, _amount, true);
}
function _beforeTokenTransfer(
address _from,
address _to,
uint256
) internal override {
_checkpoint([_from, _to]);
}
//helper function
function earmarkRewards() external returns (bool) {
return IBooster(convexBooster).earmarkRewards(convexPoolId);
}
}
// slither-disable-end reentrancy-no-eth// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.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, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b > a) return (false, 0);
return (true, a - b);
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, 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 (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b == 0) return (false, 0);
return (true, a / b);
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b == 0) return (false, 0);
return (true, a % b);
}
/**
* @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) {
require(b <= a, "SafeMath: subtraction overflow");
return a - b;
}
/**
* @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) {
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, reverting 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) {
require(b > 0, "SafeMath: division by zero");
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting 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) {
require(b > 0, "SafeMath: modulo by zero");
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
return a - b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryDiv}.
*
* 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, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* 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, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
return a % b;
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
import "../../utils/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 {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin 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;
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for {name} and {symbol}, initializes {decimals} with
* a default value of 18.
*
* To select a different value for {decimals}, use {_setupDecimals}.
*
* All three of these values are immutable: they can only be set once during
* construction.
*/
constructor (string memory name_, string memory symbol_) public {
_name = name_;
_symbol = symbol_;
_decimals = 18;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
* called.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual returns (uint8) {
return _decimals;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_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 virtual 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 virtual 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 virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_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 virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_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 virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
_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 internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Sets {decimals} to a value other than the default one of 18.
*
* WARNING: This function should only be called from the constructor. Most
* applications that interact with token contracts will not expect
* {decimals} to ever change, and may work incorrectly if it does.
*/
function _setupDecimals(uint8 decimals_) internal virtual {
_decimals = decimals_;
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.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 IERC20;` 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));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// 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. We use {Address.functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) { // Return data is optional
// solhint-disable-next-line max-line-length
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.2 <0.8.0;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
assembly { size := extcodesize(account) }
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.call{ value: value }(data);
return _verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.staticcall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.delegatecall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
// solhint-disable-next-line no-inline-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with 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.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor () internal {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
interface IRewardStaking {
function stakeFor(address, uint256) external;
function stake(uint256) external;
function withdraw(uint256 amount, bool claim) external;
function withdrawAndUnwrap(uint256 amount, bool claim) external;
function earned(address account) external view returns (uint256);
function getReward() external;
function getReward(address _account, bool _claimExtras) external;
function extraRewardsLength() external view returns (uint256);
function extraRewards(uint256 _pid) external view returns (address);
function rewardToken() external view returns (address);
function balanceOf(address _account) external view returns (uint256);
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":true,"internalType":"address","name":"_account","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"_wrapped","type":"bool"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_token","type":"address"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_account","type":"address"},{"indexed":false,"internalType":"address","name":"_forward","type":"address"}],"name":"RewardRedirected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"erc20","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardsClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_userA","type":"address"},{"indexed":false,"internalType":"address","name":"_userB","type":"address"}],"name":"UserCheckpoint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"_unwrapped","type":"bool"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"addRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"collateralVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"convexBooster","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"convexPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"convexPoolId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"convexToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"crv","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"curveToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cvx","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"earmarkRewards","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"earned","outputs":[{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ConvexStakingWrapper.EarnedData[]","name":"claimable","type":"tuple[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"address","name":"_forwardTo","type":"address"}],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isInit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"registeredRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardRedirect","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewards","outputs":[{"internalType":"address","name":"reward_token","type":"address"},{"internalType":"address","name":"reward_pool","type":"address"},{"internalType":"uint256","name":"reward_integral","type":"uint256"},{"internalType":"uint256","name":"reward_remaining","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"setApprovals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"setRewardRedirect","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"totalBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"user_checkpoint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawAndUnwrap","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60806040523480156200001157600080fd5b50604080518082018252601181527029ba30b5b2b221b7b73b32bc2a37b5b2b760791b6020808301918252835180850190945260068452650e6e8d686ecf60d31b90840152815191929162000069916003916200009a565b5080516200007f9060049060208401906200009a565b50506005805460ff1916601217905550600160065562000136565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620000dd57805160ff19168380011785556200010d565b828001600101855582156200010d579182015b828111156200010d578251825591602001919060010190620000f0565b506200011b9291506200011f565b5090565b5b808211156200011b576000815560010162000120565b61356880620001466000396000f3fe608060405234801561001057600080fd5b506004361061023c5760003560e01c806370a082311161013b578063b95c5746116100b8578063e529ee951161007c578063e529ee9514610470578063e89133b214610478578063f301af4214610480578063fe4b84df146104a3578063ff833485146104b65761023c565b8063b95c574614610427578063c00007b01461042f578063cc7d510e14610442578063dd62ed3e1461044a578063e509b9d91461045d5761023c565b8063923c1d61116100ff578063923c1d61146103e957806395d89b41146103f1578063a457c2d7146103f9578063a9059cbb1461040c578063b145a5b81461041f5761023c565b806370a08231146103a057806375a41014146103b35780637acb7757146103c65780638757b15b146103d95780638fd281dd146103e15761023c565b8063313ce567116101c95780634b8200931161018d5780634b820093146103575780634f39059c1461036a5780636a4874a1146103725780636b0916951461037a5780636e553f651461038d5761023c565b8063313ce56714610301578063372500ab14610316578063395093511461031e5780633969dfb4146103315780634b0ee02a146103445761023c565b806314d6aed01161021057806314d6aed0146102b457806318160ddd146102be57806323b872dd146102d35780632cdacb50146102e65780632e1a7d4d146102ee5761023c565b80628cc2621461024157806306fdde031461026a578063095ea7b31461027f5780630bece79c1461029f575b600080fd5b61025461024f366004612be9565b6104c9565b6040516102619190612f82565b60405180910390f35b610272610503565b6040516102619190612fe5565b61029261028d366004612d23565b610599565b6040516102619190612fda565b6102a76105b7565b6040516102619190612ed3565b6102bc6105c6565b005b6102c6610db5565b604051610261919061341d565b6102926102e1366004612ce3565b610dbb565b6102a7610e43565b6102bc6102fc366004612e09565b610e5b565b610309610f2f565b604051610261919061344e565b6102bc610f34565b61029261032c366004612d23565b611251565b6102bc61033f366004612e09565b61129f565b6102c6610352366004612be9565b611368565b610292610365366004612be9565b611373565b6102a76113a4565b6102a76113b3565b6102bc610388366004612c21565b6113cb565b6102bc61039b366004612e39565b611427565b6102c66103ae366004612be9565b611533565b6102bc6103c1366004612be9565b61154e565b6102bc6103d4366004612e39565b6115de565b6102bc6116af565b610292611747565b6102a76117d9565b6102726117f1565b610292610407366004612d23565b611852565b61029261041a366004612d23565b6118ba565b6102926118ce565b6102c66118d7565b6102bc61043d366004612be9565b6118dd565b6102a7611962565b6102c6610458366004612c21565b611971565b6102a761046b366004612be9565b61199c565b6102c66119b7565b6102a76119bd565b61049361048e366004612e09565b6119cc565b6040516102619493929190612f25565b6102bc6104b1366004612e09565b611a0f565b6102c66104c4366004612be9565b611c83565b604080518082019091526001600160a01b0382168152600060208201526060906104f290611c95565b6104fb82611dca565b90505b919050565b60108054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561058f5780601f106105645761010080835404028352916020019161058f565b820191906000526020600020905b81548152906001019060200180831161057257829003601f168201915b5050505050905090565b60006105ad6105a6611ee2565b8484611ee6565b5060015b92915050565b600b546001600160a01b031681565b600954600c546001600160a01b03909116906109e257600c604051806080016040528073d533a949740bb3306d119cc777fa900ba034cd526001600160a01b03168152602001836001600160a01b03168152602001600081526020016000815250908060018154018082558091505060019003906000526020600020906006020160009091909190915060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020155606082015181600301555050600c6040518060800160405280734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b6001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815250908060018154018082558091505060019003906000526020600020906006020160009091909190915060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550604082015181600201556060820151816003015550506000600101600d600073d533a949740bb3306d119cc777fa900ba034cd526001600160a01b03166001600160a01b031681526020019081526020016000208190555060018001600d6000734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b6001600160a01b03166001600160a01b031681526020019081526020016000208190555073d533a949740bb3306d119cc777fa900ba034cd526001600160a01b031663a9059cbb3060006040518363ffffffff1660e01b815260040161086b929190612f69565b602060405180830381600087803b15801561088557600080fd5b505af1158015610899573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108bd9190612d4e565b5060405163a9059cbb60e01b8152734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b9063a9059cbb906108f8903090600090600401612f69565b602060405180830381600087803b15801561091257600080fd5b505af1158015610926573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094a9190612d4e565b507fb13fd610fe4e1b384966826794a9b2f6100ad031f352cc5ec6f22667f607498073d533a949740bb3306d119cc777fa900ba034cd5260405161098e9190612ed3565b60405180910390a17fb13fd610fe4e1b384966826794a9b2f6100ad031f352cc5ec6f22667f6074980734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b6040516109d99190612ed3565b60405180910390a15b6000816001600160a01b031663d55a23f46040518163ffffffff1660e01b815260040160206040518083038186803b158015610a1d57600080fd5b505afa158015610a31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a559190612e21565b905060005b81811015610db057604051632061aa2360e11b81526000906001600160a01b038516906340c3544690610a9190859060040161341d565b60206040518083038186803b158015610aa957600080fd5b505afa158015610abd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae19190612c05565b90506000816001600160a01b031663f7c618c16040518163ffffffff1660e01b815260040160206040518083038186803b158015610b1e57600080fd5b505afa158015610b32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b569190612c05565b90506097600a5410610bd657806001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b9b57600080fd5b505afa158015610baf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd39190612c05565b90505b6001600160a01b038116734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b1415610c445781600c600181548110610c0a57fe5b906000526020600020906006020160010160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550610da6565b6001600160a01b0381166000908152600d6020526040902054610da657604080516080810182526001600160a01b038084168083528582166020808501918252600085870181815260608701828152600c8054600181018255818552985160069099027fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7810180549a8a166001600160a01b03199b8c1617905595517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c88701805491909916991698909817909655517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c984015593517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8ca909201919091559254908252600d90925282902055517fb13fd610fe4e1b384966826794a9b2f6100ad031f352cc5ec6f22667f607498090610d9d908390612ed3565b60405180910390a15b5050600101610a5a565b505050565b60025490565b6000610dc8848484611f9a565b610e3884610dd4611ee2565b610e33856040518060600160405280602881526020016134e6602891396001600160a01b038a16600090815260016020526040812090610e12611ee2565b6001600160a01b0316815260208101919091526040016000205491906120af565b611ee6565b5060015b9392505050565b73f403c135812408bfbe8713b5a23a04b3d48aae3181565b8015610ee857610e6b33826120db565b600954604051631c683a1b60e11b81526001600160a01b03909116906338d0743690610e9e908490600090600401613426565b600060405180830381600087803b158015610eb857600080fd5b505af1158015610ecc573d6000803e3d6000fd5b5050600854610ee892506001600160a01b0316905033836121b1565b336001600160a01b03167f2fd83d5e9f5d240bed47a97a24cf354e4047e25edc2da27b01fd95e5e8a0c9a5826000604051610f24929190613426565b60405180910390a250565b601290565b336000908152600e60205260408120546001600160a01b031615610f7057336000908152600e60205260409020546001600160a01b0316610f72565b335b6040516370a0823160e01b8152909150600090734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b906370a0823190610faf908590600401612ed3565b60206040518083038186803b158015610fc757600080fd5b505afa158015610fdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fff9190612e21565b6040516370a0823160e01b815290915060009073d533a949740bb3306d119cc777fa900ba034cd52906370a082319061103c908690600401612ed3565b60206040518083038186803b15801561105457600080fd5b505afa158015611068573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108c9190612e21565b604080518082019091523381526001600160a01b03851660208201529091506110b490612207565b6040516370a0823160e01b81528290734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b906370a08231906110ed908790600401612ed3565b60206040518083038186803b15801561110557600080fd5b505afa158015611119573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113d9190612e21565b60405191900390734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b907ffc30cddea38e2bf4d6ea7d3f9ed3b6ad7f176419f4963bd81318067a4aee73fe90600090a36040516370a0823160e01b8152819073d533a949740bb3306d119cc777fa900ba034cd52906370a08231906111b9908790600401612ed3565b60206040518083038186803b1580156111d157600080fd5b505afa1580156111e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112099190612e21565b6040519190039073d533a949740bb3306d119cc777fa900ba034cd52907ffc30cddea38e2bf4d6ea7d3f9ed3b6ad7f176419f4963bd81318067a4aee73fe90600090a3505050565b60006105ad61125e611ee2565b84610e33856001600061126f611ee2565b6001600160a01b03908116825260208083019390935260409182016000908120918c1681529252902054906122db565b801561132c576112af33826120db565b600954604051636197390160e11b81526001600160a01b039091169063c32e7202906112e2908490600090600401613426565b600060405180830381600087803b1580156112fc57600080fd5b505af1158015611310573d6000803e3d6000fd5b505060075461132c92506001600160a01b0316905033836121b1565b336001600160a01b03167f2fd83d5e9f5d240bed47a97a24cf354e4047e25edc2da27b01fd95e5e8a0c9a5826001604051610f24929190613426565b60006104fb82612300565b604080518082019091526001600160a01b03821681526000602082018190529061139c90611c95565b506001919050565b6007546001600160a01b031681565b73d533a949740bb3306d119cc777fa900ba034cd5281565b336001600160a01b038316146113fc5760405162461bcd60e51b81526004016113f3906131ef565b60405180910390fd5b604080518082019091526001600160a01b0380841682528216602082015261142390612207565b5050565b81156114e157611437818361233b565b60075461144f906001600160a01b03163330856123ef565b600a546040516321d0683360e11b815273f403c135812408bfbe8713b5a23a04b3d48aae31916343a0d0669161148d91908690600190600401613436565b602060405180830381600087803b1580156114a757600080fd5b505af11580156114bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114df9190612d4e565b505b806001600160a01b0316336001600160a01b03167fb32af138549e2a71563d1f2b1f7f0a139b3cdbc83d877d13603de1c3c5fd487a846001604051611527929190613426565b60405180910390a35050565b6001600160a01b031660009081526020819052604090205490565b600260065414156115715760405162461bcd60e51b81526004016113f390613359565b6002600655336000818152600e60205260409081902080546001600160a01b0319166001600160a01b038516179055517ff4239ad0860f93469699dd4be8040b8838c5e25bb6cf24a1dfb381b937ff078c906115ce908490612ed3565b60405180910390a2506001600655565b8115611669576115ee818361233b565b600854611606906001600160a01b03163330856123ef565b60095460405163534a7e1d60e11b81526001600160a01b039091169063a694fc3a9061163690859060040161341d565b600060405180830381600087803b15801561165057600080fd5b505af1158015611664573d6000803e3d6000fd5b505050505b806001600160a01b0316336001600160a01b03167fb32af138549e2a71563d1f2b1f7f0a139b3cdbc83d877d13603de1c3c5fd487a846000604051611527929190613426565b6007546116db906001600160a01b031673f403c135812408bfbe8713b5a23a04b3d48aae316000612410565b600754611708906001600160a01b031673f403c135812408bfbe8713b5a23a04b3d48aae31600019612410565b600954600854611726916001600160a01b0391821691166000612410565b600954600854611745916001600160a01b039182169116600019612410565b565b600a5460405163cc956f3f60e01b815260009173f403c135812408bfbe8713b5a23a04b3d48aae319163cc956f3f916117829160040161341d565b602060405180830381600087803b15801561179c57600080fd5b505af11580156117b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117d49190612d4e565b905090565b734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b81565b60118054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561058f5780601f106105645761010080835404028352916020019161058f565b60006105ad61185f611ee2565b84610e338560405180606001604052806025815260200161350e6025913960016000611889611ee2565b6001600160a01b03908116825260208083019390935260409182016000908120918d168152925290205491906120af565b60006105ad6118c7611ee2565b8484611f9a565b600f5460ff1681565b600c5490565b6001600160a01b038181166000908152600e6020526040902054161561193a576040805180820182526001600160a01b038084168083526000908152600e602090815293902054169181019190915261193590612207565b61195f565b604080518082019091526001600160a01b038216808252602082015261195f90612207565b50565b6009546001600160a01b031681565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b600e602052600090815260409020546001600160a01b031681565b600a5481565b6008546001600160a01b031681565b600c81815481106119d957fe5b600091825260209091206006909102018054600182015460028301546003909301546001600160a01b0392831694509116919084565b600f5460ff1615611a325760405162461bcd60e51b81526004016113f390613188565b604051631526fe2760e01b81526000908190819073f403c135812408bfbe8713b5a23a04b3d48aae3190631526fe2790611a7090879060040161341d565b60c06040518083038186803b158015611a8857600080fd5b505afa158015611a9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ac09190612c59565b5050600780546001600160a01b038087166001600160a01b0319928316179092556008805483871690831681179091556009805493851693909216929092179055600a899055604080516306fdde0360e01b81529051959850939650909450926306fdde03926004808201935060009291829003018186803b158015611b4557600080fd5b505afa158015611b59573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611b819190810190612d6e565b604051602001611b919190612e79565b60405160208183030381529060405260109080519060200190611bb5929190612b21565b50816001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015611bef57600080fd5b505afa158015611c03573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611c2b9190810190612d6e565b604051602001611c3b9190612ea8565b60405160208183030381529060405260119080519060200190611c5f929190612b21565b50600f805460ff19166001179055611c756105c6565b611c7d6116af565b50505050565b600d6020526000908152604090205481565b60026006541415611cb85760405162461bcd60e51b81526004016113f390613359565b60026006556000611cc76124d3565b9050611cd1612b9f565b611ce28360005b6020020151612300565b8152611cef836001611cd8565b6020820152600954604051637050ccd960e01b81526001600160a01b0390911690637050ccd990611d27903090600190600401612f4e565b600060405180830381600087803b158015611d4157600080fd5b505af1158015611d55573d6000803e3d6000fd5b5050600c549150600090505b81811015611d7f57611d778186858760006124dd565b600101611d61565b50835160208501516040517ffbb924eaf6a0dae4d734ad9fd5399b11487e7da53ec2871839b24fa30381b5ff92611db7929091612ee7565b60405180910390a1505060016006555050565b600c546060908067ffffffffffffffff81118015611de757600080fd5b50604051908082528060200260200182016040528015611e2157816020015b611e0e612bbd565b815260200190600190039081611e065790505b50915060005b81811015611edb576000600c8281548110611e3e57fe5b6000918252602090912060069091020180549091506001600160a01b0316611e665750611ed3565b6001600160a01b03851660009081526005820160205260409020548451859084908110611e8f57fe5b6020908102919091018101510152805484516001600160a01b0390911690859084908110611eb957fe5b60209081029190910101516001600160a01b039091169052505b600101611e27565b5050919050565b3390565b6001600160a01b038316611f0c5760405162461bcd60e51b81526004016113f390613294565b6001600160a01b038216611f325760405162461bcd60e51b81526004016113f39061305b565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590611f8d90859061341d565b60405180910390a3505050565b6001600160a01b038316611fc05760405162461bcd60e51b81526004016113f39061324f565b6001600160a01b038216611fe65760405162461bcd60e51b81526004016113f390613018565b611ff18383836128ac565b61202e816040518060600160405280602681526020016134c0602691396001600160a01b03861660009081526020819052604090205491906120af565b6001600160a01b03808516600090815260208190526040808220939093559084168152205461205d90826122db565b6001600160a01b0380841660008181526020819052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611f8d90859061341d565b600081848411156120d35760405162461bcd60e51b81526004016113f39190612fe5565b505050900390565b6001600160a01b0382166121015760405162461bcd60e51b81526004016113f39061320e565b61210d826000836128ac565b61214a8160405180606001604052806022815260200161349e602291396001600160a01b03851660009081526020819052604090205491906120af565b6001600160a01b03831660009081526020819052604090205560025461217090826128d3565b6002556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061152790859061341d565b610db08363a9059cbb60e01b84846040516024016121d0929190612f69565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526128fb565b6002600654141561222a5760405162461bcd60e51b81526004016113f390613359565b600260065560006122396124d3565b9050612243612b9f565b61224e836000611cd8565b8152600954604051637050ccd960e01b81526001600160a01b0390911690637050ccd990612283903090600190600401612f4e565b600060405180830381600087803b15801561229d57600080fd5b505af11580156122b1573d6000803e3d6000fd5b5050600c549150600090505b81811015611d7f576122d38186858760016124dd565b6001016122bd565b600082820183811015610e3c5760405162461bcd60e51b81526004016113f39061309d565b60006001600160a01b03821615806123255750600b546001600160a01b038381169116145b15612332575060006104fe565b6104fb82611533565b6001600160a01b0382166123615760405162461bcd60e51b81526004016113f3906133e6565b61236d600083836128ac565b60025461237a90826122db565b6002556001600160a01b0382166000908152602081905260409020546123a090826122db565b6001600160a01b0383166000818152602081905260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061152790859061341d565b611c7d846323b872dd60e01b8585856040516024016121d093929190612f01565b8015806124985750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e906124469030908690600401612ee7565b60206040518083038186803b15801561245e57600080fd5b505afa158015612472573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124969190612e21565b155b6124b45760405162461bcd60e51b81526004016113f390613390565b610db08363095ea7b360e01b84846040516024016121d0929190612f69565b60006117d4610db5565b6000600c86815481106124ec57fe5b6000918252602090912060069091020180549091506001600160a01b031661251457506128a5565b80546040516370a0823160e01b81526000916001600160a01b0316906370a0823190612544903090600401612ed3565b60206040518083038186803b15801561255c57600080fd5b505afa158015612570573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125949190612e21565b905083158015906125a85750816003015481115b156125ee576125e1846125db68056bc75e2d631000006125d58660030154866128d390919063ffffffff16565b9061298a565b906129c4565b6002830180549190910190555b60005b600281101561288e57600087826002811061260857fe5b60200201516001600160a01b0316141561262157612886565b600b546001600160a01b031687826002811061263957fe5b60200201516001600160a01b0316141561265257612886565b83801561265e57508015155b1561266857612886565b600083600401600089846002811061267c57fe5b60200201516001600160a01b03166001600160a01b0316815260200190815260200160002054905084806126b35750836002015481105b156128845784156127bf57600061274761270168056bc75e2d631000006125db6126ea868a600201546128d390919063ffffffff16565b8c88600281106126f657fe5b60200201519061298a565b8660050160008c876002811061271357fe5b60200201516001600160a01b03166001600160a01b03168152602001908152602001600020546122db90919063ffffffff16565b905080156127b95760008560050160008b866002811061276357fe5b602090810291909101516001600160a01b039081168352908201929092526040016000209190915585546127ac91168a60018601600281106127a157fe5b6020020151836129f6565b6127b684826128d3565b93505b50612843565b6128076127f568056bc75e2d631000006125db6127e98589600201546128d390919063ffffffff16565b8b87600281106126f657fe5b8560050160008b866002811061271357fe5b8460050160008a856002811061281957fe5b60200201516001600160a01b03166001600160a01b03168152602001908152602001600020819055505b83600201548460040160008a856002811061285a57fe5b60200201516001600160a01b03166001600160a01b03168152602001908152602001600020819055505b505b6001016125f1565b50816003015481146128a257600382018190555b50505b5050505050565b604080518082019091526001600160a01b03808516825283166020820152610db090611c95565b6000828211156128f55760405162461bcd60e51b81526004016113f3906130d4565b50900390565b6060612950826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612a0a9092919063ffffffff16565b805190915015610db0578080602001905181019061296e9190612d4e565b610db05760405162461bcd60e51b81526004016113f39061330f565b600082612999575060006105b1565b828202828482816129a657fe5b0414610e3c5760405162461bcd60e51b81526004016113f3906131ae565b60008082116129e55760405162461bcd60e51b81526004016113f390613151565b8183816129ee57fe5b049392505050565b610db06001600160a01b03841683836121b1565b6060612a198484600085612a21565b949350505050565b606082471015612a435760405162461bcd60e51b81526004016113f39061310b565b612a4c85612ae2565b612a685760405162461bcd60e51b81526004016113f3906132d8565b60006060866001600160a01b03168587604051612a859190612e5d565b60006040518083038185875af1925050503d8060008114612ac2576040519150601f19603f3d011682016040523d82523d6000602084013e612ac7565b606091505b5091509150612ad7828286612ae8565b979650505050505050565b3b151590565b60608315612af7575081610e3c565b825115612b075782518084602001fd5b8160405162461bcd60e51b81526004016113f39190612fe5565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612b6257805160ff1916838001178555612b8f565b82800160010185558215612b8f579182015b82811115612b8f578251825591602001919060010190612b74565b50612b9b929150612bd4565b5090565b60405180604001604052806002906020820280368337509192915050565b604080518082019091526000808252602082015290565b5b80821115612b9b5760008155600101612bd5565b600060208284031215612bfa578081fd5b8135610e3c81613488565b600060208284031215612c16578081fd5b8151610e3c81613488565b60008060408385031215612c33578081fd5b8235612c3e81613488565b91506020830135612c4e81613488565b809150509250929050565b60008060008060008060c08789031215612c71578182fd5b8651612c7c81613488565b6020880151909650612c8d81613488565b6040880151909550612c9e81613488565b6060880151909450612caf81613488565b6080880151909350612cc081613488565b60a08801519092508015158114612cd5578182fd5b809150509295509295509295565b600080600060608486031215612cf7578283fd5b8335612d0281613488565b92506020840135612d1281613488565b929592945050506040919091013590565b60008060408385031215612d35578182fd5b8235612d4081613488565b946020939093013593505050565b600060208284031215612d5f578081fd5b81518015158114610e3c578182fd5b600060208284031215612d7f578081fd5b815167ffffffffffffffff80821115612d96578283fd5b818401915084601f830112612da9578283fd5b815181811115612db7578384fd5b604051601f8201601f191681016020018381118282101715612dd7578586fd5b604052818152838201602001871015612dee578485fd5b612dff82602083016020870161345c565b9695505050505050565b600060208284031215612e1a578081fd5b5035919050565b600060208284031215612e32578081fd5b5051919050565b60008060408385031215612e4b578182fd5b823591506020830135612c4e81613488565b60008251612e6f81846020870161345c565b9190910192915050565b600066029ba30b5b2b2160cd1b82528251612e9b81600785016020870161345c565b9190910160070192915050565b60006273746b60e81b82528251612ec681600385016020870161345c565b9190910160030192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b0394851681529290931660208301526040820152606081019190915260800190565b6001600160a01b039290921682521515602082015260400190565b6001600160a01b03929092168252602082015260400190565b602080825282518282018190526000919060409081850190868401855b82811015612fcd57815180516001600160a01b03168552860151868501529284019290850190600101612f9f565b5091979650505050505050565b901515815260200190565b600060208252825180602084015261300481604085016020870161345c565b601f01601f19169190910160400192915050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252600c908201526b185b1c9958591e481a5b9a5d60a21b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b60208082526005908201526410b9b2b63360d91b604082015260600190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606082015260800190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b90815260200190565b9182521515602082015260400190565b92835260208301919091521515604082015260600190565b60ff91909116815260200190565b60005b8381101561347757818101518382015260200161345f565b83811115611c7d5750506000910152565b6001600160a01b038116811461195f57600080fdfe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220aee2b0b53509bd7e46b2f1a416b44cef3756232e4c73873af32d0fb093c5195b64736f6c634300060c0033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061023c5760003560e01c806370a082311161013b578063b95c5746116100b8578063e529ee951161007c578063e529ee9514610470578063e89133b214610478578063f301af4214610480578063fe4b84df146104a3578063ff833485146104b65761023c565b8063b95c574614610427578063c00007b01461042f578063cc7d510e14610442578063dd62ed3e1461044a578063e509b9d91461045d5761023c565b8063923c1d61116100ff578063923c1d61146103e957806395d89b41146103f1578063a457c2d7146103f9578063a9059cbb1461040c578063b145a5b81461041f5761023c565b806370a08231146103a057806375a41014146103b35780637acb7757146103c65780638757b15b146103d95780638fd281dd146103e15761023c565b8063313ce567116101c95780634b8200931161018d5780634b820093146103575780634f39059c1461036a5780636a4874a1146103725780636b0916951461037a5780636e553f651461038d5761023c565b8063313ce56714610301578063372500ab14610316578063395093511461031e5780633969dfb4146103315780634b0ee02a146103445761023c565b806314d6aed01161021057806314d6aed0146102b457806318160ddd146102be57806323b872dd146102d35780632cdacb50146102e65780632e1a7d4d146102ee5761023c565b80628cc2621461024157806306fdde031461026a578063095ea7b31461027f5780630bece79c1461029f575b600080fd5b61025461024f366004612be9565b6104c9565b6040516102619190612f82565b60405180910390f35b610272610503565b6040516102619190612fe5565b61029261028d366004612d23565b610599565b6040516102619190612fda565b6102a76105b7565b6040516102619190612ed3565b6102bc6105c6565b005b6102c6610db5565b604051610261919061341d565b6102926102e1366004612ce3565b610dbb565b6102a7610e43565b6102bc6102fc366004612e09565b610e5b565b610309610f2f565b604051610261919061344e565b6102bc610f34565b61029261032c366004612d23565b611251565b6102bc61033f366004612e09565b61129f565b6102c6610352366004612be9565b611368565b610292610365366004612be9565b611373565b6102a76113a4565b6102a76113b3565b6102bc610388366004612c21565b6113cb565b6102bc61039b366004612e39565b611427565b6102c66103ae366004612be9565b611533565b6102bc6103c1366004612be9565b61154e565b6102bc6103d4366004612e39565b6115de565b6102bc6116af565b610292611747565b6102a76117d9565b6102726117f1565b610292610407366004612d23565b611852565b61029261041a366004612d23565b6118ba565b6102926118ce565b6102c66118d7565b6102bc61043d366004612be9565b6118dd565b6102a7611962565b6102c6610458366004612c21565b611971565b6102a761046b366004612be9565b61199c565b6102c66119b7565b6102a76119bd565b61049361048e366004612e09565b6119cc565b6040516102619493929190612f25565b6102bc6104b1366004612e09565b611a0f565b6102c66104c4366004612be9565b611c83565b604080518082019091526001600160a01b0382168152600060208201526060906104f290611c95565b6104fb82611dca565b90505b919050565b60108054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561058f5780601f106105645761010080835404028352916020019161058f565b820191906000526020600020905b81548152906001019060200180831161057257829003601f168201915b5050505050905090565b60006105ad6105a6611ee2565b8484611ee6565b5060015b92915050565b600b546001600160a01b031681565b600954600c546001600160a01b03909116906109e257600c604051806080016040528073d533a949740bb3306d119cc777fa900ba034cd526001600160a01b03168152602001836001600160a01b03168152602001600081526020016000815250908060018154018082558091505060019003906000526020600020906006020160009091909190915060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020155606082015181600301555050600c6040518060800160405280734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b6001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815250908060018154018082558091505060019003906000526020600020906006020160009091909190915060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550604082015181600201556060820151816003015550506000600101600d600073d533a949740bb3306d119cc777fa900ba034cd526001600160a01b03166001600160a01b031681526020019081526020016000208190555060018001600d6000734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b6001600160a01b03166001600160a01b031681526020019081526020016000208190555073d533a949740bb3306d119cc777fa900ba034cd526001600160a01b031663a9059cbb3060006040518363ffffffff1660e01b815260040161086b929190612f69565b602060405180830381600087803b15801561088557600080fd5b505af1158015610899573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108bd9190612d4e565b5060405163a9059cbb60e01b8152734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b9063a9059cbb906108f8903090600090600401612f69565b602060405180830381600087803b15801561091257600080fd5b505af1158015610926573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094a9190612d4e565b507fb13fd610fe4e1b384966826794a9b2f6100ad031f352cc5ec6f22667f607498073d533a949740bb3306d119cc777fa900ba034cd5260405161098e9190612ed3565b60405180910390a17fb13fd610fe4e1b384966826794a9b2f6100ad031f352cc5ec6f22667f6074980734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b6040516109d99190612ed3565b60405180910390a15b6000816001600160a01b031663d55a23f46040518163ffffffff1660e01b815260040160206040518083038186803b158015610a1d57600080fd5b505afa158015610a31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a559190612e21565b905060005b81811015610db057604051632061aa2360e11b81526000906001600160a01b038516906340c3544690610a9190859060040161341d565b60206040518083038186803b158015610aa957600080fd5b505afa158015610abd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae19190612c05565b90506000816001600160a01b031663f7c618c16040518163ffffffff1660e01b815260040160206040518083038186803b158015610b1e57600080fd5b505afa158015610b32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b569190612c05565b90506097600a5410610bd657806001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b9b57600080fd5b505afa158015610baf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd39190612c05565b90505b6001600160a01b038116734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b1415610c445781600c600181548110610c0a57fe5b906000526020600020906006020160010160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550610da6565b6001600160a01b0381166000908152600d6020526040902054610da657604080516080810182526001600160a01b038084168083528582166020808501918252600085870181815260608701828152600c8054600181018255818552985160069099027fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7810180549a8a166001600160a01b03199b8c1617905595517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c88701805491909916991698909817909655517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c984015593517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8ca909201919091559254908252600d90925282902055517fb13fd610fe4e1b384966826794a9b2f6100ad031f352cc5ec6f22667f607498090610d9d908390612ed3565b60405180910390a15b5050600101610a5a565b505050565b60025490565b6000610dc8848484611f9a565b610e3884610dd4611ee2565b610e33856040518060600160405280602881526020016134e6602891396001600160a01b038a16600090815260016020526040812090610e12611ee2565b6001600160a01b0316815260208101919091526040016000205491906120af565b611ee6565b5060015b9392505050565b73f403c135812408bfbe8713b5a23a04b3d48aae3181565b8015610ee857610e6b33826120db565b600954604051631c683a1b60e11b81526001600160a01b03909116906338d0743690610e9e908490600090600401613426565b600060405180830381600087803b158015610eb857600080fd5b505af1158015610ecc573d6000803e3d6000fd5b5050600854610ee892506001600160a01b0316905033836121b1565b336001600160a01b03167f2fd83d5e9f5d240bed47a97a24cf354e4047e25edc2da27b01fd95e5e8a0c9a5826000604051610f24929190613426565b60405180910390a250565b601290565b336000908152600e60205260408120546001600160a01b031615610f7057336000908152600e60205260409020546001600160a01b0316610f72565b335b6040516370a0823160e01b8152909150600090734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b906370a0823190610faf908590600401612ed3565b60206040518083038186803b158015610fc757600080fd5b505afa158015610fdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fff9190612e21565b6040516370a0823160e01b815290915060009073d533a949740bb3306d119cc777fa900ba034cd52906370a082319061103c908690600401612ed3565b60206040518083038186803b15801561105457600080fd5b505afa158015611068573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108c9190612e21565b604080518082019091523381526001600160a01b03851660208201529091506110b490612207565b6040516370a0823160e01b81528290734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b906370a08231906110ed908790600401612ed3565b60206040518083038186803b15801561110557600080fd5b505afa158015611119573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113d9190612e21565b60405191900390734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b907ffc30cddea38e2bf4d6ea7d3f9ed3b6ad7f176419f4963bd81318067a4aee73fe90600090a36040516370a0823160e01b8152819073d533a949740bb3306d119cc777fa900ba034cd52906370a08231906111b9908790600401612ed3565b60206040518083038186803b1580156111d157600080fd5b505afa1580156111e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112099190612e21565b6040519190039073d533a949740bb3306d119cc777fa900ba034cd52907ffc30cddea38e2bf4d6ea7d3f9ed3b6ad7f176419f4963bd81318067a4aee73fe90600090a3505050565b60006105ad61125e611ee2565b84610e33856001600061126f611ee2565b6001600160a01b03908116825260208083019390935260409182016000908120918c1681529252902054906122db565b801561132c576112af33826120db565b600954604051636197390160e11b81526001600160a01b039091169063c32e7202906112e2908490600090600401613426565b600060405180830381600087803b1580156112fc57600080fd5b505af1158015611310573d6000803e3d6000fd5b505060075461132c92506001600160a01b0316905033836121b1565b336001600160a01b03167f2fd83d5e9f5d240bed47a97a24cf354e4047e25edc2da27b01fd95e5e8a0c9a5826001604051610f24929190613426565b60006104fb82612300565b604080518082019091526001600160a01b03821681526000602082018190529061139c90611c95565b506001919050565b6007546001600160a01b031681565b73d533a949740bb3306d119cc777fa900ba034cd5281565b336001600160a01b038316146113fc5760405162461bcd60e51b81526004016113f3906131ef565b60405180910390fd5b604080518082019091526001600160a01b0380841682528216602082015261142390612207565b5050565b81156114e157611437818361233b565b60075461144f906001600160a01b03163330856123ef565b600a546040516321d0683360e11b815273f403c135812408bfbe8713b5a23a04b3d48aae31916343a0d0669161148d91908690600190600401613436565b602060405180830381600087803b1580156114a757600080fd5b505af11580156114bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114df9190612d4e565b505b806001600160a01b0316336001600160a01b03167fb32af138549e2a71563d1f2b1f7f0a139b3cdbc83d877d13603de1c3c5fd487a846001604051611527929190613426565b60405180910390a35050565b6001600160a01b031660009081526020819052604090205490565b600260065414156115715760405162461bcd60e51b81526004016113f390613359565b6002600655336000818152600e60205260409081902080546001600160a01b0319166001600160a01b038516179055517ff4239ad0860f93469699dd4be8040b8838c5e25bb6cf24a1dfb381b937ff078c906115ce908490612ed3565b60405180910390a2506001600655565b8115611669576115ee818361233b565b600854611606906001600160a01b03163330856123ef565b60095460405163534a7e1d60e11b81526001600160a01b039091169063a694fc3a9061163690859060040161341d565b600060405180830381600087803b15801561165057600080fd5b505af1158015611664573d6000803e3d6000fd5b505050505b806001600160a01b0316336001600160a01b03167fb32af138549e2a71563d1f2b1f7f0a139b3cdbc83d877d13603de1c3c5fd487a846000604051611527929190613426565b6007546116db906001600160a01b031673f403c135812408bfbe8713b5a23a04b3d48aae316000612410565b600754611708906001600160a01b031673f403c135812408bfbe8713b5a23a04b3d48aae31600019612410565b600954600854611726916001600160a01b0391821691166000612410565b600954600854611745916001600160a01b039182169116600019612410565b565b600a5460405163cc956f3f60e01b815260009173f403c135812408bfbe8713b5a23a04b3d48aae319163cc956f3f916117829160040161341d565b602060405180830381600087803b15801561179c57600080fd5b505af11580156117b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117d49190612d4e565b905090565b734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b81565b60118054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561058f5780601f106105645761010080835404028352916020019161058f565b60006105ad61185f611ee2565b84610e338560405180606001604052806025815260200161350e6025913960016000611889611ee2565b6001600160a01b03908116825260208083019390935260409182016000908120918d168152925290205491906120af565b60006105ad6118c7611ee2565b8484611f9a565b600f5460ff1681565b600c5490565b6001600160a01b038181166000908152600e6020526040902054161561193a576040805180820182526001600160a01b038084168083526000908152600e602090815293902054169181019190915261193590612207565b61195f565b604080518082019091526001600160a01b038216808252602082015261195f90612207565b50565b6009546001600160a01b031681565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b600e602052600090815260409020546001600160a01b031681565b600a5481565b6008546001600160a01b031681565b600c81815481106119d957fe5b600091825260209091206006909102018054600182015460028301546003909301546001600160a01b0392831694509116919084565b600f5460ff1615611a325760405162461bcd60e51b81526004016113f390613188565b604051631526fe2760e01b81526000908190819073f403c135812408bfbe8713b5a23a04b3d48aae3190631526fe2790611a7090879060040161341d565b60c06040518083038186803b158015611a8857600080fd5b505afa158015611a9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ac09190612c59565b5050600780546001600160a01b038087166001600160a01b0319928316179092556008805483871690831681179091556009805493851693909216929092179055600a899055604080516306fdde0360e01b81529051959850939650909450926306fdde03926004808201935060009291829003018186803b158015611b4557600080fd5b505afa158015611b59573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611b819190810190612d6e565b604051602001611b919190612e79565b60405160208183030381529060405260109080519060200190611bb5929190612b21565b50816001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015611bef57600080fd5b505afa158015611c03573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611c2b9190810190612d6e565b604051602001611c3b9190612ea8565b60405160208183030381529060405260119080519060200190611c5f929190612b21565b50600f805460ff19166001179055611c756105c6565b611c7d6116af565b50505050565b600d6020526000908152604090205481565b60026006541415611cb85760405162461bcd60e51b81526004016113f390613359565b60026006556000611cc76124d3565b9050611cd1612b9f565b611ce28360005b6020020151612300565b8152611cef836001611cd8565b6020820152600954604051637050ccd960e01b81526001600160a01b0390911690637050ccd990611d27903090600190600401612f4e565b600060405180830381600087803b158015611d4157600080fd5b505af1158015611d55573d6000803e3d6000fd5b5050600c549150600090505b81811015611d7f57611d778186858760006124dd565b600101611d61565b50835160208501516040517ffbb924eaf6a0dae4d734ad9fd5399b11487e7da53ec2871839b24fa30381b5ff92611db7929091612ee7565b60405180910390a1505060016006555050565b600c546060908067ffffffffffffffff81118015611de757600080fd5b50604051908082528060200260200182016040528015611e2157816020015b611e0e612bbd565b815260200190600190039081611e065790505b50915060005b81811015611edb576000600c8281548110611e3e57fe5b6000918252602090912060069091020180549091506001600160a01b0316611e665750611ed3565b6001600160a01b03851660009081526005820160205260409020548451859084908110611e8f57fe5b6020908102919091018101510152805484516001600160a01b0390911690859084908110611eb957fe5b60209081029190910101516001600160a01b039091169052505b600101611e27565b5050919050565b3390565b6001600160a01b038316611f0c5760405162461bcd60e51b81526004016113f390613294565b6001600160a01b038216611f325760405162461bcd60e51b81526004016113f39061305b565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590611f8d90859061341d565b60405180910390a3505050565b6001600160a01b038316611fc05760405162461bcd60e51b81526004016113f39061324f565b6001600160a01b038216611fe65760405162461bcd60e51b81526004016113f390613018565b611ff18383836128ac565b61202e816040518060600160405280602681526020016134c0602691396001600160a01b03861660009081526020819052604090205491906120af565b6001600160a01b03808516600090815260208190526040808220939093559084168152205461205d90826122db565b6001600160a01b0380841660008181526020819052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611f8d90859061341d565b600081848411156120d35760405162461bcd60e51b81526004016113f39190612fe5565b505050900390565b6001600160a01b0382166121015760405162461bcd60e51b81526004016113f39061320e565b61210d826000836128ac565b61214a8160405180606001604052806022815260200161349e602291396001600160a01b03851660009081526020819052604090205491906120af565b6001600160a01b03831660009081526020819052604090205560025461217090826128d3565b6002556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061152790859061341d565b610db08363a9059cbb60e01b84846040516024016121d0929190612f69565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526128fb565b6002600654141561222a5760405162461bcd60e51b81526004016113f390613359565b600260065560006122396124d3565b9050612243612b9f565b61224e836000611cd8565b8152600954604051637050ccd960e01b81526001600160a01b0390911690637050ccd990612283903090600190600401612f4e565b600060405180830381600087803b15801561229d57600080fd5b505af11580156122b1573d6000803e3d6000fd5b5050600c549150600090505b81811015611d7f576122d38186858760016124dd565b6001016122bd565b600082820183811015610e3c5760405162461bcd60e51b81526004016113f39061309d565b60006001600160a01b03821615806123255750600b546001600160a01b038381169116145b15612332575060006104fe565b6104fb82611533565b6001600160a01b0382166123615760405162461bcd60e51b81526004016113f3906133e6565b61236d600083836128ac565b60025461237a90826122db565b6002556001600160a01b0382166000908152602081905260409020546123a090826122db565b6001600160a01b0383166000818152602081905260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061152790859061341d565b611c7d846323b872dd60e01b8585856040516024016121d093929190612f01565b8015806124985750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e906124469030908690600401612ee7565b60206040518083038186803b15801561245e57600080fd5b505afa158015612472573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124969190612e21565b155b6124b45760405162461bcd60e51b81526004016113f390613390565b610db08363095ea7b360e01b84846040516024016121d0929190612f69565b60006117d4610db5565b6000600c86815481106124ec57fe5b6000918252602090912060069091020180549091506001600160a01b031661251457506128a5565b80546040516370a0823160e01b81526000916001600160a01b0316906370a0823190612544903090600401612ed3565b60206040518083038186803b15801561255c57600080fd5b505afa158015612570573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125949190612e21565b905083158015906125a85750816003015481115b156125ee576125e1846125db68056bc75e2d631000006125d58660030154866128d390919063ffffffff16565b9061298a565b906129c4565b6002830180549190910190555b60005b600281101561288e57600087826002811061260857fe5b60200201516001600160a01b0316141561262157612886565b600b546001600160a01b031687826002811061263957fe5b60200201516001600160a01b0316141561265257612886565b83801561265e57508015155b1561266857612886565b600083600401600089846002811061267c57fe5b60200201516001600160a01b03166001600160a01b0316815260200190815260200160002054905084806126b35750836002015481105b156128845784156127bf57600061274761270168056bc75e2d631000006125db6126ea868a600201546128d390919063ffffffff16565b8c88600281106126f657fe5b60200201519061298a565b8660050160008c876002811061271357fe5b60200201516001600160a01b03166001600160a01b03168152602001908152602001600020546122db90919063ffffffff16565b905080156127b95760008560050160008b866002811061276357fe5b602090810291909101516001600160a01b039081168352908201929092526040016000209190915585546127ac91168a60018601600281106127a157fe5b6020020151836129f6565b6127b684826128d3565b93505b50612843565b6128076127f568056bc75e2d631000006125db6127e98589600201546128d390919063ffffffff16565b8b87600281106126f657fe5b8560050160008b866002811061271357fe5b8460050160008a856002811061281957fe5b60200201516001600160a01b03166001600160a01b03168152602001908152602001600020819055505b83600201548460040160008a856002811061285a57fe5b60200201516001600160a01b03166001600160a01b03168152602001908152602001600020819055505b505b6001016125f1565b50816003015481146128a257600382018190555b50505b5050505050565b604080518082019091526001600160a01b03808516825283166020820152610db090611c95565b6000828211156128f55760405162461bcd60e51b81526004016113f3906130d4565b50900390565b6060612950826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612a0a9092919063ffffffff16565b805190915015610db0578080602001905181019061296e9190612d4e565b610db05760405162461bcd60e51b81526004016113f39061330f565b600082612999575060006105b1565b828202828482816129a657fe5b0414610e3c5760405162461bcd60e51b81526004016113f3906131ae565b60008082116129e55760405162461bcd60e51b81526004016113f390613151565b8183816129ee57fe5b049392505050565b610db06001600160a01b03841683836121b1565b6060612a198484600085612a21565b949350505050565b606082471015612a435760405162461bcd60e51b81526004016113f39061310b565b612a4c85612ae2565b612a685760405162461bcd60e51b81526004016113f3906132d8565b60006060866001600160a01b03168587604051612a859190612e5d565b60006040518083038185875af1925050503d8060008114612ac2576040519150601f19603f3d011682016040523d82523d6000602084013e612ac7565b606091505b5091509150612ad7828286612ae8565b979650505050505050565b3b151590565b60608315612af7575081610e3c565b825115612b075782518084602001fd5b8160405162461bcd60e51b81526004016113f39190612fe5565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612b6257805160ff1916838001178555612b8f565b82800160010185558215612b8f579182015b82811115612b8f578251825591602001919060010190612b74565b50612b9b929150612bd4565b5090565b60405180604001604052806002906020820280368337509192915050565b604080518082019091526000808252602082015290565b5b80821115612b9b5760008155600101612bd5565b600060208284031215612bfa578081fd5b8135610e3c81613488565b600060208284031215612c16578081fd5b8151610e3c81613488565b60008060408385031215612c33578081fd5b8235612c3e81613488565b91506020830135612c4e81613488565b809150509250929050565b60008060008060008060c08789031215612c71578182fd5b8651612c7c81613488565b6020880151909650612c8d81613488565b6040880151909550612c9e81613488565b6060880151909450612caf81613488565b6080880151909350612cc081613488565b60a08801519092508015158114612cd5578182fd5b809150509295509295509295565b600080600060608486031215612cf7578283fd5b8335612d0281613488565b92506020840135612d1281613488565b929592945050506040919091013590565b60008060408385031215612d35578182fd5b8235612d4081613488565b946020939093013593505050565b600060208284031215612d5f578081fd5b81518015158114610e3c578182fd5b600060208284031215612d7f578081fd5b815167ffffffffffffffff80821115612d96578283fd5b818401915084601f830112612da9578283fd5b815181811115612db7578384fd5b604051601f8201601f191681016020018381118282101715612dd7578586fd5b604052818152838201602001871015612dee578485fd5b612dff82602083016020870161345c565b9695505050505050565b600060208284031215612e1a578081fd5b5035919050565b600060208284031215612e32578081fd5b5051919050565b60008060408385031215612e4b578182fd5b823591506020830135612c4e81613488565b60008251612e6f81846020870161345c565b9190910192915050565b600066029ba30b5b2b2160cd1b82528251612e9b81600785016020870161345c565b9190910160070192915050565b60006273746b60e81b82528251612ec681600385016020870161345c565b9190910160030192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b0394851681529290931660208301526040820152606081019190915260800190565b6001600160a01b039290921682521515602082015260400190565b6001600160a01b03929092168252602082015260400190565b602080825282518282018190526000919060409081850190868401855b82811015612fcd57815180516001600160a01b03168552860151868501529284019290850190600101612f9f565b5091979650505050505050565b901515815260200190565b600060208252825180602084015261300481604085016020870161345c565b601f01601f19169190910160400192915050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252600c908201526b185b1c9958591e481a5b9a5d60a21b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b60208082526005908201526410b9b2b63360d91b604082015260600190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606082015260800190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b90815260200190565b9182521515602082015260400190565b92835260208301919091521515604082015260600190565b60ff91909116815260200190565b60005b8381101561347757818101518382015260200161345f565b83811115611c7d5750506000910152565b6001600160a01b038116811461195f57600080fdfe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220aee2b0b53509bd7e46b2f1a416b44cef3756232e4c73873af32d0fb093c5195b64736f6c634300060c0033
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.