More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
16493665 | 699 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
VillainCustodian
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "./IAdventureApproval.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; /** * @title VillainCustodian * @author Limit Break, Inc. * @notice Holds masked villain and potion tokens that are currently on a villain unmasking adventure. */ contract VillainCustodian { /// @dev Specify the villain unmasking adventure, masked villain, super villain potion and villain potion contract addresses during creation constructor(address villainUnmaskingAdventure, address maskedVillainAddress, address superVillainPotionAddress, address villainPotionAddress) { IERC721(maskedVillainAddress).setApprovalForAll(villainUnmaskingAdventure, true); IERC721(superVillainPotionAddress).setApprovalForAll(villainUnmaskingAdventure, true); IERC721(villainPotionAddress).setApprovalForAll(villainUnmaskingAdventure, true); IAdventureApproval(maskedVillainAddress).setAdventuresApprovedForAll(villainUnmaskingAdventure, true); IAdventureApproval(superVillainPotionAddress).setAdventuresApprovedForAll(villainUnmaskingAdventure, true); IAdventureApproval(villainPotionAddress).setAdventuresApprovedForAll(villainUnmaskingAdventure, true); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * 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 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); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; interface IAdventureApproval { function setAdventuresApprovedForAll(address operator, bool approved) external; function areAdventuresApprovedForAll(address owner, address operator) external view returns (bool); function isAdventureWhitelisted(address account) external view returns (bool); }
{ "remappings": [ "@limit-break/=lib/limit-break/", "@openzeppelin/=lib/openzeppelin-contracts/", "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "limit-break/=lib/limit-break/", "openzeppelin-contracts/=lib/openzeppelin-contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"villainUnmaskingAdventure","type":"address"},{"internalType":"address","name":"maskedVillainAddress","type":"address"},{"internalType":"address","name":"superVillainPotionAddress","type":"address"},{"internalType":"address","name":"villainPotionAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"}]
Contract Creation Code
608060405234801561001057600080fd5b5060405161034138038061034183398101604081905261002f916102a0565b60405163a22cb46560e01b81526001600160a01b0385811660048301526001602483015284169063a22cb46590604401600060405180830381600087803b15801561007957600080fd5b505af115801561008d573d6000803e3d6000fd5b505060405163a22cb46560e01b81526001600160a01b038781166004830152600160248301528516925063a22cb4659150604401600060405180830381600087803b1580156100db57600080fd5b505af11580156100ef573d6000803e3d6000fd5b505060405163a22cb46560e01b81526001600160a01b038781166004830152600160248301528416925063a22cb4659150604401600060405180830381600087803b15801561013d57600080fd5b505af1158015610151573d6000803e3d6000fd5b50506040516330178bd160e21b81526001600160a01b038781166004830152600160248301528616925063c05e2f449150604401600060405180830381600087803b15801561019f57600080fd5b505af11580156101b3573d6000803e3d6000fd5b50506040516330178bd160e21b81526001600160a01b038781166004830152600160248301528516925063c05e2f449150604401600060405180830381600087803b15801561020157600080fd5b505af1158015610215573d6000803e3d6000fd5b50506040516330178bd160e21b81526001600160a01b038781166004830152600160248301528416925063c05e2f449150604401600060405180830381600087803b15801561026357600080fd5b505af1158015610277573d6000803e3d6000fd5b50505050505050506102f4565b80516001600160a01b038116811461029b57600080fd5b919050565b600080600080608085870312156102b657600080fd5b6102bf85610284565b93506102cd60208601610284565b92506102db60408601610284565b91506102e960608601610284565b905092959194509250565b603f806103026000396000f3fe6080604052600080fdfea26469706673582212205b6ea39b0211c650aa00e5b3277251d7dc558bba8728596e6ac68ed13e997c1964736f6c6343000809003300000000000000000000000005f9067205af1affa7df1c076fc7209407efca60000000000000000000000000812f5cf0d10539ef9534929940f3aeede3d3d9670000000000000000000000001ca97f9a77114a0a6759bd10c18097db8628cb7c000000000000000000000000bbd3f1d05b3a0d9b281c7739c48c3ab3924824ac
Deployed Bytecode
0x6080604052600080fdfea26469706673582212205b6ea39b0211c650aa00e5b3277251d7dc558bba8728596e6ac68ed13e997c1964736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000005f9067205af1affa7df1c076fc7209407efca60000000000000000000000000812f5cf0d10539ef9534929940f3aeede3d3d9670000000000000000000000001ca97f9a77114a0a6759bd10c18097db8628cb7c000000000000000000000000bbd3f1d05b3a0d9b281c7739c48c3ab3924824ac
-----Decoded View---------------
Arg [0] : villainUnmaskingAdventure (address): 0x05F9067205af1aFFA7DF1C076FC7209407EfcA60
Arg [1] : maskedVillainAddress (address): 0x812F5CF0D10539ef9534929940f3aeEde3d3d967
Arg [2] : superVillainPotionAddress (address): 0x1Ca97F9A77114a0A6759bd10C18097Db8628cb7C
Arg [3] : villainPotionAddress (address): 0xBBD3f1D05B3A0D9B281c7739c48c3ab3924824aC
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000005f9067205af1affa7df1c076fc7209407efca60
Arg [1] : 000000000000000000000000812f5cf0d10539ef9534929940f3aeede3d3d967
Arg [2] : 0000000000000000000000001ca97f9a77114a0a6759bd10c18097db8628cb7c
Arg [3] : 000000000000000000000000bbd3f1d05b3a0d9b281c7739c48c3ab3924824ac
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 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.