Source Code
Overview
POL Balance
More Info
ContractCreator
Multichain Info
N/A
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
TimeBased
Compiler Version
v0.8.25+commit.b61c2a91
Optimization Enabled:
Yes with 200 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.15; import {NodeOwners} from "./NodeOwners.sol"; import {IContentGraph} from "../IContentGraph.sol"; contract TimeBased is NodeOwners { mapping(bytes32 => Embargo) contentEmbargo; mapping(bytes32 => mapping(address => bool)) purchased; enum Time { MINS, DAYS, WEEKS, YEARS } enum PricingFunction { STEP, LINEAR, EXPONENTIAL, BINARY } struct Embargo { uint256 embargoDate; uint256 retailPrice; uint256 premium; Time timeDenom; PricingFunction priceFunc; } event EmbargoSet( bytes32 id, uint256 embargoDate, uint256 retailPrice, uint256 premium, Time timeDenom, PricingFunction priceFunc ); event AccessPurchased(bytes32 id, address purchaser, uint256 price); constructor(address _graph, address identity) NodeOwners(_graph, identity) {} function price(bytes32 id, uint256 time) public view returns (uint256 accessPrice) { Embargo memory embargo = contentEmbargo[id]; if (time >= embargo.embargoDate) { accessPrice = embargo.retailPrice; } else { uint256 difference = embargo.embargoDate - time; uint256 premium = embargo.premium; if (embargo.timeDenom == Time.MINS) { difference = difference / 60; } else if (embargo.timeDenom == Time.DAYS) { difference = difference / (60 * 60 * 24); } else if (embargo.timeDenom == Time.WEEKS) { difference = difference / (60 * 60 * 24 * 7); } else if (embargo.timeDenom == Time.YEARS) { difference = difference / (60 * 60 * 24 * 365); } if (embargo.priceFunc == PricingFunction.LINEAR) { premium = premium * difference; } else if (embargo.priceFunc == PricingFunction.EXPONENTIAL) { for (uint256 i = 0; i < difference; i++) { premium = premium * 2; // Assuming doubling the premium for each unit of difference } } accessPrice = embargo.retailPrice + premium; } } function setEmbargo(bytes32 id, Embargo calldata _embargo) public nodeOwner(id) { contentEmbargo[id] = _embargo; emit EmbargoSet( id, _embargo.embargoDate, _embargo.retailPrice, _embargo.premium, _embargo.timeDenom, _embargo.priceFunc ); } function purchaseAccess(bytes32 id) public payable { Embargo memory embargo = contentEmbargo[id]; if (embargo.priceFunc == PricingFunction.BINARY) { require(block.timestamp >= embargo.embargoDate, "EMBARGO: Binary embargo date not passed."); } uint256 priceNow = price(id, block.timestamp); require(msg.value >= priceNow, "EMBARGO: Value sent below price"); uint256 refund = msg.value - priceNow; uint256 token = IContentGraph(contentGraph).getNode(id).token; address owner = IContentGraph(contentGraph).ownerOf(token); (bool sent,) = owner.call{value: priceNow}(""); require(sent, "EMBARGO: Failed to send Ether to owner"); if (refund > 0) { (sent,) = msg.sender.call{value: refund}(""); require(sent, "EMBARGO: Failed to refund excess Ether"); } purchased[id][msg.sender] = true; emit AccessPurchased(id, msg.sender, priceNow); } function getEmbargo(bytes32 id) external view returns (Embargo memory embargo) { embargo = contentEmbargo[id]; } function auth(bytes32 id, address user) external view returns (bool isAuthorized) { isAuthorized = purchased[id][user]; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {IContentGraph} from "../IContentGraph.sol"; import {IIdentityRegistry} from "../interfaces/IIdentityRegistry.sol"; /** * @title Node Owners * @author Blockchain Creative Labs */ contract NodeOwners { address contentGraph; address identityRegistry; error NotAuthorized(); constructor(address _graph, address _identity) { contentGraph = _graph; identityRegistry = _identity; } modifier nodeOwner(bytes32 id) { _checkOwner(id); _; } function _checkOwner(bytes32 id) internal view virtual { uint256 token = IContentGraph(contentGraph).getNode(id).token; address owner = IContentGraph(contentGraph).ownerOf(token); address actingAs = IIdentityRegistry(identityRegistry).whoIs(msg.sender); if (actingAs != address(0)) { require(owner == actingAs, "NodeOwners: Caller is not authorized"); } else { revert NotAuthorized(); } } }
// SPDX-License-Identifier: CC0-1.0 pragma solidity ^0.8.0; import "./interfaces/IERC6150.sol"; import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; interface IContentGraph is IERC6150, IERC721 { event Moved(bytes32 _id, bytes32 indexed _from, bytes32 _to); event AccessAuthUpdate(bytes32 _id, address _auth); event ReferenceAuthUpdate(bytes32 _id, address _auth); event URIUpdate(bytes32 _id, string _uri); enum NodeType { ORG, REFERENCE, ASSET } struct ContentNode { bytes32 id; NodeType nodeType; bytes32 referenceOf; string uri; } struct Node { uint256 token; NodeType nodeType; bytes32 id; bytes32 referenceOf; string uri; address accessAuth; address referenceAuth; } /** * @notice Publishes a new set content node (assets/references) to the passed parent id. * @param parentId The id of an ORG node to publish the set of content nodes. * @param content A list of content. */ function publishBulk(bytes32 parentId, ContentNode[] calldata content) external; /** * @notice Publishes a new asset node at a given parent in addition to setting the uri for the asset node. * @param parentId The id of an ORG node to publish the set of content nodes. * @param content A content node to publish. */ function publish(bytes32 parentId, ContentNode calldata content) external; /** * @notice Creates a node of a given type under the parent node provided. * @param id The id of the node to create, must follow correct form based on type. * @param parentId The id of a admin node to publish the node under * @param nodeType The type of node to create, ADMIN, COLLECTION, or ASSET */ function createNode(bytes32 id, bytes32 parentId, NodeType nodeType) external; /** * @notice Creates a node of a given type under the parent node provided. * @param id The id of the node to create, must follow the correct form based on type. * @param parentId The id of a ORG node to publish the node under * @param nodeType The type of node to create, ORG, REFERENCE, or ASSET * @param referenceOf If the type is of REFERENCE the id of the node that is being referenced */ function createNode(bytes32 id, bytes32 parentId, NodeType nodeType, bytes32 referenceOf) external; /** * @notice Moves a node from current parent to a new parent. * @param id The id of the node to move. * @param newParentId The id of an existing admin node to move the node under. */ function move(bytes32 id, bytes32 newParentId) external; /** * @notice Sets the access auth module for a given node. * @param id The id of the node whose auth modules should be set * @param accessAuth The address to the auth module to be used access of node's content. */ function setAccessAuth(bytes32 id, address accessAuth) external; /** * @notice Sets the reference auth module for a given node. * @param id The id of the node whose auth modules should be set * @param referenceAuth The address to the auth module to be used for referencing a node in collection. */ function setReferenceAuth(bytes32 id, address referenceAuth) external; /** * @notice Sets the uri for a node. * @param id The id of the node. * @param uri The URI to the metadata to set for a node. */ function setURI(bytes32 id, string calldata uri) external; /** * @notice Validates if a given user may access the content at a given node. * @param id The id of the node whose content is being accessed. * @param user The address of the user who wishes to access the content. */ function auth(bytes32 id, address user) external view returns (bool); /** * @notice Validates if a given user may reference a given node in a collection. * @param id The id of the node who is being referenced. * @param user The address of the user who wishes to reference the node. */ function refAuth(bytes32 id, address user) external view returns (bool); /** * @notice retrieve node from node id * @param id The id of the node to retrieve. */ function getNode(bytes32 id) external view returns (Node memory node); /** * @dev retrieve node from token id * @param token The tokenId for the node to retrieve. */ function tokenToNode(uint256 token) external view returns (Node memory node); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.10; interface IIdentityRegistry { function registerRoot(address root, string memory name) external; function deregisterRoot(address root) external; function registerIdentity( bytes memory signature, address root, address identity, uint256 expirary, uint256 deadline ) external; function deregisterIdentity(bytes memory signature, address root, address identity, uint256 deadline) external; function whoIs(address identity) external view returns (address root); function getSignature(address _root, address _identity) external view returns (bytes memory signature, bytes32 digest, address root, address identity, uint256 expirary); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; // Note: the ERC-165 identifier for this interface is 0x897e2c73. interface IERC6150 { /* is IERC721, IERC165 */ /** * @notice Emitted when `tokenId` token under `parentId` is minted. * @param minter The address of minter * @param to The address received token * @param parentId The id of parent token, if it's zero, it means minted `tokenId` is a root token. * @param tokenId The id of minted token, required to be greater than zero */ event Minted(address indexed minter, address indexed to, uint256 parentId, uint256 tokenId); /** * @notice Get the parent token of `tokenId` token. * @param tokenId The child token * @return parentId The Parent token found */ function parentOf(uint256 tokenId) external view returns (uint256 parentId); /** * @notice Get the children tokens of `tokenId` token. * @param tokenId The parent token * @return childrenIds The array of children tokens */ function childrenOf(uint256 tokenId) external view returns (uint256[] memory childrenIds); /** * @notice Check the `tokenId` token if it is a root token. * @param tokenId The token want to be checked * @return Return `true` if it is a root token; if not, return `false` */ function isRoot(uint256 tokenId) external view returns (bool); /** * @notice Check the `tokenId` token if it is a leaf token. * @param tokenId The token want to be checked * @return Return `true` if it is a leaf token; if not, return `false` */ function isLeaf(uint256 tokenId) external view returns (bool); } // Note: the ERC-165 identifier for this interface is 0xba541a2e. interface IERC6150Enumerable is IERC6150 /* IERC721Enumerable */ { /** * @notice Get total amount of children tokens under `parentId` token. * @dev If `parentId` is zero, it means get total amount of root tokens. * @return The total amount of children tokens under `parentId` token. */ function childrenCountOf(uint256 parentId) external view returns (uint256); /** * @notice Get the token at the specified index of all children tokens under `parentId` token. * @dev If `parentId` is zero, it means get root token. * @return The token ID at `index` of all chlidren tokens under `parentId` token. */ function childOfParentByIndex(uint256 parentId, uint256 index) external view returns (uint256); /** * @notice Get the index position of specified token in the children enumeration under specified parent token. * @dev Throws if the `tokenId` is not found in the children enumeration. * If `parentId` is zero, means get root token index. * @param parentId The parent token * @param tokenId The specified token to be found * @return The index position of `tokenId` found in the children enumeration */ function indexInChildrenEnumeration(uint256 parentId, uint256 tokenId) external view returns (uint256); } // Note: the ERC-165 identifier for this interface is 0x4ac0aa46. interface IERC6150Burnable is IERC6150 { /** * @notice Burn the `tokenId` token. * @dev Throws if `tokenId` is not a leaf token. * Throws if `tokenId` is not a valid NFT. * Throws if `owner` is not the owner of `tokenId` token. * Throws unless `msg.sender` is the current owner, an authorized operator, or the approved address for this token. * @param tokenId The token to be burnt */ function safeBurn(uint256 tokenId) external; /** * @notice Batch burn tokens. * @dev Throws if one of `tokenIds` is not a leaf token. * Throws if one of `tokenIds` is not a valid NFT. * Throws if `owner` is not the owner of all `tokenIds` tokens. * Throws unless `msg.sender` is the current owner, an authorized operator, or the approved address for all `tokenIds`. * @param tokenIds The tokens to be burnt */ function safeBatchBurn(uint256[] memory tokenIds) external; } // Note: the ERC-165 identifier for this interface is 0xfa574808. interface IERC6150ParentTransferable is IERC6150 { /** * @notice Emitted when the parent of `tokenId` token changed. * @param tokenId The token changed * @param oldParentId Previous parent token * @param newParentId New parent token */ event ParentTransferred(uint256 tokenId, uint256 oldParentId, uint256 newParentId); /** * @notice Transfer parentship of `tokenId` token to a new parent token * @param newParentId New parent token id * @param tokenId The token to be changed */ function transferParent(uint256 newParentId, uint256 tokenId) external; /** * @notice Batch transfer parentship of `tokenIds` to a new parent token * @param newParentId New parent token id * @param tokenIds Array of token ids to be changed */ function batchTransferParent(uint256 newParentId, uint256[] memory tokenIds) external; } // Note: the ERC-165 identifier for this interface is 0x1d04f0b3. interface IERC6150AccessControl is IERC6150 { /** * @notice Check the account whether a admin of `tokenId` token. * @dev Each token can be set more than one admin. Admin have permission to do something to the token, like mint child token, * or burn token, or transfer parentship. * @param tokenId The specified token * @param account The account to be checked * @return If the account has admin permission, return true; otherwise, return false. */ function isAdminOf(uint256 tokenId, address account) external view returns (bool); /** * @notice Check whether the specified parent token and account can mint children tokens * @dev If the `parentId` is zero, check whether account can mint root nodes * @param parentId The specified parent token to be checked * @param account The specified account to be checked * @return If the token and account has mint permission, return true; otherwise, return false. */ function canMintChildren(uint256 parentId, address account) external view returns (bool); /** * @notice Check whether the specified token can be burnt by specified account * @param tokenId The specified token to be checked * @param account The specified account to be checked * @return If the tokenId can be burnt by account, return true; otherwise, return false. */ function canBurnTokenByAccount(uint256 tokenId, address account) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.20; import {IERC165} from "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC-721 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 ERC-721 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 ERC-721 * 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 address zero. * * 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 v5.1.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[ERC]. * * 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[ERC 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); }
{ "remappings": [ "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/", "solidity-stringutils/=lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "none", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "cancun", "viaIR": false, "libraries": {} }
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_graph","type":"address"},{"internalType":"address","name":"identity","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"NotAuthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":false,"internalType":"address","name":"purchaser","type":"address"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"AccessPurchased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"embargoDate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"retailPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"premium","type":"uint256"},{"indexed":false,"internalType":"enum TimeBased.Time","name":"timeDenom","type":"uint8"},{"indexed":false,"internalType":"enum TimeBased.PricingFunction","name":"priceFunc","type":"uint8"}],"name":"EmbargoSet","type":"event"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"address","name":"user","type":"address"}],"name":"auth","outputs":[{"internalType":"bool","name":"isAuthorized","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"getEmbargo","outputs":[{"components":[{"internalType":"uint256","name":"embargoDate","type":"uint256"},{"internalType":"uint256","name":"retailPrice","type":"uint256"},{"internalType":"uint256","name":"premium","type":"uint256"},{"internalType":"enum TimeBased.Time","name":"timeDenom","type":"uint8"},{"internalType":"enum TimeBased.PricingFunction","name":"priceFunc","type":"uint8"}],"internalType":"struct TimeBased.Embargo","name":"embargo","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"uint256","name":"time","type":"uint256"}],"name":"price","outputs":[{"internalType":"uint256","name":"accessPrice","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"purchaseAccess","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"components":[{"internalType":"uint256","name":"embargoDate","type":"uint256"},{"internalType":"uint256","name":"retailPrice","type":"uint256"},{"internalType":"uint256","name":"premium","type":"uint256"},{"internalType":"enum TimeBased.Time","name":"timeDenom","type":"uint8"},{"internalType":"enum TimeBased.PricingFunction","name":"priceFunc","type":"uint8"}],"internalType":"struct TimeBased.Embargo","name":"_embargo","type":"tuple"}],"name":"setEmbargo","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052348015600e575f80fd5b50604051610fd5380380610fd5833981016040819052602b916074565b5f80546001600160a01b039384166001600160a01b0319918216179091556001805492909316911617905560a0565b80516001600160a01b0381168114606f575f80fd5b919050565b5f80604083850312156084575f80fd5b608b83605a565b9150609760208401605a565b90509250929050565b610f28806100ad5f395ff3fe608060405260043610610049575f3560e01c806308874d121461004d57806332088cc61461007f57806347111876146100ab578063516a166a146100cc578063567787fa1461011f575b5f80fd5b348015610058575f80fd5b5061006c610067366004610ae2565b610132565b6040519081526020015b60405180910390f35b34801561008a575f80fd5b5061009e610099366004610b02565b610336565b6040516100769190610b4c565b3480156100b6575f80fd5b506100ca6100c5366004610b99565b6103ed565b005b3480156100d7575f80fd5b5061010f6100e6366004610be2565b5f9182526003602090815260408084206001600160a01b03909316845291905290205460ff1690565b6040519015158152602001610076565b6100ca61012d366004610b02565b610480565b5f828152600260208181526040808420815160a081018352815481526001820154938101939093529283015490820152600380830154849391606084019160ff169081111561018357610183610b19565b600381111561019457610194610b19565b81526020016003820160019054906101000a900460ff1660038111156101bc576101bc610b19565b60038111156101cd576101cd610b19565b905250805190915083106101e7578060200151915061032f565b80515f906101f6908590610c24565b60408301519091505f8360600151600381111561021557610215610b19565b0361022c57610225603c83610c3d565b91506102ae565b60018360600151600381111561024457610244610b19565b03610256576102256201518083610c3d565b60028360600151600381111561026e5761026e610b19565b036102805761022562093a8083610c3d565b60038360600151600381111561029857610298610b19565b036102ae576102ab6301e1338083610c3d565b91505b6001836080015160038111156102c6576102c6610b19565b036102dc576102d58282610c5c565b905061031a565b6002836080015160038111156102f4576102f4610b19565b0361031a575f5b828110156103185761030e826002610c5c565b91506001016102fb565b505b80836020015161032a9190610c73565b935050505b5092915050565b61033e610aa8565b60025f8381526020019081526020015f206040518060a00160405290815f82015481526020016001820154815260200160028201548152602001600382015f9054906101000a900460ff16600381111561039a5761039a610b19565b60038111156103ab576103ab610b19565b81526020016003820160019054906101000a900460ff1660038111156103d3576103d3610b19565b60038111156103e4576103e4610b19565b90525092915050565b816103f7816108b9565b5f83815260026020526040902082906104108282610c92565b507f567625eba02ae096fa2fcf920b3dde890de836119b6a3547e72fbd82bad868a89050838335602085013560408601356104516080880160608901610cfc565b61046160a0890160808a01610cfc565b60405161047396959493929190610d1e565b60405180910390a1505050565b5f818152600260208181526040808420815160a081018352815481526001820154938101939093529283015490820152600380830154919291606084019160ff909116908111156104d3576104d3610b19565b60038111156104e4576104e4610b19565b81526020016003820160019054906101000a900460ff16600381111561050c5761050c610b19565b600381111561051d5761051d610b19565b905250905060038160800151600381111561053a5761053a610b19565b036105a65780514210156105a65760405162461bcd60e51b815260206004820152602860248201527f454d424152474f3a2042696e61727920656d626172676f2064617465206e6f74604482015267103830b9b9b2b21760c11b60648201526084015b60405180910390fd5b5f6105b18342610132565b9050803410156106035760405162461bcd60e51b815260206004820152601f60248201527f454d424152474f3a2056616c75652073656e742062656c6f7720707269636500604482015260640161059d565b5f61060e8234610c24565b5f8054604051632864a37f60e11b81526004810188905292935090916001600160a01b03909116906350c946fe906024015f60405180830381865afa158015610659573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526106809190810190610e47565b515f80546040516331a9108f60e11b81526004810184905292935090916001600160a01b0390911690636352211e90602401602060405180830381865afa1580156106cd573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106f19190610f00565b90505f816001600160a01b0316856040515f6040518083038185875af1925050503d805f811461073c576040519150601f19603f3d011682016040523d82523d5f602084013e610741565b606091505b50509050806107a15760405162461bcd60e51b815260206004820152602660248201527f454d424152474f3a204661696c656420746f2073656e6420457468657220746f6044820152651037bbb732b960d11b606482015260840161059d565b831561084b57604051339085905f81818185875af1925050503d805f81146107e4576040519150601f19603f3d011682016040523d82523d5f602084013e6107e9565b606091505b5050809150508061084b5760405162461bcd60e51b815260206004820152602660248201527f454d424152474f3a204661696c656420746f20726566756e64206578636573736044820152651022ba3432b960d11b606482015260840161059d565b5f8781526003602090815260408083203380855290835292819020805460ff1916600117905580518a8152918201929092529081018690527ff390bb27ce3753f0c8819a56d2b11b14e58ff82ac61f6564c0899a970c6649f09060600160405180910390a150505050505050565b5f8054604051632864a37f60e11b8152600481018490526001600160a01b03909116906350c946fe906024015f60405180830381865afa1580156108ff573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526109269190810190610e47565b515f80546040516331a9108f60e11b81526004810184905292935090916001600160a01b0390911690636352211e90602401602060405180830381865afa158015610973573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109979190610f00565b6001546040516371d0c75360e01b81523360048201529192505f916001600160a01b03909116906371d0c75390602401602060405180830381865afa1580156109e2573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a069190610f00565b90506001600160a01b03811615610a8957806001600160a01b0316826001600160a01b031614610a845760405162461bcd60e51b8152602060048201526024808201527f4e6f64654f776e6572733a2043616c6c6572206973206e6f7420617574686f726044820152631a5e995960e21b606482015260840161059d565b610aa2565b60405163ea8e4eb560e01b815260040160405180910390fd5b50505050565b6040518060a001604052805f81526020015f81526020015f81526020015f6003811115610ad757610ad7610b19565b81526020015f905290565b5f8060408385031215610af3575f80fd5b50508035926020909101359150565b5f60208284031215610b12575f80fd5b5035919050565b634e487b7160e01b5f52602160045260245ffd5b60048110610b4957634e487b7160e01b5f52602160045260245ffd5b50565b5f60a0820190508251825260208301516020830152604083015160408301526060830151610b7981610b2d565b60608301526080830151610b8c81610b2d565b8060808401525092915050565b5f8082840360c0811215610bab575f80fd5b8335925060a0601f1982011215610bc0575f80fd5b506020830190509250929050565b6001600160a01b0381168114610b49575f80fd5b5f8060408385031215610bf3575f80fd5b823591506020830135610c0581610bce565b809150509250929050565b634e487b7160e01b5f52601160045260245ffd5b81810381811115610c3757610c37610c10565b92915050565b5f82610c5757634e487b7160e01b5f52601260045260245ffd5b500490565b8082028115828204841417610c3757610c37610c10565b80820180821115610c3757610c37610c10565b60048110610b49575f80fd5b813581556020820135600182015560408201356002820155600381016060830135610cbc81610c86565b610cc581610b2d565b81546080850135610cd581610c86565b610cde81610b2d565b61ff008160081b1660ff841661ffff19841617178455505050505050565b5f60208284031215610d0c575f80fd5b8135610d1781610c86565b9392505050565b5f60c082019050878252866020830152856040830152846060830152610d4384610b2d565b836080830152610d5283610b2d565b8260a0830152979650505050505050565b634e487b7160e01b5f52604160045260245ffd5b60405160e0810167ffffffffffffffff81118282101715610d9a57610d9a610d63565b60405290565b805160038110610dae575f80fd5b919050565b5f82601f830112610dc2575f80fd5b815167ffffffffffffffff80821115610ddd57610ddd610d63565b604051601f8301601f19908116603f01168101908282118183101715610e0557610e05610d63565b81604052838152866020858801011115610e1d575f80fd5b8360208701602083015e5f602085830101528094505050505092915050565b8051610dae81610bce565b5f60208284031215610e57575f80fd5b815167ffffffffffffffff80821115610e6e575f80fd5b9083019060e08286031215610e81575f80fd5b610e89610d77565b82518152610e9960208401610da0565b60208201526040830151604082015260608301516060820152608083015182811115610ec3575f80fd5b610ecf87828601610db3565b608083015250610ee160a08401610e3c565b60a0820152610ef260c08401610e3c565b60c082015295945050505050565b5f60208284031215610f10575f80fd5b8151610d1781610bce56fea164736f6c6343000819000a000000000000000000000000ef2e371bafae46a116519f18a1cff750570e8842000000000000000000000000ee586a3655eb0d017643551e9849ed828fd7c7fa
Deployed Bytecode
0x608060405260043610610049575f3560e01c806308874d121461004d57806332088cc61461007f57806347111876146100ab578063516a166a146100cc578063567787fa1461011f575b5f80fd5b348015610058575f80fd5b5061006c610067366004610ae2565b610132565b6040519081526020015b60405180910390f35b34801561008a575f80fd5b5061009e610099366004610b02565b610336565b6040516100769190610b4c565b3480156100b6575f80fd5b506100ca6100c5366004610b99565b6103ed565b005b3480156100d7575f80fd5b5061010f6100e6366004610be2565b5f9182526003602090815260408084206001600160a01b03909316845291905290205460ff1690565b6040519015158152602001610076565b6100ca61012d366004610b02565b610480565b5f828152600260208181526040808420815160a081018352815481526001820154938101939093529283015490820152600380830154849391606084019160ff169081111561018357610183610b19565b600381111561019457610194610b19565b81526020016003820160019054906101000a900460ff1660038111156101bc576101bc610b19565b60038111156101cd576101cd610b19565b905250805190915083106101e7578060200151915061032f565b80515f906101f6908590610c24565b60408301519091505f8360600151600381111561021557610215610b19565b0361022c57610225603c83610c3d565b91506102ae565b60018360600151600381111561024457610244610b19565b03610256576102256201518083610c3d565b60028360600151600381111561026e5761026e610b19565b036102805761022562093a8083610c3d565b60038360600151600381111561029857610298610b19565b036102ae576102ab6301e1338083610c3d565b91505b6001836080015160038111156102c6576102c6610b19565b036102dc576102d58282610c5c565b905061031a565b6002836080015160038111156102f4576102f4610b19565b0361031a575f5b828110156103185761030e826002610c5c565b91506001016102fb565b505b80836020015161032a9190610c73565b935050505b5092915050565b61033e610aa8565b60025f8381526020019081526020015f206040518060a00160405290815f82015481526020016001820154815260200160028201548152602001600382015f9054906101000a900460ff16600381111561039a5761039a610b19565b60038111156103ab576103ab610b19565b81526020016003820160019054906101000a900460ff1660038111156103d3576103d3610b19565b60038111156103e4576103e4610b19565b90525092915050565b816103f7816108b9565b5f83815260026020526040902082906104108282610c92565b507f567625eba02ae096fa2fcf920b3dde890de836119b6a3547e72fbd82bad868a89050838335602085013560408601356104516080880160608901610cfc565b61046160a0890160808a01610cfc565b60405161047396959493929190610d1e565b60405180910390a1505050565b5f818152600260208181526040808420815160a081018352815481526001820154938101939093529283015490820152600380830154919291606084019160ff909116908111156104d3576104d3610b19565b60038111156104e4576104e4610b19565b81526020016003820160019054906101000a900460ff16600381111561050c5761050c610b19565b600381111561051d5761051d610b19565b905250905060038160800151600381111561053a5761053a610b19565b036105a65780514210156105a65760405162461bcd60e51b815260206004820152602860248201527f454d424152474f3a2042696e61727920656d626172676f2064617465206e6f74604482015267103830b9b9b2b21760c11b60648201526084015b60405180910390fd5b5f6105b18342610132565b9050803410156106035760405162461bcd60e51b815260206004820152601f60248201527f454d424152474f3a2056616c75652073656e742062656c6f7720707269636500604482015260640161059d565b5f61060e8234610c24565b5f8054604051632864a37f60e11b81526004810188905292935090916001600160a01b03909116906350c946fe906024015f60405180830381865afa158015610659573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526106809190810190610e47565b515f80546040516331a9108f60e11b81526004810184905292935090916001600160a01b0390911690636352211e90602401602060405180830381865afa1580156106cd573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106f19190610f00565b90505f816001600160a01b0316856040515f6040518083038185875af1925050503d805f811461073c576040519150601f19603f3d011682016040523d82523d5f602084013e610741565b606091505b50509050806107a15760405162461bcd60e51b815260206004820152602660248201527f454d424152474f3a204661696c656420746f2073656e6420457468657220746f6044820152651037bbb732b960d11b606482015260840161059d565b831561084b57604051339085905f81818185875af1925050503d805f81146107e4576040519150601f19603f3d011682016040523d82523d5f602084013e6107e9565b606091505b5050809150508061084b5760405162461bcd60e51b815260206004820152602660248201527f454d424152474f3a204661696c656420746f20726566756e64206578636573736044820152651022ba3432b960d11b606482015260840161059d565b5f8781526003602090815260408083203380855290835292819020805460ff1916600117905580518a8152918201929092529081018690527ff390bb27ce3753f0c8819a56d2b11b14e58ff82ac61f6564c0899a970c6649f09060600160405180910390a150505050505050565b5f8054604051632864a37f60e11b8152600481018490526001600160a01b03909116906350c946fe906024015f60405180830381865afa1580156108ff573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526109269190810190610e47565b515f80546040516331a9108f60e11b81526004810184905292935090916001600160a01b0390911690636352211e90602401602060405180830381865afa158015610973573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109979190610f00565b6001546040516371d0c75360e01b81523360048201529192505f916001600160a01b03909116906371d0c75390602401602060405180830381865afa1580156109e2573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a069190610f00565b90506001600160a01b03811615610a8957806001600160a01b0316826001600160a01b031614610a845760405162461bcd60e51b8152602060048201526024808201527f4e6f64654f776e6572733a2043616c6c6572206973206e6f7420617574686f726044820152631a5e995960e21b606482015260840161059d565b610aa2565b60405163ea8e4eb560e01b815260040160405180910390fd5b50505050565b6040518060a001604052805f81526020015f81526020015f81526020015f6003811115610ad757610ad7610b19565b81526020015f905290565b5f8060408385031215610af3575f80fd5b50508035926020909101359150565b5f60208284031215610b12575f80fd5b5035919050565b634e487b7160e01b5f52602160045260245ffd5b60048110610b4957634e487b7160e01b5f52602160045260245ffd5b50565b5f60a0820190508251825260208301516020830152604083015160408301526060830151610b7981610b2d565b60608301526080830151610b8c81610b2d565b8060808401525092915050565b5f8082840360c0811215610bab575f80fd5b8335925060a0601f1982011215610bc0575f80fd5b506020830190509250929050565b6001600160a01b0381168114610b49575f80fd5b5f8060408385031215610bf3575f80fd5b823591506020830135610c0581610bce565b809150509250929050565b634e487b7160e01b5f52601160045260245ffd5b81810381811115610c3757610c37610c10565b92915050565b5f82610c5757634e487b7160e01b5f52601260045260245ffd5b500490565b8082028115828204841417610c3757610c37610c10565b80820180821115610c3757610c37610c10565b60048110610b49575f80fd5b813581556020820135600182015560408201356002820155600381016060830135610cbc81610c86565b610cc581610b2d565b81546080850135610cd581610c86565b610cde81610b2d565b61ff008160081b1660ff841661ffff19841617178455505050505050565b5f60208284031215610d0c575f80fd5b8135610d1781610c86565b9392505050565b5f60c082019050878252866020830152856040830152846060830152610d4384610b2d565b836080830152610d5283610b2d565b8260a0830152979650505050505050565b634e487b7160e01b5f52604160045260245ffd5b60405160e0810167ffffffffffffffff81118282101715610d9a57610d9a610d63565b60405290565b805160038110610dae575f80fd5b919050565b5f82601f830112610dc2575f80fd5b815167ffffffffffffffff80821115610ddd57610ddd610d63565b604051601f8301601f19908116603f01168101908282118183101715610e0557610e05610d63565b81604052838152866020858801011115610e1d575f80fd5b8360208701602083015e5f602085830101528094505050505092915050565b8051610dae81610bce565b5f60208284031215610e57575f80fd5b815167ffffffffffffffff80821115610e6e575f80fd5b9083019060e08286031215610e81575f80fd5b610e89610d77565b82518152610e9960208401610da0565b60208201526040830151604082015260608301516060820152608083015182811115610ec3575f80fd5b610ecf87828601610db3565b608083015250610ee160a08401610e3c565b60a0820152610ef260c08401610e3c565b60c082015295945050505050565b5f60208284031215610f10575f80fd5b8151610d1781610bce56fea164736f6c6343000819000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000ef2e371bafae46a116519f18a1cff750570e8842000000000000000000000000ee586a3655eb0d017643551e9849ed828fd7c7fa
-----Decoded View---------------
Arg [0] : _graph (address): 0xEF2E371BaFAe46a116519F18A1cfF750570E8842
Arg [1] : identity (address): 0xEe586a3655EB0D017643551e9849ed828Fd7c7FA
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000ef2e371bafae46a116519f18a1cff750570e8842
Arg [1] : 000000000000000000000000ee586a3655eb0d017643551e9849ed828fd7c7fa
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ 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.