Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 476 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw Free Ba... | 5477618 | 2582 days ago | IN | 0 ETH | 0.0000704 | ||||
Buy | 5177499 | 2633 days ago | IN | 0.32 ETH | 0.00048314 | ||||
Buy | 5176847 | 2633 days ago | IN | 1.92 ETH | 0.00078005 | ||||
Buy | 5176834 | 2633 days ago | IN | 9.8415 ETH | 0.0006957 | ||||
Buy | 5174816 | 2633 days ago | IN | 2.4 ETH | 0.00120465 | ||||
Buy | 5174790 | 2633 days ago | IN | 0.16 ETH | 0.00024157 | ||||
Buy | 5174790 | 2633 days ago | IN | 0.16 ETH | 0.00048314 | ||||
Buy | 5174788 | 2633 days ago | IN | 0.32 ETH | 0.00148468 | ||||
Buy | 5174788 | 2633 days ago | IN | 0.32 ETH | 0.00148468 | ||||
Buy | 5174787 | 2633 days ago | IN | 0.16 ETH | 0.00144942 | ||||
Buy | 5174787 | 2633 days ago | IN | 0.16 ETH | 0.00144942 | ||||
Buy | 5174783 | 2633 days ago | IN | 0.08 ETH | 0.00024157 | ||||
Buy | 5174783 | 2633 days ago | IN | 0.32 ETH | 0.00296046 | ||||
Buy | 5174782 | 2633 days ago | IN | 0.04 ETH | 0.00024157 | ||||
Buy | 5174782 | 2633 days ago | IN | 0.08 ETH | 0.00044086 | ||||
Buy | 5174782 | 2633 days ago | IN | 0.16 ETH | 0.0010629 | ||||
Buy | 5174781 | 2633 days ago | IN | 0.16 ETH | 0.00041308 | ||||
Buy | 5174781 | 2633 days ago | IN | 0.32 ETH | 0.00389924 | ||||
Buy | 5174781 | 2633 days ago | IN | 0.16 ETH | 0.00068243 | ||||
Buy | 5174781 | 2633 days ago | IN | 0.32 ETH | 0.01286749 | ||||
Buy | 5174781 | 2633 days ago | IN | 0.16 ETH | 0.00159436 | ||||
Buy | 5174780 | 2633 days ago | IN | 0.04 ETH | 0.00068243 | ||||
Buy | 5174780 | 2633 days ago | IN | 0.04 ETH | 0.00072471 | ||||
Buy | 5174780 | 2633 days ago | IN | 0.16 ETH | 0.0010629 | ||||
Buy | 5174780 | 2633 days ago | IN | 0.16 ETH | 0.00923832 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Method | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|---|
Transfer | 5477618 | 2582 days ago | 0.95499328 ETH | ||||
Transfer | 5176847 | 2633 days ago | 1.7664 ETH | ||||
Transfer | 5176847 | 2633 days ago | 0.0006 ETH | ||||
Transfer | 5176847 | 2633 days ago | 0.0012 ETH | ||||
Transfer | 5176847 | 2633 days ago | 0.0024 ETH | ||||
Transfer | 5176847 | 2633 days ago | 0.0048 ETH | ||||
Transfer | 5176847 | 2633 days ago | 0.0096 ETH | ||||
Transfer | 5176847 | 2633 days ago | 0.0192 ETH | ||||
Transfer | 5176847 | 2633 days ago | 0.0192 ETH | ||||
Transfer | 5176847 | 2633 days ago | 0.0192 ETH | ||||
Transfer | 5176847 | 2633 days ago | 0.0192 ETH | ||||
Transfer | 5176834 | 2633 days ago | 9.05418 ETH | ||||
Transfer | 5176834 | 2633 days ago | 0.00307546 ETH | ||||
Transfer | 5176834 | 2633 days ago | 0.00615093 ETH | ||||
Transfer | 5176834 | 2633 days ago | 0.01230187 ETH | ||||
Transfer | 5176834 | 2633 days ago | 0.02460375 ETH | ||||
Transfer | 5176834 | 2633 days ago | 0.0492075 ETH | ||||
Transfer | 5176834 | 2633 days ago | 0.098415 ETH | ||||
Transfer | 5176834 | 2633 days ago | 0.098415 ETH | ||||
Transfer | 5176834 | 2633 days ago | 0.098415 ETH | ||||
Transfer | 5174788 | 2633 days ago | 0.2944 ETH | ||||
Transfer | 5174788 | 2633 days ago | 0.0001 ETH | ||||
Transfer | 5174788 | 2633 days ago | 0.0002 ETH | ||||
Transfer | 5174788 | 2633 days ago | 0.0004 ETH | ||||
Transfer | 5174788 | 2633 days ago | 0.0008 ETH |
Loading...
Loading
Contract Name:
MetaGameCore
Compiler Version
v0.4.18+commit.9cf6e910
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-02-24 */ pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title Claimable * @dev Extension for the Ownable contract, where the ownership needs to be claimed. * This allows the new owner to accept the transfer. */ contract Claimable is Ownable { address public pendingOwner; /** * @dev Modifier throws if called by any account other than the pendingOwner. */ modifier onlyPendingOwner() { require(msg.sender == pendingOwner); _; } /** * @dev Allows the current owner to set the pendingOwner address. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { pendingOwner = newOwner; } /** * @dev Allows the pendingOwner address to finalize the transfer. */ function claimOwnership() onlyPendingOwner public { OwnershipTransferred(owner, pendingOwner); owner = pendingOwner; pendingOwner = address(0); } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { paused = true; Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { paused = false; Unpause(); } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure. * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { function safeTransfer(ERC20Basic token, address to, uint256 value) internal { assert(token.transfer(to, value)); } function safeTransferFrom(ERC20 token, address from, address to, uint256 value) internal { assert(token.transferFrom(from, to, value)); } function safeApprove(ERC20 token, address spender, uint256 value) internal { assert(token.approve(spender, value)); } } /** * @title Contracts that should be able to recover tokens * @author SylTi * @dev This allow a contract to recover any ERC20 token received in a contract by transferring the balance to the contract owner. * This will prevent any accidental loss of tokens. */ contract CanReclaimToken is Ownable { using SafeERC20 for ERC20Basic; /** * @dev Reclaim all ERC20Basic compatible tokens * @param token ERC20Basic The address of the token contract */ function reclaimToken(ERC20Basic token) external onlyOwner { uint256 balance = token.balanceOf(this); token.safeTransfer(owner, balance); } } /// @dev Implements access control to the MetaGame contract. contract MetaGameAccessControl is Claimable, Pausable, CanReclaimToken { address public cfoAddress; function MetaGameAccessControl() public { // The creator of the contract is the initial CFO. cfoAddress = msg.sender; } /// @dev Access modifier for CFO-only functionality. modifier onlyCFO() { require(msg.sender == cfoAddress); _; } /// @dev Assigns a new address to act as the CFO. Only available to the current contract owner. /// @param _newCFO The address of the new CFO. function setCFO(address _newCFO) external onlyOwner { require(_newCFO != address(0)); cfoAddress = _newCFO; } } /// @dev Defines base data structures for MetaGame. contract MetaGameBase is MetaGameAccessControl { using SafeMath for uint256; mapping (uint256 => address) identifierToOwner; mapping (uint256 => address) identifierToApproved; mapping (address => uint256) ownershipDeedCount; mapping (uint256 => uint256) identifierToParentIdentifier; /// @dev All existing identifiers. uint256[] public identifiers; /// @notice Get all minted identifiers; function getAllIdentifiers() external view returns(uint256[]) { return identifiers; } /// @notice Returns the identifier of the parent of an identifier. /// The parent identifier is 0 if the identifier has no parent. /// @param identifier The identifier to get the parent identifier of. function parentOf(uint256 identifier) external view returns (uint256 parentIdentifier) { parentIdentifier = identifierToParentIdentifier[identifier]; } } /// @title Interface for contracts conforming to ERC-721: Deed Standard /// @author William Entriken (https://phor.net), et al. /// @dev Specification at https://github.com/ethereum/EIPs/pull/841 (DRAFT) interface ERC721 { // COMPLIANCE WITH ERC-165 (DRAFT) ///////////////////////////////////////// /// @dev ERC-165 (draft) interface signature for itself // bytes4 internal constant INTERFACE_SIGNATURE_ERC165 = // 0x01ffc9a7 // bytes4(keccak256('supportsInterface(bytes4)')); /// @dev ERC-165 (draft) interface signature for ERC721 // bytes4 internal constant INTERFACE_SIGNATURE_ERC721 = // 0xda671b9b // bytes4(keccak256('ownerOf(uint256)')) ^ // bytes4(keccak256('countOfDeeds()')) ^ // bytes4(keccak256('countOfDeedsByOwner(address)')) ^ // bytes4(keccak256('deedOfOwnerByIndex(address,uint256)')) ^ // bytes4(keccak256('approve(address,uint256)')) ^ // bytes4(keccak256('takeOwnership(uint256)')); /// @notice Query a contract to see if it supports a certain interface /// @dev Returns `true` the interface is supported and `false` otherwise, /// returns `true` for INTERFACE_SIGNATURE_ERC165 and /// INTERFACE_SIGNATURE_ERC721, see ERC-165 for other interface signatures. function supportsInterface(bytes4 _interfaceID) external pure returns (bool); // PUBLIC QUERY FUNCTIONS ////////////////////////////////////////////////// /// @notice Find the owner of a deed /// @param _deedId The identifier for a deed we are inspecting /// @dev Deeds assigned to zero address are considered destroyed, and /// queries about them do throw. /// @return The non-zero address of the owner of deed `_deedId`, or `throw` /// if deed `_deedId` is not tracked by this contract function ownerOf(uint256 _deedId) external view returns (address _owner); /// @notice Count deeds tracked by this contract /// @return A count of the deeds tracked by this contract, where each one of /// them has an assigned and queryable owner function countOfDeeds() public view returns (uint256 _count); /// @notice Count all deeds assigned to an owner /// @dev Throws if `_owner` is the zero address, representing destroyed deeds. /// @param _owner An address where we are interested in deeds owned by them /// @return The number of deeds owned by `_owner`, possibly zero function countOfDeedsByOwner(address _owner) public view returns (uint256 _count); /// @notice Enumerate deeds assigned to an owner /// @dev Throws if `_index` >= `countOfDeedsByOwner(_owner)` or if /// `_owner` is the zero address, representing destroyed deeds. /// @param _owner An address where we are interested in deeds owned by them /// @param _index A counter between zero and `countOfDeedsByOwner(_owner)`, /// inclusive /// @return The identifier for the `_index`th deed assigned to `_owner`, /// (sort order not specified) function deedOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256 _deedId); // TRANSFER MECHANISM ////////////////////////////////////////////////////// /// @dev This event emits when ownership of any deed changes by any /// mechanism. This event emits when deeds are created (`from` == 0) and /// destroyed (`to` == 0). Exception: during contract creation, any /// transfers may occur without emitting `Transfer`. event Transfer(address indexed from, address indexed to, uint256 indexed deedId); /// @dev This event emits on any successful call to /// `approve(address _spender, uint256 _deedId)`. Exception: does not emit /// if an owner revokes approval (`_to` == 0x0) on a deed with no existing /// approval. event Approval(address indexed owner, address indexed approved, uint256 indexed deedId); /// @notice Approve a new owner to take your deed, or revoke approval by /// setting the zero address. You may `approve` any number of times while /// the deed is assigned to you, only the most recent approval matters. /// @dev Throws if `msg.sender` does not own deed `_deedId` or if `_to` == /// `msg.sender`. /// @param _deedId The deed you are granting ownership of function approve(address _to, uint256 _deedId) external; /// @notice Become owner of a deed for which you are currently approved /// @dev Throws if `msg.sender` is not approved to become the owner of /// `deedId` or if `msg.sender` currently owns `_deedId`. /// @param _deedId The deed that is being transferred function takeOwnership(uint256 _deedId) external; // SPEC EXTENSIONS ///////////////////////////////////////////////////////// /// @notice Transfer a deed to a new owner. /// @dev Throws if `msg.sender` does not own deed `_deedId` or if /// `_to` == 0x0. /// @param _to The address of the new owner. /// @param _deedId The deed you are transferring. function transfer(address _to, uint256 _deedId) external; } /// @title Metadata extension to ERC-721 interface /// @author William Entriken (https://phor.net) /// @dev Specification at https://github.com/ethereum/EIPs/pull/841 (DRAFT) interface ERC721Metadata { /// @dev ERC-165 (draft) interface signature for ERC721 // bytes4 internal constant INTERFACE_SIGNATURE_ERC721Metadata = // 0x2a786f11 // bytes4(keccak256('name()')) ^ // bytes4(keccak256('symbol()')) ^ // bytes4(keccak256('deedUri(uint256)')); /// @notice A descriptive name for a collection of deeds managed by this /// contract /// @dev Wallets and exchanges MAY display this to the end user. function name() public pure returns (string _deedName); /// @notice An abbreviated name for deeds managed by this contract /// @dev Wallets and exchanges MAY display this to the end user. function symbol() public pure returns (string _deedSymbol); /// @notice A distinct URI (RFC 3986) for a given token. /// @dev If: /// * The URI is a URL /// * The URL is accessible /// * The URL points to a valid JSON file format (ECMA-404 2nd ed.) /// * The JSON base element is an object /// then these names of the base element SHALL have special meaning: /// * "name": A string identifying the item to which `_deedId` grants /// ownership /// * "description": A string detailing the item to which `_deedId` grants /// ownership /// * "image": A URI pointing to a file of image/* mime type representing /// the item to which `_deedId` grants ownership /// Wallets and exchanges MAY display this to the end user. /// Consider making any images at a width between 320 and 1080 pixels and /// aspect ratio between 1.91:1 and 4:5 inclusive. function deedUri(uint256 _deedId) external pure returns (string _uri); } /// @dev Holds deed functionality such as approving and transferring. Implements ERC721. contract MetaGameDeed is MetaGameBase, ERC721, ERC721Metadata { /// @notice Name of the collection of deeds (non-fungible token), as defined in ERC721Metadata. function name() public pure returns (string _deedName) { _deedName = "MetaGame"; } /// @notice Symbol of the collection of deeds (non-fungible token), as defined in ERC721Metadata. function symbol() public pure returns (string _deedSymbol) { _deedSymbol = "MG"; } /// @dev ERC-165 (draft) interface signature for itself bytes4 internal constant INTERFACE_SIGNATURE_ERC165 = // 0x01ffc9a7 bytes4(keccak256('supportsInterface(bytes4)')); /// @dev ERC-165 (draft) interface signature for ERC721 bytes4 internal constant INTERFACE_SIGNATURE_ERC721 = // 0xda671b9b bytes4(keccak256('ownerOf(uint256)')) ^ bytes4(keccak256('countOfDeeds()')) ^ bytes4(keccak256('countOfDeedsByOwner(address)')) ^ bytes4(keccak256('deedOfOwnerByIndex(address,uint256)')) ^ bytes4(keccak256('approve(address,uint256)')) ^ bytes4(keccak256('takeOwnership(uint256)')); /// @dev ERC-165 (draft) interface signature for ERC721 bytes4 internal constant INTERFACE_SIGNATURE_ERC721Metadata = // 0x2a786f11 bytes4(keccak256('name()')) ^ bytes4(keccak256('symbol()')) ^ bytes4(keccak256('deedUri(uint256)')); /// @notice Introspection interface as per ERC-165 (https://github.com/ethereum/EIPs/issues/165). /// Returns true for any standardized interfaces implemented by this contract. /// (ERC-165 and ERC-721.) function supportsInterface(bytes4 _interfaceID) external pure returns (bool) { return ( (_interfaceID == INTERFACE_SIGNATURE_ERC165) || (_interfaceID == INTERFACE_SIGNATURE_ERC721) || (_interfaceID == INTERFACE_SIGNATURE_ERC721Metadata) ); } /// @dev Checks if a given address owns a particular deed. /// @param _owner The address of the owner to check for. /// @param _deedId The deed identifier to check for. function _owns(address _owner, uint256 _deedId) internal view returns (bool) { return identifierToOwner[_deedId] == _owner; } /// @dev Approve a given address to take ownership of a deed. /// @param _from The address approving taking ownership. /// @param _to The address to approve taking ownership. /// @param _deedId The identifier of the deed to give approval for. function _approve(address _from, address _to, uint256 _deedId) internal { identifierToApproved[_deedId] = _to; // Emit event. Approval(_from, _to, _deedId); } /// @dev Checks if a given address has approval to take ownership of a deed. /// @param _claimant The address of the claimant to check for. /// @param _deedId The identifier of the deed to check for. function _approvedFor(address _claimant, uint256 _deedId) internal view returns (bool) { return identifierToApproved[_deedId] == _claimant; } /// @dev Assigns ownership of a specific deed to an address. /// @param _from The address to transfer the deed from. /// @param _to The address to transfer the deed to. /// @param _deedId The identifier of the deed to transfer. function _transfer(address _from, address _to, uint256 _deedId) internal { // The number of deeds is capped at rows * cols, so this cannot // be overflowed if those parameters are sensible. ownershipDeedCount[_to]++; // Transfer ownership. identifierToOwner[_deedId] = _to; // When a new deed is minted, the _from address is 0x0, but we // do not track deed ownership of 0x0. if (_from != address(0)) { ownershipDeedCount[_from]--; // Clear taking ownership approval. delete identifierToApproved[_deedId]; } // Emit the transfer event. Transfer(_from, _to, _deedId); } // ERC 721 implementation /// @notice Returns the total number of deeds currently in existence. /// @dev Required for ERC-721 compliance. function countOfDeeds() public view returns (uint256) { return identifiers.length; } /// @notice Returns the number of deeds owned by a specific address. /// @param _owner The owner address to check. /// @dev Required for ERC-721 compliance function countOfDeedsByOwner(address _owner) public view returns (uint256) { return ownershipDeedCount[_owner]; } /// @notice Returns the address currently assigned ownership of a given deed. /// @dev Required for ERC-721 compliance. function ownerOf(uint256 _deedId) external view returns (address _owner) { _owner = identifierToOwner[_deedId]; require(_owner != address(0)); } /// @notice Approve a given address to take ownership of a deed. /// @param _to The address to approve taking owernship. /// @param _deedId The identifier of the deed to give approval for. /// @dev Required for ERC-721 compliance. function approve(address _to, uint256 _deedId) external whenNotPaused { uint256[] memory _deedIds = new uint256[](1); _deedIds[0] = _deedId; approveMultiple(_to, _deedIds); } /// @notice Approve a given address to take ownership of multiple deeds. /// @param _to The address to approve taking ownership. /// @param _deedIds The identifiers of the deeds to give approval for. function approveMultiple(address _to, uint256[] _deedIds) public whenNotPaused { // Ensure the sender is not approving themselves. require(msg.sender != _to); for (uint256 i = 0; i < _deedIds.length; i++) { uint256 _deedId = _deedIds[i]; // Require the sender is the owner of the deed. require(_owns(msg.sender, _deedId)); // Perform the approval. _approve(msg.sender, _to, _deedId); } } /// @notice Transfer a deed to another address. If transferring to a smart /// contract be VERY CAREFUL to ensure that it is aware of ERC-721, or your /// deed may be lost forever. /// @param _to The address of the recipient, can be a user or contract. /// @param _deedId The identifier of the deed to transfer. /// @dev Required for ERC-721 compliance. function transfer(address _to, uint256 _deedId) external whenNotPaused { uint256[] memory _deedIds = new uint256[](1); _deedIds[0] = _deedId; transferMultiple(_to, _deedIds); } /// @notice Transfers multiple deeds to another address. If transferring to /// a smart contract be VERY CAREFUL to ensure that it is aware of ERC-721, /// or your deeds may be lost forever. /// @param _to The address of the recipient, can be a user or contract. /// @param _deedIds The identifiers of the deeds to transfer. function transferMultiple(address _to, uint256[] _deedIds) public whenNotPaused { // Safety check to prevent against an unexpected 0x0 default. require(_to != address(0)); // Disallow transfers to this contract to prevent accidental misuse. require(_to != address(this)); for (uint256 i = 0; i < _deedIds.length; i++) { uint256 _deedId = _deedIds[i]; // One can only transfer their own deeds. require(_owns(msg.sender, _deedId)); // Transfer ownership _transfer(msg.sender, _to, _deedId); } } /// @notice Transfer a deed owned by another address, for which the calling /// address has previously been granted transfer approval by the owner. /// @param _deedId The identifier of the deed to be transferred. /// @dev Required for ERC-721 compliance. function takeOwnership(uint256 _deedId) external whenNotPaused { uint256[] memory _deedIds = new uint256[](1); _deedIds[0] = _deedId; takeOwnershipMultiple(_deedIds); } /// @notice Transfer multiple deeds owned by another address, for which the /// calling address has previously been granted transfer approval by the owner. /// @param _deedIds The identifier of the deed to be transferred. function takeOwnershipMultiple(uint256[] _deedIds) public whenNotPaused { for (uint256 i = 0; i < _deedIds.length; i++) { uint256 _deedId = _deedIds[i]; address _from = identifierToOwner[_deedId]; // Check for transfer approval require(_approvedFor(msg.sender, _deedId)); // Reassign ownership (also clears pending approvals and emits Transfer event). _transfer(_from, msg.sender, _deedId); } } /// @notice Returns a list of all deed identifiers assigned to an address. /// @param _owner The owner whose deeds we are interested in. /// @dev This method MUST NEVER be called by smart contract code. It's very /// expensive and is not supported in contract-to-contract calls as it returns /// a dynamic array (only supported for web3 calls). function deedsOfOwner(address _owner) external view returns(uint256[]) { uint256 deedCount = countOfDeedsByOwner(_owner); if (deedCount == 0) { // Return an empty array. return new uint256[](0); } else { uint256[] memory result = new uint256[](deedCount); uint256 totalDeeds = countOfDeeds(); uint256 resultIndex = 0; for (uint256 deedNumber = 0; deedNumber < totalDeeds; deedNumber++) { uint256 identifier = identifiers[deedNumber]; if (identifierToOwner[identifier] == _owner) { result[resultIndex] = identifier; resultIndex++; } } return result; } } /// @notice Returns a deed identifier of the owner at the given index. /// @param _owner The address of the owner we want to get a deed for. /// @param _index The index of the deed we want. function deedOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256) { // The index should be valid. require(_index < countOfDeedsByOwner(_owner)); // Loop through all deeds, accounting the number of deeds of the owner we've seen. uint256 seen = 0; uint256 totalDeeds = countOfDeeds(); for (uint256 deedNumber = 0; deedNumber < totalDeeds; deedNumber++) { uint256 identifier = identifiers[deedNumber]; if (identifierToOwner[identifier] == _owner) { if (seen == _index) { return identifier; } seen++; } } } /// @notice Returns an (off-chain) metadata url for the given deed. /// @param _deedId The identifier of the deed to get the metadata /// url for. /// @dev Implementation of optional ERC-721 functionality. function deedUri(uint256 _deedId) external pure returns (string uri) { // Assume a maximum deed id length. require (_deedId < 1000000); uri = "https://meta.quazr.io/card/xxxxxxx"; bytes memory _uri = bytes(uri); for (uint256 i = 0; i < 7; i++) { _uri[33 - i] = byte(48 + (_deedId / 10 ** i) % 10); } } } /** * @title PullPayment * @dev Base contract supporting async send for pull payments. Inherit from this * contract and use asyncSend instead of send. */ contract PullPayment { using SafeMath for uint256; mapping(address => uint256) public payments; uint256 public totalPayments; /** * @dev withdraw accumulated balance, called by payee. */ function withdrawPayments() public { address payee = msg.sender; uint256 payment = payments[payee]; require(payment != 0); require(this.balance >= payment); totalPayments = totalPayments.sub(payment); payments[payee] = 0; assert(payee.send(payment)); } /** * @dev Called by the payer to store the sent amount as credit to be pulled. * @param dest The destination address of the funds. * @param amount The amount to transfer. */ function asyncSend(address dest, uint256 amount) internal { payments[dest] = payments[dest].add(amount); totalPayments = totalPayments.add(amount); } } /// @dev Defines base data structures for MetaGame. contract MetaGameFinance is MetaGameDeed, PullPayment { /// @notice The dividend given to all parents of a deed, /// in 1/1000th of a percentage. uint256 public dividendParentsPercentage = 1000; /// @notice The minimum fee for the contract in 1/1000th /// of a percentage. uint256 public minimumFeePercentage = 2500; /// @notice The minimum total paid in fees and dividends. /// If there are (almost) no dividends to be paid, the fee /// for the contract is higher. This happens for deeds at /// or near the top of the hierarchy. In 1/1000th of a /// percentage. uint256 public minimumFeePlusDividendsPercentage = 8000; /// @notice Most-recent card buyers. These will be given /// dividends on the next sale. Then, the buyers will be /// shifted, the least recent buyer dropped, and the buyer /// of this sale is added as the most recent buyer. address[] public recentBuyers = new address[](6); /// @notice The dividend given to the most recent buyers, /// in 1/1000th of a percentage. The dividend decreases by /// the given factor for subsequent levels of recent buyers. uint256 public dividendRecentBuyersPercentage = 1000; uint256 public dividendRecentBuyersPercentageDecreaseFactor = 2; // @dev A mapping from deed identifiers to the buyout price. mapping (uint256 => uint256) public identifierToPrice; /// @notice The threshold for a payment to be sent directly, /// instead of added to a beneficiary's balance. uint256 public directPaymentThreshold = 0 ether; /// @notice Boolean indicating whether deed price can be changed /// manually. bool public allowChangePrice = false; /// @notice The maximum depth for which dividends will be paid to parents. uint256 public maxDividendDepth = 6; /// @dev This event is emitted when a deed's buyout price is initially set or changed. event Price(uint256 indexed identifier, uint256 price, uint256 nextPrice); /// @dev This event is emitted when a deed is bought out. event Buy(address indexed oldOwner, address indexed newOwner, uint256 indexed identifier, uint256 price, uint256 ownerWinnings); /// @dev This event is emitted when a dividend is paid. event DividendPaid(address indexed beneficiary, uint256 indexed identifierBought, uint256 indexed identifier, uint256 dividend); /// @notice Set the threshold for a payment to be sent directly. /// @param threshold The threshold for a payment to be sent directly. function setDirectPaymentThreshold(uint256 threshold) external onlyCFO { directPaymentThreshold = threshold; } /// @notice Set whether prices can be changed manually. /// @param _allowChangePrice Bool indiciating wether prices can be changed manually. function setAllowChangePrice(bool _allowChangePrice) external onlyCFO { allowChangePrice = _allowChangePrice; } /// @notice Set the maximum dividend depth. /// @param _maxDividendDepth The maximum dividend depth. function setMaxDividendDepth(uint256 _maxDividendDepth) external onlyCFO { maxDividendDepth = _maxDividendDepth; } /// @notice Calculate the next price given the current price. /// @param currentPrice The current price. function nextPrice(uint256 currentPrice) public pure returns(uint256) { if (currentPrice < 1 ether) { return currentPrice.mul(200).div(100); // 100% increase } else if (currentPrice < 5 ether) { return currentPrice.mul(150).div(100); // 50% increase } else { return currentPrice.mul(135).div(100); // 35% increase } } /// @notice Set the price of a deed. /// @param identifier The identifier of the deed to change the price of. /// @param newPrice The new price of the deed. function changeDeedPrice(uint256 identifier, uint256 newPrice) public { // The message sender must be the deed owner. require(identifierToOwner[identifier] == msg.sender); // Price changes must be enabled. require(allowChangePrice); // The new price must be lower than the current price. require(newPrice < identifierToPrice[identifier]); // Set the new price. identifierToPrice[identifier] = newPrice; Price(identifier, newPrice, nextPrice(newPrice)); } /// @notice Set the initial price of a deed. /// @param identifier The identifier of the deed to change the price of. /// @param newPrice The new price of the deed. function changeInitialPrice(uint256 identifier, uint256 newPrice) public onlyCFO { // The deed must be owned by the contract. require(identifierToOwner[identifier] == address(this)); // Set the new price. identifierToPrice[identifier] = newPrice; Price(identifier, newPrice, nextPrice(newPrice)); } /// @dev Pay dividends to parents of a deed. /// @param identifierBought The identifier of the deed that was bought. /// @param identifier The identifier of the deed to pay its parents dividends for (recursed). /// @param dividend The dividend to be paid to parents of the deed. /// @param depth The depth of this dividend. function _payParentDividends(uint256 identifierBought, uint256 identifier, uint256 dividend, uint256 depth) internal returns(uint256 totalDividendsPaid) { uint256 parentIdentifier = identifierToParentIdentifier[identifier]; if (parentIdentifier != 0 && depth < maxDividendDepth) { address parentOwner = identifierToOwner[parentIdentifier]; if (parentOwner != address(this)) { // Send dividend to the owner of the parent. _sendFunds(parentOwner, dividend); DividendPaid(parentOwner, identifierBought, parentIdentifier, dividend); } totalDividendsPaid = dividend; // Recursively pay dividends to parents of parents. uint256 dividendsPaid = _payParentDividends(identifierBought, parentIdentifier, dividend, depth + 1); totalDividendsPaid = totalDividendsPaid.add(dividendsPaid); } else { // Not strictly necessary to set this to 0 explicitly... but makes // it clearer to see what happens. totalDividendsPaid = 0; } } /// @dev Pay dividends to recent buyers. /// @param price The price of the card that was bought. function _payRecentBuyerDividends(uint256 price) internal returns(uint256 totalDividendsPaid) { uint256 dividend = price.mul(dividendRecentBuyersPercentage).div(100000); // Pay first dividend. if (recentBuyers[0] != 0x0) { _sendFunds(recentBuyers[0], dividend); } totalDividendsPaid = dividend; // Pay second dividend. dividend = dividend.div(dividendRecentBuyersPercentageDecreaseFactor); if (recentBuyers[1] != 0x0) { _sendFunds(recentBuyers[1], dividend); } totalDividendsPaid = totalDividendsPaid.add(dividend); // Pay third dividend. dividend = dividend.div(dividendRecentBuyersPercentageDecreaseFactor); if (recentBuyers[2] != 0x0) { _sendFunds(recentBuyers[2], dividend); } totalDividendsPaid = totalDividendsPaid.add(dividend); // Pay fourth dividend. dividend = dividend.div(dividendRecentBuyersPercentageDecreaseFactor); if (recentBuyers[3] != 0x0) { _sendFunds(recentBuyers[3], dividend); } totalDividendsPaid = totalDividendsPaid.add(dividend); // Pay fifth dividend. dividend = dividend.div(dividendRecentBuyersPercentageDecreaseFactor); if (recentBuyers[4] != 0x0) { _sendFunds(recentBuyers[4], dividend); } totalDividendsPaid = totalDividendsPaid.add(dividend); // Pay sixth dividend. dividend = dividend.div(dividendRecentBuyersPercentageDecreaseFactor); if (recentBuyers[5] != 0x0) { _sendFunds(recentBuyers[5], dividend); } totalDividendsPaid = totalDividendsPaid.add(dividend); } /// @dev Pay trade dividends. /// @param price The identifier of the card that was bought. /// @param price The price of the card that was bought. function _payDividends(uint256 identifier, uint256 price) internal returns(uint256 totalDividendsPaid) { // Pay parent dividends. uint256 parentDividend = price.mul(dividendParentsPercentage).div(100000); totalDividendsPaid = _payParentDividends(identifier, identifier, parentDividend, 0); // Pay recent buyer dividends. totalDividendsPaid = totalDividendsPaid.add(_payRecentBuyerDividends(price)); } /// @dev Calculate the contract fee. /// @param price The price of the buyout. /// @param dividendsPaid The total amount paid in dividends. function calculateFee(uint256 price, uint256 dividendsPaid) public view returns(uint256 fee) { // Calculate the absolute minimum fee. fee = price.mul(minimumFeePercentage).div(100000); // Calculate the minimum fee plus dividends payable. // See also the explanation at the definition of // minimumFeePlusDividends. uint256 _minimumFeePlusDividends = price.mul(minimumFeePlusDividendsPercentage).div(100000); if (_minimumFeePlusDividends > dividendsPaid) { uint256 feeMinusDividends = _minimumFeePlusDividends.sub(dividendsPaid); // The minimum total paid in 'fees plus dividends', minus dividends, is // greater than the minimum fee. Set the fee to this value. if (feeMinusDividends > fee) { fee = feeMinusDividends; } } } /// @dev Shift the 6 most recent buyers, and add the new buyer /// to the front. /// @param newBuyer The buyer to add to the front of the recent /// buyers list. function _shiftRecentBuyers(address newBuyer) internal { recentBuyers[5] = recentBuyers[4]; recentBuyers[4] = recentBuyers[3]; recentBuyers[3] = recentBuyers[2]; recentBuyers[2] = recentBuyers[1]; recentBuyers[1] = recentBuyers[0]; recentBuyers[0] = newBuyer; } /// @dev Send funds to a beneficiary. If sending fails, assign /// funds to the beneficiary's balance for manual withdrawal. /// @param beneficiary The beneficiary's address to send funds to /// @param amount The amount to send. function _sendFunds(address beneficiary, uint256 amount) internal { if (amount < directPaymentThreshold) { // Amount is under send threshold. Send funds asynchronously // for manual withdrawal by the beneficiary. asyncSend(beneficiary, amount); } else if (!beneficiary.send(amount)) { // Failed to send funds. This can happen due to a failure in // fallback code of the beneficiary, or because of callstack // depth. // Send funds asynchronously for manual withdrawal by the // beneficiary. asyncSend(beneficiary, amount); } } /// @notice Withdraw (unowed) contract balance. function withdrawFreeBalance() external onlyCFO { // Calculate the free (unowed) balance. This never underflows, as // totalPayments is guaranteed to be less than or equal to the // contract balance. uint256 freeBalance = this.balance - totalPayments; cfoAddress.transfer(freeBalance); } } /// @dev Defines core MetaGame functionality. contract MetaGameCore is MetaGameFinance { function MetaGameCore() public { // Start the contract paused. paused = true; } /// @notice Create a collectible. /// @param identifier The identifier of the collectible that is to be created. /// @param owner The address of the initial owner. Blank if this contract should /// be the initial owner. /// @param parentIdentifier The identifier of the parent of the collectible, which /// receives dividends when this collectible trades. /// @param price The initial price of the collectible. function createCollectible(uint256 identifier, address owner, uint256 parentIdentifier, uint256 price) external onlyCFO { // The identifier must be valid. Identifier 0 is reserved // to mark a collectible as having no parent. require(identifier >= 1); // The identifier must not exist yet. require(identifierToOwner[identifier] == 0x0); // Add the identifier to the list of existing identifiers. identifiers.push(identifier); address initialOwner = owner; if (initialOwner == 0x0) { // Set the initial owner to be the contract itself. initialOwner = address(this); } // Transfer the collectible to the initial owner. _transfer(0x0, initialOwner, identifier); // Set the parent identifier. identifierToParentIdentifier[identifier] = parentIdentifier; // Set the initial price. identifierToPrice[identifier] = price; // Emit price event. Price(identifier, price, nextPrice(price)); } /// @notice Set the parent collectible of a collectible. function setParent(uint256 identifier, uint256 parentIdentifier) external onlyCFO { // The deed must exist. require(identifierToOwner[identifier] != 0x0); identifierToParentIdentifier[identifier] = parentIdentifier; } /// @notice Buy a collectible. function buy(uint256 identifier) external payable whenNotPaused { // The collectible must exist. require(identifierToOwner[identifier] != 0x0); address oldOwner = identifierToOwner[identifier]; uint256 price = identifierToPrice[identifier]; // The old owner must not be the same as the buyer. require(oldOwner != msg.sender); // Enough ether must be provided. require(msg.value >= price); // Set the new price. uint256 newPrice = nextPrice(price); identifierToPrice[identifier] = newPrice; // Transfer the collectible. _transfer(oldOwner, msg.sender, identifier); // Emit price change event. Price(identifier, newPrice, nextPrice(newPrice)); // Emit buy event. Buy(oldOwner, msg.sender, identifier, price, oldOwnerWinnings); // Pay dividends. uint256 dividendsPaid = _payDividends(identifier, price); // Calculate the contract fee. uint256 fee = calculateFee(price, dividendsPaid); // Calculate the winnings for the previous owner. uint256 oldOwnerWinnings = price.sub(dividendsPaid).sub(fee); // Add the buyer to the recent buyer list. _shiftRecentBuyers(msg.sender); if (oldOwner != address(this)) { // The old owner is not this contract itself. // Pay the old owner. _sendFunds(oldOwner, oldOwnerWinnings); } // Calculate overspent ether. This cannot underflow, as the require // guarantees price to be greater than or equal to msg.value. uint256 excess = msg.value - price; if (excess > 0) { // Refund overspent Ether. msg.sender.transfer(excess); } } /// @notice Return a collectible's details. /// @param identifier The identifier of the collectible to get details for. function getDeed(uint256 identifier) external view returns(uint256 deedId, address owner, uint256 buyPrice, uint256 nextBuyPrice) { deedId = identifier; owner = identifierToOwner[identifier]; buyPrice = identifierToPrice[identifier]; nextBuyPrice = nextPrice(buyPrice); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"constant":true,"inputs":[],"name":"totalPayments","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"cfoAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"_deedName","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_deedId","type":"uint256"}],"name":"approve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"identifier","type":"uint256"},{"name":"newPrice","type":"uint256"}],"name":"changeInitialPrice","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"}],"name":"reclaimToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"identifier","type":"uint256"},{"name":"owner","type":"address"},{"name":"parentIdentifier","type":"uint256"},{"name":"price","type":"uint256"}],"name":"createCollectible","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_deedIds","type":"uint256[]"}],"name":"transferMultiple","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_deedIds","type":"uint256[]"}],"name":"approveMultiple","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"threshold","type":"uint256"}],"name":"setDirectPaymentThreshold","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"identifier","type":"uint256"},{"name":"parentIdentifier","type":"uint256"}],"name":"setParent","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"currentPrice","type":"uint256"}],"name":"nextPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"identifiers","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"deedsOfOwner","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"price","type":"uint256"},{"name":"dividendsPaid","type":"uint256"}],"name":"calculateFee","outputs":[{"name":"fee","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newCFO","type":"address"}],"name":"setCFO","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"claimOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_maxDividendDepth","type":"uint256"}],"name":"setMaxDividendDepth","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_index","type":"uint256"}],"name":"deedOfOwnerByIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minimumFeePlusDividendsPercentage","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getAllIdentifiers","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"withdrawPayments","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_deedId","type":"uint256"}],"name":"ownerOf","outputs":[{"name":"_owner","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"recentBuyers","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"identifier","type":"uint256"}],"name":"getDeed","outputs":[{"name":"deedId","type":"uint256"},{"name":"owner","type":"address"},{"name":"buyPrice","type":"uint256"},{"name":"nextBuyPrice","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dividendRecentBuyersPercentage","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"dividendParentsPercentage","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"maxDividendDepth","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"directPaymentThreshold","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"countOfDeedsByOwner","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"_deedSymbol","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"identifierToPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"identifier","type":"uint256"},{"name":"newPrice","type":"uint256"}],"name":"changeDeedPrice","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"allowChangePrice","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_deedId","type":"uint256"}],"name":"transfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"minimumFeePercentage","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_allowChangePrice","type":"bool"}],"name":"setAllowChangePrice","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_deedId","type":"uint256"}],"name":"takeOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_deedId","type":"uint256"}],"name":"deedUri","outputs":[{"name":"uri","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"countOfDeeds","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"identifier","type":"uint256"}],"name":"parentOf","outputs":[{"name":"parentIdentifier","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"identifier","type":"uint256"}],"name":"buy","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"payments","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pendingOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_deedIds","type":"uint256[]"}],"name":"takeOwnershipMultiple","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"dividendRecentBuyersPercentageDecreaseFactor","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"withdrawFreeBalance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"identifier","type":"uint256"},{"indexed":false,"name":"price","type":"uint256"},{"indexed":false,"name":"nextPrice","type":"uint256"}],"name":"Price","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"oldOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"},{"indexed":true,"name":"identifier","type":"uint256"},{"indexed":false,"name":"price","type":"uint256"},{"indexed":false,"name":"ownerWinnings","type":"uint256"}],"name":"Buy","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"beneficiary","type":"address"},{"indexed":true,"name":"identifierBought","type":"uint256"},{"indexed":true,"name":"identifier","type":"uint256"},{"indexed":false,"name":"dividend","type":"uint256"}],"name":"DividendPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":true,"name":"deedId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"approved","type":"address"},{"indexed":true,"name":"deedId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]
Contract Creation Code
606060409081526001805460a060020a60ff02191690556103e8600a556109c4600b55611f40600c5560069051805910620000375750595b9080825280602002602001820160405250600d9080516200005d929160200190620000e1565b506103e8600e556002600f5560006011556012805460ff19169055600660135534156200008957600080fd5b60008054600160a060020a033316600160a060020a031991821681179092556002805490911690911790556001805460a060020a60ff0219167401000000000000000000000000000000000000000017905562000177565b8280548282559060005260206000209081019282156200013b579160200282015b828111156200013b5782518254600160a060020a031916600160a060020a03919091161782556020929092019160019091019062000102565b50620001499291506200014d565b5090565b6200017491905b8082111562000149578054600160a060020a031916815560010162000154565b90565b61263a80620001876000396000f3006060604052600436106102625763ffffffff60e060020a6000350416625b4487811461026757806301ffc9a71461028c5780630519ce79146102d857806306fdde0314610307578063095ea7b31461039157806317a87b80146103b557806317ffc320146103ce5780631affcd7e146103ed5780631d976e05146104155780631f5c3a3c146104725780632062e457146104cf578063223e97be146104e55780632821ca71146104fe57806328f2d4da146105145780632d620e1e1461052a57806334e731221461059c5780633f4ba83a146105b55780634e0a3379146105c85780634e71e0c8146105e75780634fd81926146105fa5780635327091014610610578063572b7a03146106325780635c975abb146106455780635de3ba97146106585780636103d70b1461066b5780636352211e1461067e5780636751676f14610694578063683ad727146106aa57806382d708c4146106f45780638456cb59146107075780638a3318461461071a5780638b018bca1461072d5780638da5cb5b1461074057806390b17f991461075357806392efd2771461076657806395d89b41146107855780639eb180a714610798578063a132e336146107ae578063a25287c5146107c7578063a9059cbb146107da578063a971c23d146107fc578063aa601a711461080f578063b2e6ceeb14610827578063b95d2a531461083d578063c34588ba14610853578063cfa3c13214610866578063d96a094a1461087c578063e2982c2114610887578063e30c3978146108a6578063e435f2c9146108b9578063e78562c014610908578063ee8b39f61461091b578063f2fde38b1461092e575b600080fd5b341561027257600080fd5b61027a61094d565b60405190815260200160405180910390f35b341561029757600080fd5b6102c47fffffffff0000000000000000000000000000000000000000000000000000000060043516610953565b604051901515815260200160405180910390f35b34156102e357600080fd5b6102eb610bc4565b604051600160a060020a03909116815260200160405180910390f35b341561031257600080fd5b61031a610bd3565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561035657808201518382015260200161033e565b50505050905090810190601f1680156103835780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561039c57600080fd5b6103b3600160a060020a0360043516602435610c14565b005b34156103c057600080fd5b6103b3600435602435610c7c565b34156103d957600080fd5b6103b3600160a060020a0360043516610d16565b34156103f857600080fd5b6103b3600435600160a060020a0360243516604435606435610dca565b341561042057600080fd5b6103b360048035600160a060020a0316906044602480359081019083013580602080820201604051908101604052809392919081815260200183836020028082843750949650610ec295505050505050565b341561047d57600080fd5b6103b360048035600160a060020a0316906044602480359081019083013580602080820201604051908101604052809392919081815260200183836020028082843750949650610f6b95505050505050565b34156104da57600080fd5b6103b3600435610ff9565b34156104f057600080fd5b6103b3600435602435611019565b341561050957600080fd5b61027a600435611069565b341561051f57600080fd5b61027a6004356110e0565b341561053557600080fd5b610549600160a060020a03600435166110ff565b60405160208082528190810183818151815260200191508051906020019060200280838360005b83811015610588578082015183820152602001610570565b505050509050019250505060405180910390f35b34156105a757600080fd5b61027a600435602435611205565b34156105c057600080fd5b6103b3611274565b34156105d357600080fd5b6103b3600160a060020a03600435166112f3565b34156105f257600080fd5b6103b3611345565b341561060557600080fd5b6103b36004356113c6565b341561061b57600080fd5b61027a600160a060020a03600435166024356113e6565b341561063d57600080fd5b61027a61148a565b341561065057600080fd5b6102c4611490565b341561066357600080fd5b6105496114a0565b341561067657600080fd5b6103b36114ff565b341561068957600080fd5b6102eb600435611594565b341561069f57600080fd5b6102eb6004356115b8565b34156106b557600080fd5b6106c06004356115e0565b604051938452600160a060020a03909216602084015260408084019190915260608301919091526080909101905180910390f35b34156106ff57600080fd5b61027a61161a565b341561071257600080fd5b6103b3611620565b341561072557600080fd5b61027a6116a4565b341561073857600080fd5b61027a6116aa565b341561074b57600080fd5b6102eb6116b0565b341561075e57600080fd5b61027a6116bf565b341561077157600080fd5b61027a600160a060020a03600435166116c5565b341561079057600080fd5b61031a6116e0565b34156107a357600080fd5b61027a600435611721565b34156107b957600080fd5b6103b3600435602435611733565b34156107d257600080fd5b6102c4611785565b34156107e557600080fd5b6103b3600160a060020a036004351660243561178e565b341561080757600080fd5b61027a6117f1565b341561081a57600080fd5b6103b360043515156117f7565b341561083257600080fd5b6103b3600435611825565b341561084857600080fd5b61031a600435611887565b341561085e57600080fd5b61027a6119a6565b341561087157600080fd5b61027a6004356119ac565b6103b36004356119be565b341561089257600080fd5b61027a600160a060020a0360043516611bb7565b34156108b157600080fd5b6102eb611bc9565b34156108c457600080fd5b6103b36004602481358181019083013580602081810201604051908101604052809392919081815260200183836020028082843750949650611bd895505050505050565b341561091357600080fd5b61027a611c62565b341561092657600080fd5b6103b3611c68565b341561093957600080fd5b6103b3600160a060020a0360043516611cc9565b60095481565b60006040517f737570706f727473496e7465726661636528627974657334290000000000000081526019016040518091039020600160e060020a03191682600160e060020a0319161480610b0a57506040517f74616b654f776e6572736869702875696e743235362900000000000000000000815260160160405180910390206040517f617070726f766528616464726573732c75696e74323536290000000000000000815260180160405180910390206040517f646565644f664f776e65724279496e64657828616464726573732c75696e743281527f3536290000000000000000000000000000000000000000000000000000000000602082015260230160405180910390206040517f636f756e744f66446565647342794f776e6572286164647265737329000000008152601c0160405180910390206040517f636f756e744f66446565647328290000000000000000000000000000000000008152600e0160405180910390206040517f6f776e65724f662875696e743235362900000000000000000000000000000000815260100160405180910390201818181818600160e060020a03191682600160e060020a031916145b80610bbc57506040517f646565645572692875696e743235362900000000000000000000000000000000815260100160405180910390206040517f73796d626f6c2829000000000000000000000000000000000000000000000000815260080160405180910390206040517f6e616d6528290000000000000000000000000000000000000000000000000000815260060160405180910390201818600160e060020a03191682600160e060020a031916145b90505b919050565b600254600160a060020a031681565b610bdb6125bf565b60408051908101604052600881527f4d65746147616d650000000000000000000000000000000000000000000000006020820152919050565b610c1c6125bf565b60015460a060020a900460ff1615610c3357600080fd5b6001604051805910610c425750595b908082528060200260200182016040525090508181600081518110610c6357fe5b60209081029091010152610c778382610f6b565b505050565b60025433600160a060020a03908116911614610c9757600080fd5b60008281526003602052604090205430600160a060020a03908116911614610cbe57600080fd5b6000828152601060205260409020819055817f4afcb4a87cdbd9974efdb92ee48bc8d7cd0ae4bf217004db3d080cbaee652ca782610cfb81611069565b60405191825260208201526040908101905180910390a25050565b6000805433600160a060020a03908116911614610d3257600080fd5b81600160a060020a03166370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610d8957600080fd5b6102c65a03f11515610d9a57600080fd5b5050506040518051600054909250610dc69150600160a060020a0384811691168363ffffffff611d0616565b5050565b60025460009033600160a060020a03908116911614610de857600080fd5b6001851015610df657600080fd5b600085815260036020526040902054600160a060020a031615610e1857600080fd5b6007805460018101610e2a83826125d1565b5060009182526020909120018590555082600160a060020a0381161515610e4e5750305b610e5a60008287611d86565b600085815260066020908152604080832086905560109091529020829055847f4afcb4a87cdbd9974efdb92ee48bc8d7cd0ae4bf217004db3d080cbaee652ca783610ea481611069565b60405191825260208201526040908101905180910390a25050505050565b600154600090819060a060020a900460ff1615610ede57600080fd5b600160a060020a0384161515610ef357600080fd5b30600160a060020a031684600160a060020a031614151515610f1457600080fd5b600091505b8251821015610f6557828281518110610f2e57fe5b906020019060200201519050610f443382611e4d565b1515610f4f57600080fd5b610f5a338583611d86565b600190910190610f19565b50505050565b600154600090819060a060020a900460ff1615610f8757600080fd5b83600160a060020a031633600160a060020a031614151515610fa857600080fd5b600091505b8251821015610f6557828281518110610fc257fe5b906020019060200201519050610fd83382611e4d565b1515610fe357600080fd5b610fee338583611e6d565b600190910190610fad565b60025433600160a060020a0390811691161461101457600080fd5b601155565b60025433600160a060020a0390811691161461103457600080fd5b600082815260036020526040902054600160a060020a0316151561105757600080fd5b60009182526006602052604090912055565b6000670de0b6b3a76400008210156110a45761109d60646110918460c863ffffffff611ed116565b9063ffffffff611f0716565b9050610bbf565b674563918244f400008210156110ca5761109d606461109184609663ffffffff611ed116565b61109d606461109184608763ffffffff611ed116565b60078054829081106110ee57fe5b600091825260209091200154905081565b6111076125bf565b60006111116125bf565b600080600080611120886116c5565b95508515156111505760006040518059106111385750595b908082528060200260200182016040525096506111fa565b8560405180591061115e5750595b908082528060200260200182016040525094506111796119a6565b935060009250600091505b838210156111f657600780548390811061119a57fe5b60009182526020808320909101548083526003909152604090912054909150600160a060020a0390811690891614156111eb57808584815181106111da57fe5b602090810290910101526001909201915b600190910190611184565b8496505b505050505050919050565b6000806000611226620186a0611091600b5488611ed190919063ffffffff16565b9250611244620186a0611091600c5488611ed190919063ffffffff16565b91508382111561126c5761125e828563ffffffff611f1e16565b90508281111561126c578092505b505092915050565b60005433600160a060020a0390811691161461128f57600080fd5b60015460a060020a900460ff1615156112a757600080fd5b6001805474ff0000000000000000000000000000000000000000191690557f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b60005433600160a060020a0390811691161461130e57600080fd5b600160a060020a038116151561132357600080fd5b60028054600160a060020a031916600160a060020a0392909216919091179055565b60015433600160a060020a0390811691161461136057600080fd5b600154600054600160a060020a0391821691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36001805460008054600160a060020a0319908116600160a060020a03841617909155169055565b60025433600160a060020a039081169116146113e157600080fd5b601355565b60008060008060006113f7876116c5565b861061140257600080fd5b6000935061140e6119a6565b9250600091505b8282101561148057600780548390811061142b57fe5b60009182526020808320909101548083526003909152604090912054909150600160a060020a039081169088161415611475578584141561146e57809450611480565b6001909301925b600190910190611415565b5050505092915050565b600c5481565b60015460a060020a900460ff1681565b6114a86125bf565b60078054806020026020016040519081016040528092919081815260200182805480156114f457602002820191906000526020600020905b8154815260200190600101908083116114e0575b505050505090505b90565b33600160a060020a03811660009081526008602052604090205480151561152557600080fd5b600160a060020a033016318190101561153d57600080fd5b600954611550908263ffffffff611f1e16565b600955600160a060020a0382166000818152600860205260408082209190915582156108fc0290839051600060405180830381858888f193505050501515610dc657fe5b600081815260036020526040902054600160a060020a0316801515610bbf57600080fd5b600d8054829081106115c657fe5b600091825260209091200154600160a060020a0316905081565b60008181526003602090815260408083205460109092528220548392600160a060020a039092169161161182611069565b90509193509193565b600e5481565b60005433600160a060020a0390811691161461163b57600080fd5b60015460a060020a900460ff161561165257600080fd5b6001805474ff0000000000000000000000000000000000000000191660a060020a1790557f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b600a5481565b60135481565b600054600160a060020a031681565b60115481565b600160a060020a031660009081526005602052604090205490565b6116e86125bf565b60408051908101604052600281527f4d470000000000000000000000000000000000000000000000000000000000006020820152919050565b60106020526000908152604090205481565b60008281526003602052604090205433600160a060020a0390811691161461175a57600080fd5b60125460ff16151561176b57600080fd5b6000828152601060205260409020548110610cbe57600080fd5b60125460ff1681565b6117966125bf565b60015460a060020a900460ff16156117ad57600080fd5b60016040518059106117bc5750595b9080825280602002602001820160405250905081816000815181106117dd57fe5b60209081029091010152610c778382610ec2565b600b5481565b60025433600160a060020a0390811691161461181257600080fd5b6012805460ff1916911515919091179055565b61182d6125bf565b60015460a060020a900460ff161561184457600080fd5b60016040518059106118535750595b90808252806020026020018201604052509050818160008151811061187457fe5b60209081029091010152610dc681611bd8565b61188f6125bf565b6118976125bf565b6000620f424084106118a857600080fd5b606060405190810160405280602281526020017f68747470733a2f2f6d6574612e7175617a722e696f2f636172642f787878787881526020017f78780000000000000000000000000000000000000000000000000000000000008152509250829150600090505b600781101561199f57600a81600a0a8581151561192857fe5b0481151561193257fe5b066030017f01000000000000000000000000000000000000000000000000000000000000000282826021038151811061196757fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060010161190f565b5050919050565b60075490565b60009081526006602052604090205490565b6000806000806000806000600160149054906101000a900460ff161515156119e557600080fd5b600088815260036020526040902054600160a060020a03161515611a0857600080fd5b600088815260036020908152604080832054601090925290912054600160a060020a03918216985096503316871415611a4057600080fd5b3486901015611a4e57600080fd5b611a5786611069565b60008981526010602052604090208190559450611a7587338a611d86565b877f4afcb4a87cdbd9974efdb92ee48bc8d7cd0ae4bf217004db3d080cbaee652ca786611aa188611069565b60405191825260208201526040908101905180910390a28733600160a060020a031688600160a060020a03167ef93dbdb72854b6b6fb35433086556f2635fc83c37080c667496fecfa650fb4898660405191825260208201526040908101905180910390a4611b108887611f30565b9350611b1c8685611205565b9250611b3e83611b32888763ffffffff611f1e16565b9063ffffffff611f1e16565b9150611b4933611f81565b30600160a060020a031687600160a060020a0316141515611b6e57611b6e8783612197565b85340390506000811115611bad57600160a060020a03331681156108fc0282604051600060405180830381858888f193505050501515611bad57600080fd5b5050505050505050565b60086020526000908152604090205481565b600154600160a060020a031681565b6001546000908190819060a060020a900460ff1615611bf657600080fd5b600092505b8351831015610f6557838381518110611c1057fe5b90602001906020020151600081815260036020526040902054909250600160a060020a03169050611c4133836121e6565b1515611c4c57600080fd5b611c57813384611d86565b600190920191611bfb565b600f5481565b60025460009033600160a060020a03908116911614611c8657600080fd5b50600954600254600160a060020a033081163192909203911681156108fc0282604051600060405180830381858888f193505050501515611cc657600080fd5b50565b60005433600160a060020a03908116911614611ce457600080fd5b60018054600160a060020a031916600160a060020a0392909216919091179055565b82600160a060020a031663a9059cbb838360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515611d6357600080fd5b6102c65a03f11515611d7457600080fd5b505050604051805190501515610c7757fe5b600160a060020a03808316600081815260056020908152604080832080546001019055858352600390915290208054600160a060020a0319169091179055831615611e0757600160a060020a03831660009081526005602090815260408083208054600019019055838352600490915290208054600160a060020a03191690555b8082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b600090815260036020526040902054600160a060020a0391821691161490565b600081815260046020526040908190208054600160a060020a031916600160a060020a03858116918217909255839290918616907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925905160405180910390a4505050565b600080831515611ee45760009150611f00565b50828202828482811515611ef457fe5b0414611efc57fe5b8091505b5092915050565b6000808284811515611f1557fe5b04949350505050565b600082821115611f2a57fe5b50900390565b600080611f4f620186a0611091600a5486611ed190919063ffffffff16565b9050611f5e8485836000612206565b9150611f79611f6c846122d5565b839063ffffffff61255416565b949350505050565b600d80546004908110611f9057fe5b600091825260209091200154600d8054600160a060020a03909216916005908110611fb757fe5b60009182526020909120018054600160a060020a031916600160a060020a0392909216919091179055600d80546003908110611fef57fe5b600091825260209091200154600d8054600160a060020a0390921691600490811061201657fe5b60009182526020909120018054600160a060020a031916600160a060020a0392909216919091179055600d8054600290811061204e57fe5b600091825260209091200154600d8054600160a060020a0390921691600390811061207557fe5b60009182526020909120018054600160a060020a031916600160a060020a0392909216919091179055600d805460019081106120ad57fe5b600091825260209091200154600d8054600160a060020a039092169160029081106120d457fe5b600091825260208220018054600160a060020a031916600160a060020a039390931692909217909155600d8054909190811061210c57fe5b600091825260209091200154600d8054600160a060020a0390921691600190811061213357fe5b600091825260208220018054600160a060020a031916600160a060020a039390931692909217909155600d8054839290811061216b57fe5b60009182526020909120018054600160a060020a031916600160a060020a039290921691909117905550565b6011548110156121b0576121ab8282612563565b610dc6565b600160a060020a03821681156108fc0282604051600060405180830381858888f193505050501515610dc657610dc68282612563565b600090815260046020526040902054600160a060020a0391821691161490565b60008381526006602052604081205481808215801590612227575060135485105b156122c557600083815260036020526040902054600160a060020a0390811692503016821461229a5761225a8287612197565b828883600160a060020a03167f7875bbe2cfc0c5746093cb37f9404afd9499851458db1f5f0d33475e291dd92c8960405190815260200160405180910390a45b8593506122ac88848888600101612206565b90506122be848263ffffffff61255416565b93506122ca565b600093505b505050949350505050565b6000806122f4620186a0611091600e5486611ed190919063ffffffff16565b9050600d600081548110151561230657fe5b600091825260209091200154600160a060020a03161561234e5761234e600d600081548110151561233357fe5b600091825260209091200154600160a060020a031682612197565b809150612366600f5482611f0790919063ffffffff16565b9050600d600181548110151561237857fe5b600091825260209091200154600160a060020a0316156123a5576123a5600d600181548110151561233357fe5b6123b5828263ffffffff61255416565b91506123cc600f5482611f0790919063ffffffff16565b9050600d60028154811015156123de57fe5b600091825260209091200154600160a060020a03161561240b5761240b600d600281548110151561233357fe5b61241b828263ffffffff61255416565b9150612432600f5482611f0790919063ffffffff16565b9050600d600381548110151561244457fe5b600091825260209091200154600160a060020a03161561247157612471600d600381548110151561233357fe5b612481828263ffffffff61255416565b9150612498600f5482611f0790919063ffffffff16565b9050600d60048154811015156124aa57fe5b600091825260209091200154600160a060020a0316156124d7576124d7600d600481548110151561233357fe5b6124e7828263ffffffff61255416565b91506124fe600f5482611f0790919063ffffffff16565b9050600d600581548110151561251057fe5b600091825260209091200154600160a060020a03161561253d5761253d600d600581548110151561233357fe5b61254d828263ffffffff61255416565b9392505050565b600082820183811015611efc57fe5b600160a060020a03821660009081526008602052604090205461258c908263ffffffff61255416565b600160a060020a0383166000908152600860205260409020556009546125b8908263ffffffff61255416565b6009555050565b60206040519081016040526000815290565b815481835581811511610c7757600083815260209020610c779181019083016114fc91905b8082111561260a57600081556001016125f6565b50905600a165627a7a7230582011fb9c4be84d0722d97b2b0434655c711a7623dd3e9cff3faf810a92f467daa50029
Deployed Bytecode
0x6060604052600436106102625763ffffffff60e060020a6000350416625b4487811461026757806301ffc9a71461028c5780630519ce79146102d857806306fdde0314610307578063095ea7b31461039157806317a87b80146103b557806317ffc320146103ce5780631affcd7e146103ed5780631d976e05146104155780631f5c3a3c146104725780632062e457146104cf578063223e97be146104e55780632821ca71146104fe57806328f2d4da146105145780632d620e1e1461052a57806334e731221461059c5780633f4ba83a146105b55780634e0a3379146105c85780634e71e0c8146105e75780634fd81926146105fa5780635327091014610610578063572b7a03146106325780635c975abb146106455780635de3ba97146106585780636103d70b1461066b5780636352211e1461067e5780636751676f14610694578063683ad727146106aa57806382d708c4146106f45780638456cb59146107075780638a3318461461071a5780638b018bca1461072d5780638da5cb5b1461074057806390b17f991461075357806392efd2771461076657806395d89b41146107855780639eb180a714610798578063a132e336146107ae578063a25287c5146107c7578063a9059cbb146107da578063a971c23d146107fc578063aa601a711461080f578063b2e6ceeb14610827578063b95d2a531461083d578063c34588ba14610853578063cfa3c13214610866578063d96a094a1461087c578063e2982c2114610887578063e30c3978146108a6578063e435f2c9146108b9578063e78562c014610908578063ee8b39f61461091b578063f2fde38b1461092e575b600080fd5b341561027257600080fd5b61027a61094d565b60405190815260200160405180910390f35b341561029757600080fd5b6102c47fffffffff0000000000000000000000000000000000000000000000000000000060043516610953565b604051901515815260200160405180910390f35b34156102e357600080fd5b6102eb610bc4565b604051600160a060020a03909116815260200160405180910390f35b341561031257600080fd5b61031a610bd3565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561035657808201518382015260200161033e565b50505050905090810190601f1680156103835780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561039c57600080fd5b6103b3600160a060020a0360043516602435610c14565b005b34156103c057600080fd5b6103b3600435602435610c7c565b34156103d957600080fd5b6103b3600160a060020a0360043516610d16565b34156103f857600080fd5b6103b3600435600160a060020a0360243516604435606435610dca565b341561042057600080fd5b6103b360048035600160a060020a0316906044602480359081019083013580602080820201604051908101604052809392919081815260200183836020028082843750949650610ec295505050505050565b341561047d57600080fd5b6103b360048035600160a060020a0316906044602480359081019083013580602080820201604051908101604052809392919081815260200183836020028082843750949650610f6b95505050505050565b34156104da57600080fd5b6103b3600435610ff9565b34156104f057600080fd5b6103b3600435602435611019565b341561050957600080fd5b61027a600435611069565b341561051f57600080fd5b61027a6004356110e0565b341561053557600080fd5b610549600160a060020a03600435166110ff565b60405160208082528190810183818151815260200191508051906020019060200280838360005b83811015610588578082015183820152602001610570565b505050509050019250505060405180910390f35b34156105a757600080fd5b61027a600435602435611205565b34156105c057600080fd5b6103b3611274565b34156105d357600080fd5b6103b3600160a060020a03600435166112f3565b34156105f257600080fd5b6103b3611345565b341561060557600080fd5b6103b36004356113c6565b341561061b57600080fd5b61027a600160a060020a03600435166024356113e6565b341561063d57600080fd5b61027a61148a565b341561065057600080fd5b6102c4611490565b341561066357600080fd5b6105496114a0565b341561067657600080fd5b6103b36114ff565b341561068957600080fd5b6102eb600435611594565b341561069f57600080fd5b6102eb6004356115b8565b34156106b557600080fd5b6106c06004356115e0565b604051938452600160a060020a03909216602084015260408084019190915260608301919091526080909101905180910390f35b34156106ff57600080fd5b61027a61161a565b341561071257600080fd5b6103b3611620565b341561072557600080fd5b61027a6116a4565b341561073857600080fd5b61027a6116aa565b341561074b57600080fd5b6102eb6116b0565b341561075e57600080fd5b61027a6116bf565b341561077157600080fd5b61027a600160a060020a03600435166116c5565b341561079057600080fd5b61031a6116e0565b34156107a357600080fd5b61027a600435611721565b34156107b957600080fd5b6103b3600435602435611733565b34156107d257600080fd5b6102c4611785565b34156107e557600080fd5b6103b3600160a060020a036004351660243561178e565b341561080757600080fd5b61027a6117f1565b341561081a57600080fd5b6103b360043515156117f7565b341561083257600080fd5b6103b3600435611825565b341561084857600080fd5b61031a600435611887565b341561085e57600080fd5b61027a6119a6565b341561087157600080fd5b61027a6004356119ac565b6103b36004356119be565b341561089257600080fd5b61027a600160a060020a0360043516611bb7565b34156108b157600080fd5b6102eb611bc9565b34156108c457600080fd5b6103b36004602481358181019083013580602081810201604051908101604052809392919081815260200183836020028082843750949650611bd895505050505050565b341561091357600080fd5b61027a611c62565b341561092657600080fd5b6103b3611c68565b341561093957600080fd5b6103b3600160a060020a0360043516611cc9565b60095481565b60006040517f737570706f727473496e7465726661636528627974657334290000000000000081526019016040518091039020600160e060020a03191682600160e060020a0319161480610b0a57506040517f74616b654f776e6572736869702875696e743235362900000000000000000000815260160160405180910390206040517f617070726f766528616464726573732c75696e74323536290000000000000000815260180160405180910390206040517f646565644f664f776e65724279496e64657828616464726573732c75696e743281527f3536290000000000000000000000000000000000000000000000000000000000602082015260230160405180910390206040517f636f756e744f66446565647342794f776e6572286164647265737329000000008152601c0160405180910390206040517f636f756e744f66446565647328290000000000000000000000000000000000008152600e0160405180910390206040517f6f776e65724f662875696e743235362900000000000000000000000000000000815260100160405180910390201818181818600160e060020a03191682600160e060020a031916145b80610bbc57506040517f646565645572692875696e743235362900000000000000000000000000000000815260100160405180910390206040517f73796d626f6c2829000000000000000000000000000000000000000000000000815260080160405180910390206040517f6e616d6528290000000000000000000000000000000000000000000000000000815260060160405180910390201818600160e060020a03191682600160e060020a031916145b90505b919050565b600254600160a060020a031681565b610bdb6125bf565b60408051908101604052600881527f4d65746147616d650000000000000000000000000000000000000000000000006020820152919050565b610c1c6125bf565b60015460a060020a900460ff1615610c3357600080fd5b6001604051805910610c425750595b908082528060200260200182016040525090508181600081518110610c6357fe5b60209081029091010152610c778382610f6b565b505050565b60025433600160a060020a03908116911614610c9757600080fd5b60008281526003602052604090205430600160a060020a03908116911614610cbe57600080fd5b6000828152601060205260409020819055817f4afcb4a87cdbd9974efdb92ee48bc8d7cd0ae4bf217004db3d080cbaee652ca782610cfb81611069565b60405191825260208201526040908101905180910390a25050565b6000805433600160a060020a03908116911614610d3257600080fd5b81600160a060020a03166370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610d8957600080fd5b6102c65a03f11515610d9a57600080fd5b5050506040518051600054909250610dc69150600160a060020a0384811691168363ffffffff611d0616565b5050565b60025460009033600160a060020a03908116911614610de857600080fd5b6001851015610df657600080fd5b600085815260036020526040902054600160a060020a031615610e1857600080fd5b6007805460018101610e2a83826125d1565b5060009182526020909120018590555082600160a060020a0381161515610e4e5750305b610e5a60008287611d86565b600085815260066020908152604080832086905560109091529020829055847f4afcb4a87cdbd9974efdb92ee48bc8d7cd0ae4bf217004db3d080cbaee652ca783610ea481611069565b60405191825260208201526040908101905180910390a25050505050565b600154600090819060a060020a900460ff1615610ede57600080fd5b600160a060020a0384161515610ef357600080fd5b30600160a060020a031684600160a060020a031614151515610f1457600080fd5b600091505b8251821015610f6557828281518110610f2e57fe5b906020019060200201519050610f443382611e4d565b1515610f4f57600080fd5b610f5a338583611d86565b600190910190610f19565b50505050565b600154600090819060a060020a900460ff1615610f8757600080fd5b83600160a060020a031633600160a060020a031614151515610fa857600080fd5b600091505b8251821015610f6557828281518110610fc257fe5b906020019060200201519050610fd83382611e4d565b1515610fe357600080fd5b610fee338583611e6d565b600190910190610fad565b60025433600160a060020a0390811691161461101457600080fd5b601155565b60025433600160a060020a0390811691161461103457600080fd5b600082815260036020526040902054600160a060020a0316151561105757600080fd5b60009182526006602052604090912055565b6000670de0b6b3a76400008210156110a45761109d60646110918460c863ffffffff611ed116565b9063ffffffff611f0716565b9050610bbf565b674563918244f400008210156110ca5761109d606461109184609663ffffffff611ed116565b61109d606461109184608763ffffffff611ed116565b60078054829081106110ee57fe5b600091825260209091200154905081565b6111076125bf565b60006111116125bf565b600080600080611120886116c5565b95508515156111505760006040518059106111385750595b908082528060200260200182016040525096506111fa565b8560405180591061115e5750595b908082528060200260200182016040525094506111796119a6565b935060009250600091505b838210156111f657600780548390811061119a57fe5b60009182526020808320909101548083526003909152604090912054909150600160a060020a0390811690891614156111eb57808584815181106111da57fe5b602090810290910101526001909201915b600190910190611184565b8496505b505050505050919050565b6000806000611226620186a0611091600b5488611ed190919063ffffffff16565b9250611244620186a0611091600c5488611ed190919063ffffffff16565b91508382111561126c5761125e828563ffffffff611f1e16565b90508281111561126c578092505b505092915050565b60005433600160a060020a0390811691161461128f57600080fd5b60015460a060020a900460ff1615156112a757600080fd5b6001805474ff0000000000000000000000000000000000000000191690557f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b60005433600160a060020a0390811691161461130e57600080fd5b600160a060020a038116151561132357600080fd5b60028054600160a060020a031916600160a060020a0392909216919091179055565b60015433600160a060020a0390811691161461136057600080fd5b600154600054600160a060020a0391821691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36001805460008054600160a060020a0319908116600160a060020a03841617909155169055565b60025433600160a060020a039081169116146113e157600080fd5b601355565b60008060008060006113f7876116c5565b861061140257600080fd5b6000935061140e6119a6565b9250600091505b8282101561148057600780548390811061142b57fe5b60009182526020808320909101548083526003909152604090912054909150600160a060020a039081169088161415611475578584141561146e57809450611480565b6001909301925b600190910190611415565b5050505092915050565b600c5481565b60015460a060020a900460ff1681565b6114a86125bf565b60078054806020026020016040519081016040528092919081815260200182805480156114f457602002820191906000526020600020905b8154815260200190600101908083116114e0575b505050505090505b90565b33600160a060020a03811660009081526008602052604090205480151561152557600080fd5b600160a060020a033016318190101561153d57600080fd5b600954611550908263ffffffff611f1e16565b600955600160a060020a0382166000818152600860205260408082209190915582156108fc0290839051600060405180830381858888f193505050501515610dc657fe5b600081815260036020526040902054600160a060020a0316801515610bbf57600080fd5b600d8054829081106115c657fe5b600091825260209091200154600160a060020a0316905081565b60008181526003602090815260408083205460109092528220548392600160a060020a039092169161161182611069565b90509193509193565b600e5481565b60005433600160a060020a0390811691161461163b57600080fd5b60015460a060020a900460ff161561165257600080fd5b6001805474ff0000000000000000000000000000000000000000191660a060020a1790557f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b600a5481565b60135481565b600054600160a060020a031681565b60115481565b600160a060020a031660009081526005602052604090205490565b6116e86125bf565b60408051908101604052600281527f4d470000000000000000000000000000000000000000000000000000000000006020820152919050565b60106020526000908152604090205481565b60008281526003602052604090205433600160a060020a0390811691161461175a57600080fd5b60125460ff16151561176b57600080fd5b6000828152601060205260409020548110610cbe57600080fd5b60125460ff1681565b6117966125bf565b60015460a060020a900460ff16156117ad57600080fd5b60016040518059106117bc5750595b9080825280602002602001820160405250905081816000815181106117dd57fe5b60209081029091010152610c778382610ec2565b600b5481565b60025433600160a060020a0390811691161461181257600080fd5b6012805460ff1916911515919091179055565b61182d6125bf565b60015460a060020a900460ff161561184457600080fd5b60016040518059106118535750595b90808252806020026020018201604052509050818160008151811061187457fe5b60209081029091010152610dc681611bd8565b61188f6125bf565b6118976125bf565b6000620f424084106118a857600080fd5b606060405190810160405280602281526020017f68747470733a2f2f6d6574612e7175617a722e696f2f636172642f787878787881526020017f78780000000000000000000000000000000000000000000000000000000000008152509250829150600090505b600781101561199f57600a81600a0a8581151561192857fe5b0481151561193257fe5b066030017f01000000000000000000000000000000000000000000000000000000000000000282826021038151811061196757fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060010161190f565b5050919050565b60075490565b60009081526006602052604090205490565b6000806000806000806000600160149054906101000a900460ff161515156119e557600080fd5b600088815260036020526040902054600160a060020a03161515611a0857600080fd5b600088815260036020908152604080832054601090925290912054600160a060020a03918216985096503316871415611a4057600080fd5b3486901015611a4e57600080fd5b611a5786611069565b60008981526010602052604090208190559450611a7587338a611d86565b877f4afcb4a87cdbd9974efdb92ee48bc8d7cd0ae4bf217004db3d080cbaee652ca786611aa188611069565b60405191825260208201526040908101905180910390a28733600160a060020a031688600160a060020a03167ef93dbdb72854b6b6fb35433086556f2635fc83c37080c667496fecfa650fb4898660405191825260208201526040908101905180910390a4611b108887611f30565b9350611b1c8685611205565b9250611b3e83611b32888763ffffffff611f1e16565b9063ffffffff611f1e16565b9150611b4933611f81565b30600160a060020a031687600160a060020a0316141515611b6e57611b6e8783612197565b85340390506000811115611bad57600160a060020a03331681156108fc0282604051600060405180830381858888f193505050501515611bad57600080fd5b5050505050505050565b60086020526000908152604090205481565b600154600160a060020a031681565b6001546000908190819060a060020a900460ff1615611bf657600080fd5b600092505b8351831015610f6557838381518110611c1057fe5b90602001906020020151600081815260036020526040902054909250600160a060020a03169050611c4133836121e6565b1515611c4c57600080fd5b611c57813384611d86565b600190920191611bfb565b600f5481565b60025460009033600160a060020a03908116911614611c8657600080fd5b50600954600254600160a060020a033081163192909203911681156108fc0282604051600060405180830381858888f193505050501515611cc657600080fd5b50565b60005433600160a060020a03908116911614611ce457600080fd5b60018054600160a060020a031916600160a060020a0392909216919091179055565b82600160a060020a031663a9059cbb838360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515611d6357600080fd5b6102c65a03f11515611d7457600080fd5b505050604051805190501515610c7757fe5b600160a060020a03808316600081815260056020908152604080832080546001019055858352600390915290208054600160a060020a0319169091179055831615611e0757600160a060020a03831660009081526005602090815260408083208054600019019055838352600490915290208054600160a060020a03191690555b8082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b600090815260036020526040902054600160a060020a0391821691161490565b600081815260046020526040908190208054600160a060020a031916600160a060020a03858116918217909255839290918616907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925905160405180910390a4505050565b600080831515611ee45760009150611f00565b50828202828482811515611ef457fe5b0414611efc57fe5b8091505b5092915050565b6000808284811515611f1557fe5b04949350505050565b600082821115611f2a57fe5b50900390565b600080611f4f620186a0611091600a5486611ed190919063ffffffff16565b9050611f5e8485836000612206565b9150611f79611f6c846122d5565b839063ffffffff61255416565b949350505050565b600d80546004908110611f9057fe5b600091825260209091200154600d8054600160a060020a03909216916005908110611fb757fe5b60009182526020909120018054600160a060020a031916600160a060020a0392909216919091179055600d80546003908110611fef57fe5b600091825260209091200154600d8054600160a060020a0390921691600490811061201657fe5b60009182526020909120018054600160a060020a031916600160a060020a0392909216919091179055600d8054600290811061204e57fe5b600091825260209091200154600d8054600160a060020a0390921691600390811061207557fe5b60009182526020909120018054600160a060020a031916600160a060020a0392909216919091179055600d805460019081106120ad57fe5b600091825260209091200154600d8054600160a060020a039092169160029081106120d457fe5b600091825260208220018054600160a060020a031916600160a060020a039390931692909217909155600d8054909190811061210c57fe5b600091825260209091200154600d8054600160a060020a0390921691600190811061213357fe5b600091825260208220018054600160a060020a031916600160a060020a039390931692909217909155600d8054839290811061216b57fe5b60009182526020909120018054600160a060020a031916600160a060020a039290921691909117905550565b6011548110156121b0576121ab8282612563565b610dc6565b600160a060020a03821681156108fc0282604051600060405180830381858888f193505050501515610dc657610dc68282612563565b600090815260046020526040902054600160a060020a0391821691161490565b60008381526006602052604081205481808215801590612227575060135485105b156122c557600083815260036020526040902054600160a060020a0390811692503016821461229a5761225a8287612197565b828883600160a060020a03167f7875bbe2cfc0c5746093cb37f9404afd9499851458db1f5f0d33475e291dd92c8960405190815260200160405180910390a45b8593506122ac88848888600101612206565b90506122be848263ffffffff61255416565b93506122ca565b600093505b505050949350505050565b6000806122f4620186a0611091600e5486611ed190919063ffffffff16565b9050600d600081548110151561230657fe5b600091825260209091200154600160a060020a03161561234e5761234e600d600081548110151561233357fe5b600091825260209091200154600160a060020a031682612197565b809150612366600f5482611f0790919063ffffffff16565b9050600d600181548110151561237857fe5b600091825260209091200154600160a060020a0316156123a5576123a5600d600181548110151561233357fe5b6123b5828263ffffffff61255416565b91506123cc600f5482611f0790919063ffffffff16565b9050600d60028154811015156123de57fe5b600091825260209091200154600160a060020a03161561240b5761240b600d600281548110151561233357fe5b61241b828263ffffffff61255416565b9150612432600f5482611f0790919063ffffffff16565b9050600d600381548110151561244457fe5b600091825260209091200154600160a060020a03161561247157612471600d600381548110151561233357fe5b612481828263ffffffff61255416565b9150612498600f5482611f0790919063ffffffff16565b9050600d60048154811015156124aa57fe5b600091825260209091200154600160a060020a0316156124d7576124d7600d600481548110151561233357fe5b6124e7828263ffffffff61255416565b91506124fe600f5482611f0790919063ffffffff16565b9050600d600581548110151561251057fe5b600091825260209091200154600160a060020a03161561253d5761253d600d600581548110151561233357fe5b61254d828263ffffffff61255416565b9392505050565b600082820183811015611efc57fe5b600160a060020a03821660009081526008602052604090205461258c908263ffffffff61255416565b600160a060020a0383166000908152600860205260409020556009546125b8908263ffffffff61255416565b6009555050565b60206040519081016040526000815290565b815481835581811511610c7757600083815260209020610c779181019083016114fc91905b8082111561260a57600081556001016125f6565b50905600a165627a7a7230582011fb9c4be84d0722d97b2b0434655c711a7623dd3e9cff3faf810a92f467daa50029
Swarm Source
bzzr://11fb9c4be84d0722d97b2b0434655c711a7623dd3e9cff3faf810a92f467daa5
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.