Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
gCRV
Compiler Version
v0.8.15+commit.e14f2714
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.8.11; import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IUCrvWithdrawAs { enum Option { Claim, ClaimAsETH, ClaimAsCRV, ClaimAsCVX, ClaimAndStake } function withdrawAs(address _to, uint256 _shares, Option option) external; function withdrawAs(address _to, uint256 _shares, Option option, uint256 minAmountOut) external; function withdraw(address _to, uint256 _shares) external; } contract gCRV is Initializable, ERC20Upgradeable, OwnableUpgradeable { // address public constant uCrvAddress = 0x83507cc8C8B67Ed48BADD1F59F684D5d02884C81; IERC20 public uCrv; uint256 public lastInflatedTimestamp; address public inflationRecipient; // inflation rate per second uint256 public inflationRate; uint256 public inflatedAmount; bool public migrated; IStkCvxCrvZaps public immutable stkCvxCrvZaps; constructor(IStkCvxCrvZaps _stkCvxCrvZaps) { stkCvxCrvZaps = _stkCvxCrvZaps; } function initialize(IERC20 _uCrv, address _inflationRecipient) public initializer { __ERC20_init("gCRV", "gCRV"); __Ownable_init(); uCrv = _uCrv; inflationRecipient = _inflationRecipient; inflationRate = 1585489599; lastInflatedTimestamp = block.timestamp; } modifier accrue() { uint256 diff = block.timestamp - lastInflatedTimestamp; lastInflatedTimestamp = block.timestamp; uint256 supply = totalSupply(); if(diff != 0 && supply != 0) { inflatedAmount += supply * diff * inflationRate / 1e18; } _; } function totalSupply() public view override returns(uint256) { return super.totalSupply() + inflatedAmount; } function inflate() external accrue { _mint(inflationRecipient, inflatedAmount); inflatedAmount = 0; } // Wraps an `amountIn` of uCRV to a bigger amount of gCRV // // Inflation is implemented on contract level, so that when // a user wraps uCRV, they get more gCRV, since it is cheaper // due to accrued inflation. // // An alternative approach on user level would mean that a user // gets gCRV in the amount equal to the amount of uCRV wrapped, // but on exit gets less. That however would require fixing the // time a user wraps their tokens. function wrap(uint256 amountIn) external accrue { address account = msg.sender; uint256 amountOut = toGCRV(amountIn); // Increase the account's balance by amountOut _mint(account, amountOut); // Transfer uCRV from the sender to this contract's address. // The transfer must be approved by the sender in advance uCrv.transferFrom(account, address(this), amountIn); } // Unwraps an `amountIn` of gCRV to a smaller amount of uCRV // based on the `inflationRate` and the time passed since the // contract inception function unwrap(uint256 amountIn, bool cvx) external accrue { address account = msg.sender; uint256 amountOut = toUCRV(amountIn); // Reduce the account's balance by amountOut _burn(account, amountIn); if(cvx) { IUCrvWithdrawAs(address(uCrv)).withdraw(account, amountOut); } else { // Return the user the uCRV amount due uCrv.transfer(account, amountOut); } } // Inflation value is set per second. It should be expressed as a decimal // (not percentage) multiplied by 10**18, so 1% would equal // 0.01 * 10**18 = 1E16 or 10 000 000 000 000 000 function setInflation(uint256 _inflationRate) external onlyOwner { require(_inflationRate > 0, "gCRV: inflation rate cannot be zero"); inflationRate = _inflationRate; } function changeInfationRecipient(address _recipient) external onlyOwner { inflationRecipient = _recipient; } // Gets gCRV amount and returns equivalent uCRV amount function toUCRV(uint256 gCrvAmount) public view returns (uint256 uCrvAmount) { // Get the wrap ratio based on the balances pre unwrap uint256 gCrvTotal = totalSupply(); uint256 uCrvBalance = ucrvBalanceInternal(); // Sanity check: make sure we do not delete by zero if (gCrvTotal == 0) { uCrvAmount = gCrvAmount; } else { // Note here we expect uCrvBalance / gCrvTotal <= 1, // Therefore, we expect uCrvAmount <= gCrvAmount uCrvAmount = gCrvAmount * uCrvBalance / gCrvTotal; } } // Gets uCRV amount and returns equivalent gCRV amount function toGCRV(uint256 uCrvAmount) public view returns (uint256 gCrvAmount) { uint256 gCrvTotal = totalSupply(); uint256 uCrvBalance = ucrvBalanceInternal(); // Make sure we do not delete by zero if (uCrvBalance == 0 || gCrvTotal == 0) { gCrvAmount = uCrvAmount; } else { // Note here we expect gCrvTotal / uCrvBalance >= 1, // Therefore, we expect amountOut >= amountIn gCrvAmount = uCrvAmount * gCrvTotal / uCrvBalance; } } function ucrvBalanceInternal() internal view returns(uint256) { return uCrv.balanceOf(address(this)); } function migrate() external { IERC20 oldUCrv = IERC20(0x4eBaD8DbD4EdBd74DB0278714FbD67eBc76B89B7); oldUCrv.approve(address(stkCvxCrvZaps), type(uint256).max); stkCvxCrvZaps.depositFromUCrv(oldUCrv.balanceOf(address(this)), 0, address(this)); uCrv = IERC20(0xde2bEF0A01845257b4aEf2A2EAa48f6EAeAfa8B7); } } interface IStkCvxCrvZaps { function depositFromUCrv( uint256 _amount, uint256 _minAmountOut, address _to ) external; function vault() external view returns (IERC20); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _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); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20Upgradeable.sol"; import "./extensions/IERC20MetadataUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../proxy/utils/Initializable.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 ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable { 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. */ function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing { __ERC20_init_unchained(name_, symbol_); } function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { _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: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, 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}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, 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}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, 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) { address owner = _msgSender(); _approve(owner, spender, _allowances[owner][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) { address owner = _msgSender(); uint256 currentAllowance = _allowances[owner][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, 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: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _balances[to] += amount; emit Transfer(from, to, amount); _afterTokenTransfer(from, to, 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 Spend `amount` form the allowance of `owner` toward `spender`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - 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 {} /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[45] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20Upgradeable.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20MetadataUpgradeable is IERC20Upgradeable { /** * @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 (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev 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; import "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
{ "evmVersion": "london", "libraries": {}, "metadata": { "bytecodeHash": "none", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract IStkCvxCrvZaps","name":"_stkCvxCrvZaps","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":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","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"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"}],"name":"changeInfationRecipient","outputs":[],"stateMutability":"nonpayable","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":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"inflate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"inflatedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"inflationRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"inflationRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_uCrv","type":"address"},{"internalType":"address","name":"_inflationRecipient","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastInflatedTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"migrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"migrated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_inflationRate","type":"uint256"}],"name":"setInflation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stkCvxCrvZaps","outputs":[{"internalType":"contract IStkCvxCrvZaps","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"uCrvAmount","type":"uint256"}],"name":"toGCRV","outputs":[{"internalType":"uint256","name":"gCrvAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"gCrvAmount","type":"uint256"}],"name":"toUCRV","outputs":[{"internalType":"uint256","name":"uCrvAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","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":"uCrv","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"bool","name":"cvx","type":"bool"}],"name":"unwrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"wrap","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b50604051611a7a380380611a7a83398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b6080516119e161009960003960008181610225015281816109590152610a0801526119e16000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c8063715018a611610104578063a9059cbb116100a2578063dd62ed3e11610071578063dd62ed3e146103d9578063e0a8ed5214610412578063ea598cb014610425578063f2fde38b1461043857600080fd5b8063a9059cbb14610397578063afa6c344146103aa578063ce44dfba146103bd578063d6c4a819146103c657600080fd5b80638fd3ab80116100de5780638fd3ab801461036c57806395d89b4114610374578063a457c2d71461037c578063a5a98d781461038f57600080fd5b8063715018a61461034a5780637713d504146103525780638da5cb5b1461035b57600080fd5b80632c678c641161017c5780634089854b1161014b5780634089854b146102e6578063485cc955146102fb5780636d7dd21e1461030e57806370a082311461032157600080fd5b80632c678c64146102ae578063313ce567146102bb57806331f9e35b146102ca57806339509351146102d357600080fd5b806318160ddd116101b857806318160ddd1461025f5780631c9382af1461027557806323b872dd1461028857806323cb2da81461029b57600080fd5b806306fdde03146101df578063095ea7b3146101fd57806315cd46e414610220575b600080fd5b6101e761044b565b6040516101f491906115c2565b60405180910390f35b61021061020b36600461162c565b6104dd565b60405190151581526020016101f4565b6102477f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101f4565b6102676104f5565b6040519081526020016101f4565b610267610283366004611658565b610512565b610210610296366004611671565b61055a565b6102676102a9366004611658565b61057e565b609c546102109060ff1681565b604051601281526020016101f4565b610267609a5481565b6102106102e136600461162c565b6105ba565b6102f96102f43660046116c0565b6105f9565b005b6102f96103093660046116f0565b61077a565b6102f961031c36600461171e565b6108c0565b61026761032f36600461171e565b6001600160a01b031660009081526033602052604090205490565b6102f961090c565b61026760985481565b6065546001600160a01b0316610247565b6102f9610942565b6101e7610b04565b61021061038a36600461162c565b610b13565b6102f9610ba5565b6102106103a536600461162c565b610c3e565b609754610247906001600160a01b031681565b610267609b5481565b609954610247906001600160a01b031681565b6102676103e73660046116f0565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b6102f9610420366004611658565b610c4c565b6102f9610433366004611658565b610cd7565b6102f961044636600461171e565b610de3565b60606036805461045a90611742565b80601f016020809104026020016040519081016040528092919081815260200182805461048690611742565b80156104d35780601f106104a8576101008083540402835291602001916104d3565b820191906000526020600020905b8154815290600101906020018083116104b657829003601f168201915b5050505050905090565b6000336104eb818585610e7e565b5060019392505050565b6000609b5461050360355490565b61050d9190611792565b905090565b60008061051d6104f5565b90506000610529610fa2565b90508160000361053b57839250610553565b8161054682866117aa565b61055091906117c9565b92505b5050919050565b60003361056885828561100f565b6105738585856110a1565b506001949350505050565b6000806105896104f5565b90506000610595610fa2565b90508015806105a2575081155b156105af57839250610553565b8061054683866117aa565b3360008181526034602090815260408083206001600160a01b03871684529091528120549091906104eb90829086906105f4908790611792565b610e7e565b60006098544261060991906117eb565b42609855905060006106196104f5565b9050811580159061062957508015155b1561067057609a54670de0b6b3a76400009061064584846117aa565b61064f91906117aa565b61065991906117c9565b609b600082825461066a9190611792565b90915550505b33600061067c86610512565b9050610688828761126f565b84156106f95760975460405163f3fef3a360e01b81526001600160a01b038481166004830152602482018490529091169063f3fef3a390604401600060405180830381600087803b1580156106dc57600080fd5b505af11580156106f0573d6000803e3d6000fd5b50505050610772565b60975460405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490529091169063a9059cbb906044016020604051808303816000875af115801561074c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107709190611802565b505b505050505050565b600054610100900460ff166107955760005460ff1615610799565b303b155b6108015760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b600054610100900460ff16158015610823576000805461ffff19166101011790555b6108656040518060400160405280600481526020016333a1a92b60e11b8152506040518060400160405280600481526020016333a1a92b60e11b8152506113bd565b61086d6113f2565b609780546001600160a01b038086166001600160a01b0319928316179092556099805492851692909116919091179055635e80a6bf609a554260985580156108bb576000805461ff00191690555b505050565b6065546001600160a01b031633146108ea5760405162461bcd60e51b81526004016107f89061181f565b609980546001600160a01b0319166001600160a01b0392909216919091179055565b6065546001600160a01b031633146109365760405162461bcd60e51b81526004016107f89061181f565b6109406000611421565b565b60405163095ea7b360e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660048201526000196024820152734ebad8dbd4edbd74db0278714fbd67ebc76b89b790819063095ea7b3906044016020604051808303816000875af11580156109c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ea9190611802565b506040516370a0823160e01b81523060048201526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116916377212cf3918416906370a0823190602401602060405180830381865afa158015610a59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7d9190611854565b6040516001600160e01b031960e084901b168152600481019190915260006024820152306044820152606401600060405180830381600087803b158015610ac357600080fd5b505af1158015610ad7573d6000803e3d6000fd5b5050609780546001600160a01b03191673de2bef0a01845257b4aef2a2eaa48f6eaeafa8b7179055505050565b60606037805461045a90611742565b3360008181526034602090815260408083206001600160a01b038716845290915281205490919083811015610b985760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016107f8565b6105738286868403610e7e565b600060985442610bb591906117eb565b4260985590506000610bc56104f5565b90508115801590610bd557508015155b15610c1c57609a54670de0b6b3a764000090610bf184846117aa565b610bfb91906117aa565b610c0591906117c9565b609b6000828254610c169190611792565b90915550505b609954609b54610c35916001600160a01b031690611473565b50506000609b55565b6000336104eb8185856110a1565b6065546001600160a01b03163314610c765760405162461bcd60e51b81526004016107f89061181f565b60008111610cd25760405162461bcd60e51b815260206004820152602360248201527f674352563a20696e666c6174696f6e20726174652063616e6e6f74206265207a60448201526265726f60e81b60648201526084016107f8565b609a55565b600060985442610ce791906117eb565b4260985590506000610cf76104f5565b90508115801590610d0757508015155b15610d4e57609a54670de0b6b3a764000090610d2384846117aa565b610d2d91906117aa565b610d3791906117c9565b609b6000828254610d489190611792565b90915550505b336000610d5a8561057e565b9050610d668282611473565b6097546040516323b872dd60e01b81526001600160a01b03848116600483015230602483015260448201889052909116906323b872dd906064016020604051808303816000875af1158015610dbf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107729190611802565b6065546001600160a01b03163314610e0d5760405162461bcd60e51b81526004016107f89061181f565b6001600160a01b038116610e725760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107f8565b610e7b81611421565b50565b6001600160a01b038316610ee05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016107f8565b6001600160a01b038216610f415760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016107f8565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6097546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610feb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050d9190611854565b6001600160a01b03838116600090815260346020908152604080832093861683529290522054600019811461109b578181101561108e5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016107f8565b61109b8484848403610e7e565b50505050565b6001600160a01b0383166111055760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016107f8565b6001600160a01b0382166111675760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016107f8565b6001600160a01b038316600090815260336020526040902054818110156111df5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016107f8565b6001600160a01b03808516600090815260336020526040808220858503905591851681529081208054849290611216908490611792565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161126291815260200190565b60405180910390a361109b565b6001600160a01b0382166112cf5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016107f8565b6001600160a01b038216600090815260336020526040902054818110156113435760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016107f8565b6001600160a01b03831660009081526033602052604081208383039055603580548492906113729084906117eb565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600054610100900460ff166113e45760405162461bcd60e51b81526004016107f89061186d565b6113ee8282611552565b5050565b600054610100900460ff166114195760405162461bcd60e51b81526004016107f89061186d565b610940611592565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0382166114c95760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016107f8565b80603560008282546114db9190611792565b90915550506001600160a01b03821660009081526033602052604081208054839290611508908490611792565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600054610100900460ff166115795760405162461bcd60e51b81526004016107f89061186d565b60366115858382611914565b5060376108bb8282611914565b600054610100900460ff166115b95760405162461bcd60e51b81526004016107f89061186d565b61094033611421565b600060208083528351808285015260005b818110156115ef578581018301518582016040015282016115d3565b81811115611601576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b0381168114610e7b57600080fd5b6000806040838503121561163f57600080fd5b823561164a81611617565b946020939093013593505050565b60006020828403121561166a57600080fd5b5035919050565b60008060006060848603121561168657600080fd5b833561169181611617565b925060208401356116a181611617565b929592945050506040919091013590565b8015158114610e7b57600080fd5b600080604083850312156116d357600080fd5b8235915060208301356116e5816116b2565b809150509250929050565b6000806040838503121561170357600080fd5b823561170e81611617565b915060208301356116e581611617565b60006020828403121561173057600080fd5b813561173b81611617565b9392505050565b600181811c9082168061175657607f821691505b60208210810361177657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082198211156117a5576117a561177c565b500190565b60008160001904831182151516156117c4576117c461177c565b500290565b6000826117e657634e487b7160e01b600052601260045260246000fd5b500490565b6000828210156117fd576117fd61177c565b500390565b60006020828403121561181457600080fd5b815161173b816116b2565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561186657600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b601f8211156108bb57600081815260208120601f850160051c810160208610156118f55750805b601f850160051c820191505b8181101561077257828155600101611901565b815167ffffffffffffffff81111561192e5761192e6118b8565b6119428161193c8454611742565b846118ce565b602080601f831160018114611977576000841561195f5750858301515b600019600386901b1c1916600185901b178555610772565b600085815260208120601f198616915b828110156119a657888601518255948401946001909101908401611987565b50858210156119c45787850151600019600388901b60f8161c191681555b5050505050600190811b0190555056fea164736f6c634300080f000a000000000000000000000000ff87da30e779ca78ff2e9b1582d6c15c1ac31a95
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101da5760003560e01c8063715018a611610104578063a9059cbb116100a2578063dd62ed3e11610071578063dd62ed3e146103d9578063e0a8ed5214610412578063ea598cb014610425578063f2fde38b1461043857600080fd5b8063a9059cbb14610397578063afa6c344146103aa578063ce44dfba146103bd578063d6c4a819146103c657600080fd5b80638fd3ab80116100de5780638fd3ab801461036c57806395d89b4114610374578063a457c2d71461037c578063a5a98d781461038f57600080fd5b8063715018a61461034a5780637713d504146103525780638da5cb5b1461035b57600080fd5b80632c678c641161017c5780634089854b1161014b5780634089854b146102e6578063485cc955146102fb5780636d7dd21e1461030e57806370a082311461032157600080fd5b80632c678c64146102ae578063313ce567146102bb57806331f9e35b146102ca57806339509351146102d357600080fd5b806318160ddd116101b857806318160ddd1461025f5780631c9382af1461027557806323b872dd1461028857806323cb2da81461029b57600080fd5b806306fdde03146101df578063095ea7b3146101fd57806315cd46e414610220575b600080fd5b6101e761044b565b6040516101f491906115c2565b60405180910390f35b61021061020b36600461162c565b6104dd565b60405190151581526020016101f4565b6102477f000000000000000000000000ff87da30e779ca78ff2e9b1582d6c15c1ac31a9581565b6040516001600160a01b0390911681526020016101f4565b6102676104f5565b6040519081526020016101f4565b610267610283366004611658565b610512565b610210610296366004611671565b61055a565b6102676102a9366004611658565b61057e565b609c546102109060ff1681565b604051601281526020016101f4565b610267609a5481565b6102106102e136600461162c565b6105ba565b6102f96102f43660046116c0565b6105f9565b005b6102f96103093660046116f0565b61077a565b6102f961031c36600461171e565b6108c0565b61026761032f36600461171e565b6001600160a01b031660009081526033602052604090205490565b6102f961090c565b61026760985481565b6065546001600160a01b0316610247565b6102f9610942565b6101e7610b04565b61021061038a36600461162c565b610b13565b6102f9610ba5565b6102106103a536600461162c565b610c3e565b609754610247906001600160a01b031681565b610267609b5481565b609954610247906001600160a01b031681565b6102676103e73660046116f0565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b6102f9610420366004611658565b610c4c565b6102f9610433366004611658565b610cd7565b6102f961044636600461171e565b610de3565b60606036805461045a90611742565b80601f016020809104026020016040519081016040528092919081815260200182805461048690611742565b80156104d35780601f106104a8576101008083540402835291602001916104d3565b820191906000526020600020905b8154815290600101906020018083116104b657829003601f168201915b5050505050905090565b6000336104eb818585610e7e565b5060019392505050565b6000609b5461050360355490565b61050d9190611792565b905090565b60008061051d6104f5565b90506000610529610fa2565b90508160000361053b57839250610553565b8161054682866117aa565b61055091906117c9565b92505b5050919050565b60003361056885828561100f565b6105738585856110a1565b506001949350505050565b6000806105896104f5565b90506000610595610fa2565b90508015806105a2575081155b156105af57839250610553565b8061054683866117aa565b3360008181526034602090815260408083206001600160a01b03871684529091528120549091906104eb90829086906105f4908790611792565b610e7e565b60006098544261060991906117eb565b42609855905060006106196104f5565b9050811580159061062957508015155b1561067057609a54670de0b6b3a76400009061064584846117aa565b61064f91906117aa565b61065991906117c9565b609b600082825461066a9190611792565b90915550505b33600061067c86610512565b9050610688828761126f565b84156106f95760975460405163f3fef3a360e01b81526001600160a01b038481166004830152602482018490529091169063f3fef3a390604401600060405180830381600087803b1580156106dc57600080fd5b505af11580156106f0573d6000803e3d6000fd5b50505050610772565b60975460405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490529091169063a9059cbb906044016020604051808303816000875af115801561074c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107709190611802565b505b505050505050565b600054610100900460ff166107955760005460ff1615610799565b303b155b6108015760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b600054610100900460ff16158015610823576000805461ffff19166101011790555b6108656040518060400160405280600481526020016333a1a92b60e11b8152506040518060400160405280600481526020016333a1a92b60e11b8152506113bd565b61086d6113f2565b609780546001600160a01b038086166001600160a01b0319928316179092556099805492851692909116919091179055635e80a6bf609a554260985580156108bb576000805461ff00191690555b505050565b6065546001600160a01b031633146108ea5760405162461bcd60e51b81526004016107f89061181f565b609980546001600160a01b0319166001600160a01b0392909216919091179055565b6065546001600160a01b031633146109365760405162461bcd60e51b81526004016107f89061181f565b6109406000611421565b565b60405163095ea7b360e01b81526001600160a01b037f000000000000000000000000ff87da30e779ca78ff2e9b1582d6c15c1ac31a951660048201526000196024820152734ebad8dbd4edbd74db0278714fbd67ebc76b89b790819063095ea7b3906044016020604051808303816000875af11580156109c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ea9190611802565b506040516370a0823160e01b81523060048201526001600160a01b037f000000000000000000000000ff87da30e779ca78ff2e9b1582d6c15c1ac31a958116916377212cf3918416906370a0823190602401602060405180830381865afa158015610a59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7d9190611854565b6040516001600160e01b031960e084901b168152600481019190915260006024820152306044820152606401600060405180830381600087803b158015610ac357600080fd5b505af1158015610ad7573d6000803e3d6000fd5b5050609780546001600160a01b03191673de2bef0a01845257b4aef2a2eaa48f6eaeafa8b7179055505050565b60606037805461045a90611742565b3360008181526034602090815260408083206001600160a01b038716845290915281205490919083811015610b985760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016107f8565b6105738286868403610e7e565b600060985442610bb591906117eb565b4260985590506000610bc56104f5565b90508115801590610bd557508015155b15610c1c57609a54670de0b6b3a764000090610bf184846117aa565b610bfb91906117aa565b610c0591906117c9565b609b6000828254610c169190611792565b90915550505b609954609b54610c35916001600160a01b031690611473565b50506000609b55565b6000336104eb8185856110a1565b6065546001600160a01b03163314610c765760405162461bcd60e51b81526004016107f89061181f565b60008111610cd25760405162461bcd60e51b815260206004820152602360248201527f674352563a20696e666c6174696f6e20726174652063616e6e6f74206265207a60448201526265726f60e81b60648201526084016107f8565b609a55565b600060985442610ce791906117eb565b4260985590506000610cf76104f5565b90508115801590610d0757508015155b15610d4e57609a54670de0b6b3a764000090610d2384846117aa565b610d2d91906117aa565b610d3791906117c9565b609b6000828254610d489190611792565b90915550505b336000610d5a8561057e565b9050610d668282611473565b6097546040516323b872dd60e01b81526001600160a01b03848116600483015230602483015260448201889052909116906323b872dd906064016020604051808303816000875af1158015610dbf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107729190611802565b6065546001600160a01b03163314610e0d5760405162461bcd60e51b81526004016107f89061181f565b6001600160a01b038116610e725760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107f8565b610e7b81611421565b50565b6001600160a01b038316610ee05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016107f8565b6001600160a01b038216610f415760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016107f8565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6097546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610feb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050d9190611854565b6001600160a01b03838116600090815260346020908152604080832093861683529290522054600019811461109b578181101561108e5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016107f8565b61109b8484848403610e7e565b50505050565b6001600160a01b0383166111055760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016107f8565b6001600160a01b0382166111675760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016107f8565b6001600160a01b038316600090815260336020526040902054818110156111df5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016107f8565b6001600160a01b03808516600090815260336020526040808220858503905591851681529081208054849290611216908490611792565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161126291815260200190565b60405180910390a361109b565b6001600160a01b0382166112cf5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016107f8565b6001600160a01b038216600090815260336020526040902054818110156113435760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016107f8565b6001600160a01b03831660009081526033602052604081208383039055603580548492906113729084906117eb565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600054610100900460ff166113e45760405162461bcd60e51b81526004016107f89061186d565b6113ee8282611552565b5050565b600054610100900460ff166114195760405162461bcd60e51b81526004016107f89061186d565b610940611592565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0382166114c95760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016107f8565b80603560008282546114db9190611792565b90915550506001600160a01b03821660009081526033602052604081208054839290611508908490611792565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600054610100900460ff166115795760405162461bcd60e51b81526004016107f89061186d565b60366115858382611914565b5060376108bb8282611914565b600054610100900460ff166115b95760405162461bcd60e51b81526004016107f89061186d565b61094033611421565b600060208083528351808285015260005b818110156115ef578581018301518582016040015282016115d3565b81811115611601576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b0381168114610e7b57600080fd5b6000806040838503121561163f57600080fd5b823561164a81611617565b946020939093013593505050565b60006020828403121561166a57600080fd5b5035919050565b60008060006060848603121561168657600080fd5b833561169181611617565b925060208401356116a181611617565b929592945050506040919091013590565b8015158114610e7b57600080fd5b600080604083850312156116d357600080fd5b8235915060208301356116e5816116b2565b809150509250929050565b6000806040838503121561170357600080fd5b823561170e81611617565b915060208301356116e581611617565b60006020828403121561173057600080fd5b813561173b81611617565b9392505050565b600181811c9082168061175657607f821691505b60208210810361177657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082198211156117a5576117a561177c565b500190565b60008160001904831182151516156117c4576117c461177c565b500290565b6000826117e657634e487b7160e01b600052601260045260246000fd5b500490565b6000828210156117fd576117fd61177c565b500390565b60006020828403121561181457600080fd5b815161173b816116b2565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561186657600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b601f8211156108bb57600081815260208120601f850160051c810160208610156118f55750805b601f850160051c820191505b8181101561077257828155600101611901565b815167ffffffffffffffff81111561192e5761192e6118b8565b6119428161193c8454611742565b846118ce565b602080601f831160018114611977576000841561195f5750858301515b600019600386901b1c1916600185901b178555610772565b600085815260208120601f198616915b828110156119a657888601518255948401946001909101908401611987565b50858210156119c45787850151600019600388901b60f8161c191681555b5050505050600190811b0190555056fea164736f6c634300080f000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000ff87da30e779ca78ff2e9b1582d6c15c1ac31a95
-----Decoded View---------------
Arg [0] : _stkCvxCrvZaps (address): 0xFF87Da30E779ca78ff2E9b1582D6C15C1ac31A95
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000ff87da30e779ca78ff2e9b1582d6c15c1ac31a95
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.