Source Code
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 5953780 | 588 days ago | Contract Creation | 0 FRAX |
Cross-Chain Transactions
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
ExtraRewardStashV3
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;
import "./Interfaces.sol";
import "./interfaces/IRewardHook.sol";
import "./StashToken.sol";
import "@openzeppelin/contracts-0.6/math/SafeMath.sol";
import "@openzeppelin/contracts-0.6/proxy/Clones.sol";
import "@openzeppelin/contracts-0.6/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts-0.6/utils/Address.sol";
import "@openzeppelin/contracts-0.6/token/ERC20/SafeERC20.sol";
/**
* @title ExtraRewardStashV3
* @author ConvexFinance -> AuraFinance
* @notice ExtraRewardStash for pools added to the Booster to handle extra rewards
* that aren't CRV that can be claimed from a gauge.
* - v3.0: Support for curve gauge reward redirect
* The Booster contract has a function called setGaugeRedirect. This function calls set_rewards_receiver
* On the Curve Guage. This tells the Gauge where to send rewards. The Booster crafts the calldata for this
* transaction and then calls execute on the VoterProxy which executes this transaction on the Curve Gauge
* - v3.1: Support for arbitrary token rewards outside of gauge rewards add
* reward hook to pull rewards during claims
* - v3.2: Move constuctor to init function for proxy creation
*/
contract ExtraRewardStashV3 {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
address public immutable crv;
uint256 private constant maxRewards = 8;
uint256 public pid;
address public operator;
address public staker;
address public gauge;
address public rewardFactory;
address public stashTokenImplementation;
mapping(address => uint256) public historicalRewards;
bool public hasRedirected;
bool public hasCurveRewards;
struct TokenInfo {
address token;
address rewardAddress;
address stashToken;
}
//use mapping+array so that we dont have to loop check each time setToken is called
mapping(address => TokenInfo) public tokenInfo;
address[] public tokenList;
//address to call for reward pulls
address public rewardHook;
/**
* @param _crv CRV token address
*/
constructor(address _crv) public {
crv = _crv;
}
/**
* @param _pid Pool ID
* @param _operator Operator (Booster)
* @param _staker Staker (VoterProxy)
* @param _gauge Gauge
* @param _rFactory Reward factory
*/
function initialize(uint256 _pid, address _operator, address _staker, address _gauge, address _rFactory) external {
require(gauge == address(0),"!init");
pid = _pid;
operator = _operator;
staker = _staker;
gauge = _gauge;
rewardFactory = _rFactory;
stashTokenImplementation = address(new StashToken(address(this)));
}
function getName() external pure returns (string memory) {
return "ExtraRewardStashV3.2";
}
function tokenCount() external view returns (uint256){
return tokenList.length;
}
/**
* @notice Claim rewards from the gauge
* @dev The Stash's claimRewards function calls claimRewards on the Booster contract
* which calls claimRewards on the VoterProxy which calls claim_rewards on the gauge
* If a RewardHook is set onRewardClaim is also called on that
* Called by Booster earmarkRewards
* Guage rewards are sent directly to this stash even though the Curve method claim_rewards
* is being called by the VoterProxy. This is because Curves guages have the ability to redirect
* rewards to somewhere other than msg.sender. This is setup in Booster setGaugeRedirect
*/
function claimRewards() external returns (bool) {
require(msg.sender == operator, "!operator");
//this is updateable from v2 gauges now so must check each time.
checkForNewRewardTokens();
//make sure we're redirected
if(!hasRedirected){
IDeposit(operator).setGaugeRedirect(pid);
hasRedirected = true;
}
if(hasCurveRewards){
//claim rewards on gauge for staker
//using reward_receiver so all rewards will be moved to this stash
IDeposit(operator).claimRewards(pid,gauge);
}
//hook for reward pulls
if(rewardHook != address(0)){
try IRewardHook(rewardHook).onRewardClaim(){
}catch{}
}
return true;
}
//check if gauge rewards have changed
function checkForNewRewardTokens() internal {
for(uint256 i = 0; i < maxRewards; i++){
address token = ICurveGauge(gauge).reward_tokens(i);
if (token == address(0)) {
break;
}
if(!hasCurveRewards){
hasCurveRewards = true;
}
setToken(token);
}
}
//register an extra reward token to be handled
// (any new incentive that is not directly on curve gauges)
function setExtraReward(address _token) external{
//owner of booster can set extra rewards
require(IDeposit(operator).owner() == msg.sender, "!owner");
require(tokenList.length < 4, "too many rewards");
setToken(_token);
}
function setRewardHook(address _hook) external{
//owner of booster can set reward hook
require(IDeposit(operator).owner() == msg.sender, "!owner");
rewardHook = _hook;
}
/**
* @notice Add a reward token to the token list so it can be claimed
* @dev For each token that is added as a claimable reward a VirtualRewardsPool
* is deployed to handle virtual distribution of tokens
*/
function setToken(address _token) internal {
TokenInfo storage t = tokenInfo[_token];
if(t.token == address(0) && _token != crv){
//set token address
t.token = _token;
StashToken stashToken = StashToken(Clones.clone(stashTokenImplementation));
// we only want to add rewards that are not CRV
//create new reward contract (for NON-crv tokens only)
(,,,address mainRewardContract,,) = IDeposit(operator).poolInfo(pid);
address rewardContract = IRewardFactory(rewardFactory).CreateTokenRewards(
address(stashToken),
mainRewardContract,
address(this));
stashToken.init(operator, rewardContract, _token);
t.rewardAddress = rewardContract;
t.stashToken = address(stashToken);
//add token to list of known rewards
tokenList.push(_token);
}
}
//pull assigned tokens from staker to stash
function stashRewards() external pure returns(bool){
//after depositing/withdrawing, extra incentive tokens are claimed
//but from v3 this is default to off, and this stash is the reward receiver too.
return true;
}
/**
* @notice Distribute rewards
* @dev Send all extra token rewards to the rewardContract VirtualRewardsPool
* Called by Booster earmarkRewards
*/
function processStash() external returns(bool){
require(msg.sender == operator, "!operator");
uint256 tCount = tokenList.length;
for(uint i=0; i < tCount; i++){
TokenInfo storage t = tokenInfo[tokenList[i]];
address token = t.token;
if(token == address(0)) continue;
if(!StashToken(t.stashToken).isValid()) continue;
uint256 amount = IERC20(token).balanceOf(address(this));
if (amount > 0) {
historicalRewards[token] = historicalRewards[token].add(amount);
//add to reward contract
address rewards = t.rewardAddress;
if(rewards == address(0)) continue;
address stashToken = t.stashToken;
IERC20(token).safeApprove(stashToken, 0);
IERC20(token).safeApprove(stashToken, amount);
StashToken(stashToken).mint(amount);
IRewards(rewards).queueNewRewards(amount);
}
}
return true;
}
}// 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;
/**
* @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for
* deploying minimal proxy contracts, also known as "clones".
*
* > To simply and cheaply clone contract functionality in an immutable way, this standard specifies
* > a minimal bytecode implementation that delegates all calls to a known, fixed address.
*
* The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`
* (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the
* deterministic method.
*
* _Available since v3.4._
*/
library Clones {
/**
* @dev Deploys and returns the address of a clone that mimics the behaviour of `master`.
*
* This function uses the create opcode, which should never revert.
*/
function clone(address master) internal returns (address instance) {
// solhint-disable-next-line no-inline-assembly
assembly {
let ptr := mload(0x40)
mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
mstore(add(ptr, 0x14), shl(0x60, master))
mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)
instance := create(0, ptr, 0x37)
}
require(instance != address(0), "ERC1167: create failed");
}
/**
* @dev Deploys and returns the address of a clone that mimics the behaviour of `master`.
*
* This function uses the create2 opcode and a `salt` to deterministically deploy
* the clone. Using the same `master` and `salt` multiple time will revert, since
* the clones cannot be deployed twice at the same address.
*/
function cloneDeterministic(address master, bytes32 salt) internal returns (address instance) {
// solhint-disable-next-line no-inline-assembly
assembly {
let ptr := mload(0x40)
mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
mstore(add(ptr, 0x14), shl(0x60, master))
mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)
instance := create2(0, ptr, 0x37, salt)
}
require(instance != address(0), "ERC1167: create2 failed");
}
/**
* @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
*/
function predictDeterministicAddress(address master, bytes32 salt, address deployer) internal pure returns (address predicted) {
// solhint-disable-next-line no-inline-assembly
assembly {
let ptr := mload(0x40)
mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
mstore(add(ptr, 0x14), shl(0x60, master))
mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf3ff00000000000000000000000000000000)
mstore(add(ptr, 0x38), shl(0x60, deployer))
mstore(add(ptr, 0x4c), salt)
mstore(add(ptr, 0x6c), keccak256(ptr, 0x37))
predicted := keccak256(add(ptr, 0x37), 0x55)
}
}
/**
* @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
*/
function predictDeterministicAddress(address master, bytes32 salt) internal view returns (address predicted) {
return predictDeterministicAddress(master, salt, address(this));
}
}// 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
// solhint-disable-next-line compiler-version
pragma solidity >=0.4.24 <0.8.0;
import "../utils/AddressUpgradeable.sol";
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*/
abstract contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
*/
bool private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Modifier to protect an initializer function from being invoked twice.
*/
modifier initializer() {
require(_initializing || _isConstructor() || !_initialized, "Initializable: contract is already initialized");
bool isTopLevelCall = !_initializing;
if (isTopLevelCall) {
_initializing = true;
_initialized = true;
}
_;
if (isTopLevelCall) {
_initializing = false;
}
}
/// @dev Returns true if and only if the function is running in the constructor
function _isConstructor() private view returns (bool) {
return !AddressUpgradeable.isContract(address(this));
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.2 <0.8.0;
/**
* @dev Collection of functions related to the address type
*/
library AddressUpgradeable {
/**
* @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);
}
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;
import "../proxy/Initializable.sol";
/**
* @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 ReentrancyGuardUpgradeable is Initializable {
// 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;
function __ReentrancyGuard_init() internal initializer {
__ReentrancyGuard_init_unchained();
}
function __ReentrancyGuard_init_unchained() internal initializer {
_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;
}
uint256[49] private __gap;
}// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
interface ICurveGauge {
function deposit(uint256) external;
function balanceOf(address) external view returns (uint256);
function withdraw(uint256) external;
function claim_rewards() external;
function reward_tokens(uint256) external view returns(address);//v2
function rewarded_token() external view returns(address);//v1
function lp_token() external view returns(address);
}
interface ICurveVoteEscrow {
function create_lock(uint256, uint256) external;
function increase_amount(uint256) external;
function increase_unlock_time(uint256) external;
function withdraw() external;
function smart_wallet_checker() external view returns (address);
function commit_smart_wallet_checker(address) external;
function apply_smart_wallet_checker() external;
}
interface IWalletChecker {
function check(address) external view returns (bool);
function approveWallet(address) external;
function dao() external view returns (address);
}
interface IVoting{
function vote(uint256, bool, bool) external; //voteId, support, executeIfDecided
function getVote(uint256) external view returns(bool,bool,uint64,uint64,uint64,uint64,uint256,uint256,uint256,bytes memory);
function vote_for_gauge_weights(address,uint256) external;
}
interface IMinter{
function mint(address) external;
}
interface IStaker{
function deposit(address, address) external returns (bool);
function withdraw(address) external returns (uint256);
function withdraw(address, address, uint256) external returns (bool);
function withdrawAll(address, address) external returns (bool);
function createLock(uint256, uint256) external returns(bool);
function increaseAmount(uint256) external returns(bool);
function increaseTime(uint256) external returns(bool);
function release() external returns(bool);
function claimCrv(address) external returns (uint256);
function claimRewards(address) external returns(bool);
function claimFees(address,address) external returns (uint256);
function setStashAccess(address, bool) external returns (bool);
function vote(uint256,address,bool) external returns(bool);
function voteGaugeWeight(address,uint256) external returns(bool);
function balanceOfPool(address) external view returns (uint256);
function operator() external view returns (address);
function execute(address _to, uint256 _value, bytes calldata _data) external returns (bool, bytes memory);
function setVote(bytes32 hash, bool valid) external;
function migrate(address to) external;
}
interface IRewards{
function stake(address, uint256) external;
function stakeFor(address, uint256) external;
function withdraw(address, uint256) external;
function exit(address) external;
function getReward(address) external;
function queueNewRewards(uint256) external;
function notifyRewardAmount(uint256) external;
function addExtraReward(address) external;
function extraRewardsLength() external view returns (uint256);
function stakingToken() external view returns (address);
function rewardToken() external view returns(address);
function earned(address account) external view returns (uint256);
}
interface IStash{
function stashRewards() external returns (bool);
function processStash() external returns (bool);
function claimRewards() external returns (bool);
function initialize(uint256 _pid, address _operator, address _staker, address _gauge, address _rewardFactory) external;
function setExtraReward(address) external;
}
interface IFeeDistributor {
function claimToken(address user, address token) external returns (uint256);
function claimTokens(address user, address[] calldata tokens) external returns (uint256[] memory);
function getTokenTimeCursor(address token) external view returns (uint256);
}
interface ITokenMinter{
function mint(address,uint256) external;
function burn(address,uint256) external;
}
interface IDeposit{
function isShutdown() external view returns(bool);
function balanceOf(address _account) external view returns(uint256);
function totalSupply() external view returns(uint256);
function poolInfo(uint256) external view returns(address,address,address,address,address, bool);
function rewardClaimed(uint256,address,uint256) external;
function withdrawTo(uint256,uint256,address) external;
function claimRewards(uint256,address) external returns(bool);
function rewardArbitrator() external returns(address);
function setGaugeRedirect(uint256 _pid) external returns(bool);
function owner() external returns(address);
function deposit(uint256 _pid, uint256 _amount, bool _stake) external returns(bool);
}
interface ICrvDeposit{
function deposit(uint256, bool) external;
function lockIncentive() external view returns(uint256);
}
interface IRewardFactory{
function setAccess(address,bool) external;
function CreateCrvRewards(uint256,address,address) external returns(address);
function CreateTokenRewards(address,address,address) external returns(address);
function activeRewardCount(address) external view returns(uint256);
function addActiveReward(address,uint256) external returns(bool);
function removeActiveReward(address,uint256) external returns(bool);
}
interface IStashFactory{
function CreateStash(uint256,address,address,uint256) external returns(address);
function setImplementation(address, address, address) external;
}
interface ITokenFactory{
function CreateDepositToken(address) external returns(address);
}
interface IPools{
function addPool(address _lptoken, address _gauge, uint256 _stashVersion) external returns(bool);
function forceAddPool(address _lptoken, address _gauge, uint256 _stashVersion) external returns(bool);
function shutdownPool(uint256 _pid) external returns(bool);
function poolInfo(uint256) external view returns(address,address,address,address,address,bool);
function poolLength() external view returns (uint256);
function gaugeMap(address) external view returns(bool);
function setPoolManager(address _poolM) external;
function shutdownSystem() external;
function setUsedAddress(address[] memory) external;
}
interface IVestedEscrow{
function fund(address[] calldata _recipient, uint256[] calldata _amount) external returns(bool);
}
interface IRewardDeposit {
function addReward(address, uint256) external;
}// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
interface IRewardHook {
function onRewardClaim() external;
}// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "./Interfaces.sol";
import "@openzeppelin/contracts-0.6/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts-0.6/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts-0.6/math/SafeMath.sol";
import "@openzeppelin/contracts-upgradeable-0.6/utils/ReentrancyGuardUpgradeable.sol";
interface IERC20Metadata {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
}
contract StashToken is ReentrancyGuardUpgradeable {
using SafeERC20 for IERC20;
using SafeMath for uint256;
uint256 public constant MAX_TOTAL_SUPPLY = 1e38;
address public immutable stash;
address public operator;
address public rewardPool;
address public baseToken;
bool public isValid;
bool public isImplementation;
uint256 internal _totalSupply;
constructor(address _stash) public {
stash = _stash;
isImplementation = true;
}
function init(
address _operator,
address _rewardPool,
address _baseToken
) external initializer {
require(!isImplementation, "isImplementation");
__ReentrancyGuard_init();
operator = _operator;
rewardPool = _rewardPool;
baseToken = _baseToken;
isValid = true;
}
function name() external view returns (string memory) {
return string(abi.encodePacked("Stash Token ", IERC20Metadata(baseToken).name()));
}
function symbol() external view returns (string memory) {
return string(abi.encodePacked("STASH-", IERC20Metadata(baseToken).symbol()));
}
function setIsValid(bool _isValid) external {
require(msg.sender == IDeposit(operator).owner(), "!owner");
isValid = _isValid;
}
function totalSupply() public view returns (uint256) {
return _totalSupply;
}
function mint(uint256 _amount) external nonReentrant {
require(msg.sender == stash, "!stash");
require(_totalSupply.add(_amount) < MAX_TOTAL_SUPPLY, "totalSupply exceeded");
_totalSupply = _totalSupply.add(_amount);
IERC20(baseToken).safeTransferFrom(msg.sender, address(this), _amount);
}
function transfer(address _to, uint256 _amount) public nonReentrant returns (bool) {
require(msg.sender == rewardPool, "!rewardPool");
require(_totalSupply >= _amount, "amount>totalSupply");
_totalSupply = _totalSupply.sub(_amount);
IERC20(baseToken).safeTransfer(_to, _amount);
return true;
}
}{
"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":[{"internalType":"address","name":"_crv","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"claimRewards","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"crv","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gauge","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"hasCurveRewards","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hasRedirected","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"historicalRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_operator","type":"address"},{"internalType":"address","name":"_staker","type":"address"},{"internalType":"address","name":"_gauge","type":"address"},{"internalType":"address","name":"_rFactory","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"processStash","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardFactory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardHook","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"setExtraReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_hook","type":"address"}],"name":"setRewardHook","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"staker","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stashRewards","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"stashTokenImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenInfo","outputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"rewardAddress","type":"address"},{"internalType":"address","name":"stashToken","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenList","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60a060405234801561001057600080fd5b5060405161280f38038061280f8339818101604052602081101561003357600080fd5b5051606081901b6001600160601b0319166080526001600160a01b03166127a361006c6000398061090a5280610cea52506127a36000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c80635ebaf1db116100b8578063a6f19c841161007c578063a6f19c84146102fa578063b87bd48114610302578063ca8b01761461030a578063cb00aa7314610312578063f106845414610338578063f5dab7111461034057610137565b80635ebaf1db146102ab57806362119bff146102b35780636a4874a1146102bb5780639ead7222146102c35780639f181b5e146102e057610137565b8063372500ab116100ff578063372500ab1461026f57806344214ecf1461028b578063480f592414610293578063570ca7351461029b5780635afffef1146102a357610137565b80630d5225de1461013c57806317d7de7c146101645780632223686f146101e1578063245e4bf0146102075780633641e0831461022b575b600080fd5b6101626004803603602081101561015257600080fd5b50356001600160a01b0316610391565b005b61016c610469565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101a657818101518382015260200161018e565b50505050905090810190601f1680156101d35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610162600480360360208110156101f757600080fd5b50356001600160a01b0316610497565b61020f6105a3565b604080516001600160a01b039092168252519081900360200190f35b610162600480360360a081101561024157600080fd5b508035906001600160a01b0360208201358116916040810135821691606082013581169160800135166105b2565b6102776106aa565b604080519115158252519081900360200190f35b61020f6108b5565b6102776108c4565b61020f6108d2565b6102776108e1565b61020f6108ea565b61020f6108f9565b61020f610908565b61020f600480360360208110156102d957600080fd5b503561092c565b6102e8610953565b60408051918252519081900360200190f35b61020f610959565b610277610968565b61027761096d565b6102e86004803603602081101561032857600080fd5b50356001600160a01b0316610c7c565b6102e8610c8e565b6103666004803603602081101561035657600080fd5b50356001600160a01b0316610c94565b604080516001600160a01b039485168152928416602084015292168183015290519081900360600190f35b60015460408051638da5cb5b60e01b8152905133926001600160a01b031691638da5cb5b9160048083019260209291908290030181600087803b1580156103d757600080fd5b505af11580156103eb573d6000803e3d6000fd5b505050506040513d602081101561040157600080fd5b50516001600160a01b031614610447576040805162461bcd60e51b815260206004820152600660248201526510b7bbb732b960d11b604482015290519081900360640190fd5b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b60408051808201909152601481527322bc3a3930a932bbb0b93229ba30b9b42b19971960611b602082015290565b60015460408051638da5cb5b60e01b8152905133926001600160a01b031691638da5cb5b9160048083019260209291908290030181600087803b1580156104dd57600080fd5b505af11580156104f1573d6000803e3d6000fd5b505050506040513d602081101561050757600080fd5b50516001600160a01b03161461054d576040805162461bcd60e51b815260206004820152600660248201526510b7bbb732b960d11b604482015290519081900360640190fd5b600954600411610597576040805162461bcd60e51b815260206004820152601060248201526f746f6f206d616e79207265776172647360801b604482015290519081900360640190fd5b6105a081610cc2565b50565b6004546001600160a01b031681565b6003546001600160a01b0316156105f8576040805162461bcd60e51b8152602060048201526005602482015264085a5b9a5d60da1b604482015290519081900360640190fd5b6000859055600180546001600160a01b038087166001600160a01b03199283161790925560028054868416908316179055600380548584169083161790556004805492841692909116919091179055604051309061065590611512565b6001600160a01b03909116815260405190819003602001906000f080158015610682573d6000803e3d6000fd5b50600580546001600160a01b0319166001600160a01b03929092169190911790555050505050565b6001546000906001600160a01b031633146106f8576040805162461bcd60e51b815260206004820152600960248201526810b7b832b930ba37b960b91b604482015290519081900360640190fd5b610700610f5e565b60075460ff166107a157600160009054906101000a90046001600160a01b03166001600160a01b0316639123d4046000546040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b15801561076757600080fd5b505af115801561077b573d6000803e3d6000fd5b505050506040513d602081101561079157600080fd5b50506007805460ff191660011790555b600754610100900460ff161561083b576001546000805460035460408051636c7b69cb60e01b815260048101939093526001600160a01b03918216602484015251931692636c7b69cb92604480840193602093929083900390910190829087803b15801561080e57600080fd5b505af1158015610822573d6000803e3d6000fd5b505050506040513d602081101561083857600080fd5b50505b600a546001600160a01b0316156108af57600a60009054906101000a90046001600160a01b03166001600160a01b0316632663fcfc6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561089c57600080fd5b505af19250505080156108ad575060015b505b50600190565b600a546001600160a01b031681565b600754610100900460ff1681565b6001546001600160a01b031681565b60075460ff1681565b6002546001600160a01b031681565b6005546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b6009818154811061093957fe5b6000918252602090912001546001600160a01b0316905081565b60095490565b6003546001600160a01b031681565b600190565b6001546000906001600160a01b031633146109bb576040805162461bcd60e51b815260206004820152600960248201526810b7b832b930ba37b960b91b604482015290519081900360640190fd5b60095460005b81811015610c7357600060086000600984815481106109dc57fe5b60009182526020808320909101546001600160a01b039081168452908301939093526040909101902080549092501680610a17575050610c6b565b8160020160009054906101000a90046001600160a01b03166001600160a01b031663bb5d40eb6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a6757600080fd5b505afa158015610a7b573d6000803e3d6000fd5b505050506040513d6020811015610a9157600080fd5b5051610a9e575050610c6b565b6000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610aed57600080fd5b505afa158015610b01573d6000803e3d6000fd5b505050506040513d6020811015610b1757600080fd5b505190508015610c67576001600160a01b038216600090815260066020526040902054610b449082611029565b6001600160a01b0380841660009081526006602052604090209190915560018401541680610b755750505050610c6b565b60028401546001600160a01b0390811690610b9490851682600061108a565b610ba86001600160a01b038516828561108a565b806001600160a01b031663a0712d68846040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015610bee57600080fd5b505af1158015610c02573d6000803e3d6000fd5b50505050816001600160a01b031663590a41f5846040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015610c4c57600080fd5b505af1158015610c60573d6000803e3d6000fd5b5050505050505b5050505b6001016109c1565b50600191505090565b60066020526000908152604090205481565b60005481565b6008602052600090815260409020805460018201546002909201546001600160a01b03918216928216911683565b6001600160a01b0380821660009081526008602052604090208054909116158015610d1f57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614155b15610f5a5780546001600160a01b0319166001600160a01b03838116919091178255600554600091610d5191166111a2565b90506000600160009054906101000a90046001600160a01b03166001600160a01b0316631526fe276000546040518263ffffffff1660e01b81526004018082815260200191505060c06040518083038186803b158015610db057600080fd5b505afa158015610dc4573d6000803e3d6000fd5b505050506040513d60c0811015610dda57600080fd5b50606001516004805460408051637c6b091760e11b81526001600160a01b038781169482019490945283851660248201523060448201529051939450600093929091169163f8d6122e9160648082019260209290919082900301818787803b158015610e4557600080fd5b505af1158015610e59573d6000803e3d6000fd5b505050506040513d6020811015610e6f57600080fd5b50516001546040805163184b955960e01b81526001600160a01b0392831660048201528284166024820152888316604482015290519293509085169163184b95599160648082019260009290919082900301818387803b158015610ed257600080fd5b505af1158015610ee6573d6000803e3d6000fd5b50505050600184810180546001600160a01b03199081166001600160a01b03948516179091556002860180548216958416959095179094556009805491820181556000527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af01805490931690851617909155505b5050565b60005b60088110156105a057600354604080516354c49fe960e01b81526004810184905290516000926001600160a01b0316916354c49fe9916024808301926020929190829003018186803b158015610fb657600080fd5b505afa158015610fca573d6000803e3d6000fd5b505050506040513d6020811015610fe057600080fd5b505190506001600160a01b038116610ff857506105a0565b600754610100900460ff16611017576007805461ff0019166101001790555b61102081610cc2565b50600101610f61565b600082820183811015611083576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b801580611110575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b1580156110e257600080fd5b505afa1580156110f6573d6000803e3d6000fd5b505050506040513d602081101561110c57600080fd5b5051155b61114b5760405162461bcd60e51b81526004018080602001828103825260368152602001806127386036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b17905261119d908490611244565b505050565b6000604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528260601b60148201526e5af43d82803e903d91602b57fd5bf360881b60288201526037816000f09150506001600160a01b03811661123f576040805162461bcd60e51b8152602060048201526016602482015275115490cc4c4d8dce8818dc99585d194819985a5b195960521b604482015290519081900360640190fd5b919050565b6060611299826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166112f59092919063ffffffff16565b80519091501561119d578080602001905160208110156112b857600080fd5b505161119d5760405162461bcd60e51b815260040180806020018281038252602a81526020018061270e602a913960400191505060405180910390fd5b6060611304848460008561130c565b949350505050565b60608247101561134d5760405162461bcd60e51b81526004018080602001828103825260268152602001806126e86026913960400191505060405180910390fd5b61135685611468565b6113a7576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106113e65780518252601f1990920191602091820191016113c7565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611448576040519150601f19603f3d011682016040523d82523d6000602084013e61144d565b606091505b509150915061145d82828661146e565b979650505050505050565b3b151590565b6060831561147d575081611083565b82511561148d5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156114d75781810151838201526020016114bf565b50505050905090810190601f1680156115045780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6111c8806115208339019056fe60a060405234801561001057600080fd5b506040516111c83803806111c88339818101604052602081101561003357600080fd5b50516001600160601b0319606082901b166080526035805460ff60a81b1916600160a81b1790556001600160a01b031661114961007f600039806108985280610ad652506111496000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806366666aa91161008c578063a9059cbb11610066578063a9059cbb14610254578063bb5d40eb14610280578063c55dae6314610288578063d8da813114610290576100ea565b806366666aa91461022757806395d89b411461022f578063a0712d6814610237576100ea565b8063184b9559116100c8578063184b9559146101a757806333039d3d146101df578063570ca735146101e757806360a49b331461020b576100ea565b806306fdde03146100ef57806317c136771461016c57806318160ddd1461018d575b600080fd5b6100f7610298565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610131578181015183820152602001610119565b50505050905090810190601f16801561015e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61018b6004803603602081101561018257600080fd5b5035151561044c565b005b61019561052b565b60408051918252519081900360200190f35b61018b600480360360608110156101bd57600080fd5b506001600160a01b038135811691602081013582169160409091013516610531565b61019561067a565b6101ef61068e565b604080516001600160a01b039092168252519081900360200190f35b61021361069d565b604080519115158252519081900360200190f35b6101ef6106ad565b6100f76106bc565b61018b6004803603602081101561024d57600080fd5b5035610830565b6102136004803603604081101561026a57600080fd5b506001600160a01b03813516906020013561098a565b610213610ab5565b6101ef610ac5565b6101ef610ad4565b603554604080516306fdde0360e01b815290516060926001600160a01b0316916306fdde03916004808301926000929190829003018186803b1580156102dd57600080fd5b505afa1580156102f1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561031a57600080fd5b810190808051604051939291908464010000000082111561033a57600080fd5b90830190602082018581111561034f57600080fd5b825164010000000081118282018810171561036957600080fd5b82525081516020918201929091019080838360005b8381101561039657818101518382015260200161037e565b50505050905090810190601f1680156103c35780820380516001836020036101000a031916815260200191505b5060405250505060405160200180806b029ba30b9b4102a37b5b2b7160a51b815250600c0182805190602001908083835b602083106104135780518252601f1990920191602091820191016103f4565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052905090565b603360009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561049c57600080fd5b505af11580156104b0573d6000803e3d6000fd5b505050506040513d60208110156104c657600080fd5b50516001600160a01b0316331461050d576040805162461bcd60e51b815260206004820152600660248201526510b7bbb732b960d11b604482015290519081900360640190fd5b60358054911515600160a01b0260ff60a01b19909216919091179055565b60365490565b600054610100900460ff168061054a575061054a610af8565b80610558575060005460ff16155b6105935760405162461bcd60e51b815260040180806020018281038252602e8152602001806110bc602e913960400191505060405180910390fd5b600054610100900460ff161580156105be576000805460ff1961ff0019909116610100171660011790555b603554600160a81b900460ff1615610610576040805162461bcd60e51b815260206004820152601060248201526f34b9a4b6b83632b6b2b73a30ba34b7b760811b604482015290519081900360640190fd5b610618610b09565b603380546001600160a01b03199081166001600160a01b038781169190911790925560348054821686841617905560358054600160a01b92169285169290921760ff60a01b19161790558015610674576000805461ff00191690555b50505050565b6f4b3b4ca85a86c47a098a22400000000081565b6033546001600160a01b031681565b603554600160a81b900460ff1681565b6034546001600160a01b031681565b603554604080516395d89b4160e01b815290516060926001600160a01b0316916395d89b41916004808301926000929190829003018186803b15801561070157600080fd5b505afa158015610715573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561073e57600080fd5b810190808051604051939291908464010000000082111561075e57600080fd5b90830190602082018581111561077357600080fd5b825164010000000081118282018810171561078d57600080fd5b82525081516020918201929091019080838360005b838110156107ba5781810151838201526020016107a2565b50505050905090810190601f1680156107e75780820380516001836020036101000a031916815260200191505b5060405250505060405160200180806553544153482d60d01b8152506006018280519060200190808383602083106104135780518252601f1990920191602091820191016103f4565b60026001541415610888576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600155336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108f3576040805162461bcd60e51b8152602060048201526006602482015265042e6e8c2e6d60d31b604482015290519081900360640190fd5b6036546f4b3b4ca85a86c47a098a224000000000906109129083610bb3565b1061095b576040805162461bcd60e51b81526020600482015260146024820152731d1bdd185b14dd5c1c1b1e48195e18d95959195960621b604482015290519081900360640190fd5b6036546109689082610bb3565b603655603554610983906001600160a01b0316333084610c14565b5060018055565b6000600260015414156109e4576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026001556034546001600160a01b03163314610a36576040805162461bcd60e51b815260206004820152600b60248201526a085c995dd85c99141bdbdb60aa1b604482015290519081900360640190fd5b816036541015610a82576040805162461bcd60e51b8152602060048201526012602482015271616d6f756e743e746f74616c537570706c7960701b604482015290519081900360640190fd5b603654610a8f9083610c6e565b603655603554610aa9906001600160a01b03168484610ccb565b50600180805592915050565b603554600160a01b900460ff1681565b6035546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000610b0330610d22565b15905090565b600054610100900460ff1680610b225750610b22610af8565b80610b30575060005460ff16155b610b6b5760405162461bcd60e51b815260040180806020018281038252602e8152602001806110bc602e913960400191505060405180910390fd5b600054610100900460ff16158015610b96576000805460ff1961ff0019909116610100171660011790555b610b9e610d28565b8015610bb0576000805461ff00191690555b50565b600082820183811015610c0d576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610674908590610dcd565b600082821115610cc5576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610d1d908490610dcd565b505050565b3b151590565b600054610100900460ff1680610d415750610d41610af8565b80610d4f575060005460ff16155b610d8a5760405162461bcd60e51b815260040180806020018281038252602e8152602001806110bc602e913960400191505060405180910390fd5b600054610100900460ff16158015610db5576000805460ff1961ff0019909116610100171660011790555b600180558015610bb0576000805461ff001916905550565b6060610e22826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610e7e9092919063ffffffff16565b805190915015610d1d57808060200190516020811015610e4157600080fd5b5051610d1d5760405162461bcd60e51b815260040180806020018281038252602a8152602001806110ea602a913960400191505060405180910390fd5b6060610e8d8484600085610e95565b949350505050565b606082471015610ed65760405162461bcd60e51b81526004018080602001828103825260268152602001806110966026913960400191505060405180910390fd5b610edf85610d22565b610f30576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310610f6f5780518252601f199092019160209182019101610f50565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610fd1576040519150601f19603f3d011682016040523d82523d6000602084013e610fd6565b606091505b5091509150610fe6828286610ff1565b979650505050505050565b60608315611000575081610c0d565b8251156110105782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561105a578181015183820152602001611042565b50505050905090810190601f1680156110875780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212202c324b64b862616ff98968c4f2195a3231408574244c1225cb81374f78c4c6d264736f6c634300060c0033416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a264697066735822122070217aabbaad36568c8bb3e969ce3dcb2f39be579a551c9b2c423130ae36c4c364736f6c634300060c00330000000000000000000000002fc7447f6cf71f9aa9e7ff8814b37e55b268ec91
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101375760003560e01c80635ebaf1db116100b8578063a6f19c841161007c578063a6f19c84146102fa578063b87bd48114610302578063ca8b01761461030a578063cb00aa7314610312578063f106845414610338578063f5dab7111461034057610137565b80635ebaf1db146102ab57806362119bff146102b35780636a4874a1146102bb5780639ead7222146102c35780639f181b5e146102e057610137565b8063372500ab116100ff578063372500ab1461026f57806344214ecf1461028b578063480f592414610293578063570ca7351461029b5780635afffef1146102a357610137565b80630d5225de1461013c57806317d7de7c146101645780632223686f146101e1578063245e4bf0146102075780633641e0831461022b575b600080fd5b6101626004803603602081101561015257600080fd5b50356001600160a01b0316610391565b005b61016c610469565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101a657818101518382015260200161018e565b50505050905090810190601f1680156101d35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610162600480360360208110156101f757600080fd5b50356001600160a01b0316610497565b61020f6105a3565b604080516001600160a01b039092168252519081900360200190f35b610162600480360360a081101561024157600080fd5b508035906001600160a01b0360208201358116916040810135821691606082013581169160800135166105b2565b6102776106aa565b604080519115158252519081900360200190f35b61020f6108b5565b6102776108c4565b61020f6108d2565b6102776108e1565b61020f6108ea565b61020f6108f9565b61020f610908565b61020f600480360360208110156102d957600080fd5b503561092c565b6102e8610953565b60408051918252519081900360200190f35b61020f610959565b610277610968565b61027761096d565b6102e86004803603602081101561032857600080fd5b50356001600160a01b0316610c7c565b6102e8610c8e565b6103666004803603602081101561035657600080fd5b50356001600160a01b0316610c94565b604080516001600160a01b039485168152928416602084015292168183015290519081900360600190f35b60015460408051638da5cb5b60e01b8152905133926001600160a01b031691638da5cb5b9160048083019260209291908290030181600087803b1580156103d757600080fd5b505af11580156103eb573d6000803e3d6000fd5b505050506040513d602081101561040157600080fd5b50516001600160a01b031614610447576040805162461bcd60e51b815260206004820152600660248201526510b7bbb732b960d11b604482015290519081900360640190fd5b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b60408051808201909152601481527322bc3a3930a932bbb0b93229ba30b9b42b19971960611b602082015290565b60015460408051638da5cb5b60e01b8152905133926001600160a01b031691638da5cb5b9160048083019260209291908290030181600087803b1580156104dd57600080fd5b505af11580156104f1573d6000803e3d6000fd5b505050506040513d602081101561050757600080fd5b50516001600160a01b03161461054d576040805162461bcd60e51b815260206004820152600660248201526510b7bbb732b960d11b604482015290519081900360640190fd5b600954600411610597576040805162461bcd60e51b815260206004820152601060248201526f746f6f206d616e79207265776172647360801b604482015290519081900360640190fd5b6105a081610cc2565b50565b6004546001600160a01b031681565b6003546001600160a01b0316156105f8576040805162461bcd60e51b8152602060048201526005602482015264085a5b9a5d60da1b604482015290519081900360640190fd5b6000859055600180546001600160a01b038087166001600160a01b03199283161790925560028054868416908316179055600380548584169083161790556004805492841692909116919091179055604051309061065590611512565b6001600160a01b03909116815260405190819003602001906000f080158015610682573d6000803e3d6000fd5b50600580546001600160a01b0319166001600160a01b03929092169190911790555050505050565b6001546000906001600160a01b031633146106f8576040805162461bcd60e51b815260206004820152600960248201526810b7b832b930ba37b960b91b604482015290519081900360640190fd5b610700610f5e565b60075460ff166107a157600160009054906101000a90046001600160a01b03166001600160a01b0316639123d4046000546040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b15801561076757600080fd5b505af115801561077b573d6000803e3d6000fd5b505050506040513d602081101561079157600080fd5b50506007805460ff191660011790555b600754610100900460ff161561083b576001546000805460035460408051636c7b69cb60e01b815260048101939093526001600160a01b03918216602484015251931692636c7b69cb92604480840193602093929083900390910190829087803b15801561080e57600080fd5b505af1158015610822573d6000803e3d6000fd5b505050506040513d602081101561083857600080fd5b50505b600a546001600160a01b0316156108af57600a60009054906101000a90046001600160a01b03166001600160a01b0316632663fcfc6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561089c57600080fd5b505af19250505080156108ad575060015b505b50600190565b600a546001600160a01b031681565b600754610100900460ff1681565b6001546001600160a01b031681565b60075460ff1681565b6002546001600160a01b031681565b6005546001600160a01b031681565b7f0000000000000000000000002fc7447f6cf71f9aa9e7ff8814b37e55b268ec9181565b6009818154811061093957fe5b6000918252602090912001546001600160a01b0316905081565b60095490565b6003546001600160a01b031681565b600190565b6001546000906001600160a01b031633146109bb576040805162461bcd60e51b815260206004820152600960248201526810b7b832b930ba37b960b91b604482015290519081900360640190fd5b60095460005b81811015610c7357600060086000600984815481106109dc57fe5b60009182526020808320909101546001600160a01b039081168452908301939093526040909101902080549092501680610a17575050610c6b565b8160020160009054906101000a90046001600160a01b03166001600160a01b031663bb5d40eb6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a6757600080fd5b505afa158015610a7b573d6000803e3d6000fd5b505050506040513d6020811015610a9157600080fd5b5051610a9e575050610c6b565b6000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610aed57600080fd5b505afa158015610b01573d6000803e3d6000fd5b505050506040513d6020811015610b1757600080fd5b505190508015610c67576001600160a01b038216600090815260066020526040902054610b449082611029565b6001600160a01b0380841660009081526006602052604090209190915560018401541680610b755750505050610c6b565b60028401546001600160a01b0390811690610b9490851682600061108a565b610ba86001600160a01b038516828561108a565b806001600160a01b031663a0712d68846040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015610bee57600080fd5b505af1158015610c02573d6000803e3d6000fd5b50505050816001600160a01b031663590a41f5846040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015610c4c57600080fd5b505af1158015610c60573d6000803e3d6000fd5b5050505050505b5050505b6001016109c1565b50600191505090565b60066020526000908152604090205481565b60005481565b6008602052600090815260409020805460018201546002909201546001600160a01b03918216928216911683565b6001600160a01b0380821660009081526008602052604090208054909116158015610d1f57507f0000000000000000000000002fc7447f6cf71f9aa9e7ff8814b37e55b268ec916001600160a01b0316826001600160a01b031614155b15610f5a5780546001600160a01b0319166001600160a01b03838116919091178255600554600091610d5191166111a2565b90506000600160009054906101000a90046001600160a01b03166001600160a01b0316631526fe276000546040518263ffffffff1660e01b81526004018082815260200191505060c06040518083038186803b158015610db057600080fd5b505afa158015610dc4573d6000803e3d6000fd5b505050506040513d60c0811015610dda57600080fd5b50606001516004805460408051637c6b091760e11b81526001600160a01b038781169482019490945283851660248201523060448201529051939450600093929091169163f8d6122e9160648082019260209290919082900301818787803b158015610e4557600080fd5b505af1158015610e59573d6000803e3d6000fd5b505050506040513d6020811015610e6f57600080fd5b50516001546040805163184b955960e01b81526001600160a01b0392831660048201528284166024820152888316604482015290519293509085169163184b95599160648082019260009290919082900301818387803b158015610ed257600080fd5b505af1158015610ee6573d6000803e3d6000fd5b50505050600184810180546001600160a01b03199081166001600160a01b03948516179091556002860180548216958416959095179094556009805491820181556000527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af01805490931690851617909155505b5050565b60005b60088110156105a057600354604080516354c49fe960e01b81526004810184905290516000926001600160a01b0316916354c49fe9916024808301926020929190829003018186803b158015610fb657600080fd5b505afa158015610fca573d6000803e3d6000fd5b505050506040513d6020811015610fe057600080fd5b505190506001600160a01b038116610ff857506105a0565b600754610100900460ff16611017576007805461ff0019166101001790555b61102081610cc2565b50600101610f61565b600082820183811015611083576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b801580611110575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b1580156110e257600080fd5b505afa1580156110f6573d6000803e3d6000fd5b505050506040513d602081101561110c57600080fd5b5051155b61114b5760405162461bcd60e51b81526004018080602001828103825260368152602001806127386036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b17905261119d908490611244565b505050565b6000604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528260601b60148201526e5af43d82803e903d91602b57fd5bf360881b60288201526037816000f09150506001600160a01b03811661123f576040805162461bcd60e51b8152602060048201526016602482015275115490cc4c4d8dce8818dc99585d194819985a5b195960521b604482015290519081900360640190fd5b919050565b6060611299826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166112f59092919063ffffffff16565b80519091501561119d578080602001905160208110156112b857600080fd5b505161119d5760405162461bcd60e51b815260040180806020018281038252602a81526020018061270e602a913960400191505060405180910390fd5b6060611304848460008561130c565b949350505050565b60608247101561134d5760405162461bcd60e51b81526004018080602001828103825260268152602001806126e86026913960400191505060405180910390fd5b61135685611468565b6113a7576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106113e65780518252601f1990920191602091820191016113c7565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611448576040519150601f19603f3d011682016040523d82523d6000602084013e61144d565b606091505b509150915061145d82828661146e565b979650505050505050565b3b151590565b6060831561147d575081611083565b82511561148d5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156114d75781810151838201526020016114bf565b50505050905090810190601f1680156115045780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6111c8806115208339019056fe60a060405234801561001057600080fd5b506040516111c83803806111c88339818101604052602081101561003357600080fd5b50516001600160601b0319606082901b166080526035805460ff60a81b1916600160a81b1790556001600160a01b031661114961007f600039806108985280610ad652506111496000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806366666aa91161008c578063a9059cbb11610066578063a9059cbb14610254578063bb5d40eb14610280578063c55dae6314610288578063d8da813114610290576100ea565b806366666aa91461022757806395d89b411461022f578063a0712d6814610237576100ea565b8063184b9559116100c8578063184b9559146101a757806333039d3d146101df578063570ca735146101e757806360a49b331461020b576100ea565b806306fdde03146100ef57806317c136771461016c57806318160ddd1461018d575b600080fd5b6100f7610298565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610131578181015183820152602001610119565b50505050905090810190601f16801561015e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61018b6004803603602081101561018257600080fd5b5035151561044c565b005b61019561052b565b60408051918252519081900360200190f35b61018b600480360360608110156101bd57600080fd5b506001600160a01b038135811691602081013582169160409091013516610531565b61019561067a565b6101ef61068e565b604080516001600160a01b039092168252519081900360200190f35b61021361069d565b604080519115158252519081900360200190f35b6101ef6106ad565b6100f76106bc565b61018b6004803603602081101561024d57600080fd5b5035610830565b6102136004803603604081101561026a57600080fd5b506001600160a01b03813516906020013561098a565b610213610ab5565b6101ef610ac5565b6101ef610ad4565b603554604080516306fdde0360e01b815290516060926001600160a01b0316916306fdde03916004808301926000929190829003018186803b1580156102dd57600080fd5b505afa1580156102f1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561031a57600080fd5b810190808051604051939291908464010000000082111561033a57600080fd5b90830190602082018581111561034f57600080fd5b825164010000000081118282018810171561036957600080fd5b82525081516020918201929091019080838360005b8381101561039657818101518382015260200161037e565b50505050905090810190601f1680156103c35780820380516001836020036101000a031916815260200191505b5060405250505060405160200180806b029ba30b9b4102a37b5b2b7160a51b815250600c0182805190602001908083835b602083106104135780518252601f1990920191602091820191016103f4565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052905090565b603360009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561049c57600080fd5b505af11580156104b0573d6000803e3d6000fd5b505050506040513d60208110156104c657600080fd5b50516001600160a01b0316331461050d576040805162461bcd60e51b815260206004820152600660248201526510b7bbb732b960d11b604482015290519081900360640190fd5b60358054911515600160a01b0260ff60a01b19909216919091179055565b60365490565b600054610100900460ff168061054a575061054a610af8565b80610558575060005460ff16155b6105935760405162461bcd60e51b815260040180806020018281038252602e8152602001806110bc602e913960400191505060405180910390fd5b600054610100900460ff161580156105be576000805460ff1961ff0019909116610100171660011790555b603554600160a81b900460ff1615610610576040805162461bcd60e51b815260206004820152601060248201526f34b9a4b6b83632b6b2b73a30ba34b7b760811b604482015290519081900360640190fd5b610618610b09565b603380546001600160a01b03199081166001600160a01b038781169190911790925560348054821686841617905560358054600160a01b92169285169290921760ff60a01b19161790558015610674576000805461ff00191690555b50505050565b6f4b3b4ca85a86c47a098a22400000000081565b6033546001600160a01b031681565b603554600160a81b900460ff1681565b6034546001600160a01b031681565b603554604080516395d89b4160e01b815290516060926001600160a01b0316916395d89b41916004808301926000929190829003018186803b15801561070157600080fd5b505afa158015610715573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561073e57600080fd5b810190808051604051939291908464010000000082111561075e57600080fd5b90830190602082018581111561077357600080fd5b825164010000000081118282018810171561078d57600080fd5b82525081516020918201929091019080838360005b838110156107ba5781810151838201526020016107a2565b50505050905090810190601f1680156107e75780820380516001836020036101000a031916815260200191505b5060405250505060405160200180806553544153482d60d01b8152506006018280519060200190808383602083106104135780518252601f1990920191602091820191016103f4565b60026001541415610888576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600155336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108f3576040805162461bcd60e51b8152602060048201526006602482015265042e6e8c2e6d60d31b604482015290519081900360640190fd5b6036546f4b3b4ca85a86c47a098a224000000000906109129083610bb3565b1061095b576040805162461bcd60e51b81526020600482015260146024820152731d1bdd185b14dd5c1c1b1e48195e18d95959195960621b604482015290519081900360640190fd5b6036546109689082610bb3565b603655603554610983906001600160a01b0316333084610c14565b5060018055565b6000600260015414156109e4576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026001556034546001600160a01b03163314610a36576040805162461bcd60e51b815260206004820152600b60248201526a085c995dd85c99141bdbdb60aa1b604482015290519081900360640190fd5b816036541015610a82576040805162461bcd60e51b8152602060048201526012602482015271616d6f756e743e746f74616c537570706c7960701b604482015290519081900360640190fd5b603654610a8f9083610c6e565b603655603554610aa9906001600160a01b03168484610ccb565b50600180805592915050565b603554600160a01b900460ff1681565b6035546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000610b0330610d22565b15905090565b600054610100900460ff1680610b225750610b22610af8565b80610b30575060005460ff16155b610b6b5760405162461bcd60e51b815260040180806020018281038252602e8152602001806110bc602e913960400191505060405180910390fd5b600054610100900460ff16158015610b96576000805460ff1961ff0019909116610100171660011790555b610b9e610d28565b8015610bb0576000805461ff00191690555b50565b600082820183811015610c0d576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610674908590610dcd565b600082821115610cc5576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610d1d908490610dcd565b505050565b3b151590565b600054610100900460ff1680610d415750610d41610af8565b80610d4f575060005460ff16155b610d8a5760405162461bcd60e51b815260040180806020018281038252602e8152602001806110bc602e913960400191505060405180910390fd5b600054610100900460ff16158015610db5576000805460ff1961ff0019909116610100171660011790555b600180558015610bb0576000805461ff001916905550565b6060610e22826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610e7e9092919063ffffffff16565b805190915015610d1d57808060200190516020811015610e4157600080fd5b5051610d1d5760405162461bcd60e51b815260040180806020018281038252602a8152602001806110ea602a913960400191505060405180910390fd5b6060610e8d8484600085610e95565b949350505050565b606082471015610ed65760405162461bcd60e51b81526004018080602001828103825260268152602001806110966026913960400191505060405180910390fd5b610edf85610d22565b610f30576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310610f6f5780518252601f199092019160209182019101610f50565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610fd1576040519150601f19603f3d011682016040523d82523d6000602084013e610fd6565b606091505b5091509150610fe6828286610ff1565b979650505050505050565b60608315611000575081610c0d565b8251156110105782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561105a578181015183820152602001611042565b50505050905090810190601f1680156110875780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212202c324b64b862616ff98968c4f2195a3231408574244c1225cb81374f78c4c6d264736f6c634300060c0033416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a264697066735822122070217aabbaad36568c8bb3e969ce3dcb2f39be579a551c9b2c423130ae36c4c364736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000002fc7447f6cf71f9aa9e7ff8814b37e55b268ec91
-----Decoded View---------------
Arg [0] : _crv (address): 0x2FC7447F6cF71f9aa9E7FF8814B37E55b268Ec91
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000002fc7447f6cf71f9aa9e7ff8814b37e55b268ec91
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in FRAX
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
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.