Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
MigrateV2ToV3
Compiler Version
v0.6.12+commit.27d51765
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.6.12; import "./external/MixedPodInterface.sol"; import "@openzeppelin/contracts-ethereum-package/contracts/access/Ownable.sol"; import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC777/IERC777.sol"; import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC777/IERC777Recipient.sol"; import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC777/IERC777Sender.sol"; import "@openzeppelin/contracts-ethereum-package/contracts/introspection/IERC1820Registry.sol"; import "@openzeppelin/contracts-ethereum-package/contracts/introspection/IERC1820Implementer.sol"; contract MigrateV2ToV3 is OwnableUpgradeSafe, IERC777Recipient, IERC1820Implementer { IERC1820Registry constant internal ERC1820_REGISTRY = IERC1820Registry(0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24); bytes32 constant private _ERC1820_ACCEPT_MAGIC = keccak256(abi.encodePacked("ERC1820_ACCEPT_MAGIC")); // keccak256("ERC777TokensRecipient") bytes32 constant internal TOKENS_RECIPIENT_INTERFACE_HASH = 0xb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b; event ReceivedTokens(address token, address from, uint256 amount); IERC777 public poolDaiToken; IERC777 public poolUsdcToken; MixedPodInterface public poolDaiPod; MixedPodInterface public poolUsdcPod; IERC20 public v3Token; constructor ( IERC777 _poolDaiToken, IERC777 _poolUsdcToken, MixedPodInterface _poolDaiPod, MixedPodInterface _poolUsdcPod, IERC20 _v3Token ) public { poolDaiToken = _poolDaiToken; poolUsdcToken = _poolUsdcToken; poolDaiPod = _poolDaiPod; poolUsdcPod = _poolUsdcPod; v3Token = _v3Token; // register interfaces ERC1820_REGISTRY.setInterfaceImplementer(address(this), TOKENS_RECIPIENT_INTERFACE_HASH, address(this)); __Ownable_init(); } function tokensReceived( address, address from, address to, uint256 amount, bytes calldata, bytes calldata ) external override { require(to == address(this), "MigrateV2ToV3/only-tokens"); if (msg.sender == address(poolDaiToken)) { v3Token.transfer(from, amount); } else if (msg.sender == address(poolUsdcToken)) { v3Token.transfer(from, amount * 1e12); } else if (msg.sender == address(poolDaiPod)) { uint256 collateral = poolDaiPod.tokenToCollateralValue(amount); v3Token.transfer(from, collateral); } else if (msg.sender == address(poolUsdcPod)) { uint256 collateral = poolUsdcPod.tokenToCollateralValue(amount); v3Token.transfer(from, collateral * 1e12); } else { revert("MigrateV2ToV3/unknown-token"); } emit ReceivedTokens(msg.sender, from, amount); } function withdrawERC777(IERC777 token) external onlyOwner { uint256 amount = token.balanceOf(address(this)); token.send(msg.sender, amount, ""); } function withdrawERC20(IERC20 token) external onlyOwner { uint256 amount = token.balanceOf(address(this)); token.transfer(msg.sender, amount); } function withdrawERC721(IERC721 token, uint256 id) external onlyOwner { IERC721(token).transferFrom(address(this), msg.sender, id); } function canImplementInterfaceForAddress(bytes32 interfaceHash, address account) external override view returns (bytes32) { if (account == address(this) && interfaceHash == TOKENS_RECIPIENT_INTERFACE_HASH) { return _ERC1820_ACCEPT_MAGIC; } else { return bytes32(0x00); } } }
pragma solidity ^0.6.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 GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ contract ContextUpgradeSafe is Initializable { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } uint256[50] private __gap; }
pragma solidity >=0.4.24 <0.7.0; /** * @title Initializable * * @dev Helper contract to support initializer functions. To use it, replace * the constructor with a function that has the `initializer` modifier. * WARNING: Unlike constructors, initializer functions must be manually * invoked. This applies both to deploying an Initializable contract, as well * as extending an Initializable contract via inheritance. * WARNING: When used with inheritance, manual care must be taken to not invoke * a parent initializer twice, or ensure that all initializers are idempotent, * because this is not dealt with automatically as with constructors. */ contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private initializing; /** * @dev Modifier to use in the initializer function of a contract. */ modifier initializer() { require(initializing || isConstructor() || !initialized, "Contract instance has already been initialized"); bool isTopLevelCall = !initializing; if (isTopLevelCall) { initializing = true; initialized = true; } _; if (isTopLevelCall) { initializing = false; } } /// @dev Returns true if and only if the function is running in the constructor function isConstructor() private view returns (bool) { // extcodesize checks the size of the code stored in an address, and // address returns the current address. Since the code is still not // deployed when running a constructor, any checks on its code size will // yield zero, making it an effective way to detect if a contract is // under construction or not. address self = address(this); uint256 cs; assembly { cs := extcodesize(self) } return cs == 0; } // Reserved storage space to allow for layout changes in the future. uint256[50] private ______gap; }
pragma solidity ^0.6.0; import "../GSN/Context.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. */ contract OwnableUpgradeSafe is Initializable, ContextUpgradeSafe { 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 initializer { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal initializer { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = 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"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } uint256[49] private __gap; }
pragma solidity ^0.6.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
pragma solidity ^0.6.0; /** * @dev Interface for an ERC1820 implementer, as defined in the * https://eips.ethereum.org/EIPS/eip-1820#interface-implementation-erc1820implementerinterface[EIP]. * Used by contracts that will be registered as implementers in the * {IERC1820Registry}. */ interface IERC1820Implementer { /** * @dev Returns a special value (`ERC1820_ACCEPT_MAGIC`) if this contract * implements `interfaceHash` for `account`. * * See {IERC1820Registry-setInterfaceImplementer}. */ function canImplementInterfaceForAddress(bytes32 interfaceHash, address account) external view returns (bytes32); }
pragma solidity ^0.6.0; /** * @dev Interface of the global ERC1820 Registry, as defined in the * https://eips.ethereum.org/EIPS/eip-1820[EIP]. Accounts may register * implementers for interfaces in this registry, as well as query support. * * Implementers may be shared by multiple accounts, and can also implement more * than a single interface for each account. Contracts can implement interfaces * for themselves, but externally-owned accounts (EOA) must delegate this to a * contract. * * {IERC165} interfaces can also be queried via the registry. * * For an in-depth explanation and source code analysis, see the EIP text. */ interface IERC1820Registry { /** * @dev Sets `newManager` as the manager for `account`. A manager of an * account is able to set interface implementers for it. * * By default, each account is its own manager. Passing a value of `0x0` in * `newManager` will reset the manager to this initial state. * * Emits a {ManagerChanged} event. * * Requirements: * * - the caller must be the current manager for `account`. */ function setManager(address account, address newManager) external; /** * @dev Returns the manager for `account`. * * See {setManager}. */ function getManager(address account) external view returns (address); /** * @dev Sets the `implementer` contract as ``account``'s implementer for * `interfaceHash`. * * `account` being the zero address is an alias for the caller's address. * The zero address can also be used in `implementer` to remove an old one. * * See {interfaceHash} to learn how these are created. * * Emits an {InterfaceImplementerSet} event. * * Requirements: * * - the caller must be the current manager for `account`. * - `interfaceHash` must not be an {IERC165} interface id (i.e. it must not * end in 28 zeroes). * - `implementer` must implement {IERC1820Implementer} and return true when * queried for support, unless `implementer` is the caller. See * {IERC1820Implementer-canImplementInterfaceForAddress}. */ function setInterfaceImplementer(address account, bytes32 interfaceHash, address implementer) external; /** * @dev Returns the implementer of `interfaceHash` for `account`. If no such * implementer is registered, returns the zero address. * * If `interfaceHash` is an {IERC165} interface id (i.e. it ends with 28 * zeroes), `account` will be queried for support of it. * * `account` being the zero address is an alias for the caller's address. */ function getInterfaceImplementer(address account, bytes32 interfaceHash) external view returns (address); /** * @dev Returns the interface hash for an `interfaceName`, as defined in the * corresponding * https://eips.ethereum.org/EIPS/eip-1820#interface-name[section of the EIP]. */ function interfaceHash(string calldata interfaceName) external pure returns (bytes32); /** * @notice Updates the cache with whether the contract implements an ERC165 interface or not. * @param account Address of the contract for which to update the cache. * @param interfaceId ERC165 interface for which to update the cache. */ function updateERC165Cache(address account, bytes4 interfaceId) external; /** * @notice Checks whether a contract implements an ERC165 interface or not. * If the result is not cached a direct lookup on the contract address is performed. * If the result is not cached or the cached value is out-of-date, the cache MUST be updated manually by calling * {updateERC165Cache} with the contract address. * @param account Address of the contract to check. * @param interfaceId ERC165 interface to check. * @return True if `account` implements `interfaceId`, false otherwise. */ function implementsERC165Interface(address account, bytes4 interfaceId) external view returns (bool); /** * @notice Checks whether a contract implements an ERC165 interface or not without using nor updating the cache. * @param account Address of the contract to check. * @param interfaceId ERC165 interface to check. * @return True if `account` implements `interfaceId`, false otherwise. */ function implementsERC165InterfaceNoCache(address account, bytes4 interfaceId) external view returns (bool); event InterfaceImplementerSet(address indexed account, bytes32 indexed interfaceHash, address indexed implementer); event ManagerChanged(address indexed account, address indexed newManager); }
pragma solidity ^0.6.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
pragma solidity ^0.6.2; import "../../introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of NFTs in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the NFT specified by `tokenId`. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to * another (`to`). * * * * Requirements: * - `from`, `to` cannot be zero. * - `tokenId` must be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this * NFT by either {approve} or {setApprovalForAll}. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to * another (`to`). * * Requirements: * - If the caller is not `from`, it must be approved to move this NFT by * either {approve} or {setApprovalForAll}. */ function transferFrom(address from, address to, uint256 tokenId) external; function approve(address to, uint256 tokenId) external; function getApproved(uint256 tokenId) external view returns (address operator); function setApprovalForAll(address operator, bool _approved) external; function isApprovedForAll(address owner, address operator) external view returns (bool); function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; }
pragma solidity ^0.6.0; /** * @dev Interface of the ERC777Token standard as defined in the EIP. * * This contract uses the * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 registry standard] to let * token holders and recipients react to token movements by using setting implementers * for the associated interfaces in said registry. See {IERC1820Registry} and * {ERC1820Implementer}. */ interface IERC777 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() external view returns (string memory); /** * @dev Returns the smallest part of the token that is not divisible. This * means all token operations (creation, movement and destruction) must have * amounts that are a multiple of this number. * * For most token contracts, this value will equal 1. */ function granularity() external view returns (uint256); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by an account (`owner`). */ function balanceOf(address owner) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * If send or receive hooks are registered for the caller and `recipient`, * the corresponding functions will be called with `data` and empty * `operatorData`. See {IERC777Sender} and {IERC777Recipient}. * * Emits a {Sent} event. * * Requirements * * - the caller must have at least `amount` tokens. * - `recipient` cannot be the zero address. * - if `recipient` is a contract, it must implement the {IERC777Recipient} * interface. */ function send(address recipient, uint256 amount, bytes calldata data) external; /** * @dev Destroys `amount` tokens from the caller's account, reducing the * total supply. * * If a send hook is registered for the caller, the corresponding function * will be called with `data` and empty `operatorData`. See {IERC777Sender}. * * Emits a {Burned} event. * * Requirements * * - the caller must have at least `amount` tokens. */ function burn(uint256 amount, bytes calldata data) external; /** * @dev Returns true if an account is an operator of `tokenHolder`. * Operators can send and burn tokens on behalf of their owners. All * accounts are their own operator. * * See {operatorSend} and {operatorBurn}. */ function isOperatorFor(address operator, address tokenHolder) external view returns (bool); /** * @dev Make an account an operator of the caller. * * See {isOperatorFor}. * * Emits an {AuthorizedOperator} event. * * Requirements * * - `operator` cannot be calling address. */ function authorizeOperator(address operator) external; /** * @dev Revoke an account's operator status for the caller. * * See {isOperatorFor} and {defaultOperators}. * * Emits a {RevokedOperator} event. * * Requirements * * - `operator` cannot be calling address. */ function revokeOperator(address operator) external; /** * @dev Returns the list of default operators. These accounts are operators * for all token holders, even if {authorizeOperator} was never called on * them. * * This list is immutable, but individual holders may revoke these via * {revokeOperator}, in which case {isOperatorFor} will return false. */ function defaultOperators() external view returns (address[] memory); /** * @dev Moves `amount` tokens from `sender` to `recipient`. The caller must * be an operator of `sender`. * * If send or receive hooks are registered for `sender` and `recipient`, * the corresponding functions will be called with `data` and * `operatorData`. See {IERC777Sender} and {IERC777Recipient}. * * Emits a {Sent} event. * * Requirements * * - `sender` cannot be the zero address. * - `sender` must have at least `amount` tokens. * - the caller must be an operator for `sender`. * - `recipient` cannot be the zero address. * - if `recipient` is a contract, it must implement the {IERC777Recipient} * interface. */ function operatorSend( address sender, address recipient, uint256 amount, bytes calldata data, bytes calldata operatorData ) external; /** * @dev Destroys `amount` tokens from `account`, reducing the total supply. * The caller must be an operator of `account`. * * If a send hook is registered for `account`, the corresponding function * will be called with `data` and `operatorData`. See {IERC777Sender}. * * Emits a {Burned} event. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. * - the caller must be an operator for `account`. */ function operatorBurn( address account, uint256 amount, bytes calldata data, bytes calldata operatorData ) external; event Sent( address indexed operator, address indexed from, address indexed to, uint256 amount, bytes data, bytes operatorData ); event Minted(address indexed operator, address indexed to, uint256 amount, bytes data, bytes operatorData); event Burned(address indexed operator, address indexed from, uint256 amount, bytes data, bytes operatorData); event AuthorizedOperator(address indexed operator, address indexed tokenHolder); event RevokedOperator(address indexed operator, address indexed tokenHolder); }
pragma solidity ^0.6.0; /** * @dev Interface of the ERC777TokensRecipient standard as defined in the EIP. * * Accounts can be notified of {IERC777} tokens being sent to them by having a * contract implement this interface (contract holders can be their own * implementer) and registering it on the * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry]. * * See {IERC1820Registry} and {ERC1820Implementer}. */ interface IERC777Recipient { /** * @dev Called by an {IERC777} token contract whenever tokens are being * moved or created into a registered account (`to`). The type of operation * is conveyed by `from` being the zero address or not. * * This call occurs _after_ the token contract's state is updated, so * {IERC777-balanceOf}, etc., can be used to query the post-operation state. * * This function may revert to prevent the operation from being executed. */ function tokensReceived( address operator, address from, address to, uint256 amount, bytes calldata userData, bytes calldata operatorData ) external; }
pragma solidity ^0.6.0; /** * @dev Interface of the ERC777TokensSender standard as defined in the EIP. * * {IERC777} Token holders can be notified of operations performed on their * tokens by having a contract implement this interface (contract holders can be * their own implementer) and registering it on the * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry]. * * See {IERC1820Registry} and {ERC1820Implementer}. */ interface IERC777Sender { /** * @dev Called by an {IERC777} token contract whenever a registered holder's * (`from`) tokens are about to be moved or destroyed. The type of operation * is conveyed by `to` being the zero address or not. * * This call occurs _before_ the token contract's state is updated, so * {IERC777-balanceOf}, etc., can be used to query the pre-operation state. * * This function may revert to prevent the operation from being executed. */ function tokensToSend( address operator, address from, address to, uint256 amount, bytes calldata userData, bytes calldata operatorData ) external; }
pragma solidity ^0.6.12; import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC777/IERC777.sol"; import "./PodInterface.sol"; interface MixedPodInterface is IERC777, PodInterface { }
pragma solidity ^0.6.12; interface PodInterface { function tokenToCollateralValue(uint256 tokens) external view returns (uint256); function balanceOfUnderlying(address user) external view returns (uint256); }
{ "evmVersion": "istanbul", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IERC777","name":"_poolDaiToken","type":"address"},{"internalType":"contract IERC777","name":"_poolUsdcToken","type":"address"},{"internalType":"contract MixedPodInterface","name":"_poolDaiPod","type":"address"},{"internalType":"contract MixedPodInterface","name":"_poolUsdcPod","type":"address"},{"internalType":"contract IERC20","name":"_v3Token","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ReceivedTokens","type":"event"},{"inputs":[{"internalType":"bytes32","name":"interfaceHash","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"canImplementInterfaceForAddress","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolDaiPod","outputs":[{"internalType":"contract MixedPodInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolDaiToken","outputs":[{"internalType":"contract IERC777","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolUsdcPod","outputs":[{"internalType":"contract MixedPodInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolUsdcToken","outputs":[{"internalType":"contract IERC777","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"tokensReceived","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"v3Token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"token","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"withdrawERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC777","name":"token","type":"address"}],"name":"withdrawERC777","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040516200115838038062001158833981810160405260a08110156200003757600080fd5b50805160208201516040808401516060850151608090950151609780546001600160a01b03199081166001600160a01b0380891691909117909255609880548216838816179055609980548216838616179055609a80548216838a16179055609b805490911691831691909117905582516329965a1d60e01b815230600482018190527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b602483015260448201529251949593949193929091731820a4b7618bde71dce8cdc73aab6c95905fad24916329965a1d91606480830192600092919082900301818387803b1580156200012d57600080fd5b505af115801562000142573d6000803e3d6000fd5b50505050620001566200016160201b60201c565b5050505050620003d4565b600054610100900460ff16806200017d57506200017d6200021f565b806200018c575060005460ff16155b620001c95760405162461bcd60e51b815260040180806020018281038252602e8152602001806200112a602e913960400191505060405180910390fd5b600054610100900460ff16158015620001f5576000805460ff1961ff0019909116610100171660011790555b620001ff62000225565b62000209620002cd565b80156200021c576000805461ff00191690555b50565b303b1590565b600054610100900460ff1680620002415750620002416200021f565b8062000250575060005460ff16155b6200028d5760405162461bcd60e51b815260040180806020018281038252602e8152602001806200112a602e913960400191505060405180910390fd5b600054610100900460ff1615801562000209576000805460ff1961ff00199091166101001716600117905580156200021c576000805461ff001916905550565b600054610100900460ff1680620002e95750620002e96200021f565b80620002f8575060005460ff16155b620003355760405162461bcd60e51b815260040180806020018281038252602e8152602001806200112a602e913960400191505060405180910390fd5b600054610100900460ff1615801562000361576000805460ff1961ff0019909116610100171660011790555b60006200036d620003d0565b606580546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35080156200021c576000805461ff001916905550565b3390565b610d4680620003e46000396000f3fe608060405234801561001057600080fd5b50600436106100ce5760003560e01c8063715018a61161008c578063da52e52e11610066578063da52e52e1461026f578063f2fde38b14610277578063f3e414f81461029d578063f4f3b200146102c9576100ce565b8063715018a6146102575780638da5cb5b1461025f578063bf5486f614610267576100ce565b806223de29146100d357806310b25362146101bf5780631b771bd6146101e3578063249cb3fa146101eb5780634761f9d81461022957806363d190fa14610231575b600080fd5b6101bd600480360360c08110156100e957600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a08101608082013564010000000081111561012c57600080fd5b82018360208201111561013e57600080fd5b8035906020019184600183028401116401000000008311171561016057600080fd5b91939092909160208101903564010000000081111561017e57600080fd5b82018360208201111561019057600080fd5b803590602001918460018302840111640100000000831117156101b257600080fd5b5090925090506102ef565b005b6101c76106f4565b604080516001600160a01b039092168252519081900360200190f35b6101c7610703565b6102176004803603604081101561020157600080fd5b50803590602001356001600160a01b0316610712565b60408051918252519081900360200190f35b6101c761079f565b6101bd6004803603602081101561024757600080fd5b50356001600160a01b03166107ae565b6101bd6108fc565b6101c761099e565b6101c76109ad565b6101c76109bc565b6101bd6004803603602081101561028d57600080fd5b50356001600160a01b03166109cb565b6101bd600480360360408110156102b357600080fd5b506001600160a01b038135169060200135610ac4565b6101bd600480360360208110156102df57600080fd5b50356001600160a01b0316610b70565b6001600160a01b038616301461034c576040805162461bcd60e51b815260206004820152601960248201527f4d6967726174655632546f56332f6f6e6c792d746f6b656e7300000000000000604482015290519081900360640190fd5b6097546001600160a01b03163314156103e757609b546040805163a9059cbb60e01b81526001600160a01b038a81166004830152602482018990529151919092169163a9059cbb9160448083019260209291908290030181600087803b1580156103b557600080fd5b505af11580156103c9573d6000803e3d6000fd5b505050506040513d60208110156103df57600080fd5b506106a29050565b6098546001600160a01b031633141561045657609b546040805163a9059cbb60e01b81526001600160a01b038a8116600483015264e8d4a51000890260248301529151919092169163a9059cbb9160448083019260209291908290030181600087803b1580156103b557600080fd5b6099546001600160a01b031633141561056c576099546040805163d67d7a7d60e01b81526004810188905290516000926001600160a01b03169163d67d7a7d916024808301926020929190829003018186803b1580156104b557600080fd5b505afa1580156104c9573d6000803e3d6000fd5b505050506040513d60208110156104df57600080fd5b5051609b546040805163a9059cbb60e01b81526001600160a01b038c8116600483015260248201859052915193945091169163a9059cbb916044808201926020929091908290030181600087803b15801561053957600080fd5b505af115801561054d573d6000803e3d6000fd5b505050506040513d602081101561056357600080fd5b506106a2915050565b609a546001600160a01b031633141561065557609a546040805163d67d7a7d60e01b81526004810188905290516000926001600160a01b03169163d67d7a7d916024808301926020929190829003018186803b1580156105cb57600080fd5b505afa1580156105df573d6000803e3d6000fd5b505050506040513d60208110156105f557600080fd5b5051609b546040805163a9059cbb60e01b81526001600160a01b038c8116600483015264e8d4a5100085026024830152915193945091169163a9059cbb916044808201926020929091908290030181600087803b15801561053957600080fd5b6040805162461bcd60e51b815260206004820152601b60248201527f4d6967726174655632546f56332f756e6b6e6f776e2d746f6b656e0000000000604482015290519081900360640190fd5b604080513381526001600160a01b038916602082015280820187905290517fbd878faa248cebecbb044cc9fd6294f16e5afe7fc344c69ffb1931f90f636fcd9181900360600190a15050505050505050565b6097546001600160a01b031681565b609a546001600160a01b031681565b60006001600160a01b0382163014801561074b57507fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b83145b1561079557604051602001808073455243313832305f4143434550545f4d4147494360601b8152506014019050604051602081830303815290604052805190602001209050610799565b5060005b92915050565b609b546001600160a01b031681565b6107b6610cc6565b6065546001600160a01b03908116911614610806576040805162461bcd60e51b81526020600482018190526024820152600080516020610cf1833981519152604482015290519081900360640190fd5b6000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561085557600080fd5b505afa158015610869573d6000803e3d6000fd5b505050506040513d602081101561087f57600080fd5b505160408051634decdde360e11b8152336004820152602481018390526060604482015260006064820181905291519293506001600160a01b03851692639bd9bbc69260a48084019391929182900301818387803b1580156108e057600080fd5b505af11580156108f4573d6000803e3d6000fd5b505050505050565b610904610cc6565b6065546001600160a01b03908116911614610954576040805162461bcd60e51b81526020600482018190526024820152600080516020610cf1833981519152604482015290519081900360640190fd5b6065546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3606580546001600160a01b0319169055565b6065546001600160a01b031690565b6098546001600160a01b031681565b6099546001600160a01b031681565b6109d3610cc6565b6065546001600160a01b03908116911614610a23576040805162461bcd60e51b81526020600482018190526024820152600080516020610cf1833981519152604482015290519081900360640190fd5b6001600160a01b038116610a685760405162461bcd60e51b8152600401808060200182810382526026815260200180610ccb6026913960400191505060405180910390fd5b6065546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3606580546001600160a01b0319166001600160a01b0392909216919091179055565b610acc610cc6565b6065546001600160a01b03908116911614610b1c576040805162461bcd60e51b81526020600482018190526024820152600080516020610cf1833981519152604482015290519081900360640190fd5b604080516323b872dd60e01b81523060048201523360248201526044810183905290516001600160a01b038416916323b872dd91606480830192600092919082900301818387803b1580156108e057600080fd5b610b78610cc6565b6065546001600160a01b03908116911614610bc8576040805162461bcd60e51b81526020600482018190526024820152600080516020610cf1833981519152604482015290519081900360640190fd5b6000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610c1757600080fd5b505afa158015610c2b573d6000803e3d6000fd5b505050506040513d6020811015610c4157600080fd5b50516040805163a9059cbb60e01b81523360048201526024810183905290519192506001600160a01b0384169163a9059cbb916044808201926020929091908290030181600087803b158015610c9657600080fd5b505af1158015610caa573d6000803e3d6000fd5b505050506040513d6020811015610cc057600080fd5b50505050565b339056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220da57b2606d32c1fb6a0ca35699c3fa28c60cd0f66b93d81eb091a203858b85fd64736f6c634300060c0033436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a656400000000000000000000000049d716dfe60b37379010a75329ae09428f17118d000000000000000000000000bd87447f48ad729c5c4b8bcb503e1395f62e8b980000000000000000000000009f4c5d8d9be360df36e67f52ae55c1b137b4d0c40000000000000000000000006f5587e191c8b222f634c78111f97c4851663ba4000000000000000000000000334cbb5858417aee161b53ee0d5349ccf54514cf
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100ce5760003560e01c8063715018a61161008c578063da52e52e11610066578063da52e52e1461026f578063f2fde38b14610277578063f3e414f81461029d578063f4f3b200146102c9576100ce565b8063715018a6146102575780638da5cb5b1461025f578063bf5486f614610267576100ce565b806223de29146100d357806310b25362146101bf5780631b771bd6146101e3578063249cb3fa146101eb5780634761f9d81461022957806363d190fa14610231575b600080fd5b6101bd600480360360c08110156100e957600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a08101608082013564010000000081111561012c57600080fd5b82018360208201111561013e57600080fd5b8035906020019184600183028401116401000000008311171561016057600080fd5b91939092909160208101903564010000000081111561017e57600080fd5b82018360208201111561019057600080fd5b803590602001918460018302840111640100000000831117156101b257600080fd5b5090925090506102ef565b005b6101c76106f4565b604080516001600160a01b039092168252519081900360200190f35b6101c7610703565b6102176004803603604081101561020157600080fd5b50803590602001356001600160a01b0316610712565b60408051918252519081900360200190f35b6101c761079f565b6101bd6004803603602081101561024757600080fd5b50356001600160a01b03166107ae565b6101bd6108fc565b6101c761099e565b6101c76109ad565b6101c76109bc565b6101bd6004803603602081101561028d57600080fd5b50356001600160a01b03166109cb565b6101bd600480360360408110156102b357600080fd5b506001600160a01b038135169060200135610ac4565b6101bd600480360360208110156102df57600080fd5b50356001600160a01b0316610b70565b6001600160a01b038616301461034c576040805162461bcd60e51b815260206004820152601960248201527f4d6967726174655632546f56332f6f6e6c792d746f6b656e7300000000000000604482015290519081900360640190fd5b6097546001600160a01b03163314156103e757609b546040805163a9059cbb60e01b81526001600160a01b038a81166004830152602482018990529151919092169163a9059cbb9160448083019260209291908290030181600087803b1580156103b557600080fd5b505af11580156103c9573d6000803e3d6000fd5b505050506040513d60208110156103df57600080fd5b506106a29050565b6098546001600160a01b031633141561045657609b546040805163a9059cbb60e01b81526001600160a01b038a8116600483015264e8d4a51000890260248301529151919092169163a9059cbb9160448083019260209291908290030181600087803b1580156103b557600080fd5b6099546001600160a01b031633141561056c576099546040805163d67d7a7d60e01b81526004810188905290516000926001600160a01b03169163d67d7a7d916024808301926020929190829003018186803b1580156104b557600080fd5b505afa1580156104c9573d6000803e3d6000fd5b505050506040513d60208110156104df57600080fd5b5051609b546040805163a9059cbb60e01b81526001600160a01b038c8116600483015260248201859052915193945091169163a9059cbb916044808201926020929091908290030181600087803b15801561053957600080fd5b505af115801561054d573d6000803e3d6000fd5b505050506040513d602081101561056357600080fd5b506106a2915050565b609a546001600160a01b031633141561065557609a546040805163d67d7a7d60e01b81526004810188905290516000926001600160a01b03169163d67d7a7d916024808301926020929190829003018186803b1580156105cb57600080fd5b505afa1580156105df573d6000803e3d6000fd5b505050506040513d60208110156105f557600080fd5b5051609b546040805163a9059cbb60e01b81526001600160a01b038c8116600483015264e8d4a5100085026024830152915193945091169163a9059cbb916044808201926020929091908290030181600087803b15801561053957600080fd5b6040805162461bcd60e51b815260206004820152601b60248201527f4d6967726174655632546f56332f756e6b6e6f776e2d746f6b656e0000000000604482015290519081900360640190fd5b604080513381526001600160a01b038916602082015280820187905290517fbd878faa248cebecbb044cc9fd6294f16e5afe7fc344c69ffb1931f90f636fcd9181900360600190a15050505050505050565b6097546001600160a01b031681565b609a546001600160a01b031681565b60006001600160a01b0382163014801561074b57507fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b83145b1561079557604051602001808073455243313832305f4143434550545f4d4147494360601b8152506014019050604051602081830303815290604052805190602001209050610799565b5060005b92915050565b609b546001600160a01b031681565b6107b6610cc6565b6065546001600160a01b03908116911614610806576040805162461bcd60e51b81526020600482018190526024820152600080516020610cf1833981519152604482015290519081900360640190fd5b6000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561085557600080fd5b505afa158015610869573d6000803e3d6000fd5b505050506040513d602081101561087f57600080fd5b505160408051634decdde360e11b8152336004820152602481018390526060604482015260006064820181905291519293506001600160a01b03851692639bd9bbc69260a48084019391929182900301818387803b1580156108e057600080fd5b505af11580156108f4573d6000803e3d6000fd5b505050505050565b610904610cc6565b6065546001600160a01b03908116911614610954576040805162461bcd60e51b81526020600482018190526024820152600080516020610cf1833981519152604482015290519081900360640190fd5b6065546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3606580546001600160a01b0319169055565b6065546001600160a01b031690565b6098546001600160a01b031681565b6099546001600160a01b031681565b6109d3610cc6565b6065546001600160a01b03908116911614610a23576040805162461bcd60e51b81526020600482018190526024820152600080516020610cf1833981519152604482015290519081900360640190fd5b6001600160a01b038116610a685760405162461bcd60e51b8152600401808060200182810382526026815260200180610ccb6026913960400191505060405180910390fd5b6065546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3606580546001600160a01b0319166001600160a01b0392909216919091179055565b610acc610cc6565b6065546001600160a01b03908116911614610b1c576040805162461bcd60e51b81526020600482018190526024820152600080516020610cf1833981519152604482015290519081900360640190fd5b604080516323b872dd60e01b81523060048201523360248201526044810183905290516001600160a01b038416916323b872dd91606480830192600092919082900301818387803b1580156108e057600080fd5b610b78610cc6565b6065546001600160a01b03908116911614610bc8576040805162461bcd60e51b81526020600482018190526024820152600080516020610cf1833981519152604482015290519081900360640190fd5b6000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610c1757600080fd5b505afa158015610c2b573d6000803e3d6000fd5b505050506040513d6020811015610c4157600080fd5b50516040805163a9059cbb60e01b81523360048201526024810183905290519192506001600160a01b0384169163a9059cbb916044808201926020929091908290030181600087803b158015610c9657600080fd5b505af1158015610caa573d6000803e3d6000fd5b505050506040513d6020811015610cc057600080fd5b50505050565b339056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220da57b2606d32c1fb6a0ca35699c3fa28c60cd0f66b93d81eb091a203858b85fd64736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000049d716dfe60b37379010a75329ae09428f17118d000000000000000000000000bd87447f48ad729c5c4b8bcb503e1395f62e8b980000000000000000000000009f4c5d8d9be360df36e67f52ae55c1b137b4d0c40000000000000000000000006f5587e191c8b222f634c78111f97c4851663ba4000000000000000000000000334cbb5858417aee161b53ee0d5349ccf54514cf
-----Decoded View---------------
Arg [0] : _poolDaiToken (address): 0x49d716DFe60b37379010A75329ae09428f17118d
Arg [1] : _poolUsdcToken (address): 0xBD87447F48ad729C5c4b8bcb503e1395F62e8B98
Arg [2] : _poolDaiPod (address): 0x9F4C5D8d9BE360DF36E67F52aE55C1B137B4d0C4
Arg [3] : _poolUsdcPod (address): 0x6F5587E191C8b222F634C78111F97c4851663ba4
Arg [4] : _v3Token (address): 0x334cBb5858417Aee161B53Ee0D5349cCF54514CF
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 00000000000000000000000049d716dfe60b37379010a75329ae09428f17118d
Arg [1] : 000000000000000000000000bd87447f48ad729c5c4b8bcb503e1395f62e8b98
Arg [2] : 0000000000000000000000009f4c5d8d9be360df36e67f52ae55c1b137b4d0c4
Arg [3] : 0000000000000000000000006f5587e191c8b222f634c78111f97c4851663ba4
Arg [4] : 000000000000000000000000334cbb5858417aee161b53ee0d5349ccf54514cf
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.