Source Code
Overview
ETH Balance
ETH Value
$0.00| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 28271051 | 33 hrs ago | 0 ETH | ||||
| 28254266 | 43 hrs ago | 0 ETH | ||||
| 28238914 | 2 days ago | 0 ETH | ||||
| 28238914 | 2 days ago | 0 ETH | ||||
| 28238914 | 2 days ago | 0 ETH | ||||
| 28238914 | 2 days ago | 0 ETH | ||||
| 28238914 | 2 days ago | 0 ETH | ||||
| 28238903 | 2 days ago | 0 ETH | ||||
| 28178215 | 3 days ago | 0 ETH | ||||
| 28178215 | 3 days ago | 0 ETH | ||||
| 28178215 | 3 days ago | 0 ETH | ||||
| 28178215 | 3 days ago | 0 ETH | ||||
| 28178215 | 3 days ago | 0 ETH | ||||
| 28178200 | 3 days ago | 0 ETH | ||||
| 27858073 | 11 days ago | 0 ETH | ||||
| 27623617 | 16 days ago | 0 ETH | ||||
| 27623617 | 16 days ago | 0 ETH | ||||
| 27623617 | 16 days ago | 0 ETH | ||||
| 27623617 | 16 days ago | 0 ETH | ||||
| 27623617 | 16 days ago | 0 ETH | ||||
| 27623552 | 16 days ago | 0 ETH | ||||
| 27544181 | 18 days ago | 0 ETH | ||||
| 27544181 | 18 days ago | 0 ETH | ||||
| 27544181 | 18 days ago | 0 ETH | ||||
| 27544181 | 18 days ago | 0 ETH |
Cross-Chain Transactions
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
MendiVault
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 1 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../deps/ReentrancyGuardUpgradeable.sol";
import "../deps/UUPSUpgradeable.sol";
import "../deps/OwnableUpgradeable.sol";
import "../deps/ERC20Upgradeable.sol";
import "../deps/SafeERC20Upgradeable.sol";
import "./interfaces/IStrategy.sol";
/**
* @dev Implementation of a vault to deposit funds for yield optimizing.
* This is the contract that receives funds and that users interface with.
* The yield optimizing strategy itself is implemented in a separate 'Strategy.sol' contract.
*/
contract MendiVault is ERC20Upgradeable, OwnableUpgradeable, UUPSUpgradeable, ReentrancyGuardUpgradeable {
using SafeERC20Upgradeable for IERC20Upgradeable;
struct Candidate {
address implementation;
uint proposedTime;
}
// The last proposed strategy to switch to.
Candidate public candidate;
// The strategy currently in use by the vault.
IStrategy public strategy;
// The minimum time it has to pass before a strat candidate can be approved.
uint256 public approvalDelay;
//ATTENTION! ADD Varrible(s) only before this __gap and decrease __gap size properly
uint256[50] private __gap;
event NewCandidate(address implementation);
event UpgradeStrat(address implementation);
function initialize(bytes memory initializeData) public initializer {
string memory _name;
string memory _symbol;
(strategy, _name, _symbol, approvalDelay) = abi.decode(initializeData, (IStrategy, string, string, uint256));
__ERC20_init(_name, _symbol);
__Ownable_init();
__ReentrancyGuard_init();
transferOwnership(tx.origin);
}
function depositToken() public view returns (IERC20Upgradeable) {
return IERC20Upgradeable(strategy.depositToken());
}
/**
* @dev It calculates the total underlying value of {token} held by the system.
* It takes into account the vault contract balance, the strategy contract balance
* and the balance deployed in other contracts as part of the strategy.
*/
function TVL() public view returns (uint) {
return depositToken().balanceOf(address(this)) + IStrategy(strategy).totalTokens();
}
/**
* @dev Custom logic in here for how much the vault allows to be borrowed.
* We return 100% of tokens for now. Under certain conditions we might
* want to keep some of the system funds at hand in the vault, instead
* of putting them to work.
*/
function available() public view returns (uint256) {
return depositToken().balanceOf(address(this));
}
function totalTokens() external view returns (uint256) {
return _totalTokens(msg.sender);
}
function _totalTokens(address user) private view returns (uint256) {
return totalSupply() == 0 ? 0 : (balanceOf(user) * TVL()) / totalSupply();
}
function totalTokens(address user) external view returns (uint256) {
return _totalTokens(user);
}
/**
* @dev Function for various UIs to display the current value of one of our yield tokens.
* Returns an uint256 with 18 decimals of how much underlying asset one vault share represents.
*/
function getPricePerFullShare() public view returns (uint256) {
return totalSupply() == 0 ? 1e18 : (TVL() * 1e18) / totalSupply();
}
/**
* @dev A helper function to call deposit() with all the sender's funds.
*/
function depositAll() external {
deposit(depositToken().balanceOf(msg.sender));
}
/**
* @dev The entrypoint of funds into the system. People deposit with this function
* into the vault. The vault is then in charge of sending funds into the strategy.
*/
function deposit(uint _amount) public nonReentrant {
strategy.beforeDeposit();
uint256 _pool = TVL();
depositToken().safeTransferFrom(msg.sender, address(this), _amount);
_deposit();
uint256 _after = TVL();
_amount = _after - _pool; // Additional check for deflationary tokens
uint256 shares = 0;
if (totalSupply() == 0) {
shares = _amount;
} else {
shares = (_amount * totalSupply()) / _pool;
}
_mint(msg.sender, shares);
}
/**
* @dev Function to send funds into the strategy and put them to work. It's primarily called
* by the vault's deposit() function.
*/
function _deposit() internal {
uint _bal = available();
depositToken().safeTransfer(address(strategy), _bal);
strategy.deposit();
}
/**
* @dev A helper function to call withdraw() with all the sender's funds.
*/
function withdrawAll() external returns (uint256 amountWithdrawn) {
return withdraw(balanceOf(msg.sender));
}
/**
* @dev Function to exit the system. The vault will withdraw the required tokens
* from the strategy and pay up the token holder. A proportional number of IOU
* tokens are burned in the process.
*/
function withdraw(uint256 _shares) public returns (uint256 amountWithdrawn) {
uint256 desiredAmount = (TVL() * _shares) / totalSupply();
_burn(msg.sender, _shares);
uint vaultBalance = depositToken().balanceOf(address(this));
if (vaultBalance < desiredAmount) {
uint amountToWithdraw = desiredAmount - vaultBalance;
strategy.withdraw(amountToWithdraw);
uint vaultBalanceAfter = depositToken().balanceOf(address(this));
uint withdrawnFromStrategy = vaultBalanceAfter - vaultBalance;
// Adjust the desiredAmount if strategy returned less than calculated amount to withdraw
if (withdrawnFromStrategy < amountToWithdraw) {
desiredAmount = vaultBalance + withdrawnFromStrategy;
}
}
amountWithdrawn = desiredAmount;
depositToken().safeTransfer(msg.sender, amountWithdrawn);
}
/**
* @dev Sets the candidate for the new strat to use with this vault.
* @param _implementation The address of the candidate strategy.
*/
function propose(address _implementation) public onlyOwner {
require(address(this) == IStrategy(_implementation).vault(), "Proposal not valid for this Vault");
require(depositToken() == IStrategy(_implementation).depositToken(), "Different depositToken");
candidate = Candidate({implementation: _implementation, proposedTime: block.timestamp});
emit NewCandidate(_implementation);
}
/**
* @dev It switches the active strat for the strat Candidate. After upgrading, the
* candidate implementation is set to the 0x00 address, and proposedTime to a time
* happening in +100 years for safety.
*/
function upgradeStrat() public onlyOwner {
require(candidate.implementation != address(0), "There is no candidate");
require(candidate.proposedTime + approvalDelay < block.timestamp, "Delay has not passed");
emit UpgradeStrat(candidate.implementation);
strategy.retireStrat();
strategy = IStrategy(candidate.implementation);
candidate.implementation = address(0);
candidate.proposedTime = 5000000000;
_deposit();
}
/**
* @dev Rescues random funds stuck that the strat can't handle.
* @param _token address of the token to rescue.
*/
function inCaseTokensGetStuck(address _token) external onlyOwner {
require(_token != address(depositToken()), "!depositToken");
uint256 amount = IERC20Upgradeable(_token).balanceOf(address(this));
IERC20Upgradeable(_token).safeTransfer(msg.sender, amount);
}
function _authorizeUpgrade(address newImplementation) internal override onlyOwner {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)
pragma solidity ^0.8.0;
/**
* @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified
* proxy whose upgrades are fully controlled by the current implementation.
*/
interface IERC1822ProxiableUpgradeable {
/**
* @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation
* address.
*
* IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
* function revert if invoked through a proxy.
*/
function proxiableUUID() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)
pragma solidity ^0.8.0;
/**
* @dev This is the interface that {BeaconProxy} expects of its beacon.
*/
interface IBeaconUpgradeable {
/**
* @dev Must return an address that can be used as a delegate call target.
*
* {BeaconProxy} will check that this address is a contract.
*/
function implementation() external view returns (address);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library AddressUpgradeable {
enum ErrorCodes {
unknown,
functionCall,
functionCallWithValue,
functionStaticCall,
functionDelegateCall
}
/**
* @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");
if (!(address(this).balance >= amount)) revert Address__InsufficientBalance();
(bool success, ) = recipient.call{value: amount}("");
// require(success, "Address: unable to send value, recipient may have reverted");
if (!success) revert Address__UnableToSendValue();
}
/**
* @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");
return functionCall(target, data, uint(ErrorCodes.functionCall));
}
/**
* @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 with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data, uint errorCode) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorCode);
}
/**
* @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");
return functionCallWithValue(target, data, value, uint(ErrorCodes.functionCallWithValue));
}
/**
* @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");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// 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
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
/**
* @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,
uint errorCode
) internal returns (bytes memory) {
// require(address(this).balance >= value, "Address: insufficient balance for call");
// require(isContract(target), "Address: call to non-contract");
if (!(address(this).balance >= value)) revert Address__InsufficientBalanceForCall();
if (!(isContract(target))) revert Address__CallToNonContract();
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorCode);
}
/**
* @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");
return functionStaticCall(target, data, uint(ErrorCodes.functionStaticCall));
}
/**
* @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,
uint errorCode
) internal view returns (bytes memory) {
// require(isContract(target), "Address: static call to non-contract");
if (!(isContract(target))) revert Address__StaticCallToNonContract();
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorCode);
}
/**
* @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,
uint errorCode
) 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
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
// revert(errorMessage);
if (errorCode == uint(ErrorCodes.functionCall)) revert Address__LowLevelCallFailed();
else if (errorCode == uint(ErrorCodes.functionCallWithValue))
revert Address__LowLevelCallWithValueFailed();
else if (errorCode == uint(ErrorCodes.functionStaticCall)) revert Address__LowLevelStaticCallFailed();
else revert Address__LowLevelCallFailedWithCustomErrorCode(uint(errorCode));
}
}
}
/* ERRORS */
error Address__InsufficientBalance();
error Address__UnableToSendValue();
error Address__InsufficientBalanceForCall();
error Address__CallToNonContract();
error Address__StaticCallToNonContract();
error Address__LowLevelCallFailedWithCustomErrorCode(uint errorCode);
error Address__LowLevelCallFailed();
error Address__LowLevelCallWithValueFailed();
error Address__LowLevelStaticCallFailed();
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
import "./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.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)
pragma solidity ^0.8.2;
import "@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol";
import "./AddressUpgradeable.sol";
import "./StorageSlotUpgradeable.sol";
import "./Initializable.sol";
/**
* @dev This abstract contract provides getters and event emitting update functions for
* https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.
*
* _Available since v4.1._
*
* @custom:oz-upgrades-unsafe-allow delegatecall
*/
abstract contract ERC1967UpgradeUpgradeable is Initializable {
function __ERC1967Upgrade_init() internal onlyInitializing {}
function __ERC1967Upgrade_init_unchained() internal onlyInitializing {}
// This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1
bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;
/**
* @dev Storage slot with the address of the current implementation.
* This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
* validated in the constructor.
*/
bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
/**
* @dev Emitted when the implementation is upgraded.
*/
event Upgraded(address indexed implementation);
/**
* @dev Returns the current implementation address.
*/
function _getImplementation() internal view returns (address) {
return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;
}
/**
* @dev Stores a new address in the EIP1967 implementation slot.
*/
function _setImplementation(address newImplementation) private {
// require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract");
if (!(AddressUpgradeable.isContract(newImplementation))) revert ERC1967_NewImplementationIsNotAContract();
StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
}
/**
* @dev Perform implementation upgrade
*
* Emits an {Upgraded} event.
*/
function _upgradeTo(address newImplementation) internal {
_setImplementation(newImplementation);
emit Upgraded(newImplementation);
}
/**
* @dev Perform implementation upgrade with additional setup call.
*
* Emits an {Upgraded} event.
*/
function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal {
_upgradeTo(newImplementation);
if (data.length > 0 || forceCall) {
_functionDelegateCall(newImplementation, data);
}
}
/**
* @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.
*
* Emits an {Upgraded} event.
*/
function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal {
// Upgrades from old implementations will perform a rollback test. This test requires the new
// implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing
// this special case will break upgrade paths from old UUPS implementation to new ones.
if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {
_setImplementation(newImplementation);
} else {
try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {
// require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID");
if (!(slot == _IMPLEMENTATION_SLOT)) revert ERC1967Upgrade_UnsupportedProxiableUUID();
} catch {
// revert("ERC1967Upgrade: new implementation is not UUPS");
revert ERC1967Upgrade_NewImplementationIsNotUUPS();
}
_upgradeToAndCall(newImplementation, data, forceCall);
}
}
/**
* @dev Storage slot with the admin of the contract.
* This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is
* validated in the constructor.
*/
bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
/**
* @dev Emitted when the admin account has changed.
*/
event AdminChanged(address previousAdmin, address newAdmin);
/**
* @dev Returns the current admin.
*/
function _getAdmin() internal view returns (address) {
return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;
}
/**
* @dev Stores a new address in the EIP1967 admin slot.
*/
function _setAdmin(address newAdmin) private {
// require(newAdmin != address(0), "ERC1967: new admin is the zero address");
if (!(newAdmin != address(0))) revert ERC1967_NewAdminIsZeroAddress();
StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;
}
/**
* @dev Changes the admin of the proxy.
*
* Emits an {AdminChanged} event.
*/
function _changeAdmin(address newAdmin) internal {
emit AdminChanged(_getAdmin(), newAdmin);
_setAdmin(newAdmin);
}
/**
* @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
* This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.
*/
bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;
/**
* @dev Emitted when the beacon is upgraded.
*/
event BeaconUpgraded(address indexed beacon);
/**
* @dev Returns the current beacon.
*/
function _getBeacon() internal view returns (address) {
return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;
}
/**
* @dev Stores a new beacon in the EIP1967 beacon slot.
*/
function _setBeacon(address newBeacon) private {
// require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract");
// require(
// AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),
// "ERC1967: beacon implementation is not a contract"
// );
if (!(AddressUpgradeable.isContract(newBeacon))) revert ERC1967_NewBeaconIsNotAContract();
if (!(AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()))) {
revert ERC1967_BeaconImplementationIsNotAContract();
}
StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;
}
/**
* @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does
* not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).
*
* Emits a {BeaconUpgraded} event.
*/
function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal {
_setBeacon(newBeacon);
emit BeaconUpgraded(newBeacon);
if (data.length > 0 || forceCall) {
_functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);
}
}
/**
* @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) private returns (bytes memory) {
// require(AddressUpgradeable.isContract(target), "Address: delegate call to non-contract");
if (!(AddressUpgradeable.isContract(target))) revert Address_DelegateCallToNonContract();
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.delegatecall(data);
return
AddressUpgradeable.verifyCallResult(
success,
returndata,
uint256(AddressUpgradeable.ErrorCodes.functionDelegateCall)
);
}
/**
* @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;
/* ERRORS */
error ERC1967_NewImplementationIsNotAContract();
error ERC1967Upgrade_UnsupportedProxiableUUID();
error ERC1967Upgrade_NewImplementationIsNotUUPS();
error ERC1967_NewAdminIsZeroAddress();
error ERC1967_NewBeaconIsNotAContract();
error ERC1967_BeaconImplementationIsNotAContract();
error Address_DelegateCallToNonContract();
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
import "./IERC20Upgradeable.sol";
import "./IERC20MetadataUpgradeable.sol";
import "./ContextUpgradeable.sol";
import "./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.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* The default value of {decimals} is 18. To change this, you should override
* this function so it returns a different value.
*
* 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}.
*
* 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 default value returned by this function, unless
* it's 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, allowance(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 = allowance(owner, spender);
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `amount` of tokens from `from` to `to`.
*
* 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;
// Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
// decrementing then incrementing.
_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;
unchecked {
// Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
_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;
// Overflow not possible: amount <= accountBalance <= totalSupply.
_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 Updates `owner` s allowance for `spender` based on spent `amount`.
*
* 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 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.9.0) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*/
interface IERC20PermitUpgradeable {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20Upgradeable {
/**
* @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);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.2;
import "./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.
*
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
* case an upgrade adds a module that needs to be initialized.
*
* For example:
*
* [.hljs-theme-light.nopadding]
* ```
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
* function initializeV2() rereinitializer(2) public {
* __ERC20Permit_init("MyToken");
* }
* }
* ```
*
* 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 prevent the implementation contract from being used, you should invoke
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() {
* _disableInitializers();
* }
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
* @custom:oz-retyped-from bool
*/
uint8 private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint8 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.
*/
modifier initializer() {
bool isTopLevelCall = !_initializing;
// require(
// (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
// "Initializable: contract is already initialized"
// );
if (
!((isTopLevelCall && _initialized < 1) ||
(!AddressUpgradeable.isContract(address(this)) && _initialized == 1))
) {
revert Initializable__ContractIsAlreadyInitialized();
}
_initialized = 1;
if (isTopLevelCall) {
_initializing = true;
}
_;
if (isTopLevelCall) {
_initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original
* initialization step. This is essential to configure modules that are added through upgrades and that require
* initialization.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*/
modifier reinitializer(uint8 version) {
// require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
if (!(!_initializing && _initialized < version)) revert Initializable__ContractIsAlreadyInitialized();
_initialized = version;
_initializing = true;
_;
_initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
// require(_initializing, "Initializable: contract is not initializing");
if (!(_initializing)) revert Initializable__ContractIsNotInitializing();
_;
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*/
function _disableInitializers() internal virtual {
// require(!_initializing, "Initializable: contract is initializing");
if (!(!_initializing)) revert Initializable_ContractIsInitializing();
if (_initialized < type(uint8).max) {
_initialized = type(uint8).max;
emit Initialized(type(uint8).max);
}
}
/* ERRORS */
error Initializable__ContractIsAlreadyInitialized();
error Initializable__ContractIsNotInitializing();
error Initializable_ContractIsInitializing();
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "./ContextUpgradeable.sol";
import "./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 Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
// require(owner() == _msgSender(), "Ownable: caller is not the owner");
if (!(owner() == _msgSender())) revert Ownable__CallerIsNotTheOwner();
}
/**
* @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");
if (!(newOwner != address(0))) revert Ownable__NewOwnerIsTheZeroAddress();
_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;
/* ERRORS */
error Ownable__CallerIsNotTheOwner();
error Ownable__NewOwnerIsTheZeroAddress();
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
import "./Initializable.sol";
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuardUpgradeable is Initializable {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
function __ReentrancyGuard_init() internal onlyInitializing {
__ReentrancyGuard_init_unchained();
}
function __ReentrancyGuard_init_unchained() internal onlyInitializing {
_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() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be _NOT_ENTERED
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == _ENTERED;
}
/**
* @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.9.3) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "./IERC20Upgradeable.sol";
import "./IERC20PermitUpgradeable.sol";
import "./AddressUpgradeable.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 SafeERC20Upgradeable {
using AddressUpgradeable for address;
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20Upgradeable token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20Upgradeable 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(IERC20Upgradeable 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));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeIncreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeDecreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*/
function forceApprove(IERC20Upgradeable token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
* Revert on invalid signature.
*/
function safePermit(
IERC20PermitUpgradeable token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @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(IERC20Upgradeable 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");
require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
/**
* @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).
*
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20Upgradeable token, bytes memory data) private returns (bool) {
// 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 cannot use {Address-functionCall} here since this should return false
// and not revert is the subcall reverts.
(bool success, bytes memory returndata) = address(token).call(data);
return
success && (returndata.length == 0 || abi.decode(returndata, (bool))) && AddressUpgradeable.isContract(address(token));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)
pragma solidity ^0.8.0;
/**
* @dev Library for reading and writing primitive types to specific storage slots.
*
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
*
* Example usage to set ERC1967 implementation slot:
* ```
* contract ERC1967 {
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*
* _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._
*/
library StorageSlotUpgradeable {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 value;
}
/**
* @dev Returns an `AddressSlot` with member `value` located at `slot`.
*/
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BooleanSlot` with member `value` located at `slot`.
*/
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
*/
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Uint256Slot` with member `value` located at `slot`.
*/
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/UUPSUpgradeable.sol)
pragma solidity ^0.8.0;
import "@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol";
import "./ERC1967UpgradeUpgradeable.sol";
import "./Initializable.sol";
/**
* @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an
* {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.
*
* A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is
* reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing
* `UUPSUpgradeable` with a custom implementation of upgrades.
*
* The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.
*
* _Available since v4.1._
*/
abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {
function __UUPSUpgradeable_init() internal onlyInitializing {}
function __UUPSUpgradeable_init_unchained() internal onlyInitializing {}
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment
address private immutable __self = address(this);
/**
* @dev Check that the execution is being performed through a delegatecall call and that the execution context is
* a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case
* for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a
* function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to
* fail.
*/
modifier onlyProxy() {
// require(address(this) != __self, "Function must be called through delegatecall");
// require(_getImplementation() == __self, "Function must be called through active proxy");
if (!(address(this) != __self)) revert FunctionMustBeCalledThroughDelegatecall();
if (!(_getImplementation() == __self)) revert FunctionMustBeCalledThroughActiveProxy();
_;
}
/**
* @dev Check that the execution is not being performed through a delegate call. This allows a function to be
* callable on the implementing contract but not through proxies.
*/
modifier notDelegated() {
// require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall");
if (!(address(this) == __self)) revert UUPSUpgradeable__MustNotBeCalledThroughDelegatecall();
_;
}
/**
* @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the
* implementation. It is used to validate that the this implementation remains valid after an upgrade.
*
* IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
* function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.
*/
function proxiableUUID() external view virtual override notDelegated returns (bytes32) {
return _IMPLEMENTATION_SLOT;
}
/**
* @dev Upgrade the implementation of the proxy to `newImplementation`.
*
* Calls {_authorizeUpgrade}.
*
* Emits an {Upgraded} event.
*/
function upgradeTo(address newImplementation) external virtual onlyProxy {
_authorizeUpgrade(newImplementation);
_upgradeToAndCallUUPS(newImplementation, new bytes(0), false);
}
/**
* @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call
* encoded in `data`.
*
* Calls {_authorizeUpgrade}.
*
* Emits an {Upgraded} event.
*/
function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {
_authorizeUpgrade(newImplementation);
_upgradeToAndCallUUPS(newImplementation, data, true);
}
/**
* @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by
* {upgradeTo} and {upgradeToAndCall}.
*
* Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
*
* ```solidity
* function _authorizeUpgrade(address) internal override onlyOwner {}
* ```
*/
function _authorizeUpgrade(address newImplementation) 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[50] private __gap;
/* ERRORS */
error FunctionMustBeCalledThroughDelegatecall();
error FunctionMustBeCalledThroughActiveProxy();
error UUPSUpgradeable__MustNotBeCalledThroughDelegatecall();
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./../../deps//IERC20Upgradeable.sol";
interface IStrategy {
function vault() external view returns (address);
function depositToken() external view returns (IERC20Upgradeable);
function beforeDeposit() external;
function deposit() external;
function withdraw(uint256) external;
function totalTokens() external view returns (uint256);
function balance() external view returns (uint256);
function balanceOfDepositToken() external view returns (uint256);
function balanceOfPool() external view returns (uint256);
function compound() external;
function retireStrat() external;
function panic() external;
function pause() external;
function unpause() external;
function paused() external view returns (bool);
function unirouter() external view returns (address);
}{
"viaIR": true,
"optimizer": {
"enabled": true,
"runs": 1,
"details": {
"peephole": true,
"yulDetails": {
"stackAllocation": true,
"optimizerSteps": "dhfoD[xarrscLMcCTU]uljmul"
}
}
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"name":"Address_DelegateCallToNonContract","type":"error"},{"inputs":[],"name":"Address__LowLevelCallFailed","type":"error"},{"inputs":[{"internalType":"uint256","name":"errorCode","type":"uint256"}],"name":"Address__LowLevelCallFailedWithCustomErrorCode","type":"error"},{"inputs":[],"name":"Address__LowLevelCallWithValueFailed","type":"error"},{"inputs":[],"name":"Address__LowLevelStaticCallFailed","type":"error"},{"inputs":[],"name":"ERC1967Upgrade_NewImplementationIsNotUUPS","type":"error"},{"inputs":[],"name":"ERC1967Upgrade_UnsupportedProxiableUUID","type":"error"},{"inputs":[],"name":"ERC1967_BeaconImplementationIsNotAContract","type":"error"},{"inputs":[],"name":"ERC1967_NewAdminIsZeroAddress","type":"error"},{"inputs":[],"name":"ERC1967_NewBeaconIsNotAContract","type":"error"},{"inputs":[],"name":"ERC1967_NewImplementationIsNotAContract","type":"error"},{"inputs":[],"name":"FunctionMustBeCalledThroughActiveProxy","type":"error"},{"inputs":[],"name":"FunctionMustBeCalledThroughDelegatecall","type":"error"},{"inputs":[],"name":"Initializable_ContractIsInitializing","type":"error"},{"inputs":[],"name":"Initializable__ContractIsAlreadyInitialized","type":"error"},{"inputs":[],"name":"Initializable__ContractIsNotInitializing","type":"error"},{"inputs":[],"name":"Ownable__CallerIsNotTheOwner","type":"error"},{"inputs":[],"name":"Ownable__NewOwnerIsTheZeroAddress","type":"error"},{"inputs":[],"name":"UUPSUpgradeable__MustNotBeCalledThroughDelegatecall","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"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":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"implementation","type":"address"}],"name":"NewCandidate","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"implementation","type":"address"}],"name":"UpgradeStrat","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"TVL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":[],"name":"approvalDelay","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":"available","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"candidate","outputs":[{"internalType":"address","name":"implementation","type":"address"},{"internalType":"uint256","name":"proposedTime","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"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositToken","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPricePerFullShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"inCaseTokensGetStuck","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":"bytes","name":"initializeData","type":"bytes"}],"name":"initialize","outputs":[],"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":"address","name":"_implementation","type":"address"}],"name":"propose","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategy","outputs":[{"internalType":"contract IStrategy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"totalTokens","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":"upgradeStrat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"amountWithdrawn","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[{"internalType":"uint256","name":"amountWithdrawn","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60a06040523462000034576200001462000039565b604051612cdb90816200009b82396080518181816127d8015261286b0152f35b600080fd5b6200004362000045565b565b620000436200008a565b620000659062000068906001600160a01b031682565b90565b6001600160a01b031690565b62000065906200004f565b620000659062000074565b62000095306200007f565b60805256fe6080604052600436101561001257600080fd5b60003560e01c8063012679511461023257806306fdde031461022d578063095ea7b31461022857806318160ddd1461022357806323b872dd1461021e5780632e1a7d4d14610219578063313ce567146102145780633659cfe61461020f578063395093511461020a578063439fab911461020557806348a0d754146102005780634f1ef286146101fb57806352d1902d146101f65780636c8381f8146101f157806370a08231146101ec578063715018a6146101e757806377c7b8fc146101e25780637e1c0c09146101dd578063853828b6146101d85780638da5cb5b146101d357806395d89b41146101ce578063a457c2d7146101c9578063a8c62e76146101c4578063a9059cbb146101bf578063b6b55f25146101ba578063c89039c5146101b5578063cb9199a2146101b0578063dd62ed3e146101ab578063de5f6268146101a6578063def68a9c146101a1578063e2d1e75c1461019c578063e668524414610197578063edaf2d2e146101925763f2fde38b0361025657610972565b610957565b61093f565b610924565b6108e9565b6108d1565b6108b5565b610877565b61085c565b610844565b610828565b610801565b610781565b610766565b61073f565b610714565b6106f9565b6106de565b6106c6565b6106ab565b61067d565b61060c565b6105f8565b6105a8565b610590565b61048c565b610474565b610445565b61042a565b6103fa565b6103a5565b610377565b610316565b61027e565b6001600160a01b031690565b90565b61024f81610237565b0361025657565b600080fd5b9050359061026882610246565b565b90602082820312610256576102439161025b565b346102565761029661029136600461026a565b6115c5565b604051005b0390f35b600091031261025657565b60005b8381106102bd5750506000910152565b81810151838201526020016102ad565b6102ee6102f7602093610301936102e2815190565b80835293849260200190565b958691016102aa565b601f01601f191690565b0190565b9060206102439281815201906102cd565b346102565761032636600461029f565b61029b610331611bb0565b60405191829182610305565b8061024f565b905035906102688261033d565b91906040838203126102565780602061036c610243938661025b565b9401610343565b9052565b346102565761029b61039361038d366004610350565b90611c2f565b60405191829182901515815260200190565b34610256576103b536600461029f565b61029b6103c0611bce565b6040515b9182918290815260200190565b9091606082840312610256576102436103ea848461025b565b93604061036c826020870161025b565b346102565761029b6103936104103660046103d1565b91611c3a565b906020828203126102565761024391610343565b346102565761029b6103c0610440366004610416565b6111ba565b346102565761045536600461029f565b61029b610460611bc4565b6040519182918260ff909116815260200190565b346102565761029661048736600461026a565b61292b565b346102565761029b6103936104a2366004610350565b90611c4b565b634e487b7160e01b600052604160045260246000fd5b90601f01601f191681019081106001600160401b038211176104df57604052565b6104a8565b906102686104f160405190565b92836104be565b6001600160401b0381116104df57602090601f01601f19160190565b90826000939282370152565b90929192610535610530826104f8565b6104e4565b91829482845282820111610256576020610268930190610514565b9080601f830112156102565781602061024393359101610520565b906020828203126102565781356001600160401b038111610256576102439201610550565b34610256576102966105a336600461056b565b610cc4565b34610256576105b836600461029f565b61029b6103c0610e8a565b919091604081840312610256576105da838261025b565b9260208201356001600160401b038111610256576102439201610550565b6102966106063660046105c3565b90612c7b565b346102565761061c36600461029f565b61029b6103c061284d565b6102439054610237565b6102439081565b6102439054610631565b61064d61012d610627565b9061024361012e610638565b61037390610237565b916020610268929493610679816040810197610659565b0152565b346102565761068d36600461029f565b610695610642565b9061029b6106a260405190565b92839283610662565b346102565761029b6103c06106c136600461026a565b611bf0565b34610256576106d636600461029f565b6102966122bb565b34610256576106ee36600461029f565b61029b6103c0610f6f565b346102565761070936600461029f565b61029b6103c0610ec8565b346102565761072436600461029f565b61029b6103c06111ae565b6020810192916102689190610659565b346102565761074f36600461029f565b61029b61075a612265565b6040519182918261072f565b346102565761077636600461029f565b61029b610331611bba565b346102565761029b610393610797366004610350565b90611cc4565b6102439160031b1c610237565b90610243915461079d565b610243600061012f6107aa565b61024390610237906001600160a01b031682565b610243906107c2565b610243906107d6565b610373906107df565b60208101929161026891906107e8565b346102565761081136600461029f565b61029b61081c6107b5565b604051918291826107f1565b346102565761029b61039361083e366004610350565b90611c03565b3461025657610296610857366004610416565b61112b565b346102565761086c36600461029f565b61029b61081c610ced565b346102565761029b6103c061088d36600461026a565b610f66565b9190604083820312610256578060206108ae610243938661025b565b940161025b565b346102565761029b6103c06108cb366004610892565b90611c18565b34610256576108e136600461029f565b610296610fb9565b34610256576102966108fc36600461026a565b61188d565b6102439160031b1c81565b906102439154610901565b610243600061013061090c565b346102565761093436600461029f565b61029b6103c0610917565b346102565761094f36600461029f565b61029661179a565b346102565761096736600461029f565b61029b6103c0610da3565b346102565761029661098536600461026a565b61230b565b6102439060081c5b60ff1690565b610243905461098a565b61024390610992565b61024390546109a2565b6109926102436102439290565b6109926102436102439260ff1690565b906109e26102436109f1926109c2565b825460ff191660ff9091161790565b9055565b90610a056102436109f192151590565b825461ff00191660089190911b61ff00161790565b610373906109b5565b6020810192916102689190610a1a565b610a44610a406000610998565b1590565b908180610b33575b8015610aee575b155b610ad857610a7b9082610a72610a6b60016109b5565b60006109d2565b610ac757610c6e565b610a8157565b610a8c6000806109f5565b7f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498610ab660405190565b80610ac2600182610a23565b0390a1565b610ad3600160006109f5565b610c6e565b604051632785437f60e21b8152600490fd5b0390fd5b50610b03610a40610afe306107df565b611896565b8015610a535750610a55610b1760006109ab565b610b2b610b2460016109b5565b9160ff1690565b149050610a53565b50610b3e60006109ab565b610b4b610b2460016109b5565b10610a4c565b61024390610237565b61024f81610b51565b9050519061026882610b5a565b90929192610b80610530826104f8565b918294828452828201116102565760206102689301906102aa565b9080601f8301121561025657815161024392602001610b70565b905051906102688261033d565b60808183031261025657610bd68282610b63565b60208201519093906001600160401b0381116102565783610bf8918401610b9b565b604083015190936001600160401b038211610256576060610c1e82610243948701610b9b565b9401610bb5565b6102436102436102439290565b906102436102436109f192610c25565b90610c526102436109f1926107df565b82546001600160a01b0319166001600160a01b03919091161790565b610ca6610c9e610c90610cab93602080610c86835190565b8301019101610bc2565b610130959392949195610c32565b61012f610c42565b6118df565b610cb3612233565b610cbb612383565b6102683261230b565b61026890610a33565b906020828203126102565761024391610b63565b6040513d6000823e3d90fd5b610d00610cfb61012f610627565b6107df565b6020610d0b60405190565b63c89039c560e01b815291829060049082905afa908115610d5957600091610d31575090565b610243915060203d8111610d52575b610d4a81836104be565b810190610ccd565b503d610d40565b610ce1565b906020828203126102565761024391610bb5565b634e487b7160e01b600052601160045260246000fd5b9190610d93565b9290565b8201809211610d9e57565b610d72565b610de16020610db3610cfb610ced565b610dbc306107df565b90610dc660405190565b938492839182916370a0823160e01b5b83526004830161072f565b03915afa908115610d5957600091610e6c575b50610e03610cfb61012f610627565b906020610e0f60405190565b637e1c0c0960e01b815292839060049082905afa908115610d595761024392600092610e3c575b50610d88565b610e5e91925060203d8111610e65575b610e5681836104be565b810190610d5e565b9038610e36565b503d610e4c565b610e84915060203d8111610e6557610e5681836104be565b38610df4565b610e9a6020610db3610cfb610ced565b03915afa908115610d5957600091610eb0575090565b610243915060203d8111610e6557610e5681836104be565b61024333610f14565b81810292918115918404141715610d9e57565b634e487b7160e01b600052601260045260246000fd5b90610f04565b9190565b908115610f0f570490565b610ee4565b610f3090610f20611bce565b610f2a6000610c25565b92839190565b03610f39575090565b6102439150610f4a610f5891611bf0565b610f52610da3565b90610ed1565b610f60611bce565b90610efa565b61024390610f14565b610f77611bce565b610f84610f006000610c25565b03610f9a57610243670de0b6b3a7640000610c25565b610243610f58610fa8610da3565b610f52670de0b6b3a7640000610c25565b610fc4610cfb610ced565b6020610fcf60405190565b9182906370a0823160e01b82528180610feb336004830161072f565b03915afa8015610d595761026891600091611007575b5061112b565b61101f915060203d8111610e6557610e5681836104be565b38611001565b6110369061103161241e565b61104b565b6102686123ae565b91908203918211610d9e57565b611059610cfb61012f610627565b90813b1561025657600061106c60405190565b632b9ff78560e11b8152928390600490829084905af1918215610d59576102689261110d575b506110b861109e610da3565b916110a7610ced565b6110b0306107df565b9033906124d0565b6110c0611134565b6110d1816110cc610da3565b61103e565b906110dc6000610c25565b6110e7610243611bce565b036110f457505b33611ef5565b61110361110892610f52611bce565b610efa565b6110ee565b61112590600061111d81836104be565b81019061029f565b38611092565b61026890611025565b61115b61113f610e8a565b611147610ced565b611155610cfb61012f610627565b90612465565b611169610cfb61012f610627565b803b1561025657600061117b60405190565b630d0e30db60e41b8152918290600490829084905af18015610d595761119e5750565b61026890600061111d81836104be565b61024361044033611bf0565b906111cf610f58836111ca610da3565b610ed1565b6111da819333611ff8565b6111e5610cfb610ced565b906111ef306107df565b604051916020836370a0823160e01b958682528180611211876004830161072f565b03915afa928315610d595760009361133c575b50808310611243575b50505050610268823361123e610ced565b612465565b8261124d9161103e565b9261125c610cfb61012f610627565b91823b1561025657600061126f60405190565b632e1a7d4d60e01b815260048101879052938490602490829084905af1918215610d59576112c693602093611326575b506112ab610cfb610ced565b906112b560405190565b80958194829383526004830161072f565b03915afa8015610d595782610d8f916112e793600091611308575b5061103e565b82106112f5575b808061122d565b611300929350610d88565b9038806112ee565b611320915060203d8111610e6557610e5681836104be565b386112e1565b61133690600061111d81836104be565b3861129f565b61135591935060203d8111610e6557610e5681836104be565b9138611224565b6102689061136861226f565b61147a565b9050519061026882610246565b90602082820312610256576102439161136d565b1561139557565b60405162461bcd60e51b815260206004820152602160248201527f50726f706f73616c206e6f742076616c696420666f722074686973205661756c6044820152601d60fa1b6064820152608490fd5b156113eb57565b60405162461bcd60e51b81526020600482015260166024820152752234b33332b932b73a103232b837b9b4ba2a37b5b2b760511b6044820152606490fd5b61024360406104e4565b9061037390610237565b6102439051610237565b600161146960206102689461146461145e8261143d565b86610c42565b015190565b9101610c32565b9061026891611447565b611483306107df565b61148f610cfb836107df565b9061149960405190565b63fbfa77cf60e01b815290602082600481865afa8015610d59576114cc6114d2916114d894600091611597575b50610237565b91610237565b1461138e565b6114e0610ced565b9160206114ec60405190565b63c89039c560e01b815292839060049082905afa918215610d59577f69a1af0bb79be322515cb5fe575b0abc57640e7dd5f16cc95f50bf54b91e637e9361154b611545610ac29561155194600091611579575b50610b51565b91610b51565b146113e4565b61075a61155c611429565b6115668382611433565b611571426020830152565b61012d611470565b611591915060203d8111610d5257610d4a81836104be565b3861153f565b6115b8915060203d81116115be575b6115b081836104be565b81019061137a565b386114c6565b503d6115a6565b6102689061135c565b6115d661226f565b61026861167b565b6102376102436102439290565b610243906115de565b156115fb57565b60405162461bcd60e51b81526020600482015260156024820152745468657265206973206e6f2063616e64696461746560581b6044820152606490fd5b1561163f57565b60405162461bcd60e51b815260206004820152601460248201527311195b185e481a185cc81b9bdd081c185cdcd95960621b6044820152606490fd5b61168661012d610627565b6116a761169360006115eb565b916116a06114cc84610237565b14156115f4565b6116d06116c96116b861012e610638565b6116c3610130610638565b90610d88565b4211611638565b7f7f37d440e85aba7fbf641c4bda5ca4ef669a80bffaacde2aa8d9feb1b048c82c6116ff61075a61012d610627565b0390a1611710610cfb61012f610627565b90813b1561025657600061172360405190565b63fb61778760e01b8152928390600490829084905af1918215610d595761176392611784575b5061175b610c9e610cfb61012d610627565b61012d610c42565b61177c61177464012a05f200610c25565b61012e610c32565b610268611134565b61179490600061111d81836104be565b38611749565b6102686115ce565b610268906117ae61226f565b6117ef565b156117ba57565b60405162461bcd60e51b815260206004820152600d60248201526c10b232b837b9b4ba2a37b5b2b760991b6044820152606490fd5b61181c61184e91610cfb61180c611807610cfb610ced565b610237565b61181583610237565b14156117b3565b6020611827826107df565b611830306107df565b9061183a60405190565b948592839182916370a0823160e01b610dd6565b03915afa908115610d59576102689260009261186d575b503390612465565b61188691925060203d8111610e6557610e5681836104be565b9038611865565b610268906117a2565b3b6118a4610f006000610c25565b1190565b906118b6610a406000610998565b6118c357610268916118d5565b60405163dec57a6f60e01b8152600490fd5b9061026891611af1565b90610268916118a8565b906118f7610a406000610998565b6118c35761026891611adb565b634e487b7160e01b600052602260045260246000fd5b600181811c92911682811561193b575b50602083101461193657565b611904565b607f1692503861192a565b9060031b611959600019821b9384921b90565b169119161790565b91906119726102436109f193610c25565b908354611946565b61026891600091611961565b818110611991575050565b8061199f600060019361197a565b01611986565b9190601f81116119b457505050565b6119c661026893600052602060002090565b906020601f840160051c830193106119e6575b601f0160051c0190611986565b90915081906119d9565b9060001960039190911b1c191690565b81611a0a916119f0565b9060011b1790565b81519192916001600160401b0381116104df57611a3981611a33845461191a565b846119a5565b6020601f8211600114611a685781906109f1939495600092611a5d575b5050611a00565b015190503880611a56565b601f19821694611a7d84600052602060002090565b9160005b878110611ab9575083600195969710611a9f575b505050811b019055565b611aaf910151601f8416906119f0565b9055388080611a95565b90926020600181928686015181550194019101611a81565b9061026891611a12565b90611aea610268926036611ad1565b6037611ad1565b90610268916118e9565b80546000939291611b18611b0e8361191a565b8085529360200190565b9160018116908115611b6a5750600114611b3157505050565b611b449192939450600052602060002090565b916000925b818410611b565750500190565b805484840152602090930192600101611b49565b60ff19168352505090151560051b019150565b9061024391611afb565b90610268611b9460405190565b80611ba0818096611b7d565b03906104be565b61024390611b87565b6102436036611ba7565b6102436037611ba7565b61024360126109b5565b6102436035610638565b90611be2906107df565b600052602052604060002090565b611bfe610243916033611bd8565b610638565b611c13919033611df5565b611df5565b600190565b61024391611c2a611bfe926034611bd8565b611bd8565b611c13919033612118565b611c13929190611c0e8333836121d6565b611c139190611c643392611c5f8385611c18565b610d88565b91612118565b15611c7157565b60405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608490fd5b611c139190611c643392611cd88385611c18565b611ce482821015611c6a565b0390565b15611cef57565b60405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608490fd5b15611d4957565b60405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608490fd5b15611da157565b60405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608490fd5b611ea4611e9a611e94600080516020612c8683398151915293611e42611e1e61180760006115eb565b611e3281611e2b85610237565b1415611ce8565b611e3b88610237565b1415611d42565b611e73611e6388611e57611bfe856033611bd8565b611ce482821015611d9a565b611e6e836033611bd8565b610c32565b610cfb611e81876033611bd8565b611e8e8961030183610638565b90610c32565b936107df565b936103c460405190565b0390a3565b15611eb057565b60405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606490fd5b600080516020612c86833981519152611ea4611e9a611e94611f1760006115eb565b611f33611f2382610237565b611f2c88610237565b1415611ea9565b611e73611f4488611c5f6035610638565b6035610c32565b15611f5257565b60405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608490fd5b15611fa857565b60405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608490fd5b600080516020612c86833981519152611ea4611e9a611e9461201a60006115eb565b9461203761202787610237565b61203083610237565b1415611f4b565b612058611e638861204c611bfe856033611bd8565b611ce482821015611fa1565b610cfb611f4488611ce46035610638565b1561207057565b60405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b156120c857565b60405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608490fd5b611ea4611e9a611e947f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259361217761215361180760006115eb565b6121678161216085610237565b1415612069565b61217088610237565b14156120c1565b610cfb87611e6e88611c2a856034611bd8565b1561219157565b60405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606490fd5b906121e18183611c18565b928390600182016121f4575b5050505050565b61220d94611ce4611c64936122068490565b111561218a565b38808080806121ed565b612224610a406000610998565b6118c35761026861026861225d565b610268612217565b612248610a406000610998565b6118c35761026861026833612314565b612314565b61026861223b565b6102436065610627565b61228b61227a612265565b6122866114cc33610237565b141590565b61229157565b60405163ab4d99dd60e01b8152600490fd5b6122ab61226f565b61026861026861225860006115eb565b6102686122a3565b610268906122cf61226f565b6122ec6122df61180760006115eb565b6122e883610237565b1490565b6122f95761026890612314565b60405163235cec9b60e21b8152600490fd5b610268906122c3565b61233561232f6123246065610627565b610cfb846065610c42565b916107df565b907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e061236060405190565b8080611ea4565b612374610a406000610998565b6118c3576102686102686123c0565b610268612367565b612398610a406000610998565b6118c3576102686123ae565b6102436001610c25565b6102686123b96123a4565b60fb610c32565b61026861238b565b6102436002610c25565b156123d957565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b61026861242b60fb610638565b6123b96124366123c8565b918214156123d2565b6124586124526102439263ffffffff1690565b60e01b90565b6001600160e01b03191690565b6124a56102689361249761247c63a9059cbb61243f565b9161248660405190565b958693602085015260248401610662565b03601f1981018452836104be565b6125da565b60409061067961026894969593966124c6836060810199610659565b6020830190610659565b90916124a590612497610268956124ea6323b872dd61243f565b926124f460405190565b9687946020860152602485016124aa565b90612512610530836104f8565b918252565b6125216020612505565b7f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564602082015290565b610243612517565b80151561024f565b9050519061026882612552565b90602082820312610256576102439161255a565b1561258257565b60405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b610268916125ea6125f9926107df565b906125f361254a565b91612637565b8051612608610f006000610c25565b14908115612617575b5061257b565b6126319150602080612627835190565b8301019101612567565b38612611565b61024392916126466000610c25565b916126c6565b1561265357565b60405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608490fd5b3d156126c1576126b63d612505565b903d6000602084013e565b606090565b906000809161024395946126e66126dc306107df565b829031101561264c565b60208251920190855af16126f86126a7565b9161274a565b1561270557565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b9192901561277c57508151612762610f006000610c25565b1461276b575090565b61277761024391611896565b6126fe565b8290612786825190565b612793610f006000610c25565b11156127a25750805190602001fd5b610aea906127af60405190565b62461bcd60e51b815291829160048301610305565b6127fc6127d0306107df565b6122866114cc7f0000000000000000000000000000000000000000000000000000000000000000610237565b6128095761024390612844565b604051632e4771e760e21b8152600490fd5b6102437f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610c25565b5061024361281b565b61024360006127c4565b6122e8612897612866306107df565b61288f7f0000000000000000000000000000000000000000000000000000000000000000610237565b928391610237565b6128c9576128aa90612286611807612946565b6128b75761026890612905565b604051631b50ae3760e11b8152600490fd5b604051637170f3db60e01b8152600490fd5b369037565b906102686128ed83612505565b602081946128fd601f19916104f8565b0191016128db565b6000610268916129148161293d565b61292561292083610c25565b6128e0565b90612982565b61026890612857565b5061026861226f565b61026890612934565b61024361295461024361281b565b610627565b6102437f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143610c25565b9190612997612992610243612959565b6109ab565b156129a757505061026890612a44565b6129b3610cfb846107df565b60206129be60405190565b6352d1902d60e01b815291829060049082905afa60009181612a24575b506129f35750604051636f5837f160e01b8152600490fd5b612a0590612286610f0061024361281b565b612a125761026892612a7a565b6040516304e7393f60e41b8152600490fd5b612a3d91925060203d8111610e6557610e5681836104be565b90386129db565b612a50610a4082611896565b612a685761026890612a6361024361281b565b610c42565b60405163075de2d760e51b8152600490fd5b91612a8483612ab9565b8151612a93610f006000610c25565b11908115612ab1575b50612aa5575050565b612aae91612b2e565b50565b905038612a9c565b612ac690610cfb81612a44565b7fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b612af060405190565b600090a2565b634e487b7160e01b600052602160045260246000fd5b60051115612b1657565b612af6565b9061026882612b0c565b61024390612b1b565b90612b3b610a4083611896565b612b68576000816102439360208394519201905af4612b586126a7565b612b626004612b25565b91612b7a565b60405163ae931db960e01b8152600490fd5b90919015612b86575090565b8151612b95610f006000610c25565b1115612ba45750805190602001fd5b612bb16102436001612b25565b81908103612bcb5760405163014bd73d60e21b8152600490fd5b612bd86102436002612b25565b8103612bf057604051630a4d4fd160e01b8152600490fd5b612bfd6102436003612b25565b03612c145760405163166c491f60e11b8152600490fd5b610aea90612c2160405190565b632638bfdb60e11b81529182916004830190815260200190565b906122e8612c4b612866306107df565b6128c957612c5e90612286611807612946565b6128b7576102689161026891600191612c768161293d565b612982565b9061026891612c3b56feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212204c80a8d16b3b86335e414aa3deef7bed7805ec701560218eb90a85016dd7b25364736f6c63430008140033
Deployed Bytecode
0x6080604052600436101561001257600080fd5b60003560e01c8063012679511461023257806306fdde031461022d578063095ea7b31461022857806318160ddd1461022357806323b872dd1461021e5780632e1a7d4d14610219578063313ce567146102145780633659cfe61461020f578063395093511461020a578063439fab911461020557806348a0d754146102005780634f1ef286146101fb57806352d1902d146101f65780636c8381f8146101f157806370a08231146101ec578063715018a6146101e757806377c7b8fc146101e25780637e1c0c09146101dd578063853828b6146101d85780638da5cb5b146101d357806395d89b41146101ce578063a457c2d7146101c9578063a8c62e76146101c4578063a9059cbb146101bf578063b6b55f25146101ba578063c89039c5146101b5578063cb9199a2146101b0578063dd62ed3e146101ab578063de5f6268146101a6578063def68a9c146101a1578063e2d1e75c1461019c578063e668524414610197578063edaf2d2e146101925763f2fde38b0361025657610972565b610957565b61093f565b610924565b6108e9565b6108d1565b6108b5565b610877565b61085c565b610844565b610828565b610801565b610781565b610766565b61073f565b610714565b6106f9565b6106de565b6106c6565b6106ab565b61067d565b61060c565b6105f8565b6105a8565b610590565b61048c565b610474565b610445565b61042a565b6103fa565b6103a5565b610377565b610316565b61027e565b6001600160a01b031690565b90565b61024f81610237565b0361025657565b600080fd5b9050359061026882610246565b565b90602082820312610256576102439161025b565b346102565761029661029136600461026a565b6115c5565b604051005b0390f35b600091031261025657565b60005b8381106102bd5750506000910152565b81810151838201526020016102ad565b6102ee6102f7602093610301936102e2815190565b80835293849260200190565b958691016102aa565b601f01601f191690565b0190565b9060206102439281815201906102cd565b346102565761032636600461029f565b61029b610331611bb0565b60405191829182610305565b8061024f565b905035906102688261033d565b91906040838203126102565780602061036c610243938661025b565b9401610343565b9052565b346102565761029b61039361038d366004610350565b90611c2f565b60405191829182901515815260200190565b34610256576103b536600461029f565b61029b6103c0611bce565b6040515b9182918290815260200190565b9091606082840312610256576102436103ea848461025b565b93604061036c826020870161025b565b346102565761029b6103936104103660046103d1565b91611c3a565b906020828203126102565761024391610343565b346102565761029b6103c0610440366004610416565b6111ba565b346102565761045536600461029f565b61029b610460611bc4565b6040519182918260ff909116815260200190565b346102565761029661048736600461026a565b61292b565b346102565761029b6103936104a2366004610350565b90611c4b565b634e487b7160e01b600052604160045260246000fd5b90601f01601f191681019081106001600160401b038211176104df57604052565b6104a8565b906102686104f160405190565b92836104be565b6001600160401b0381116104df57602090601f01601f19160190565b90826000939282370152565b90929192610535610530826104f8565b6104e4565b91829482845282820111610256576020610268930190610514565b9080601f830112156102565781602061024393359101610520565b906020828203126102565781356001600160401b038111610256576102439201610550565b34610256576102966105a336600461056b565b610cc4565b34610256576105b836600461029f565b61029b6103c0610e8a565b919091604081840312610256576105da838261025b565b9260208201356001600160401b038111610256576102439201610550565b6102966106063660046105c3565b90612c7b565b346102565761061c36600461029f565b61029b6103c061284d565b6102439054610237565b6102439081565b6102439054610631565b61064d61012d610627565b9061024361012e610638565b61037390610237565b916020610268929493610679816040810197610659565b0152565b346102565761068d36600461029f565b610695610642565b9061029b6106a260405190565b92839283610662565b346102565761029b6103c06106c136600461026a565b611bf0565b34610256576106d636600461029f565b6102966122bb565b34610256576106ee36600461029f565b61029b6103c0610f6f565b346102565761070936600461029f565b61029b6103c0610ec8565b346102565761072436600461029f565b61029b6103c06111ae565b6020810192916102689190610659565b346102565761074f36600461029f565b61029b61075a612265565b6040519182918261072f565b346102565761077636600461029f565b61029b610331611bba565b346102565761029b610393610797366004610350565b90611cc4565b6102439160031b1c610237565b90610243915461079d565b610243600061012f6107aa565b61024390610237906001600160a01b031682565b610243906107c2565b610243906107d6565b610373906107df565b60208101929161026891906107e8565b346102565761081136600461029f565b61029b61081c6107b5565b604051918291826107f1565b346102565761029b61039361083e366004610350565b90611c03565b3461025657610296610857366004610416565b61112b565b346102565761086c36600461029f565b61029b61081c610ced565b346102565761029b6103c061088d36600461026a565b610f66565b9190604083820312610256578060206108ae610243938661025b565b940161025b565b346102565761029b6103c06108cb366004610892565b90611c18565b34610256576108e136600461029f565b610296610fb9565b34610256576102966108fc36600461026a565b61188d565b6102439160031b1c81565b906102439154610901565b610243600061013061090c565b346102565761093436600461029f565b61029b6103c0610917565b346102565761094f36600461029f565b61029661179a565b346102565761096736600461029f565b61029b6103c0610da3565b346102565761029661098536600461026a565b61230b565b6102439060081c5b60ff1690565b610243905461098a565b61024390610992565b61024390546109a2565b6109926102436102439290565b6109926102436102439260ff1690565b906109e26102436109f1926109c2565b825460ff191660ff9091161790565b9055565b90610a056102436109f192151590565b825461ff00191660089190911b61ff00161790565b610373906109b5565b6020810192916102689190610a1a565b610a44610a406000610998565b1590565b908180610b33575b8015610aee575b155b610ad857610a7b9082610a72610a6b60016109b5565b60006109d2565b610ac757610c6e565b610a8157565b610a8c6000806109f5565b7f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498610ab660405190565b80610ac2600182610a23565b0390a1565b610ad3600160006109f5565b610c6e565b604051632785437f60e21b8152600490fd5b0390fd5b50610b03610a40610afe306107df565b611896565b8015610a535750610a55610b1760006109ab565b610b2b610b2460016109b5565b9160ff1690565b149050610a53565b50610b3e60006109ab565b610b4b610b2460016109b5565b10610a4c565b61024390610237565b61024f81610b51565b9050519061026882610b5a565b90929192610b80610530826104f8565b918294828452828201116102565760206102689301906102aa565b9080601f8301121561025657815161024392602001610b70565b905051906102688261033d565b60808183031261025657610bd68282610b63565b60208201519093906001600160401b0381116102565783610bf8918401610b9b565b604083015190936001600160401b038211610256576060610c1e82610243948701610b9b565b9401610bb5565b6102436102436102439290565b906102436102436109f192610c25565b90610c526102436109f1926107df565b82546001600160a01b0319166001600160a01b03919091161790565b610ca6610c9e610c90610cab93602080610c86835190565b8301019101610bc2565b610130959392949195610c32565b61012f610c42565b6118df565b610cb3612233565b610cbb612383565b6102683261230b565b61026890610a33565b906020828203126102565761024391610b63565b6040513d6000823e3d90fd5b610d00610cfb61012f610627565b6107df565b6020610d0b60405190565b63c89039c560e01b815291829060049082905afa908115610d5957600091610d31575090565b610243915060203d8111610d52575b610d4a81836104be565b810190610ccd565b503d610d40565b610ce1565b906020828203126102565761024391610bb5565b634e487b7160e01b600052601160045260246000fd5b9190610d93565b9290565b8201809211610d9e57565b610d72565b610de16020610db3610cfb610ced565b610dbc306107df565b90610dc660405190565b938492839182916370a0823160e01b5b83526004830161072f565b03915afa908115610d5957600091610e6c575b50610e03610cfb61012f610627565b906020610e0f60405190565b637e1c0c0960e01b815292839060049082905afa908115610d595761024392600092610e3c575b50610d88565b610e5e91925060203d8111610e65575b610e5681836104be565b810190610d5e565b9038610e36565b503d610e4c565b610e84915060203d8111610e6557610e5681836104be565b38610df4565b610e9a6020610db3610cfb610ced565b03915afa908115610d5957600091610eb0575090565b610243915060203d8111610e6557610e5681836104be565b61024333610f14565b81810292918115918404141715610d9e57565b634e487b7160e01b600052601260045260246000fd5b90610f04565b9190565b908115610f0f570490565b610ee4565b610f3090610f20611bce565b610f2a6000610c25565b92839190565b03610f39575090565b6102439150610f4a610f5891611bf0565b610f52610da3565b90610ed1565b610f60611bce565b90610efa565b61024390610f14565b610f77611bce565b610f84610f006000610c25565b03610f9a57610243670de0b6b3a7640000610c25565b610243610f58610fa8610da3565b610f52670de0b6b3a7640000610c25565b610fc4610cfb610ced565b6020610fcf60405190565b9182906370a0823160e01b82528180610feb336004830161072f565b03915afa8015610d595761026891600091611007575b5061112b565b61101f915060203d8111610e6557610e5681836104be565b38611001565b6110369061103161241e565b61104b565b6102686123ae565b91908203918211610d9e57565b611059610cfb61012f610627565b90813b1561025657600061106c60405190565b632b9ff78560e11b8152928390600490829084905af1918215610d59576102689261110d575b506110b861109e610da3565b916110a7610ced565b6110b0306107df565b9033906124d0565b6110c0611134565b6110d1816110cc610da3565b61103e565b906110dc6000610c25565b6110e7610243611bce565b036110f457505b33611ef5565b61110361110892610f52611bce565b610efa565b6110ee565b61112590600061111d81836104be565b81019061029f565b38611092565b61026890611025565b61115b61113f610e8a565b611147610ced565b611155610cfb61012f610627565b90612465565b611169610cfb61012f610627565b803b1561025657600061117b60405190565b630d0e30db60e41b8152918290600490829084905af18015610d595761119e5750565b61026890600061111d81836104be565b61024361044033611bf0565b906111cf610f58836111ca610da3565b610ed1565b6111da819333611ff8565b6111e5610cfb610ced565b906111ef306107df565b604051916020836370a0823160e01b958682528180611211876004830161072f565b03915afa928315610d595760009361133c575b50808310611243575b50505050610268823361123e610ced565b612465565b8261124d9161103e565b9261125c610cfb61012f610627565b91823b1561025657600061126f60405190565b632e1a7d4d60e01b815260048101879052938490602490829084905af1918215610d59576112c693602093611326575b506112ab610cfb610ced565b906112b560405190565b80958194829383526004830161072f565b03915afa8015610d595782610d8f916112e793600091611308575b5061103e565b82106112f5575b808061122d565b611300929350610d88565b9038806112ee565b611320915060203d8111610e6557610e5681836104be565b386112e1565b61133690600061111d81836104be565b3861129f565b61135591935060203d8111610e6557610e5681836104be565b9138611224565b6102689061136861226f565b61147a565b9050519061026882610246565b90602082820312610256576102439161136d565b1561139557565b60405162461bcd60e51b815260206004820152602160248201527f50726f706f73616c206e6f742076616c696420666f722074686973205661756c6044820152601d60fa1b6064820152608490fd5b156113eb57565b60405162461bcd60e51b81526020600482015260166024820152752234b33332b932b73a103232b837b9b4ba2a37b5b2b760511b6044820152606490fd5b61024360406104e4565b9061037390610237565b6102439051610237565b600161146960206102689461146461145e8261143d565b86610c42565b015190565b9101610c32565b9061026891611447565b611483306107df565b61148f610cfb836107df565b9061149960405190565b63fbfa77cf60e01b815290602082600481865afa8015610d59576114cc6114d2916114d894600091611597575b50610237565b91610237565b1461138e565b6114e0610ced565b9160206114ec60405190565b63c89039c560e01b815292839060049082905afa918215610d59577f69a1af0bb79be322515cb5fe575b0abc57640e7dd5f16cc95f50bf54b91e637e9361154b611545610ac29561155194600091611579575b50610b51565b91610b51565b146113e4565b61075a61155c611429565b6115668382611433565b611571426020830152565b61012d611470565b611591915060203d8111610d5257610d4a81836104be565b3861153f565b6115b8915060203d81116115be575b6115b081836104be565b81019061137a565b386114c6565b503d6115a6565b6102689061135c565b6115d661226f565b61026861167b565b6102376102436102439290565b610243906115de565b156115fb57565b60405162461bcd60e51b81526020600482015260156024820152745468657265206973206e6f2063616e64696461746560581b6044820152606490fd5b1561163f57565b60405162461bcd60e51b815260206004820152601460248201527311195b185e481a185cc81b9bdd081c185cdcd95960621b6044820152606490fd5b61168661012d610627565b6116a761169360006115eb565b916116a06114cc84610237565b14156115f4565b6116d06116c96116b861012e610638565b6116c3610130610638565b90610d88565b4211611638565b7f7f37d440e85aba7fbf641c4bda5ca4ef669a80bffaacde2aa8d9feb1b048c82c6116ff61075a61012d610627565b0390a1611710610cfb61012f610627565b90813b1561025657600061172360405190565b63fb61778760e01b8152928390600490829084905af1918215610d595761176392611784575b5061175b610c9e610cfb61012d610627565b61012d610c42565b61177c61177464012a05f200610c25565b61012e610c32565b610268611134565b61179490600061111d81836104be565b38611749565b6102686115ce565b610268906117ae61226f565b6117ef565b156117ba57565b60405162461bcd60e51b815260206004820152600d60248201526c10b232b837b9b4ba2a37b5b2b760991b6044820152606490fd5b61181c61184e91610cfb61180c611807610cfb610ced565b610237565b61181583610237565b14156117b3565b6020611827826107df565b611830306107df565b9061183a60405190565b948592839182916370a0823160e01b610dd6565b03915afa908115610d59576102689260009261186d575b503390612465565b61188691925060203d8111610e6557610e5681836104be565b9038611865565b610268906117a2565b3b6118a4610f006000610c25565b1190565b906118b6610a406000610998565b6118c357610268916118d5565b60405163dec57a6f60e01b8152600490fd5b9061026891611af1565b90610268916118a8565b906118f7610a406000610998565b6118c35761026891611adb565b634e487b7160e01b600052602260045260246000fd5b600181811c92911682811561193b575b50602083101461193657565b611904565b607f1692503861192a565b9060031b611959600019821b9384921b90565b169119161790565b91906119726102436109f193610c25565b908354611946565b61026891600091611961565b818110611991575050565b8061199f600060019361197a565b01611986565b9190601f81116119b457505050565b6119c661026893600052602060002090565b906020601f840160051c830193106119e6575b601f0160051c0190611986565b90915081906119d9565b9060001960039190911b1c191690565b81611a0a916119f0565b9060011b1790565b81519192916001600160401b0381116104df57611a3981611a33845461191a565b846119a5565b6020601f8211600114611a685781906109f1939495600092611a5d575b5050611a00565b015190503880611a56565b601f19821694611a7d84600052602060002090565b9160005b878110611ab9575083600195969710611a9f575b505050811b019055565b611aaf910151601f8416906119f0565b9055388080611a95565b90926020600181928686015181550194019101611a81565b9061026891611a12565b90611aea610268926036611ad1565b6037611ad1565b90610268916118e9565b80546000939291611b18611b0e8361191a565b8085529360200190565b9160018116908115611b6a5750600114611b3157505050565b611b449192939450600052602060002090565b916000925b818410611b565750500190565b805484840152602090930192600101611b49565b60ff19168352505090151560051b019150565b9061024391611afb565b90610268611b9460405190565b80611ba0818096611b7d565b03906104be565b61024390611b87565b6102436036611ba7565b6102436037611ba7565b61024360126109b5565b6102436035610638565b90611be2906107df565b600052602052604060002090565b611bfe610243916033611bd8565b610638565b611c13919033611df5565b611df5565b600190565b61024391611c2a611bfe926034611bd8565b611bd8565b611c13919033612118565b611c13929190611c0e8333836121d6565b611c139190611c643392611c5f8385611c18565b610d88565b91612118565b15611c7157565b60405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608490fd5b611c139190611c643392611cd88385611c18565b611ce482821015611c6a565b0390565b15611cef57565b60405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608490fd5b15611d4957565b60405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608490fd5b15611da157565b60405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608490fd5b611ea4611e9a611e94600080516020612c8683398151915293611e42611e1e61180760006115eb565b611e3281611e2b85610237565b1415611ce8565b611e3b88610237565b1415611d42565b611e73611e6388611e57611bfe856033611bd8565b611ce482821015611d9a565b611e6e836033611bd8565b610c32565b610cfb611e81876033611bd8565b611e8e8961030183610638565b90610c32565b936107df565b936103c460405190565b0390a3565b15611eb057565b60405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606490fd5b600080516020612c86833981519152611ea4611e9a611e94611f1760006115eb565b611f33611f2382610237565b611f2c88610237565b1415611ea9565b611e73611f4488611c5f6035610638565b6035610c32565b15611f5257565b60405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608490fd5b15611fa857565b60405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608490fd5b600080516020612c86833981519152611ea4611e9a611e9461201a60006115eb565b9461203761202787610237565b61203083610237565b1415611f4b565b612058611e638861204c611bfe856033611bd8565b611ce482821015611fa1565b610cfb611f4488611ce46035610638565b1561207057565b60405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b156120c857565b60405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608490fd5b611ea4611e9a611e947f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259361217761215361180760006115eb565b6121678161216085610237565b1415612069565b61217088610237565b14156120c1565b610cfb87611e6e88611c2a856034611bd8565b1561219157565b60405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606490fd5b906121e18183611c18565b928390600182016121f4575b5050505050565b61220d94611ce4611c64936122068490565b111561218a565b38808080806121ed565b612224610a406000610998565b6118c35761026861026861225d565b610268612217565b612248610a406000610998565b6118c35761026861026833612314565b612314565b61026861223b565b6102436065610627565b61228b61227a612265565b6122866114cc33610237565b141590565b61229157565b60405163ab4d99dd60e01b8152600490fd5b6122ab61226f565b61026861026861225860006115eb565b6102686122a3565b610268906122cf61226f565b6122ec6122df61180760006115eb565b6122e883610237565b1490565b6122f95761026890612314565b60405163235cec9b60e21b8152600490fd5b610268906122c3565b61233561232f6123246065610627565b610cfb846065610c42565b916107df565b907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e061236060405190565b8080611ea4565b612374610a406000610998565b6118c3576102686102686123c0565b610268612367565b612398610a406000610998565b6118c3576102686123ae565b6102436001610c25565b6102686123b96123a4565b60fb610c32565b61026861238b565b6102436002610c25565b156123d957565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b61026861242b60fb610638565b6123b96124366123c8565b918214156123d2565b6124586124526102439263ffffffff1690565b60e01b90565b6001600160e01b03191690565b6124a56102689361249761247c63a9059cbb61243f565b9161248660405190565b958693602085015260248401610662565b03601f1981018452836104be565b6125da565b60409061067961026894969593966124c6836060810199610659565b6020830190610659565b90916124a590612497610268956124ea6323b872dd61243f565b926124f460405190565b9687946020860152602485016124aa565b90612512610530836104f8565b918252565b6125216020612505565b7f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564602082015290565b610243612517565b80151561024f565b9050519061026882612552565b90602082820312610256576102439161255a565b1561258257565b60405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b610268916125ea6125f9926107df565b906125f361254a565b91612637565b8051612608610f006000610c25565b14908115612617575b5061257b565b6126319150602080612627835190565b8301019101612567565b38612611565b61024392916126466000610c25565b916126c6565b1561265357565b60405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608490fd5b3d156126c1576126b63d612505565b903d6000602084013e565b606090565b906000809161024395946126e66126dc306107df565b829031101561264c565b60208251920190855af16126f86126a7565b9161274a565b1561270557565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b9192901561277c57508151612762610f006000610c25565b1461276b575090565b61277761024391611896565b6126fe565b8290612786825190565b612793610f006000610c25565b11156127a25750805190602001fd5b610aea906127af60405190565b62461bcd60e51b815291829160048301610305565b6127fc6127d0306107df565b6122866114cc7f000000000000000000000000ade767857892bb3935a6ac14bc3384900ec51830610237565b6128095761024390612844565b604051632e4771e760e21b8152600490fd5b6102437f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610c25565b5061024361281b565b61024360006127c4565b6122e8612897612866306107df565b61288f7f000000000000000000000000ade767857892bb3935a6ac14bc3384900ec51830610237565b928391610237565b6128c9576128aa90612286611807612946565b6128b75761026890612905565b604051631b50ae3760e11b8152600490fd5b604051637170f3db60e01b8152600490fd5b369037565b906102686128ed83612505565b602081946128fd601f19916104f8565b0191016128db565b6000610268916129148161293d565b61292561292083610c25565b6128e0565b90612982565b61026890612857565b5061026861226f565b61026890612934565b61024361295461024361281b565b610627565b6102437f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143610c25565b9190612997612992610243612959565b6109ab565b156129a757505061026890612a44565b6129b3610cfb846107df565b60206129be60405190565b6352d1902d60e01b815291829060049082905afa60009181612a24575b506129f35750604051636f5837f160e01b8152600490fd5b612a0590612286610f0061024361281b565b612a125761026892612a7a565b6040516304e7393f60e41b8152600490fd5b612a3d91925060203d8111610e6557610e5681836104be565b90386129db565b612a50610a4082611896565b612a685761026890612a6361024361281b565b610c42565b60405163075de2d760e51b8152600490fd5b91612a8483612ab9565b8151612a93610f006000610c25565b11908115612ab1575b50612aa5575050565b612aae91612b2e565b50565b905038612a9c565b612ac690610cfb81612a44565b7fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b612af060405190565b600090a2565b634e487b7160e01b600052602160045260246000fd5b60051115612b1657565b612af6565b9061026882612b0c565b61024390612b1b565b90612b3b610a4083611896565b612b68576000816102439360208394519201905af4612b586126a7565b612b626004612b25565b91612b7a565b60405163ae931db960e01b8152600490fd5b90919015612b86575090565b8151612b95610f006000610c25565b1115612ba45750805190602001fd5b612bb16102436001612b25565b81908103612bcb5760405163014bd73d60e21b8152600490fd5b612bd86102436002612b25565b8103612bf057604051630a4d4fd160e01b8152600490fd5b612bfd6102436003612b25565b03612c145760405163166c491f60e11b8152600490fd5b610aea90612c2160405190565b632638bfdb60e11b81529182916004830190815260200190565b906122e8612c4b612866306107df565b6128c957612c5e90612286611807612946565b6128b7576102689161026891600191612c768161293d565b612982565b9061026891612c3b56feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212204c80a8d16b3b86335e414aa3deef7bed7805ec701560218eb90a85016dd7b25364736f6c63430008140033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.