Overview
APE Balance
APE Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Name:
NFTMarketplace
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
No with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Address.sol"; contract NFTMarketplace is ReentrancyGuard { using Address for address payable; uint256 private constant DECIMALS = 18; struct Listing { address seller; uint256 price; } mapping(address => mapping(uint256 => Listing)) public listings; // 列出NFT function listNFT( address nftContract, uint256 tokenId, uint256 priceInAPE ) external { IERC721 nft = IERC721(nftContract); // 获取 NFT 当前所有者 address currentOwner = nft.ownerOf(tokenId); // 确保调用者是 NFT 的所有者 require(currentOwner == msg.sender, "You are not the owner"); // 确保调用者已将该 NFT 授权给合约,以便合约可以进行转移 bool isApproved = nft.isApprovedForAll(msg.sender, address(this)) || nft.getApproved(tokenId) == address(this); require(isApproved, "Marketplace not approved"); // 确保NFT没有被列出 require( listings[nftContract][tokenId].price == 0, "NFT is already listed" ); // 创建上架记录 listings[nftContract][tokenId] = Listing(msg.sender, priceInAPE); } // 购买NFT,合约自动匹配价格 function buyNFT( address nftContract, uint256 tokenId ) external payable nonReentrant { Listing memory listedItem = listings[nftContract][tokenId]; // 确保NFT已经被列出 require(listedItem.price > 0, "NFT not for sale"); // 确保买家支付的金额等于NFT的价格 require(msg.value == listedItem.price, "Incorrect payment amount"); // 确保买家不是卖家 require(listedItem.seller != msg.sender, "You cannot buy your own NFT"); // 删除上架信息 delete listings[nftContract][tokenId]; // 将款项支付给卖家 payable(listedItem.seller).sendValue(listedItem.price); // 将NFT转移给买家 IERC721(nftContract).safeTransferFrom( listedItem.seller, msg.sender, tokenId ); } // 撤下NFT function delistNFT(address nftContract, uint256 tokenId) external { Listing memory listedItem = listings[nftContract][tokenId]; // 确保调用者是卖家 require(listedItem.seller == msg.sender, "You are not the seller"); // 确保卖家仍然拥有该NFT require( IERC721(nftContract).ownerOf(tokenId) == msg.sender, "Seller no longer owns NFT" ); // 删除上架信息 delete listings[nftContract][tokenId]; } // 查询某个 NFT 是否在售 function isListed( address nftContract, uint256 tokenId ) public view returns (bool) { return listings[nftContract][tokenId].price > 0; } // 查询NFT的价格(返回用户可理解的价格) function getNFTPrice( address nftContract, uint256 tokenId ) external view returns (uint256) { Listing memory listedItem = listings[nftContract][tokenId]; // 如果NFT未列出,返回0 require(listedItem.price > 0, "NFT is not listed for sale"); // 返回无精度的价格(例如 0.1 APE) return listedItem.price / 10 ** DECIMALS; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [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://consensys.net/diligence/blog/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.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(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); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _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); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.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); }
{ "evmVersion": "paris", "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"buyNFT","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"delistNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getNFTPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isListed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"priceInAPE","type":"uint256"}],"name":"listNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"listings","outputs":[{"internalType":"address","name":"seller","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50600160008190555061189e806100286000396000f3fe6080604052600436106100545760003560e01c806207df3014610059578063a17a709414610097578063a82ba76f146100c0578063ad05f1b4146100dc578063bc24179314610105578063cdb3cd2514610142575b600080fd5b34801561006557600080fd5b50610080600480360381019061007b9190610ea8565b61017f565b60405161008e929190610f06565b60405180910390f35b3480156100a357600080fd5b506100be60048036038101906100b99190610ea8565b6101d0565b005b6100da60048036038101906100d59190610ea8565b61046f565b005b3480156100e857600080fd5b5061010360048036038101906100fe9190610f2f565b610768565b005b34801561011157600080fd5b5061012c60048036038101906101279190610ea8565b610b35565b6040516101399190610f82565b60405180910390f35b34801561014e57600080fd5b5061016960048036038101906101649190610ea8565b610c62565b6040516101769190610fb8565b60405180910390f35b6001602052816000526040600020602052806000526040600020600091509150508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160018201548152505090503373ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff1614610301576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890611030565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b81526004016103519190610f82565b602060405180830381865afa15801561036e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103929190611065565b73ffffffffffffffffffffffffffffffffffffffff16146103e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103df906110de565b60405180910390fd5b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000838152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905560018201600090555050505050565b610477610cc2565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820154815250509050600081602001511161057d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105749061114a565b60405180910390fd5b806020015134146105c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ba906111b6565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff1603610635576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062c90611222565b60405180910390fd5b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000838152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000905550506106e88160200151826000015173ffffffffffffffffffffffffffffffffffffffff16610d1190919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff166342842e0e826000015133856040518463ffffffff1660e01b815260040161072993929190611242565b600060405180830381600087803b15801561074357600080fd5b505af1158015610757573d6000803e3d6000fd5b5050505050610764610e05565b5050565b600083905060008173ffffffffffffffffffffffffffffffffffffffff16636352211e856040518263ffffffff1660e01b81526004016107a89190610f82565b602060405180830381865afa1580156107c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107e99190611065565b90503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610859576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610850906112c5565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff1663e985e9c533306040518363ffffffff1660e01b81526004016108969291906112e5565b602060405180830381865afa1580156108b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d7919061133a565b8061098657503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1663081812fc876040518263ffffffff1660e01b815260040161092d9190610f82565b602060405180830381865afa15801561094a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096e9190611065565b73ffffffffffffffffffffffffffffffffffffffff16145b9050806109c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109bf906113b3565b60405180910390fd5b6000600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008781526020019081526020016000206001015414610a5e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a559061141f565b60405180910390fd5b60405180604001604052803373ffffffffffffffffffffffffffffffffffffffff16815260200185815250600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600087815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155905050505050505050565b600080600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008481526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160018201548152505090506000816020015111610c3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c339061148b565b60405180910390fd5b6012600a610c4a919061160d565b8160200151610c599190611687565b91505092915050565b600080600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008481526020019081526020016000206001015411905092915050565b600260005403610d07576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cfe90611704565b60405180910390fd5b6002600081905550565b80471015610d54576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4b90611770565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff1682604051610d7a906117c1565b60006040518083038185875af1925050503d8060008114610db7576040519150601f19603f3d011682016040523d82523d6000602084013e610dbc565b606091505b5050905080610e00576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df790611848565b60405180910390fd5b505050565b6001600081905550565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610e3f82610e14565b9050919050565b610e4f81610e34565b8114610e5a57600080fd5b50565b600081359050610e6c81610e46565b92915050565b6000819050919050565b610e8581610e72565b8114610e9057600080fd5b50565b600081359050610ea281610e7c565b92915050565b60008060408385031215610ebf57610ebe610e0f565b5b6000610ecd85828601610e5d565b9250506020610ede85828601610e93565b9150509250929050565b610ef181610e34565b82525050565b610f0081610e72565b82525050565b6000604082019050610f1b6000830185610ee8565b610f286020830184610ef7565b9392505050565b600080600060608486031215610f4857610f47610e0f565b5b6000610f5686828701610e5d565b9350506020610f6786828701610e93565b9250506040610f7886828701610e93565b9150509250925092565b6000602082019050610f976000830184610ef7565b92915050565b60008115159050919050565b610fb281610f9d565b82525050565b6000602082019050610fcd6000830184610fa9565b92915050565b600082825260208201905092915050565b7f596f7520617265206e6f74207468652073656c6c657200000000000000000000600082015250565b600061101a601683610fd3565b915061102582610fe4565b602082019050919050565b600060208201905081810360008301526110498161100d565b9050919050565b60008151905061105f81610e46565b92915050565b60006020828403121561107b5761107a610e0f565b5b600061108984828501611050565b91505092915050565b7f53656c6c6572206e6f206c6f6e676572206f776e73204e465400000000000000600082015250565b60006110c8601983610fd3565b91506110d382611092565b602082019050919050565b600060208201905081810360008301526110f7816110bb565b9050919050565b7f4e4654206e6f7420666f722073616c6500000000000000000000000000000000600082015250565b6000611134601083610fd3565b915061113f826110fe565b602082019050919050565b6000602082019050818103600083015261116381611127565b9050919050565b7f496e636f7272656374207061796d656e7420616d6f756e740000000000000000600082015250565b60006111a0601883610fd3565b91506111ab8261116a565b602082019050919050565b600060208201905081810360008301526111cf81611193565b9050919050565b7f596f752063616e6e6f742062757920796f7572206f776e204e46540000000000600082015250565b600061120c601b83610fd3565b9150611217826111d6565b602082019050919050565b6000602082019050818103600083015261123b816111ff565b9050919050565b60006060820190506112576000830186610ee8565b6112646020830185610ee8565b6112716040830184610ef7565b949350505050565b7f596f7520617265206e6f7420746865206f776e65720000000000000000000000600082015250565b60006112af601583610fd3565b91506112ba82611279565b602082019050919050565b600060208201905081810360008301526112de816112a2565b9050919050565b60006040820190506112fa6000830185610ee8565b6113076020830184610ee8565b9392505050565b61131781610f9d565b811461132257600080fd5b50565b6000815190506113348161130e565b92915050565b6000602082840312156113505761134f610e0f565b5b600061135e84828501611325565b91505092915050565b7f4d61726b6574706c616365206e6f7420617070726f7665640000000000000000600082015250565b600061139d601883610fd3565b91506113a882611367565b602082019050919050565b600060208201905081810360008301526113cc81611390565b9050919050565b7f4e465420697320616c7265616479206c69737465640000000000000000000000600082015250565b6000611409601583610fd3565b9150611414826113d3565b602082019050919050565b60006020820190508181036000830152611438816113fc565b9050919050565b7f4e4654206973206e6f74206c697374656420666f722073616c65000000000000600082015250565b6000611475601a83610fd3565b91506114808261143f565b602082019050919050565b600060208201905081810360008301526114a481611468565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008160011c9050919050565b6000808291508390505b60018511156115315780860481111561150d5761150c6114ab565b5b600185161561151c5780820291505b808102905061152a856114da565b94506114f1565b94509492505050565b60008261154a5760019050611606565b816115585760009050611606565b816001811461156e5760028114611578576115a7565b6001915050611606565b60ff84111561158a576115896114ab565b5b8360020a9150848211156115a1576115a06114ab565b5b50611606565b5060208310610133831016604e8410600b84101617156115dc5782820a9050838111156115d7576115d66114ab565b5b611606565b6115e984848460016114e7565b92509050818404811115611600576115ff6114ab565b5b81810290505b9392505050565b600061161882610e72565b915061162383610e72565b92506116507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848461153a565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061169282610e72565b915061169d83610e72565b9250826116ad576116ac611658565b5b828204905092915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b60006116ee601f83610fd3565b91506116f9826116b8565b602082019050919050565b6000602082019050818103600083015261171d816116e1565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e6365000000600082015250565b600061175a601d83610fd3565b915061176582611724565b602082019050919050565b600060208201905081810360008301526117898161174d565b9050919050565b600081905092915050565b50565b60006117ab600083611790565b91506117b68261179b565b600082019050919050565b60006117cc8261179e565b9150819050919050565b7f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260008201527f6563697069656e74206d61792068617665207265766572746564000000000000602082015250565b6000611832603a83610fd3565b915061183d826117d6565b604082019050919050565b6000602082019050818103600083015261186181611825565b905091905056fea2646970667358221220afa5dfbc5130a0ac6c79be49700b9cf5951b7d7df4c0da64694e781fe30df18c64736f6c63430008140033
Deployed Bytecode
0x6080604052600436106100545760003560e01c806207df3014610059578063a17a709414610097578063a82ba76f146100c0578063ad05f1b4146100dc578063bc24179314610105578063cdb3cd2514610142575b600080fd5b34801561006557600080fd5b50610080600480360381019061007b9190610ea8565b61017f565b60405161008e929190610f06565b60405180910390f35b3480156100a357600080fd5b506100be60048036038101906100b99190610ea8565b6101d0565b005b6100da60048036038101906100d59190610ea8565b61046f565b005b3480156100e857600080fd5b5061010360048036038101906100fe9190610f2f565b610768565b005b34801561011157600080fd5b5061012c60048036038101906101279190610ea8565b610b35565b6040516101399190610f82565b60405180910390f35b34801561014e57600080fd5b5061016960048036038101906101649190610ea8565b610c62565b6040516101769190610fb8565b60405180910390f35b6001602052816000526040600020602052806000526040600020600091509150508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160018201548152505090503373ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff1614610301576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890611030565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b81526004016103519190610f82565b602060405180830381865afa15801561036e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103929190611065565b73ffffffffffffffffffffffffffffffffffffffff16146103e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103df906110de565b60405180910390fd5b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000838152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905560018201600090555050505050565b610477610cc2565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820154815250509050600081602001511161057d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105749061114a565b60405180910390fd5b806020015134146105c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ba906111b6565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff1603610635576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062c90611222565b60405180910390fd5b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000838152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000905550506106e88160200151826000015173ffffffffffffffffffffffffffffffffffffffff16610d1190919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff166342842e0e826000015133856040518463ffffffff1660e01b815260040161072993929190611242565b600060405180830381600087803b15801561074357600080fd5b505af1158015610757573d6000803e3d6000fd5b5050505050610764610e05565b5050565b600083905060008173ffffffffffffffffffffffffffffffffffffffff16636352211e856040518263ffffffff1660e01b81526004016107a89190610f82565b602060405180830381865afa1580156107c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107e99190611065565b90503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610859576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610850906112c5565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff1663e985e9c533306040518363ffffffff1660e01b81526004016108969291906112e5565b602060405180830381865afa1580156108b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d7919061133a565b8061098657503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1663081812fc876040518263ffffffff1660e01b815260040161092d9190610f82565b602060405180830381865afa15801561094a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096e9190611065565b73ffffffffffffffffffffffffffffffffffffffff16145b9050806109c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109bf906113b3565b60405180910390fd5b6000600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008781526020019081526020016000206001015414610a5e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a559061141f565b60405180910390fd5b60405180604001604052803373ffffffffffffffffffffffffffffffffffffffff16815260200185815250600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600087815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155905050505050505050565b600080600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008481526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160018201548152505090506000816020015111610c3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c339061148b565b60405180910390fd5b6012600a610c4a919061160d565b8160200151610c599190611687565b91505092915050565b600080600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008481526020019081526020016000206001015411905092915050565b600260005403610d07576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cfe90611704565b60405180910390fd5b6002600081905550565b80471015610d54576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4b90611770565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff1682604051610d7a906117c1565b60006040518083038185875af1925050503d8060008114610db7576040519150601f19603f3d011682016040523d82523d6000602084013e610dbc565b606091505b5050905080610e00576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df790611848565b60405180910390fd5b505050565b6001600081905550565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610e3f82610e14565b9050919050565b610e4f81610e34565b8114610e5a57600080fd5b50565b600081359050610e6c81610e46565b92915050565b6000819050919050565b610e8581610e72565b8114610e9057600080fd5b50565b600081359050610ea281610e7c565b92915050565b60008060408385031215610ebf57610ebe610e0f565b5b6000610ecd85828601610e5d565b9250506020610ede85828601610e93565b9150509250929050565b610ef181610e34565b82525050565b610f0081610e72565b82525050565b6000604082019050610f1b6000830185610ee8565b610f286020830184610ef7565b9392505050565b600080600060608486031215610f4857610f47610e0f565b5b6000610f5686828701610e5d565b9350506020610f6786828701610e93565b9250506040610f7886828701610e93565b9150509250925092565b6000602082019050610f976000830184610ef7565b92915050565b60008115159050919050565b610fb281610f9d565b82525050565b6000602082019050610fcd6000830184610fa9565b92915050565b600082825260208201905092915050565b7f596f7520617265206e6f74207468652073656c6c657200000000000000000000600082015250565b600061101a601683610fd3565b915061102582610fe4565b602082019050919050565b600060208201905081810360008301526110498161100d565b9050919050565b60008151905061105f81610e46565b92915050565b60006020828403121561107b5761107a610e0f565b5b600061108984828501611050565b91505092915050565b7f53656c6c6572206e6f206c6f6e676572206f776e73204e465400000000000000600082015250565b60006110c8601983610fd3565b91506110d382611092565b602082019050919050565b600060208201905081810360008301526110f7816110bb565b9050919050565b7f4e4654206e6f7420666f722073616c6500000000000000000000000000000000600082015250565b6000611134601083610fd3565b915061113f826110fe565b602082019050919050565b6000602082019050818103600083015261116381611127565b9050919050565b7f496e636f7272656374207061796d656e7420616d6f756e740000000000000000600082015250565b60006111a0601883610fd3565b91506111ab8261116a565b602082019050919050565b600060208201905081810360008301526111cf81611193565b9050919050565b7f596f752063616e6e6f742062757920796f7572206f776e204e46540000000000600082015250565b600061120c601b83610fd3565b9150611217826111d6565b602082019050919050565b6000602082019050818103600083015261123b816111ff565b9050919050565b60006060820190506112576000830186610ee8565b6112646020830185610ee8565b6112716040830184610ef7565b949350505050565b7f596f7520617265206e6f7420746865206f776e65720000000000000000000000600082015250565b60006112af601583610fd3565b91506112ba82611279565b602082019050919050565b600060208201905081810360008301526112de816112a2565b9050919050565b60006040820190506112fa6000830185610ee8565b6113076020830184610ee8565b9392505050565b61131781610f9d565b811461132257600080fd5b50565b6000815190506113348161130e565b92915050565b6000602082840312156113505761134f610e0f565b5b600061135e84828501611325565b91505092915050565b7f4d61726b6574706c616365206e6f7420617070726f7665640000000000000000600082015250565b600061139d601883610fd3565b91506113a882611367565b602082019050919050565b600060208201905081810360008301526113cc81611390565b9050919050565b7f4e465420697320616c7265616479206c69737465640000000000000000000000600082015250565b6000611409601583610fd3565b9150611414826113d3565b602082019050919050565b60006020820190508181036000830152611438816113fc565b9050919050565b7f4e4654206973206e6f74206c697374656420666f722073616c65000000000000600082015250565b6000611475601a83610fd3565b91506114808261143f565b602082019050919050565b600060208201905081810360008301526114a481611468565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008160011c9050919050565b6000808291508390505b60018511156115315780860481111561150d5761150c6114ab565b5b600185161561151c5780820291505b808102905061152a856114da565b94506114f1565b94509492505050565b60008261154a5760019050611606565b816115585760009050611606565b816001811461156e5760028114611578576115a7565b6001915050611606565b60ff84111561158a576115896114ab565b5b8360020a9150848211156115a1576115a06114ab565b5b50611606565b5060208310610133831016604e8410600b84101617156115dc5782820a9050838111156115d7576115d66114ab565b5b611606565b6115e984848460016114e7565b92509050818404811115611600576115ff6114ab565b5b81810290505b9392505050565b600061161882610e72565b915061162383610e72565b92506116507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848461153a565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061169282610e72565b915061169d83610e72565b9250826116ad576116ac611658565b5b828204905092915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b60006116ee601f83610fd3565b91506116f9826116b8565b602082019050919050565b6000602082019050818103600083015261171d816116e1565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e6365000000600082015250565b600061175a601d83610fd3565b915061176582611724565b602082019050919050565b600060208201905081810360008301526117898161174d565b9050919050565b600081905092915050565b50565b60006117ab600083611790565b91506117b68261179b565b600082019050919050565b60006117cc8261179e565b9150819050919050565b7f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260008201527f6563697069656e74206d61792068617665207265766572746564000000000000602082015250565b6000611832603a83610fd3565b915061183d826117d6565b604082019050919050565b6000602082019050818103600083015261186181611825565b905091905056fea2646970667358221220afa5dfbc5130a0ac6c79be49700b9cf5951b7d7df4c0da64694e781fe30df18c64736f6c63430008140033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.