ERC-20
Overview
Max Total Supply
5,633,744.150091400305071197 stkhyperTHRUST
Holders
890
Market
Price
$0.00 @ 0.000000 ETH
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
807.904250957113783382 stkhyperTHRUSTValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
Contract Name:
AuraBalVault
Compiler Version
v0.8.11+commit.d7f03943
Optimization Enabled:
Yes with 800 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.11; import { GenericUnionVault } from "./GenericVault.sol"; import { IStrategy } from "../interfaces/IStrategy.sol"; /** * @title AuraBalVault * @author llama.airforce */ contract AuraBalVault is GenericUnionVault { bool public isHarvestPermissioned = true; mapping(address => bool) public authorizedHarvesters; constructor(address _token, address _virtualRewardFactory) GenericUnionVault(_token, _virtualRewardFactory) {} /// @notice Sets whether only whitelisted addresses can harvest /// @param _status Whether or not harvests are permissioned function setHarvestPermissions(bool _status) external onlyOwner { isHarvestPermissioned = _status; } /// @notice Adds or remove an address from the harvesters' whitelist /// @param _harvester address of the authorized harvester /// @param _authorized Whether to add or remove harvester function updateAuthorizedHarvesters(address _harvester, bool _authorized) external onlyOwner { authorizedHarvesters[_harvester] = _authorized; } /// @notice Claim rewards and swaps them to auraBAL for restaking /// @dev Can be called by whitelisted account or anyone against an auraBal incentive /// @dev Harvest logic in the strategy contract /// @dev Harvest can be called even if permissioned when last staker is /// withdrawing from the vault. function harvest(uint256 _minAmountOut) public { require( !isHarvestPermissioned || authorizedHarvesters[msg.sender] || totalSupply() == 0, "permissioned harvest" ); uint256 _harvested = IStrategy(strategy).harvest(_minAmountOut); emit Harvest(msg.sender, _harvested); } /// @notice Claim rewards and swaps them to auraBAL for restaking /// @dev No slippage protection, swapping for auraBAL function harvest() public override { harvest(0); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); _afterTokenTransfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `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 // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.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 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' 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) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _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 require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^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; 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"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.11; import { Ownable } from "@openzeppelin/contracts-0.8/access/Ownable.sol"; import { SafeERC20 } from "@openzeppelin/contracts-0.8/token/ERC20/utils/SafeERC20.sol"; import { ERC20 } from "@openzeppelin/contracts-0.8/token/ERC20/ERC20.sol"; import { IERC20 } from "@openzeppelin/contracts-0.8/token/ERC20/IERC20.sol"; import { ReentrancyGuard } from "@openzeppelin/contracts-0.8/security/ReentrancyGuard.sol"; import { IERC4626 } from "../interfaces/IERC4626.sol"; import { IStrategy } from "../interfaces/IStrategy.sol"; import { IBasicRewards } from "../interfaces/IBasicRewards.sol"; import { IVirtualRewards, IVirtualRewardFactory } from "../interfaces/IVirtualRewards.sol"; /** * @title GenericUnionVault * @author llama.airforce -> AuraFinance * @notice Changes: * - remove platform fee * - add extra rewards logic */ contract GenericUnionVault is ERC20, IERC4626, Ownable, ReentrancyGuard { using SafeERC20 for IERC20; uint256 public withdrawalPenalty = 100; uint256 public constant MAX_WITHDRAWAL_PENALTY = 150; uint256 public constant FEE_DENOMINATOR = 10000; address public immutable underlying; address public immutable virtualRewardFactory; address public strategy; address[] public extraRewards; mapping(address => bool) public isExtraReward; event WithdrawalPenaltyUpdated(uint256 _penalty); event Harvest(address indexed _caller, uint256 _value); event StrategySet(address indexed _strategy); event ExtraRewardAdded(address indexed _reward, address extraReward); event ExtraRewardCleared(address indexed _reward); constructor(address _token, address _virtualRewardFactory) ERC20( string(abi.encodePacked("Staked ", ERC20(_token).name())), string(abi.encodePacked("stk", ERC20(_token).symbol())) ) { underlying = _token; virtualRewardFactory = _virtualRewardFactory; } /// @notice Updates the withdrawal penalty /// @param _penalty - the amount of the new penalty (in BIPS) function setWithdrawalPenalty(uint256 _penalty) external onlyOwner { require(_penalty <= MAX_WITHDRAWAL_PENALTY, "!penalty"); withdrawalPenalty = _penalty; emit WithdrawalPenaltyUpdated(_penalty); } /// @notice Set the address of the strategy contract /// @dev Can only be set once /// @param _strategy - address of the strategy contract function setStrategy(address _strategy) external onlyOwner notToZeroAddress(_strategy) { require(strategy == address(0), "Strategy already set"); strategy = _strategy; emit StrategySet(_strategy); } /// @notice Count of extra rewards function extraRewardsLength() external view returns (uint256) { return extraRewards.length; } /// @notice Add extra reward contract /// @param _reward VirtualBalanceRewardPool address /// @return bool success function addExtraReward(address _reward) external onlyOwner notToZeroAddress(_reward) returns (bool) { require(extraRewards.length < 12, "too many rewards"); require(!isExtraReward[_reward], "reward exists"); require(strategy != address(0), "strategy not set"); address extraReward = IVirtualRewardFactory(virtualRewardFactory).createVirtualReward( address(this), _reward, strategy ); address reward = IVirtualRewards(extraReward).rewardToken(); extraRewards.push(extraReward); isExtraReward[reward] = true; emit ExtraRewardAdded(reward, extraReward); return true; } /// @notice Clear extra rewards array function clearExtraRewards() external onlyOwner { uint256 len = extraRewards.length; for (uint256 i = 0; i < len; i++) { address reward = IVirtualRewards(extraRewards[i]).rewardToken(); isExtraReward[reward] = false; emit ExtraRewardCleared(reward); } delete extraRewards; } /// @notice Query the amount currently staked /// @return total - the total amount of tokens staked function totalUnderlying() public view returns (uint256 total) { return IStrategy(strategy).totalUnderlying(); } /// @notice Returns the amount of underlying a user can claim /// @param user - address whose claimable amount to query /// @return amount - claimable amount /// @dev Does not account for penalties and fees function balanceOfUnderlying(address user) external view returns (uint256 amount) { require(totalSupply() > 0, "No users"); return ((balanceOf(user) * totalUnderlying()) / totalSupply()); } /// @notice Deposit user funds in the autocompounder and mints tokens /// representing user's share of the pool in exchange /// @param _amount - the amount of underlying to deposit /// @return _shares - the amount of shares issued function deposit(uint256 _amount, address _receiver) public notToZeroAddress(_receiver) nonReentrant returns (uint256 _shares) { require(_amount > 0, "Deposit too small"); uint256 _before = totalUnderlying(); // Issues shares in proportion of deposit to pool amount uint256 shares = 0; if (totalSupply() == 0) { shares = _amount; } else { shares = (_amount * totalSupply()) / _before; } IERC20(underlying).safeTransferFrom(msg.sender, strategy, _amount); IStrategy(strategy).stake(_amount); _mint(_receiver, shares); emit Deposit(msg.sender, _receiver, _amount, shares); return shares; } /// @notice Unstake underlying in proportion to the amount of shares sent /// @param _shares - the number of shares sent /// @return _withdrawable - the withdrawable underlying amount function _withdraw(address _from, uint256 _shares) internal returns (uint256 _withdrawable) { require(totalSupply() > 0); // Computes the amount withdrawable based on the number of shares sent uint256 amount = (_shares * totalUnderlying()) / totalSupply(); // Burn the shares before retrieving tokens _burn(_from, _shares); // If user is last to withdraw, harvest before exit if (totalSupply() == 0) { harvest(); IStrategy(strategy).withdraw(totalUnderlying()); _withdrawable = IERC20(underlying).balanceOf(address(this)); } // Otherwise compute share and unstake else { _withdrawable = amount; // Substract a small withdrawal fee to prevent users "timing" // the harvests. The fee stays staked and is therefore // redistributed to all remaining participants. uint256 _penalty = _getWithdrawalPenalty(_withdrawable); _withdrawable = _withdrawable - _penalty; IStrategy(strategy).withdraw(_withdrawable); } return _withdrawable; } /// @notice Get the withdraw penalty amount /// @param _amount Amount of asset /// @return penalty amount function _getWithdrawalPenalty(uint256 _amount) internal view returns (uint256) { return (_amount * withdrawalPenalty) / FEE_DENOMINATOR; } /// @notice Unstake underlying token in proportion to the amount of shares sent /// @param _shares - the number of shares sent /// @return withdrawn - the amount of underlying returned to the user function redeem( uint256 _shares, address _receiver, address _owner ) public notToZeroAddress(_receiver) notToZeroAddress(_owner) nonReentrant returns (uint256 withdrawn) { // Check allowance if owner if not sender if (msg.sender != _owner) { uint256 currentAllowance = allowance(_owner, msg.sender); require(currentAllowance >= _shares, "ERC4626: redeem exceeds allowance"); _approve(_owner, msg.sender, currentAllowance - _shares); } // Withdraw requested amount of underlying uint256 _withdrawable = _withdraw(_owner, _shares); // And sends back underlying to user IERC20(underlying).safeTransfer(_receiver, _withdrawable); emit Withdraw(msg.sender, _receiver, _owner, _withdrawable, _shares); return _withdrawable; } /// @notice Claim rewards and swaps them to FXS for restaking /// @dev Can be called by anyone against an incentive in FXS /// @dev Harvest logic in the strategy contract function harvest() public virtual { uint256 _harvested = IStrategy(strategy).harvest(); emit Harvest(msg.sender, _harvested); } modifier notToZeroAddress(address _to) { require(_to != address(0), "Invalid address!"); _; } /* -------------------------------------------------------------- * ERC20 hooks ----------------------------------------------------------------- */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal override { // Withdraw extra rewards for the "from" address to update their earned // amount when updateReward is called for (uint256 i = 0; i < extraRewards.length; i++) { IBasicRewards(extraRewards[i]).withdraw(from, amount); } // Stake extra rewards for the "to" address for (uint256 i = 0; i < extraRewards.length; i++) { IBasicRewards(extraRewards[i]).stake(to, amount); } } /* -------------------------------------------------------------- * EIP-4626 functions ----------------------------------------------------------------- */ /// @notice The address of the underlying token used for the Vault for /// accounting, depositing, and withdrawing. function asset() public view returns (address) { return underlying; } /// @notice Total amount of the underlying asset that is “managed” by Vault. function totalAssets() public view returns (uint256) { return totalUnderlying(); } /// @notice The amount of shares that the Vault would exchange for the amount /// of assets provided, in an ideal scenario where all the conditions are met. function convertToShares(uint256 _assets) public view returns (uint256) { return _convertToShares(_assets, false); } /// @param _assets The amount of underlying assets to be convert to vault shares. /// @param isRoundUp bool to indicate round up the shares /// @dev isRoundUp is used to round-up the shares amount for withdraw and previewWithdraw function _convertToShares(uint256 _assets, bool isRoundUp) internal view virtual returns (uint256 shares) { uint256 totalShares = totalSupply(); if (totalShares == 0) { shares = _assets; // 1:1 value of shares and assets } else { uint256 totalAssetsMem = totalUnderlying(); shares = (_assets * totalShares) / totalAssetsMem; // Round Up if needed if (isRoundUp && mulmod(_assets, totalShares, totalAssetsMem) > 0) { shares += 1; } } } /// @notice The amount of assets that the Vault would exchange for the amount /// of shares provided, in an ideal scenario where all the conditions are met. function convertToAssets(uint256 _shares) public view returns (uint256) { return _convertToAssets(_shares, false); } /// @param _shares The amount of vault shares to be converted to the underlying assets. /// @param isRoundUp bool to indicate round up the assets /// @dev isRoundUp is used to round-up the assets amount for mint and previewMint function _convertToAssets(uint256 _shares, bool isRoundUp) internal view virtual returns (uint256 assets) { uint256 totalShares = totalSupply(); if (totalShares == 0) { assets = _shares; // 1:1 value of shares and assets } else { uint256 totalAssetsMem = totalUnderlying(); assets = (_shares * totalAssetsMem) / totalShares; // Round Up if needed if (isRoundUp && mulmod(_shares, totalAssetsMem, totalShares) > 0) { assets += 1; } } } /// @notice Maximum amount of the underlying asset that can be deposited into /// the Vault for the receiver, through a deposit call. function maxDeposit(address) public pure returns (uint256) { return type(uint256).max; } /// @notice Allows an on-chain or off-chain user to simulate the effects of /// their deposit at the current block, given current on-chain conditions. function previewDeposit(uint256 _assets) public view returns (uint256) { return _convertToShares(_assets, false); } /// @notice Maximum amount of shares that can be minted from the Vault /// for the receiver, through a mint call. function maxMint(address) public pure returns (uint256) { return type(uint256).max; } /// @notice Allows an on-chain or off-chain user to simulate the effects of /// their mint at the current block, given current on-chain conditions. function previewMint(uint256 _shares) public view returns (uint256) { return _convertToAssets(_shares, true); } /// @notice Mints exactly shares Vault shares to receiver by depositing /// assets of underlying tokens. function mint(uint256 _shares, address _receiver) public returns (uint256) { uint256 assets = previewMint(_shares); return deposit(assets, _receiver); } /// @notice Maximum amount of the underlying asset that can be withdrawn /// from the owner balance in the Vault, through a withdraw call. function maxWithdraw(address _owner) public view returns (uint256) { return previewRedeem(maxRedeem((_owner))); } /// @notice Allows an on-chain or off-chain user to simulate the effects /// of their withdrawal at the current block, given current on-chain conditions. function previewWithdraw(uint256 _assets) public view returns (uint256) { _assets = ((FEE_DENOMINATOR * _assets) / (FEE_DENOMINATOR - withdrawalPenalty)); return _convertToShares(_assets, true); } /// @notice Burns shares from owner and sends exactly assets of /// underlying tokens to receiver. function withdraw( uint256 _assets, address _receiver, address _owner ) public returns (uint256) { uint256 shares = previewWithdraw(_assets); return redeem(shares, _receiver, _owner); } /// @notice Maximum amount of Vault shares that can be redeemed from the /// owner balance in the Vault, through a redeem call. function maxRedeem(address _owner) public view returns (uint256) { return balanceOf(_owner); } /// @notice Allows an on-chain or off-chain user to simulate the effects of /// their redeemption at the current block, given current on-chain conditions. function previewRedeem(uint256 _shares) public view returns (uint256) { uint256 amount = _convertToAssets(_shares, false); uint256 penalty = _getWithdrawalPenalty(amount); return amount - penalty; } /* ---------------------------------------------------- * Compatability functions ---------------------------------------------------- */ function stakeFor(address to, uint256 amount) external { deposit(amount, to); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.11; interface IBasicRewards { function stakeFor(address, uint256) external returns (bool); function balanceOf(address) external view returns (uint256); function totalSupply() external view returns (uint256); function earned(address) external view returns (uint256); function withdrawAll(bool) external returns (bool); function withdraw(uint256, bool) external returns (bool); function withdraw(address, uint256) external; function withdrawAndUnwrap(uint256 amount, bool claim) external returns (bool); function getReward() external returns (bool); function stake(uint256) external returns (bool); function stake(address, uint256) external; function extraRewards(uint256) external view returns (address); function exit() external returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.11; import { IERC20 } from "@openzeppelin/contracts-0.8/token/ERC20/IERC20.sol"; import { IERC20Metadata } from "@openzeppelin/contracts-0.8/token/ERC20/extensions/IERC20Metadata.sol"; /** * @dev Interface of the ERC4626 "Tokenized Vault Standard", as defined in * https://eips.ethereum.org/EIPS/eip-4626[ERC-4626]. * @author OpenZeppelin * Fork of OpenZeppelin Contracts (last updated v4.8.0) (interfaces/IERC4626.sol) */ interface IERC4626 is IERC20, IERC20Metadata { event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares); event Withdraw( address indexed sender, address indexed receiver, address indexed owner, uint256 assets, uint256 shares ); /** * @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing. * * - MUST be an ERC-20 token contract. * - MUST NOT revert. */ function asset() external view returns (address assetTokenAddress); /** * @dev Returns the total amount of the underlying asset that is “managed” by Vault. * * - SHOULD include any compounding that occurs from yield. * - MUST be inclusive of any fees that are charged against assets in the Vault. * - MUST NOT revert. */ function totalAssets() external view returns (uint256 totalManagedAssets); /** * @dev Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal * scenario where all the conditions are met. * * - MUST NOT be inclusive of any fees that are charged against assets in the Vault. * - MUST NOT show any variations depending on the caller. * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange. * - MUST NOT revert. * * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and * from. */ function convertToShares(uint256 assets) external view returns (uint256 shares); /** * @dev Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal * scenario where all the conditions are met. * * - MUST NOT be inclusive of any fees that are charged against assets in the Vault. * - MUST NOT show any variations depending on the caller. * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange. * - MUST NOT revert. * * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and * from. */ function convertToAssets(uint256 shares) external view returns (uint256 assets); /** * @dev Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver, * through a deposit call. * * - MUST return a limited value if receiver is subject to some deposit limit. * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited. * - MUST NOT revert. */ function maxDeposit(address receiver) external view returns (uint256 maxAssets); /** * @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given * current on-chain conditions. * * - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit * call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called * in the same transaction. * - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the * deposit would be accepted, regardless if the user has enough tokens approved, etc. * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees. * - MUST NOT revert. * * NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in * share price or some other type of condition, meaning the depositor will lose assets by depositing. */ function previewDeposit(uint256 assets) external view returns (uint256 shares); /** * @dev Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens. * * - MUST emit the Deposit event. * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the * deposit execution, and are accounted for during deposit. * - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not * approving enough underlying tokens to the Vault contract, etc). * * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token. */ function deposit(uint256 assets, address receiver) external returns (uint256 shares); /** * @dev Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call. * - MUST return a limited value if receiver is subject to some mint limit. * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted. * - MUST NOT revert. */ function maxMint(address receiver) external view returns (uint256 maxShares); /** * @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given * current on-chain conditions. * * - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call * in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the * same transaction. * - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint * would be accepted, regardless if the user has enough tokens approved, etc. * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees. * - MUST NOT revert. * * NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in * share price or some other type of condition, meaning the depositor will lose assets by minting. */ function previewMint(uint256 shares) external view returns (uint256 assets); /** * @dev Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens. * * - MUST emit the Deposit event. * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint * execution, and are accounted for during mint. * - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not * approving enough underlying tokens to the Vault contract, etc). * * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token. */ function mint(uint256 shares, address receiver) external returns (uint256 assets); /** * @dev Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the * Vault, through a withdraw call. * * - MUST return a limited value if owner is subject to some withdrawal limit or timelock. * - MUST NOT revert. */ function maxWithdraw(address owner) external view returns (uint256 maxAssets); /** * @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block, * given current on-chain conditions. * * - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw * call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if * called * in the same transaction. * - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though * the withdrawal would be accepted, regardless if the user has enough shares, etc. * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees. * - MUST NOT revert. * * NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in * share price or some other type of condition, meaning the depositor will lose assets by depositing. */ function previewWithdraw(uint256 assets) external view returns (uint256 shares); /** * @dev Burns shares from owner and sends exactly assets of underlying tokens to receiver. * * - MUST emit the Withdraw event. * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the * withdraw execution, and are accounted for during withdraw. * - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner * not having enough shares, etc). * * Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed. * Those methods should be performed separately. */ function withdraw( uint256 assets, address receiver, address owner ) external returns (uint256 shares); /** * @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault, * through a redeem call. * * - MUST return a limited value if owner is subject to some withdrawal limit or timelock. * - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock. * - MUST NOT revert. */ function maxRedeem(address owner) external view returns (uint256 maxShares); /** * @dev Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block, * given current on-chain conditions. * * - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call * in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the * same transaction. * - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the * redemption would be accepted, regardless if the user has enough shares, etc. * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees. * - MUST NOT revert. * * NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in * share price or some other type of condition, meaning the depositor will lose assets by redeeming. */ function previewRedeem(uint256 shares) external view returns (uint256 assets); /** * @dev Burns exactly shares from owner and sends assets of underlying tokens to receiver. * * - MUST emit the Withdraw event. * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the * redeem execution, and are accounted for during redeem. * - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner * not having enough shares, etc). * * NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed. * Those methods should be performed separately. */ function redeem( uint256 shares, address receiver, address owner ) external returns (uint256 assets); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.11; interface IStrategy { function harvest() external returns (uint256 harvested); function harvest(uint256 _minAmountOut) external returns (uint256 harvested); function totalUnderlying() external view returns (uint256 total); function stake(uint256 _amount) external; function withdraw(uint256 _amount) external; function setApprovals() external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.11; interface IVirtualRewardFactory { function createVirtualReward( address, address, address ) external returns (address); } interface IVirtualRewards { function periodFinish() external view returns (uint256); function queuedRewards() external view returns (uint256); function queueNewRewards(uint256) external; function rewardToken() external view returns (address); function getReward() external; }
{ "metadata": { "bytecodeHash": "none" }, "optimizer": { "enabled": true, "runs": 800 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_virtualRewardFactory","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"assets","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_reward","type":"address"},{"indexed":false,"internalType":"address","name":"extraReward","type":"address"}],"name":"ExtraRewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_reward","type":"address"}],"name":"ExtraRewardCleared","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Harvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_strategy","type":"address"}],"name":"StrategySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"assets","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"Withdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_penalty","type":"uint256"}],"name":"WithdrawalPenaltyUpdated","type":"event"},{"inputs":[],"name":"FEE_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_WITHDRAWAL_PENALTY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_reward","type":"address"}],"name":"addExtraReward","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"asset","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"authorizedHarvesters","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"balanceOfUnderlying","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"clearExtraRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"convertToAssets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_assets","type":"uint256"}],"name":"convertToShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"extraRewards","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"extraRewardsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minAmountOut","type":"uint256"}],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isExtraReward","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isHarvestPermissioned","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"maxDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"maxMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"maxRedeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"maxWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_assets","type":"uint256"}],"name":"previewDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"previewMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"previewRedeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_assets","type":"uint256"}],"name":"previewWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"address","name":"_owner","type":"address"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"withdrawn","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"setHarvestPermissions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategy","type":"address"}],"name":"setStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_penalty","type":"uint256"}],"name":"setWithdrawalPenalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stakeFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAssets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalUnderlying","outputs":[{"internalType":"uint256","name":"total","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"underlying","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_harvester","type":"address"},{"internalType":"bool","name":"_authorized","type":"bool"}],"name":"updateAuthorizedHarvesters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"virtualRewardFactory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_assets","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"address","name":"_owner","type":"address"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawalPenalty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60c06040526064600755600b805460ff191660011790553480156200002357600080fd5b5060405162003022380380620030228339810160408190526200004691620002de565b8181816001600160a01b03166306fdde036040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000087573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620000b191908101906200035f565b604051602001620000c3919062000417565b604051602081830303815290604052826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000111573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526200013b91908101906200035f565b6040516020016200014d919062000448565b60408051601f198184030181529190528151620001729060039060208501906200021b565b508051620001889060049060208401906200021b565b505050620001a56200019f620001c560201b60201c565b620001c9565b60016006556001600160a01b039182166080521660a05250620004b29050565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620002299062000475565b90600052602060002090601f0160209004810192826200024d576000855562000298565b82601f106200026857805160ff191683800117855562000298565b8280016001018555821562000298579182015b82811115620002985782518255916020019190600101906200027b565b50620002a6929150620002aa565b5090565b5b80821115620002a65760008155600101620002ab565b80516001600160a01b0381168114620002d957600080fd5b919050565b60008060408385031215620002f257600080fd5b620002fd83620002c1565b91506200030d60208401620002c1565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620003495781810151838201526020016200032f565b8381111562000359576000848401525b50505050565b6000602082840312156200037257600080fd5b81516001600160401b03808211156200038a57600080fd5b818401915084601f8301126200039f57600080fd5b815181811115620003b457620003b462000316565b604051601f8201601f19908116603f01168101908382118183101715620003df57620003df62000316565b81604052828152876020848701011115620003f957600080fd5b6200040c8360208301602088016200032c565b979650505050505050565b66029ba30b5b2b2160cd1b8152600082516200043b8160078501602087016200032c565b9190910160070192915050565b6273746b60e81b815260008251620004688160038501602087016200032c565b9190910160030192915050565b600181811c908216806200048a57607f821691505b60208210811415620004ac57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a051612b27620004fb600039600081816105040152610f8201526000818161045e0152818161056401528181611252015281816117ac01526121ab0152612b276000f3fe608060405234801561001057600080fd5b506004361061034c5760003560e01c806370a08231116101bd578063ba087652116100f9578063d73792a9116100a2578063ddc632621161007c578063ddc632621461070f578063ef8b30f714610684578063f2fde38b14610722578063f7ff67a01461073557600080fd5b8063d73792a9146106ba578063d905777e146106c3578063dd62ed3e146106d657600080fd5b8063c70920bc116100d3578063c70920bc14610697578063ce96cb771461069f578063d55a23f4146106b257600080fd5b8063ba08765214610671578063c63d75b6146104cf578063c6e6f5921461068457600080fd5b806395d89b4111610166578063a8c62e7611610140578063a8c62e7614610625578063a9059cbb14610638578063b3d7f6b91461064b578063b460af941461065e57600080fd5b806395d89b4114610601578063a2468c1914610609578063a457c2d71461061257600080fd5b8063809c95cc11610197578063809c95cc146105ca5780638da5cb5b146105dd57806394bf804d146105ee57600080fd5b806370a0823114610586578063715018a6146105af5780637faaa6c1146105b757600080fd5b806333a100ca1161028c57806340c35446116102355780634cdad5061161020f5780634cdad506146105265780635e43c47b146105395780636e553f651461054c5780636f307dc31461055f57600080fd5b806340c35446146104e45780634641257d146104f75780634653aaa1146104ff57600080fd5b80633af9e669116102665780633af9e669146104a95780633dc31d19146104bc578063402d267d146104cf57600080fd5b806333a100ca1461044957806338d52e0f1461045c578063395093511461049657600080fd5b806318160ddd116102f9578063252c37fa116102d3578063252c37fa146103f75780632ee4090814610404578063313ce5671461041757806333393d371461042657600080fd5b806318160ddd146103d45780632060176b146103dc57806323b872dd146103e457600080fd5b806307a2d13a1161032a57806307a2d13a1461038b578063095ea7b31461039e5780630a28a477146103c157600080fd5b806301e1d114146103515780630569d3881461036c57806306fdde0314610376575b600080fd5b610359610758565b6040519081526020015b60405180910390f35b610374610767565b005b61037e6108c9565b60405161036391906127c5565b6103596103993660046127f8565b61095b565b6103b16103ac366004612826565b61096e565b6040519015158152602001610363565b6103596103cf3660046127f8565b610984565b600254610359565b610359609681565b6103b16103f2366004612852565b6109b9565b600b546103b19060ff1681565b610374610412366004612826565b610a7a565b60405160128152602001610363565b6103b1610434366004612893565b600a6020526000908152604090205460ff1681565b610374610457366004612893565b610a89565b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610363565b6103b16104a4366004612826565b610bde565b6103596104b7366004612893565b610c1a565b6103746104ca3660046128be565b610cab565b6103596104dd366004612893565b5060001990565b61047e6104f23660046127f8565b610d30565b610374610d5a565b61047e7f000000000000000000000000000000000000000000000000000000000000000081565b6103596105343660046127f8565b610d66565b6103b1610547366004612893565b610d95565b61035961055a3660046128f7565b61110d565b61047e7f000000000000000000000000000000000000000000000000000000000000000081565b610359610594366004612893565b6001600160a01b031660009081526020819052604090205490565b610374611339565b6103746105c53660046127f8565b61139d565b6103746105d836600461291c565b611483565b6005546001600160a01b031661047e565b6103596105fc3660046128f7565b6114f0565b61037e611508565b61035960075481565b6103b1610620366004612826565b611517565b60085461047e906001600160a01b031681565b6103b1610646366004612826565b6115c8565b6103596106593660046127f8565b6115d5565b61035961066c366004612939565b6115e2565b61035961067f366004612939565b611604565b6103596106923660046127f8565b61182d565b61035961183a565b6103596106ad366004612893565b6118a8565b600954610359565b61035961271081565b6103596106d1366004612893565b6118b2565b6103596106e436600461297b565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61037461071d3660046127f8565b6118d0565b610374610730366004612893565b6119f4565b6103b1610743366004612893565b600c6020526000908152604090205460ff1681565b600061076261183a565b905090565b6005546001600160a01b031633146107c65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b60095460005b818110156108b9576000600982815481106107e9576107e96129a9565b600091825260209182902001546040805163f7c618c160e01b815290516001600160a01b039092169263f7c618c1926004808401938290030181865afa158015610837573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085b91906129bf565b6001600160a01b0381166000818152600a6020526040808220805460ff191690555192935090917f34304d78213ed24f75e323bc823dc4883b456fbe135029e6ae3c1597e6c7d4369190a250806108b1816129f2565b9150506107cc565b506108c660096000612767565b50565b6060600380546108d890612a0d565b80601f016020809104026020016040519081016040528092919081815260200182805461090490612a0d565b80156109515780601f1061092657610100808354040283529160200191610951565b820191906000526020600020905b81548152906001019060200180831161093457829003601f168201915b5050505050905090565b6000610968826000611ad3565b92915050565b600061097b338484611b4a565b50600192915050565b60006007546127106109969190612a42565b6109a283612710612a59565b6109ac9190612a8e565b9150610968826001611c6e565b60006109c6848484611cd8565b6001600160a01b038416600090815260016020908152604080832033845290915290205482811015610a605760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084016107bd565b610a6d8533858403611b4a565b60019150505b9392505050565b610a84818361110d565b505050565b6005546001600160a01b03163314610ae35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107bd565b806001600160a01b038116610b2d5760405162461bcd60e51b815260206004820152601060248201526f496e76616c696420616464726573732160801b60448201526064016107bd565b6008546001600160a01b031615610b865760405162461bcd60e51b815260206004820152601460248201527f537472617465677920616c72656164792073657400000000000000000000000060448201526064016107bd565b6008805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040517fe70d79dad95c835bdd87e9cf4665651c9e5abb3b756e4fd2bf45f29c95c3aa4090600090a25050565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161097b918590610c15908690612ab0565b611b4a565b600080610c2660025490565b11610c735760405162461bcd60e51b815260206004820152600860248201527f4e6f20757365727300000000000000000000000000000000000000000000000060448201526064016107bd565b600254610c7e61183a565b6001600160a01b038416600090815260208190526040902054610ca19190612a59565b6109689190612a8e565b6005546001600160a01b03163314610d055760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107bd565b6001600160a01b03919091166000908152600c60205260409020805460ff1916911515919091179055565b60098181548110610d4057600080fd5b6000918252602090912001546001600160a01b0316905081565b610d6460006118d0565b565b600080610d74836000611ad3565b90506000610d8182611ee2565b9050610d8d8183612a42565b949350505050565b6005546000906001600160a01b03163314610df25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107bd565b816001600160a01b038116610e3c5760405162461bcd60e51b815260206004820152601060248201526f496e76616c696420616464726573732160801b60448201526064016107bd565b600954600c11610e8e5760405162461bcd60e51b815260206004820152601060248201527f746f6f206d616e7920726577617264730000000000000000000000000000000060448201526064016107bd565b6001600160a01b0383166000908152600a602052604090205460ff1615610ef75760405162461bcd60e51b815260206004820152600d60248201527f726577617264206578697374730000000000000000000000000000000000000060448201526064016107bd565b6008546001600160a01b0316610f4f5760405162461bcd60e51b815260206004820152601060248201527f7374726174656779206e6f74207365740000000000000000000000000000000060448201526064016107bd565b600854604051638e88bbdd60e01b81523060048201526001600160a01b03858116602483015291821660448201526000917f00000000000000000000000000000000000000000000000000000000000000001690638e88bbdd906064016020604051808303816000875af1158015610fcb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fef91906129bf565b90506000816001600160a01b031663f7c618c16040518163ffffffff1660e01b8152600401602060405180830381865afa158015611031573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105591906129bf565b6009805460018082019092557f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af01805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038681169182179092559083166000818152600a6020908152604091829020805460ff1916909517909455519182529293507fbf7c7e98b1c9a807d31de793918fb6b650367d4d4264f0098ba904699ba878fc910160405180910390a26001935050505b50919050565b6000816001600160a01b0381166111595760405162461bcd60e51b815260206004820152601060248201526f496e76616c696420616464726573732160801b60448201526064016107bd565b600260065414156111ac5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016107bd565b6002600655836111fe5760405162461bcd60e51b815260206004820152601160248201527f4465706f73697420746f6f20736d616c6c00000000000000000000000000000060448201526064016107bd565b600061120861183a565b9050600061121560025490565b611220575084611241565b8161122a60025490565b6112349088612a59565b61123e9190612a8e565b90505b60085461127d906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169133911689611ef5565b60085460405163534a7e1d60e11b8152600481018890526001600160a01b039091169063a694fc3a90602401600060405180830381600087803b1580156112c357600080fd5b505af11580156112d7573d6000803e3d6000fd5b505050506112e58582611f8d565b60408051878152602081018390526001600160a01b0387169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3600160065595945050505050565b6005546001600160a01b031633146113935760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107bd565b610d646000612078565b6005546001600160a01b031633146113f75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107bd565b60968111156114485760405162461bcd60e51b815260206004820152600860248201527f2170656e616c747900000000000000000000000000000000000000000000000060448201526064016107bd565b60078190556040518181527f9d5ddc6fdb90a6647fe4981fdf08b45a5f9ef6d8ea960de27bef48fb481325929060200160405180910390a150565b6005546001600160a01b031633146114dd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107bd565b600b805460ff1916911515919091179055565b6000806114fc846115d5565b9050610d8d818461110d565b6060600480546108d890612a0d565b3360009081526001602090815260408083206001600160a01b0386168452909152812054828110156115b15760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016107bd565b6115be3385858403611b4a565b5060019392505050565b600061097b338484611cd8565b6000610968826001611ad3565b6000806115ee85610984565b90506115fb818585611604565b95945050505050565b6000826001600160a01b0381166116505760405162461bcd60e51b815260206004820152601060248201526f496e76616c696420616464726573732160801b60448201526064016107bd565b826001600160a01b03811661169a5760405162461bcd60e51b815260206004820152601060248201526f496e76616c696420616464726573732160801b60448201526064016107bd565b600260065414156116ed5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016107bd565b6002600655336001600160a01b03851614611791576001600160a01b0384166000908152600160209081526040808320338452909152902054868110156117805760405162461bcd60e51b815260206004820152602160248201527f455243343632363a2072656465656d206578636565647320616c6c6f77616e636044820152606560f81b60648201526084016107bd565b61178f8533610c158a85612a42565b505b600061179d85886120d7565b90506117d36001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001687836122a8565b60408051828152602081018990526001600160a01b03808816929089169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a460016006559695505050505050565b6000610968826000611c6e565b600854604080516331c2482f60e21b815290516000926001600160a01b03169163c70920bc9160048083019260209291908290030181865afa158015611884573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107629190612ac8565b6000610968610534835b6001600160a01b038116600090815260208190526040812054610968565b600b5460ff1615806118f15750336000908152600c602052604090205460ff165b806118fc5750600254155b6119485760405162461bcd60e51b815260206004820152601460248201527f7065726d697373696f6e6564206861727665737400000000000000000000000060448201526064016107bd565b600854604051636ee3193160e11b8152600481018390526000916001600160a01b03169063ddc63262906024016020604051808303816000875af1158015611994573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b89190612ac8565b60405181815290915033907fc9695243a805adb74c91f28311176c65b417e842d5699893cef56d18bfa48cba9060200160405180910390a25050565b6005546001600160a01b03163314611a4e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107bd565b6001600160a01b038116611aca5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016107bd565b6108c681612078565b600080611adf60025490565b905080611aee57839150611b43565b6000611af861183a565b905081611b058287612a59565b611b0f9190612a8e565b9250838015611b2e575060008280611b2957611b29612a78565b828709115b15611b4157611b3e600184612ab0565b92505b505b5092915050565b6001600160a01b038316611bac5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016107bd565b6001600160a01b038216611c0d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016107bd565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600080611c7a60025490565b905080611c8957839150611b43565b6000611c9361183a565b905080611ca08387612a59565b611caa9190612a8e565b9250838015611b2e575060008180611cc457611cc4612a78565b8387091115611b4157611b3e600184612ab0565b6001600160a01b038316611d545760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016107bd565b6001600160a01b038216611db65760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016107bd565b611dc18383836122d8565b6001600160a01b03831660009081526020819052604090205481811015611e505760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016107bd565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290611e87908490612ab0565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611ed391815260200190565b60405180910390a35b50505050565b600061271060075483610ca19190612a59565b6040516001600160a01b0380851660248301528316604482015260648101829052611edc9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261241d565b6001600160a01b038216611fe35760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016107bd565b611fef600083836122d8565b80600260008282546120019190612ab0565b90915550506001600160a01b0382166000908152602081905260408120805483929061202e908490612ab0565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600580546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000806120e360025490565b116120ed57600080fd5b60006120f860025490565b61210061183a565b61210a9085612a59565b6121149190612a8e565b90506121208484612502565b6002546122275761212f610d5a565b6008546001600160a01b0316632e1a7d4d61214861183a565b6040518263ffffffff1660e01b815260040161216691815260200190565b600060405180830381600087803b15801561218057600080fd5b505af1158015612194573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031692506370a082319150602401602060405180830381865afa1580156121fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122209190612ac8565b9150611b43565b809150600061223583611ee2565b90506122418184612a42565b600854604051632e1a7d4d60e01b8152600481018390529194506001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561228857600080fd5b505af115801561229c573d6000803e3d6000fd5b50505050505092915050565b6040516001600160a01b038316602482015260448101829052610a8490849063a9059cbb60e01b90606401611f29565b60005b60095481101561237a57600981815481106122f8576122f86129a9565b60009182526020909120015460405163f3fef3a360e01b81526001600160a01b038681166004830152602482018590529091169063f3fef3a390604401600060405180830381600087803b15801561234f57600080fd5b505af1158015612363573d6000803e3d6000fd5b505050508080612372906129f2565b9150506122db565b5060005b600954811015611edc576009818154811061239b5761239b6129a9565b6000918252602090912001546040516356e4bb9760e11b81526001600160a01b038581166004830152602482018590529091169063adc9772e90604401600060405180830381600087803b1580156123f257600080fd5b505af1158015612406573d6000803e3d6000fd5b505050508080612415906129f2565b91505061237e565b6000612472826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661265c9092919063ffffffff16565b805190915015610a8457808060200190518101906124909190612ae1565b610a845760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016107bd565b6001600160a01b0382166125625760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016107bd565b61256e826000836122d8565b6001600160a01b038216600090815260208190526040902054818110156125e25760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016107bd565b6001600160a01b0383166000908152602081905260408120838303905560028054849290612611908490612a42565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6060610d8d848460008585843b6126b55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016107bd565b600080866001600160a01b031685876040516126d19190612afe565b60006040518083038185875af1925050503d806000811461270e576040519150601f19603f3d011682016040523d82523d6000602084013e612713565b606091505b509150915061272382828661272e565b979650505050505050565b6060831561273d575081610a73565b82511561274d5782518084602001fd5b8160405162461bcd60e51b81526004016107bd91906127c5565b50805460008255906000526020600020908101906108c691905b808211156127955760008155600101612781565b5090565b60005b838110156127b457818101518382015260200161279c565b83811115611edc5750506000910152565b60208152600082518060208401526127e4816040850160208701612799565b601f01601f19169190910160400192915050565b60006020828403121561280a57600080fd5b5035919050565b6001600160a01b03811681146108c657600080fd5b6000806040838503121561283957600080fd5b823561284481612811565b946020939093013593505050565b60008060006060848603121561286757600080fd5b833561287281612811565b9250602084013561288281612811565b929592945050506040919091013590565b6000602082840312156128a557600080fd5b8135610a7381612811565b80151581146108c657600080fd5b600080604083850312156128d157600080fd5b82356128dc81612811565b915060208301356128ec816128b0565b809150509250929050565b6000806040838503121561290a57600080fd5b8235915060208301356128ec81612811565b60006020828403121561292e57600080fd5b8135610a73816128b0565b60008060006060848603121561294e57600080fd5b83359250602084013561296081612811565b9150604084013561297081612811565b809150509250925092565b6000806040838503121561298e57600080fd5b823561299981612811565b915060208301356128ec81612811565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156129d157600080fd5b8151610a7381612811565b634e487b7160e01b600052601160045260246000fd5b6000600019821415612a0657612a066129dc565b5060010190565b600181811c90821680612a2157607f821691505b6020821081141561110757634e487b7160e01b600052602260045260246000fd5b600082821015612a5457612a546129dc565b500390565b6000816000190483118215151615612a7357612a736129dc565b500290565b634e487b7160e01b600052601260045260246000fd5b600082612aab57634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115612ac357612ac36129dc565b500190565b600060208284031215612ada57600080fd5b5051919050565b600060208284031215612af357600080fd5b8151610a73816128b0565b60008251612b10818460208701612799565b919091019291505056fea164736f6c634300080b000a000000000000000000000000569fcbda292f1a69ab14e401bad13cc0e1dec7900000000000000000000000004bd1f7021968bf16e964cee2a5dade60f5491499
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061034c5760003560e01c806370a08231116101bd578063ba087652116100f9578063d73792a9116100a2578063ddc632621161007c578063ddc632621461070f578063ef8b30f714610684578063f2fde38b14610722578063f7ff67a01461073557600080fd5b8063d73792a9146106ba578063d905777e146106c3578063dd62ed3e146106d657600080fd5b8063c70920bc116100d3578063c70920bc14610697578063ce96cb771461069f578063d55a23f4146106b257600080fd5b8063ba08765214610671578063c63d75b6146104cf578063c6e6f5921461068457600080fd5b806395d89b4111610166578063a8c62e7611610140578063a8c62e7614610625578063a9059cbb14610638578063b3d7f6b91461064b578063b460af941461065e57600080fd5b806395d89b4114610601578063a2468c1914610609578063a457c2d71461061257600080fd5b8063809c95cc11610197578063809c95cc146105ca5780638da5cb5b146105dd57806394bf804d146105ee57600080fd5b806370a0823114610586578063715018a6146105af5780637faaa6c1146105b757600080fd5b806333a100ca1161028c57806340c35446116102355780634cdad5061161020f5780634cdad506146105265780635e43c47b146105395780636e553f651461054c5780636f307dc31461055f57600080fd5b806340c35446146104e45780634641257d146104f75780634653aaa1146104ff57600080fd5b80633af9e669116102665780633af9e669146104a95780633dc31d19146104bc578063402d267d146104cf57600080fd5b806333a100ca1461044957806338d52e0f1461045c578063395093511461049657600080fd5b806318160ddd116102f9578063252c37fa116102d3578063252c37fa146103f75780632ee4090814610404578063313ce5671461041757806333393d371461042657600080fd5b806318160ddd146103d45780632060176b146103dc57806323b872dd146103e457600080fd5b806307a2d13a1161032a57806307a2d13a1461038b578063095ea7b31461039e5780630a28a477146103c157600080fd5b806301e1d114146103515780630569d3881461036c57806306fdde0314610376575b600080fd5b610359610758565b6040519081526020015b60405180910390f35b610374610767565b005b61037e6108c9565b60405161036391906127c5565b6103596103993660046127f8565b61095b565b6103b16103ac366004612826565b61096e565b6040519015158152602001610363565b6103596103cf3660046127f8565b610984565b600254610359565b610359609681565b6103b16103f2366004612852565b6109b9565b600b546103b19060ff1681565b610374610412366004612826565b610a7a565b60405160128152602001610363565b6103b1610434366004612893565b600a6020526000908152604090205460ff1681565b610374610457366004612893565b610a89565b7f000000000000000000000000569fcbda292f1a69ab14e401bad13cc0e1dec7905b6040516001600160a01b039091168152602001610363565b6103b16104a4366004612826565b610bde565b6103596104b7366004612893565b610c1a565b6103746104ca3660046128be565b610cab565b6103596104dd366004612893565b5060001990565b61047e6104f23660046127f8565b610d30565b610374610d5a565b61047e7f0000000000000000000000004bd1f7021968bf16e964cee2a5dade60f549149981565b6103596105343660046127f8565b610d66565b6103b1610547366004612893565b610d95565b61035961055a3660046128f7565b61110d565b61047e7f000000000000000000000000569fcbda292f1a69ab14e401bad13cc0e1dec79081565b610359610594366004612893565b6001600160a01b031660009081526020819052604090205490565b610374611339565b6103746105c53660046127f8565b61139d565b6103746105d836600461291c565b611483565b6005546001600160a01b031661047e565b6103596105fc3660046128f7565b6114f0565b61037e611508565b61035960075481565b6103b1610620366004612826565b611517565b60085461047e906001600160a01b031681565b6103b1610646366004612826565b6115c8565b6103596106593660046127f8565b6115d5565b61035961066c366004612939565b6115e2565b61035961067f366004612939565b611604565b6103596106923660046127f8565b61182d565b61035961183a565b6103596106ad366004612893565b6118a8565b600954610359565b61035961271081565b6103596106d1366004612893565b6118b2565b6103596106e436600461297b565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61037461071d3660046127f8565b6118d0565b610374610730366004612893565b6119f4565b6103b1610743366004612893565b600c6020526000908152604090205460ff1681565b600061076261183a565b905090565b6005546001600160a01b031633146107c65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b60095460005b818110156108b9576000600982815481106107e9576107e96129a9565b600091825260209182902001546040805163f7c618c160e01b815290516001600160a01b039092169263f7c618c1926004808401938290030181865afa158015610837573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085b91906129bf565b6001600160a01b0381166000818152600a6020526040808220805460ff191690555192935090917f34304d78213ed24f75e323bc823dc4883b456fbe135029e6ae3c1597e6c7d4369190a250806108b1816129f2565b9150506107cc565b506108c660096000612767565b50565b6060600380546108d890612a0d565b80601f016020809104026020016040519081016040528092919081815260200182805461090490612a0d565b80156109515780601f1061092657610100808354040283529160200191610951565b820191906000526020600020905b81548152906001019060200180831161093457829003601f168201915b5050505050905090565b6000610968826000611ad3565b92915050565b600061097b338484611b4a565b50600192915050565b60006007546127106109969190612a42565b6109a283612710612a59565b6109ac9190612a8e565b9150610968826001611c6e565b60006109c6848484611cd8565b6001600160a01b038416600090815260016020908152604080832033845290915290205482811015610a605760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084016107bd565b610a6d8533858403611b4a565b60019150505b9392505050565b610a84818361110d565b505050565b6005546001600160a01b03163314610ae35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107bd565b806001600160a01b038116610b2d5760405162461bcd60e51b815260206004820152601060248201526f496e76616c696420616464726573732160801b60448201526064016107bd565b6008546001600160a01b031615610b865760405162461bcd60e51b815260206004820152601460248201527f537472617465677920616c72656164792073657400000000000000000000000060448201526064016107bd565b6008805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040517fe70d79dad95c835bdd87e9cf4665651c9e5abb3b756e4fd2bf45f29c95c3aa4090600090a25050565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161097b918590610c15908690612ab0565b611b4a565b600080610c2660025490565b11610c735760405162461bcd60e51b815260206004820152600860248201527f4e6f20757365727300000000000000000000000000000000000000000000000060448201526064016107bd565b600254610c7e61183a565b6001600160a01b038416600090815260208190526040902054610ca19190612a59565b6109689190612a8e565b6005546001600160a01b03163314610d055760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107bd565b6001600160a01b03919091166000908152600c60205260409020805460ff1916911515919091179055565b60098181548110610d4057600080fd5b6000918252602090912001546001600160a01b0316905081565b610d6460006118d0565b565b600080610d74836000611ad3565b90506000610d8182611ee2565b9050610d8d8183612a42565b949350505050565b6005546000906001600160a01b03163314610df25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107bd565b816001600160a01b038116610e3c5760405162461bcd60e51b815260206004820152601060248201526f496e76616c696420616464726573732160801b60448201526064016107bd565b600954600c11610e8e5760405162461bcd60e51b815260206004820152601060248201527f746f6f206d616e7920726577617264730000000000000000000000000000000060448201526064016107bd565b6001600160a01b0383166000908152600a602052604090205460ff1615610ef75760405162461bcd60e51b815260206004820152600d60248201527f726577617264206578697374730000000000000000000000000000000000000060448201526064016107bd565b6008546001600160a01b0316610f4f5760405162461bcd60e51b815260206004820152601060248201527f7374726174656779206e6f74207365740000000000000000000000000000000060448201526064016107bd565b600854604051638e88bbdd60e01b81523060048201526001600160a01b03858116602483015291821660448201526000917f0000000000000000000000004bd1f7021968bf16e964cee2a5dade60f54914991690638e88bbdd906064016020604051808303816000875af1158015610fcb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fef91906129bf565b90506000816001600160a01b031663f7c618c16040518163ffffffff1660e01b8152600401602060405180830381865afa158015611031573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105591906129bf565b6009805460018082019092557f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af01805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038681169182179092559083166000818152600a6020908152604091829020805460ff1916909517909455519182529293507fbf7c7e98b1c9a807d31de793918fb6b650367d4d4264f0098ba904699ba878fc910160405180910390a26001935050505b50919050565b6000816001600160a01b0381166111595760405162461bcd60e51b815260206004820152601060248201526f496e76616c696420616464726573732160801b60448201526064016107bd565b600260065414156111ac5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016107bd565b6002600655836111fe5760405162461bcd60e51b815260206004820152601160248201527f4465706f73697420746f6f20736d616c6c00000000000000000000000000000060448201526064016107bd565b600061120861183a565b9050600061121560025490565b611220575084611241565b8161122a60025490565b6112349088612a59565b61123e9190612a8e565b90505b60085461127d906001600160a01b037f000000000000000000000000569fcbda292f1a69ab14e401bad13cc0e1dec79081169133911689611ef5565b60085460405163534a7e1d60e11b8152600481018890526001600160a01b039091169063a694fc3a90602401600060405180830381600087803b1580156112c357600080fd5b505af11580156112d7573d6000803e3d6000fd5b505050506112e58582611f8d565b60408051878152602081018390526001600160a01b0387169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3600160065595945050505050565b6005546001600160a01b031633146113935760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107bd565b610d646000612078565b6005546001600160a01b031633146113f75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107bd565b60968111156114485760405162461bcd60e51b815260206004820152600860248201527f2170656e616c747900000000000000000000000000000000000000000000000060448201526064016107bd565b60078190556040518181527f9d5ddc6fdb90a6647fe4981fdf08b45a5f9ef6d8ea960de27bef48fb481325929060200160405180910390a150565b6005546001600160a01b031633146114dd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107bd565b600b805460ff1916911515919091179055565b6000806114fc846115d5565b9050610d8d818461110d565b6060600480546108d890612a0d565b3360009081526001602090815260408083206001600160a01b0386168452909152812054828110156115b15760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016107bd565b6115be3385858403611b4a565b5060019392505050565b600061097b338484611cd8565b6000610968826001611ad3565b6000806115ee85610984565b90506115fb818585611604565b95945050505050565b6000826001600160a01b0381166116505760405162461bcd60e51b815260206004820152601060248201526f496e76616c696420616464726573732160801b60448201526064016107bd565b826001600160a01b03811661169a5760405162461bcd60e51b815260206004820152601060248201526f496e76616c696420616464726573732160801b60448201526064016107bd565b600260065414156116ed5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016107bd565b6002600655336001600160a01b03851614611791576001600160a01b0384166000908152600160209081526040808320338452909152902054868110156117805760405162461bcd60e51b815260206004820152602160248201527f455243343632363a2072656465656d206578636565647320616c6c6f77616e636044820152606560f81b60648201526084016107bd565b61178f8533610c158a85612a42565b505b600061179d85886120d7565b90506117d36001600160a01b037f000000000000000000000000569fcbda292f1a69ab14e401bad13cc0e1dec7901687836122a8565b60408051828152602081018990526001600160a01b03808816929089169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a460016006559695505050505050565b6000610968826000611c6e565b600854604080516331c2482f60e21b815290516000926001600160a01b03169163c70920bc9160048083019260209291908290030181865afa158015611884573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107629190612ac8565b6000610968610534835b6001600160a01b038116600090815260208190526040812054610968565b600b5460ff1615806118f15750336000908152600c602052604090205460ff165b806118fc5750600254155b6119485760405162461bcd60e51b815260206004820152601460248201527f7065726d697373696f6e6564206861727665737400000000000000000000000060448201526064016107bd565b600854604051636ee3193160e11b8152600481018390526000916001600160a01b03169063ddc63262906024016020604051808303816000875af1158015611994573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b89190612ac8565b60405181815290915033907fc9695243a805adb74c91f28311176c65b417e842d5699893cef56d18bfa48cba9060200160405180910390a25050565b6005546001600160a01b03163314611a4e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107bd565b6001600160a01b038116611aca5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016107bd565b6108c681612078565b600080611adf60025490565b905080611aee57839150611b43565b6000611af861183a565b905081611b058287612a59565b611b0f9190612a8e565b9250838015611b2e575060008280611b2957611b29612a78565b828709115b15611b4157611b3e600184612ab0565b92505b505b5092915050565b6001600160a01b038316611bac5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016107bd565b6001600160a01b038216611c0d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016107bd565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600080611c7a60025490565b905080611c8957839150611b43565b6000611c9361183a565b905080611ca08387612a59565b611caa9190612a8e565b9250838015611b2e575060008180611cc457611cc4612a78565b8387091115611b4157611b3e600184612ab0565b6001600160a01b038316611d545760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016107bd565b6001600160a01b038216611db65760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016107bd565b611dc18383836122d8565b6001600160a01b03831660009081526020819052604090205481811015611e505760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016107bd565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290611e87908490612ab0565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611ed391815260200190565b60405180910390a35b50505050565b600061271060075483610ca19190612a59565b6040516001600160a01b0380851660248301528316604482015260648101829052611edc9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261241d565b6001600160a01b038216611fe35760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016107bd565b611fef600083836122d8565b80600260008282546120019190612ab0565b90915550506001600160a01b0382166000908152602081905260408120805483929061202e908490612ab0565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600580546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000806120e360025490565b116120ed57600080fd5b60006120f860025490565b61210061183a565b61210a9085612a59565b6121149190612a8e565b90506121208484612502565b6002546122275761212f610d5a565b6008546001600160a01b0316632e1a7d4d61214861183a565b6040518263ffffffff1660e01b815260040161216691815260200190565b600060405180830381600087803b15801561218057600080fd5b505af1158015612194573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201527f000000000000000000000000569fcbda292f1a69ab14e401bad13cc0e1dec7906001600160a01b031692506370a082319150602401602060405180830381865afa1580156121fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122209190612ac8565b9150611b43565b809150600061223583611ee2565b90506122418184612a42565b600854604051632e1a7d4d60e01b8152600481018390529194506001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561228857600080fd5b505af115801561229c573d6000803e3d6000fd5b50505050505092915050565b6040516001600160a01b038316602482015260448101829052610a8490849063a9059cbb60e01b90606401611f29565b60005b60095481101561237a57600981815481106122f8576122f86129a9565b60009182526020909120015460405163f3fef3a360e01b81526001600160a01b038681166004830152602482018590529091169063f3fef3a390604401600060405180830381600087803b15801561234f57600080fd5b505af1158015612363573d6000803e3d6000fd5b505050508080612372906129f2565b9150506122db565b5060005b600954811015611edc576009818154811061239b5761239b6129a9565b6000918252602090912001546040516356e4bb9760e11b81526001600160a01b038581166004830152602482018590529091169063adc9772e90604401600060405180830381600087803b1580156123f257600080fd5b505af1158015612406573d6000803e3d6000fd5b505050508080612415906129f2565b91505061237e565b6000612472826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661265c9092919063ffffffff16565b805190915015610a8457808060200190518101906124909190612ae1565b610a845760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016107bd565b6001600160a01b0382166125625760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016107bd565b61256e826000836122d8565b6001600160a01b038216600090815260208190526040902054818110156125e25760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016107bd565b6001600160a01b0383166000908152602081905260408120838303905560028054849290612611908490612a42565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6060610d8d848460008585843b6126b55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016107bd565b600080866001600160a01b031685876040516126d19190612afe565b60006040518083038185875af1925050503d806000811461270e576040519150601f19603f3d011682016040523d82523d6000602084013e612713565b606091505b509150915061272382828661272e565b979650505050505050565b6060831561273d575081610a73565b82511561274d5782518084602001fd5b8160405162461bcd60e51b81526004016107bd91906127c5565b50805460008255906000526020600020908101906108c691905b808211156127955760008155600101612781565b5090565b60005b838110156127b457818101518382015260200161279c565b83811115611edc5750506000910152565b60208152600082518060208401526127e4816040850160208701612799565b601f01601f19169190910160400192915050565b60006020828403121561280a57600080fd5b5035919050565b6001600160a01b03811681146108c657600080fd5b6000806040838503121561283957600080fd5b823561284481612811565b946020939093013593505050565b60008060006060848603121561286757600080fd5b833561287281612811565b9250602084013561288281612811565b929592945050506040919091013590565b6000602082840312156128a557600080fd5b8135610a7381612811565b80151581146108c657600080fd5b600080604083850312156128d157600080fd5b82356128dc81612811565b915060208301356128ec816128b0565b809150509250929050565b6000806040838503121561290a57600080fd5b8235915060208301356128ec81612811565b60006020828403121561292e57600080fd5b8135610a73816128b0565b60008060006060848603121561294e57600080fd5b83359250602084013561296081612811565b9150604084013561297081612811565b809150509250925092565b6000806040838503121561298e57600080fd5b823561299981612811565b915060208301356128ec81612811565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156129d157600080fd5b8151610a7381612811565b634e487b7160e01b600052601160045260246000fd5b6000600019821415612a0657612a066129dc565b5060010190565b600181811c90821680612a2157607f821691505b6020821081141561110757634e487b7160e01b600052602260045260246000fd5b600082821015612a5457612a546129dc565b500390565b6000816000190483118215151615612a7357612a736129dc565b500290565b634e487b7160e01b600052601260045260246000fd5b600082612aab57634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115612ac357612ac36129dc565b500190565b600060208284031215612ada57600080fd5b5051919050565b600060208284031215612af357600080fd5b8151610a73816128b0565b60008251612b10818460208701612799565b919091019291505056fea164736f6c634300080b000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000569fcbda292f1a69ab14e401bad13cc0e1dec7900000000000000000000000004bd1f7021968bf16e964cee2a5dade60f5491499
-----Decoded View---------------
Arg [0] : _token (address): 0x569FcbDa292f1a69AB14e401bAD13Cc0E1DEC790
Arg [1] : _virtualRewardFactory (address): 0x4Bd1f7021968BF16e964cEe2a5dade60f5491499
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000569fcbda292f1a69ab14e401bad13cc0e1dec790
Arg [1] : 0000000000000000000000004bd1f7021968bf16e964cee2a5dade60f5491499
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.