Overview
TokenID
2573
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
SignalToken
Compiler Version
v0.4.24+commit.e67f0147
Optimization Enabled:
Yes with 300 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-12-04 */ pragma solidity ^0.4.24; /** * @title ERC165 * @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md */ interface ERC165 { /** * @notice Query if a contract implements an interface * @param _interfaceId The interface identifier, as specified in ERC-165 * @dev Interface identification is specified in ERC-165. This function * uses less than 30,000 gas. */ function supportsInterface(bytes4 _interfaceId) external view returns (bool); } /** * @title ERC721 Non-Fungible Token Standard basic interface * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */ contract ERC721Basic is ERC165 { bytes4 internal constant InterfaceId_ERC721 = 0x80ac58cd; /* * 0x80ac58cd === * bytes4(keccak256('balanceOf(address)')) ^ * bytes4(keccak256('ownerOf(uint256)')) ^ * bytes4(keccak256('approve(address,uint256)')) ^ * bytes4(keccak256('getApproved(uint256)')) ^ * bytes4(keccak256('setApprovalForAll(address,bool)')) ^ * bytes4(keccak256('isApprovedForAll(address,address)')) ^ * bytes4(keccak256('transferFrom(address,address,uint256)')) ^ * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) ^ * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) */ bytes4 internal constant InterfaceId_ERC721Exists = 0x4f558e79; /* * 0x4f558e79 === * bytes4(keccak256('exists(uint256)')) */ bytes4 internal constant InterfaceId_ERC721Enumerable = 0x780e9d63; /** * 0x780e9d63 === * bytes4(keccak256('totalSupply()')) ^ * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) ^ * bytes4(keccak256('tokenByIndex(uint256)')) */ bytes4 internal constant InterfaceId_ERC721Metadata = 0x5b5e139f; /** * 0x5b5e139f === * bytes4(keccak256('name()')) ^ * bytes4(keccak256('symbol()')) ^ * bytes4(keccak256('tokenURI(uint256)')) */ event Transfer( address indexed _from, address indexed _to, uint256 indexed _tokenId ); event Approval( address indexed _owner, address indexed _approved, uint256 indexed _tokenId ); event ApprovalForAll( address indexed _owner, address indexed _operator, bool _approved ); function balanceOf(address _owner) public view returns (uint256 _balance); function ownerOf(uint256 _tokenId) public view returns (address _owner); function exists(uint256 _tokenId) public view returns (bool _exists); function approve(address _to, uint256 _tokenId) public; function getApproved(uint256 _tokenId) public view returns (address _operator); function setApprovalForAll(address _operator, bool _approved) public; function isApprovedForAll(address _owner, address _operator) public view returns (bool); function transferFrom(address _from, address _to, uint256 _tokenId) public; function safeTransferFrom(address _from, address _to, uint256 _tokenId) public; function safeTransferFrom( address _from, address _to, uint256 _tokenId, bytes _data ) public; } /** * @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 OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() 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 relinquish control of the contract. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */ function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); } /** * @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 { _transferOwnership(_newOwner); } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; } } interface POUInterface { function totalStaked(address) external view returns(uint256); function numApplications(address) external view returns(uint256); } /* Implements EIP20 token standard: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md .*/ // Abstract contract for the full ERC 20 Token standard // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md contract EIP20Interface { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract since public getter functions are not currently recognised as an implementation of the matching abstract function by the compiler. */ /// total amount of tokens uint256 public totalSupply; /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) public view returns (uint256 balance); /// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transfer(address _to, uint256 _value) public returns (bool success); /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); /// @notice `msg.sender` approves `_spender` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of tokens to be approved for transfer /// @return Whether the approval was successful or not function approve(address _spender, uint256 _value) public returns (bool success); /// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent function allowance(address _owner, address _spender) public view returns (uint256 remaining); // solhint-disable-next-line no-simple-event-func-name event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract EIP20 is EIP20Interface { uint256 constant private MAX_UINT256 = 2**256 - 1; mapping (address => uint256) public balances; mapping (address => mapping (address => uint256)) public allowed; /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. They allow one to customise the token contract & in no way influences the core functionality. Some wallets/interfaces might not even bother to look at this information. */ string public name; //fancy name: eg Simon Bucks uint8 public decimals; //How many decimals to show. string public symbol; //An identifier: eg SBX function EIP20( uint256 _initialAmount, string _tokenName, uint8 _decimalUnits, string _tokenSymbol ) public { balances[msg.sender] = _initialAmount; // Give the creator all initial tokens totalSupply = _initialAmount; // Update total supply name = _tokenName; // Set the name for display purposes decimals = _decimalUnits; // Amount of decimals for display purposes symbol = _tokenSymbol; // Set the symbol for display purposes } function transfer(address _to, uint256 _value) public returns (bool success) { require(balances[msg.sender] >= _value); balances[msg.sender] -= _value; balances[_to] += _value; emit Transfer(msg.sender, _to, _value); //solhint-disable-line indent, no-unused-vars return true; } function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { uint256 allowance = allowed[_from][msg.sender]; require(balances[_from] >= _value && allowance >= _value); balances[_to] += _value; balances[_from] -= _value; if (allowance < MAX_UINT256) { allowed[_from][msg.sender] -= _value; } emit Transfer(_from, _to, _value); //solhint-disable-line indent, no-unused-vars return true; } function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } function approve(address _spender, uint256 _value) public returns (bool success) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); //solhint-disable-line indent, no-unused-vars return true; } function allowance(address _owner, address _spender) public view returns (uint256 remaining) { return allowed[_owner][_spender]; } } /// @title Interface for token controllers. The controller specifies whether a transfer can be done. contract TokenControllerI { /// @dev Specifies whether a transfer is allowed or not. /// @return True if the transfer is allowed function transferAllowed(address _from, address _to) external view returns (bool); } /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ contract ERC721Receiver { /** * @dev Magic value to be returned upon successful reception of an NFT * Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`, * which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` */ bytes4 internal constant ERC721_RECEIVED = 0x150b7a02; /** * @notice Handle the receipt of an NFT * @dev The ERC721 smart contract calls this function on the recipient * after a `safetransfer`. This function MAY throw to revert and reject the * transfer. Return of other than the magic value MUST result in the * transaction being reverted. * Note: the contract address is always the message sender. * @param _operator The address which called `safeTransferFrom` function * @param _from The address which previously owned the token * @param _tokenId The NFT identifier which is being transferred * @param _data Additional data with no specified format * @return `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` */ function onERC721Received( address _operator, address _from, uint256 _tokenId, bytes _data ) public returns(bytes4); } /** * Utility library of inline functions on addresses */ library AddressUtils { /** * Returns whether the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param _addr address to check * @return whether the target address is a contract */ function isContract(address _addr) internal view returns (bool) { uint256 size; // XXX Currently there is no better way to check if there is a contract in an address // than to check the size of the code at that address. // See https://ethereum.stackexchange.com/a/14016/36603 // for more details about how this works. // TODO Check this again before the Serenity release, because all addresses will be // contracts then. // solium-disable-next-line security/no-inline-assembly assembly { size := extcodesize(_addr) } return size > 0; } } /** * @title SupportsInterfaceWithLookup * @author Matt Condon (@shrugs) * @dev Implements ERC165 using a lookup table. */ contract SupportsInterfaceWithLookup is ERC165 { bytes4 public constant InterfaceId_ERC165 = 0x01ffc9a7; /** * 0x01ffc9a7 === * bytes4(keccak256('supportsInterface(bytes4)')) */ /** * @dev a mapping of interface id to whether or not it's supported */ mapping(bytes4 => bool) internal supportedInterfaces; /** * @dev A contract implementing SupportsInterfaceWithLookup * implement ERC165 itself */ constructor() public { _registerInterface(InterfaceId_ERC165); } /** * @dev implement supportsInterface(bytes4) using a lookup table */ function supportsInterface(bytes4 _interfaceId) external view returns (bool) { return supportedInterfaces[_interfaceId]; } /** * @dev private method for registering an interface */ function _registerInterface(bytes4 _interfaceId) internal { require(_interfaceId != 0xffffffff); supportedInterfaces[_interfaceId] = true; } } /** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { using SafeMath for uint256; using AddressUtils for address; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 private constant ERC721_RECEIVED = 0x150b7a02; // Mapping from token ID to owner mapping (uint256 => address) internal tokenOwner; // Mapping from token ID to approved address mapping (uint256 => address) internal tokenApprovals; // Mapping from owner to number of owned token mapping (address => uint256) internal ownedTokensCount; // Mapping from owner to operator approvals mapping (address => mapping (address => bool)) internal operatorApprovals; constructor() public { // register the supported interfaces to conform to ERC721 via ERC165 _registerInterface(InterfaceId_ERC721); _registerInterface(InterfaceId_ERC721Exists); } /** * @dev Gets the balance of the specified address * @param _owner address to query the balance of * @return uint256 representing the amount owned by the passed address */ function balanceOf(address _owner) public view returns (uint256) { require(_owner != address(0)); return ownedTokensCount[_owner]; } /** * @dev Gets the owner of the specified token ID * @param _tokenId uint256 ID of the token to query the owner of * @return owner address currently marked as the owner of the given token ID */ function ownerOf(uint256 _tokenId) public view returns (address) { address owner = tokenOwner[_tokenId]; require(owner != address(0)); return owner; } /** * @dev Returns whether the specified token exists * @param _tokenId uint256 ID of the token to query the existence of * @return whether the token exists */ function exists(uint256 _tokenId) public view returns (bool) { address owner = tokenOwner[_tokenId]; return owner != address(0); } /** * @dev Approves another address to transfer the given token ID * The zero address indicates there is no approved address. * There can only be one approved address per token at a given time. * Can only be called by the token owner or an approved operator. * @param _to address to be approved for the given token ID * @param _tokenId uint256 ID of the token to be approved */ function approve(address _to, uint256 _tokenId) public { address owner = ownerOf(_tokenId); require(_to != owner); require(msg.sender == owner || isApprovedForAll(owner, msg.sender)); tokenApprovals[_tokenId] = _to; emit Approval(owner, _to, _tokenId); } /** * @dev Gets the approved address for a token ID, or zero if no address set * @param _tokenId uint256 ID of the token to query the approval of * @return address currently approved for the given token ID */ function getApproved(uint256 _tokenId) public view returns (address) { return tokenApprovals[_tokenId]; } /** * @dev Sets or unsets the approval of a given operator * An operator is allowed to transfer all tokens of the sender on their behalf * @param _to operator address to set the approval * @param _approved representing the status of the approval to be set */ function setApprovalForAll(address _to, bool _approved) public { require(_to != msg.sender); operatorApprovals[msg.sender][_to] = _approved; emit ApprovalForAll(msg.sender, _to, _approved); } /** * @dev Tells whether an operator is approved by a given owner * @param _owner owner address which you want to query the approval of * @param _operator operator address which you want to query the approval of * @return bool whether the given operator is approved by the given owner */ function isApprovedForAll( address _owner, address _operator ) public view returns (bool) { return operatorApprovals[_owner][_operator]; } /** * @dev Transfers the ownership of a given token ID to another address * Usage of this method is discouraged, use `safeTransferFrom` whenever possible * Requires the msg sender to be the owner, approved, or operator * @param _from current owner of the token * @param _to address to receive the ownership of the given token ID * @param _tokenId uint256 ID of the token to be transferred */ function transferFrom( address _from, address _to, uint256 _tokenId ) public { require(isApprovedOrOwner(msg.sender, _tokenId)); require(_from != address(0)); require(_to != address(0)); clearApproval(_from, _tokenId); removeTokenFrom(_from, _tokenId); addTokenTo(_to, _tokenId); emit Transfer(_from, _to, _tokenId); } /** * @dev Safely transfers the ownership of a given token ID to another address * If the target address is a contract, it must implement `onERC721Received`, * which is called upon a safe transfer, and return the magic value * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise, * the transfer is reverted. * * Requires the msg sender to be the owner, approved, or operator * @param _from current owner of the token * @param _to address to receive the ownership of the given token ID * @param _tokenId uint256 ID of the token to be transferred */ function safeTransferFrom( address _from, address _to, uint256 _tokenId ) public { // solium-disable-next-line arg-overflow safeTransferFrom(_from, _to, _tokenId, ""); } /** * @dev Safely transfers the ownership of a given token ID to another address * If the target address is a contract, it must implement `onERC721Received`, * which is called upon a safe transfer, and return the magic value * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise, * the transfer is reverted. * Requires the msg sender to be the owner, approved, or operator * @param _from current owner of the token * @param _to address to receive the ownership of the given token ID * @param _tokenId uint256 ID of the token to be transferred * @param _data bytes data to send along with a safe transfer check */ function safeTransferFrom( address _from, address _to, uint256 _tokenId, bytes _data ) public { transferFrom(_from, _to, _tokenId); // solium-disable-next-line arg-overflow require(checkAndCallSafeTransfer(_from, _to, _tokenId, _data)); } /** * @dev Returns whether the given spender can transfer a given token ID * @param _spender address of the spender to query * @param _tokenId uint256 ID of the token to be transferred * @return bool whether the msg.sender is approved for the given token ID, * is an operator of the owner, or is the owner of the token */ function isApprovedOrOwner( address _spender, uint256 _tokenId ) internal view returns (bool) { address owner = ownerOf(_tokenId); // Disable solium check because of // https://github.com/duaraghav8/Solium/issues/175 // solium-disable-next-line operator-whitespace return ( _spender == owner || getApproved(_tokenId) == _spender || isApprovedForAll(owner, _spender) ); } /** * @dev Internal function to mint a new token * Reverts if the given token ID already exists * @param _to The address that will own the minted token * @param _tokenId uint256 ID of the token to be minted by the msg.sender */ function _mint(address _to, uint256 _tokenId) internal { require(_to != address(0)); addTokenTo(_to, _tokenId); emit Transfer(address(0), _to, _tokenId); } /** * @dev Internal function to burn a specific token * Reverts if the token does not exist * @param _tokenId uint256 ID of the token being burned by the msg.sender */ function _burn(address _owner, uint256 _tokenId) internal { clearApproval(_owner, _tokenId); removeTokenFrom(_owner, _tokenId); emit Transfer(_owner, address(0), _tokenId); } /** * @dev Internal function to clear current approval of a given token ID * Reverts if the given address is not indeed the owner of the token * @param _owner owner of the token * @param _tokenId uint256 ID of the token to be transferred */ function clearApproval(address _owner, uint256 _tokenId) internal { require(ownerOf(_tokenId) == _owner); if (tokenApprovals[_tokenId] != address(0)) { tokenApprovals[_tokenId] = address(0); } } /** * @dev Internal function to add a token ID to the list of a given address * @param _to address representing the new owner of the given token ID * @param _tokenId uint256 ID of the token to be added to the tokens list of the given address */ function addTokenTo(address _to, uint256 _tokenId) internal { require(tokenOwner[_tokenId] == address(0)); tokenOwner[_tokenId] = _to; ownedTokensCount[_to] = ownedTokensCount[_to].add(1); } /** * @dev Internal function to remove a token ID from the list of a given address * @param _from address representing the previous owner of the given token ID * @param _tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function removeTokenFrom(address _from, uint256 _tokenId) internal { require(ownerOf(_tokenId) == _from); ownedTokensCount[_from] = ownedTokensCount[_from].sub(1); tokenOwner[_tokenId] = address(0); } /** * @dev Internal function to invoke `onERC721Received` on a target address * The call is not executed if the target address is not a contract * @param _from address representing the previous owner of the given token ID * @param _to target address that will receive the tokens * @param _tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return whether the call correctly returned the expected magic value */ function checkAndCallSafeTransfer( address _from, address _to, uint256 _tokenId, bytes _data ) internal returns (bool) { if (!_to.isContract()) { return true; } bytes4 retval = ERC721Receiver(_to).onERC721Received( msg.sender, _from, _tokenId, _data); return (retval == ERC721_RECEIVED); } } /** * @title Controllable ERC721Basic token * * @dev Token that queries a token controller contract to check if a transfer is allowed. * @dev controller state var is going to be set with the address of a TokenControllerI contract that has * implemented transferAllowed() function. */ contract ERC721Controllable is Ownable, ERC721BasicToken { TokenControllerI public controller; /// @dev Executes transferAllowed() function from the Controller. modifier isAllowed(address _from, address _to) { require(controller.transferAllowed(_from, _to), "controller must allow the transfer"); _; } /// @dev Sets the controller that is going to be used by isAllowed modifier function setController(TokenControllerI _controller) public onlyOwner { require(_controller != address(0), "controller must be a valid address"); controller = _controller; } /// @dev It calls parent StandardToken.transferFrom() function. It will transfer from an address a certain amount of tokens to another address /// @return True if the token is transfered with success function transferFrom(address _from, address _to, uint256 _tokenID) public isAllowed(_from, _to) { super.transferFrom(_from, _to, _tokenID); } } /** * @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 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (_a == 0) { return 0; } 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 _a / _b; } /** * @dev Subtracts 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 c) { c = _a + _b; assert(c >= _a); return c; } } contract StakeToken is ERC721Controllable, POUInterface { EIP20Interface intrinsicToken; uint256 nftNonce; using SafeMath for uint; function numApplications(address prover) external view returns(uint256) { return balanceOf(prover); } function totalStaked(address prover) external view returns(uint256) { return _totalStaked[prover]; } mapping (address => uint256) _totalStaked; mapping (uint256 => uint256) public tokenStake; mapping (uint256 => uint256) public tokenMintedOn; mapping (uint256 => uint256) public tokenBurntOn; constructor(EIP20Interface _token) public { intrinsicToken = _token; } function mint(address mintedTokenOwner, uint256 stake) public returns (uint256 tokenID) { require(msg.sender == mintedTokenOwner, "msg.sender == mintedTokenOwner"); nftNonce += 1; tokenID = nftNonce; tokenStake[tokenID] = stake; tokenMintedOn[tokenID] = block.timestamp; super._mint(mintedTokenOwner, tokenID); require(intrinsicToken.transferFrom(mintedTokenOwner, this, stake), "transferFrom"); return tokenID; } function burn(uint256 tokenID) public { address burntTokenOwner = tokenOwner[tokenID]; require(msg.sender == burntTokenOwner, "msg.sender == burntTokenOwner"); // _burn doesn't do any ownership checks... uint256 stake = tokenStake[tokenID]; super._burn(burntTokenOwner, tokenID); tokenBurntOn[tokenID] = block.timestamp; require(intrinsicToken.transfer(burntTokenOwner, stake), "transfer"); } function removeTokenFrom(address _from, uint256 _tokenId) internal { super.removeTokenFrom(_from, _tokenId); _totalStaked[_from] = _totalStaked[_from].sub(tokenStake[_tokenId]); } function addTokenTo(address _to, uint256 _tokenId) internal { super.addTokenTo(_to, _tokenId); _totalStaked[_to] = _totalStaked[_to].add(tokenStake[_tokenId]); } } contract CSTRegistry { function getGeohash(bytes32 cst) public view returns (bytes32 geohash); function getRadius(bytes32 cst) public view returns (uint256 radius); function getCreatedOn(bytes32 cst) public view returns (uint256 timestamp); function getDeletedOn(bytes32 cst) public view returns (uint256 timestamp); function isTracked(bytes32 cst) public view returns (bool); event TrackedToken(bytes32 cst, address indexed nftAddress, uint256 tokenID, bytes32 geohash, uint256 radius); /* function trackToken(ERC721Basic nftContract, uint256 tokenID, bytes32 geohash, uint256 radius) public returns (bytes32) { require(radius > 0, "radius must be nonzero"); address tokenOwner = nftContract.ownerOf(tokenID); require( msg.sender == address(this) // so that contracts which inherit from this registry and also mint can track without doing approve/transfer gymnastics || tokenOwner == msg.sender // the rest are basically nftContract.isApprovedOrOwner(tokenID, msg.sender), since they made it internal for some bizarre reason || nftContract.getApproved(tokenID) == msg.sender || nftContract.isApprovedForAll(tokenOwner, msg.sender) , "msg.sender must have control over the token or be the registry itself"); bytes32 cst = computeCST(nftContract, tokenID); require(!isTracked(cst), "CST is already tracked"); TrackedToken storage theToken = trackedTokens[cst]; theToken.geohash = geohash; theToken.radius = radius; return cst; } */ function computeCST(address nftContract, uint256 tokenID) public pure returns (bytes32) { return keccak256(abi.encodePacked(nftContract, tokenID)); } } contract SignalToken is StakeToken, CSTRegistry { mapping (uint256 => bytes32) public tokenGeohash; mapping (uint256 => uint256) public tokenRadius; mapping (bytes32 => uint256) public cstToID; constructor(EIP20Interface _token) StakeToken(_token) public { } function mint(address, uint256) public returns (uint256) { revert("use mintSignal(address,uint256,bytes32,uint256) instead"); } function mintSignal(address owner, uint256 stake, bytes32 geohash, uint256 radius) public returns (uint256 tokenID) { tokenID = super.mint(owner, stake); tokenGeohash[tokenID] = geohash; tokenRadius[tokenID] = radius; bytes32 cst = computeCST(address(this), tokenID); cstToID[cst] = tokenID; // To know the stake in a Signal // `stake` will have to be looked up through a join on // `SignalToken.TrackedToken.tokenID` and // `ERC721BasicToken.Transfer(address(0), _, tokenID)` and // `ERC20.Transfer(_, address(nftToken), value)` emit TrackedToken(cst, this, tokenID, geohash, radius); return tokenID; } // implement CSTRegistry function getGeohash(bytes32 cst) public view returns (bytes32 geohash) { return tokenGeohash[cstToID[cst]]; } function getRadius(bytes32 cst) public view returns (uint256 radius) { return tokenRadius[cstToID[cst]]; } function getCreatedOn(bytes32 cst) public view returns (uint256 timestamp) { return tokenMintedOn[cstToID[cst]]; } function getDeletedOn(bytes32 cst) public view returns (uint256 timestamp) { return tokenBurntOn[cstToID[cst]]; } function isTracked(bytes32 cst) public view returns (bool) { return cstToID[cst] != 0; } function name() external pure returns (string) { return "FOAM Signal"; } function symbol() external pure returns (string) { return "FSX"; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[{"name":"_interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"approve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"InterfaceId_ERC165","outputs":[{"name":"","type":"bytes4"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenID","type":"uint256"}],"name":"transferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"cst","type":"bytes32"}],"name":"getRadius","outputs":[{"name":"radius","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"tokenBurntOn","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"","type":"address"},{"name":"","type":"uint256"}],"name":"mint","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"tokenID","type":"uint256"}],"name":"burn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"cst","type":"bytes32"}],"name":"getDeletedOn","outputs":[{"name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"exists","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"prover","type":"address"}],"name":"numApplications","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"nftContract","type":"address"},{"name":"tokenID","type":"uint256"}],"name":"computeCST","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_controller","type":"address"}],"name":"setController","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"tokenGeohash","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"tokenRadius","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"prover","type":"address"}],"name":"totalStaked","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"cst","type":"bytes32"}],"name":"getGeohash","outputs":[{"name":"geohash","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"tokenStake","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"owner","type":"address"},{"name":"stake","type":"uint256"},{"name":"geohash","type":"bytes32"},{"name":"radius","type":"uint256"}],"name":"mintSignal","outputs":[{"name":"tokenID","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"tokenMintedOn","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"cst","type":"bytes32"}],"name":"getCreatedOn","outputs":[{"name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"cstToID","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"cst","type":"bytes32"}],"name":"isTracked","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"controller","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_token","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"cst","type":"bytes32"},{"indexed":true,"name":"nftAddress","type":"address"},{"indexed":false,"name":"tokenID","type":"uint256"},{"indexed":false,"name":"geohash","type":"bytes32"},{"indexed":false,"name":"radius","type":"uint256"}],"name":"TrackedToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":true,"name":"_tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_approved","type":"address"},{"indexed":true,"name":"_tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_operator","type":"address"},{"indexed":false,"name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"}],"name":"OwnershipRenounced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]
Contract Creation Code
608060405234801561001057600080fd5b5060405160208062001aab833981016040525160008054600160a060020a03191633179055806100687f01ffc9a7000000000000000000000000000000000000000000000000000000006401000000006100f2810204565b61009a7f80ac58cd000000000000000000000000000000000000000000000000000000006401000000006100f2810204565b6100cc7f4f558e79000000000000000000000000000000000000000000000000000000006401000000006100f2810204565b60078054600160a060020a031916600160a060020a039290921691909117905550610161565b7fffffffff00000000000000000000000000000000000000000000000000000000808216141561012157600080fd5b7fffffffff00000000000000000000000000000000000000000000000000000000166000908152600160208190526040909120805460ff19169091179055565b61193a80620001716000396000f3006080604052600436106101c15763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301ffc9a781146101c657806306fdde0314610211578063081812fc1461029b578063095ea7b3146102cf57806319fa8f50146102f557806323b872dd1461033c5780632f003cba146103665780633afa8ccb1461039057806340c10f19146103a857806342842e0e146103cc57806342966c68146103f6578063446bff5a1461040e5780634f558e79146104265780636352211e1461043e578063683e52c51461045657806370a0823114610477578063715018a6146104985780637f9d30d6146104ad5780638da5cb5b146104d157806392eefe9b146104e657806395c50b4e1461050757806395d89b411461051f578063984dc94b146105345780639bfd8d611461054c578063a22cb4651461056d578063ac94885f14610593578063b5be9306146105ab578063b7f65439146105c3578063b88d4fde146105ed578063ba3e30e01461065c578063bdb589fe14610674578063d3f8caa51461068c578063d8bcda24146106a4578063e985e9c5146106bc578063f2fde38b146106e3578063f77c479114610704575b600080fd5b3480156101d257600080fd5b506101fd7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1960043516610719565b604080519115158252519081900360200190f35b34801561021d57600080fd5b5061022661074d565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610260578181015183820152602001610248565b50505050905090810190601f16801561028d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102a757600080fd5b506102b3600435610784565b60408051600160a060020a039092168252519081900360200190f35b3480156102db57600080fd5b506102f3600160a060020a036004351660243561079f565b005b34801561030157600080fd5b5061030a610855565b604080517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff199092168252519081900360200190f35b34801561034857600080fd5b506102f3600160a060020a0360043581169060243516604435610879565b34801561037257600080fd5b5061037e6004356109a9565b60408051918252519081900360200190f35b34801561039c57600080fd5b5061037e6004356109c8565b3480156103b457600080fd5b5061037e600160a060020a03600435166024356109da565b3480156103d857600080fd5b506102f3600160a060020a0360043581169060243516604435610a57565b34801561040257600080fd5b506102f3600435610a78565b34801561041a57600080fd5b5061037e600435610c0f565b34801561043257600080fd5b506101fd600435610c2e565b34801561044a57600080fd5b506102b3600435610c4b565b34801561046257600080fd5b5061037e600160a060020a0360043516610c75565b34801561048357600080fd5b5061037e600160a060020a0360043516610c7c565b3480156104a457600080fd5b506102f3610caf565b3480156104b957600080fd5b5061037e600160a060020a0360043516602435610d1b565b3480156104dd57600080fd5b506102b3610dc8565b3480156104f257600080fd5b506102f3600160a060020a0360043516610dd7565b34801561051357600080fd5b5061037e600435610ea8565b34801561052b57600080fd5b50610226610eba565b34801561054057600080fd5b5061037e600435610ef1565b34801561055857600080fd5b5061037e600160a060020a0360043516610f03565b34801561057957600080fd5b506102f3600160a060020a03600435166024351515610f1e565b34801561059f57600080fd5b5061037e600435610fa2565b3480156105b757600080fd5b5061037e600435610fc1565b3480156105cf57600080fd5b5061037e600160a060020a0360043516602435604435606435610fd3565b3480156105f957600080fd5b50604080516020601f6064356004818101359283018490048402850184019095528184526102f394600160a060020a0381358116956024803590921695604435953695608494019181908401838280828437509497506110729650505050505050565b34801561066857600080fd5b5061037e60043561109a565b34801561068057600080fd5b5061037e6004356110ac565b34801561069857600080fd5b5061037e6004356110cb565b3480156106b057600080fd5b506101fd6004356110dd565b3480156106c857600080fd5b506101fd600160a060020a03600435811690602435166110f1565b3480156106ef57600080fd5b506102f3600160a060020a036004351661111f565b34801561071057600080fd5b506102b3611142565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191660009081526001602052604090205460ff1690565b60408051808201909152600b81527f464f414d205369676e616c000000000000000000000000000000000000000000602082015290565b600090815260036020526040902054600160a060020a031690565b60006107aa82610c4b565b9050600160a060020a0383811690821614156107c557600080fd5b33600160a060020a03821614806107e157506107e181336110f1565b15156107ec57600080fd5b600082815260036020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b7f01ffc9a70000000000000000000000000000000000000000000000000000000081565b600654604080517f214e52ca000000000000000000000000000000000000000000000000000000008152600160a060020a0380871660048301528086166024830152915186938693169163214e52ca9160448083019260209291908290030181600087803b1580156108ea57600080fd5b505af11580156108fe573d6000803e3d6000fd5b505050506040513d602081101561091457600080fd5b5051151561099757604080516000805160206118ef833981519152815260206004820152602260248201527f636f6e74726f6c6c6572206d75737420616c6c6f7720746865207472616e736660448201527f6572000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6109a2858585611151565b5050505050565b6000908152600f60209081526040808320548352600e90915290205490565b600c6020526000908152604090205481565b604080516000805160206118ef833981519152815260206004820152603760248201527f757365206d696e745369676e616c28616464726573732c75696e743235362c6260448201527f7974657333322c75696e743235362920696e73746561640000000000000000006064820152905160009181900360840190fd5b610a738383836020604051908101604052806000815250611072565b505050565b600081815260026020526040812054600160a060020a031690338214610aed57604080516000805160206118ef833981519152815260206004820152601d60248201527f6d73672e73656e646572203d3d206275726e74546f6b656e4f776e6572000000604482015290519081900360640190fd5b506000828152600a6020526040902054610b0782846111f4565b6000838152600c6020908152604080832042905560075481517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a038781166004830152602482018790529251929091169363a9059cbb9360448084019491939192918390030190829087803b158015610b8857600080fd5b505af1158015610b9c573d6000803e3d6000fd5b505050506040513d6020811015610bb257600080fd5b50511515610a7357604080516000805160206118ef833981519152815260206004820152600860248201527f7472616e73666572000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000908152600f60209081526040808320548352600c90915290205490565b600090815260026020526040902054600160a060020a0316151590565b600081815260026020526040812054600160a060020a0316801515610c6f57600080fd5b92915050565b6000610c6f825b6000600160a060020a0382161515610c9357600080fd5b50600160a060020a031660009081526004602052604090205490565b600054600160a060020a03163314610cc657600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600082826040516020018083600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310610d955780518252601f199092019160209182019101610d76565b5181516020939093036101000a600019018019909116921691909117905260405192018290039091209695505050505050565b600054600160a060020a031681565b600054600160a060020a03163314610dee57600080fd5b600160a060020a0381161515610e7957604080516000805160206118ef833981519152815260206004820152602260248201527f636f6e74726f6c6c6572206d75737420626520612076616c696420616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600d6020526000908152604090205481565b60408051808201909152600381527f4653580000000000000000000000000000000000000000000000000000000000602082015290565b600e6020526000908152604090205481565b600160a060020a031660009081526009602052604090205490565b600160a060020a038216331415610f3457600080fd5b336000818152600560209081526040808320600160a060020a03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b6000908152600f60209081526040808320548352600d90915290205490565b600a6020526000908152604090205481565b600080610fe08686611244565b6000818152600d60209081526040808320889055600e9091529020849055915061100a3083610d1b565b6000818152600f6020908152604091829020859055815183815290810185905280820187905260608101869052905191925030917fae066be719a025aa84ce2e5cb92f496010fb4a339d6d9a2aac332be5770d471a9181900360800190a25b50949350505050565b61107d848484610879565b611089848484846113db565b151561109457600080fd5b50505050565b600b6020526000908152604090205481565b6000908152600f60209081526040808320548352600b90915290205490565b600f6020526000908152604090205481565b6000908152600f6020526040902054151590565b600160a060020a03918216600090815260056020908152604080832093909416825291909152205460ff1690565b600054600160a060020a0316331461113657600080fd5b61113f81611558565b50565b600654600160a060020a031681565b61115b33826115d5565b151561116657600080fd5b600160a060020a038316151561117b57600080fd5b600160a060020a038216151561119057600080fd5b61119a8382611634565b6111a483826116a5565b6111ae8282611705565b8082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6111fe8282611634565b61120882826116a5565b6040518190600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600033600160a060020a038416146112ab57604080516000805160206118ef833981519152815260206004820152601e60248201527f6d73672e73656e646572203d3d206d696e746564546f6b656e4f776e65720000604482015290519081900360640190fd5b5060088054600101908190556000818152600a60209081526040808320859055600b90915290204290556112df8382611745565b600754604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a03868116600483015230602483015260448201869052915191909216916323b872dd9160648083019260209291908290030181600087803b15801561135457600080fd5b505af1158015611368573d6000803e3d6000fd5b505050506040513d602081101561137e57600080fd5b50511515610c6f57604080516000805160206118ef833981519152815260206004820152600c60248201527f7472616e7366657246726f6d0000000000000000000000000000000000000000604482015290519081900360640190fd5b6000806113f085600160a060020a03166117a0565b15156113ff5760019150611069565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081523360048201818152600160a060020a03898116602485015260448401889052608060648501908152875160848601528751918a169463150b7a0294938c938b938b93909160a490910190602085019080838360005b8381101561149257818101518382015260200161147a565b50505050905090810190601f1680156114bf5780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b1580156114e157600080fd5b505af11580156114f5573d6000803e3d6000fd5b505050506040513d602081101561150b57600080fd5b50517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f150b7a0200000000000000000000000000000000000000000000000000000000149695505050505050565b600160a060020a038116151561156d57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000806115e183610c4b565b905080600160a060020a031684600160a060020a0316148061161c575083600160a060020a031661161184610784565b600160a060020a0316145b8061162c575061162c81856110f1565b949350505050565b81600160a060020a031661164782610c4b565b600160a060020a03161461165a57600080fd5b600081815260036020526040902054600160a060020a0316156116a1576000818152600360205260409020805473ffffffffffffffffffffffffffffffffffffffff191690555b5050565b6116af82826117a8565b6000818152600a6020908152604080832054600160a060020a03861684526009909252909120546116e59163ffffffff61183e16565b600160a060020a0390921660009081526009602052604090209190915550565b61170f8282611850565b6000818152600a6020908152604080832054600160a060020a03861684526009909252909120546116e59163ffffffff6118e116565b600160a060020a038216151561175a57600080fd5b6117648282611705565b6040518190600160a060020a038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000903b1190565b81600160a060020a03166117bb82610c4b565b600160a060020a0316146117ce57600080fd5b600160a060020a0382166000908152600460205260409020546117f890600163ffffffff61183e16565b600160a060020a03909216600090815260046020908152604080832094909455918152600290915220805473ffffffffffffffffffffffffffffffffffffffff19169055565b60008282111561184a57fe5b50900390565b600081815260026020526040902054600160a060020a03161561187257600080fd5b6000818152600260209081526040808320805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038716908117909155835260049091529020546118c19060016118e1565b600160a060020a0390921660009081526004602052604090209190915550565b81810182811015610c6f57fe0008c379a000000000000000000000000000000000000000000000000000000000a165627a7a723058209ed8cc0b3cd4cc409d99c7c60edbaa8ca1050c4d6c06f13ba729301542023c1e00290000000000000000000000004946fcea7c692606e8908002e55a582af44ac121
Deployed Bytecode
0x6080604052600436106101c15763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301ffc9a781146101c657806306fdde0314610211578063081812fc1461029b578063095ea7b3146102cf57806319fa8f50146102f557806323b872dd1461033c5780632f003cba146103665780633afa8ccb1461039057806340c10f19146103a857806342842e0e146103cc57806342966c68146103f6578063446bff5a1461040e5780634f558e79146104265780636352211e1461043e578063683e52c51461045657806370a0823114610477578063715018a6146104985780637f9d30d6146104ad5780638da5cb5b146104d157806392eefe9b146104e657806395c50b4e1461050757806395d89b411461051f578063984dc94b146105345780639bfd8d611461054c578063a22cb4651461056d578063ac94885f14610593578063b5be9306146105ab578063b7f65439146105c3578063b88d4fde146105ed578063ba3e30e01461065c578063bdb589fe14610674578063d3f8caa51461068c578063d8bcda24146106a4578063e985e9c5146106bc578063f2fde38b146106e3578063f77c479114610704575b600080fd5b3480156101d257600080fd5b506101fd7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1960043516610719565b604080519115158252519081900360200190f35b34801561021d57600080fd5b5061022661074d565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610260578181015183820152602001610248565b50505050905090810190601f16801561028d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102a757600080fd5b506102b3600435610784565b60408051600160a060020a039092168252519081900360200190f35b3480156102db57600080fd5b506102f3600160a060020a036004351660243561079f565b005b34801561030157600080fd5b5061030a610855565b604080517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff199092168252519081900360200190f35b34801561034857600080fd5b506102f3600160a060020a0360043581169060243516604435610879565b34801561037257600080fd5b5061037e6004356109a9565b60408051918252519081900360200190f35b34801561039c57600080fd5b5061037e6004356109c8565b3480156103b457600080fd5b5061037e600160a060020a03600435166024356109da565b3480156103d857600080fd5b506102f3600160a060020a0360043581169060243516604435610a57565b34801561040257600080fd5b506102f3600435610a78565b34801561041a57600080fd5b5061037e600435610c0f565b34801561043257600080fd5b506101fd600435610c2e565b34801561044a57600080fd5b506102b3600435610c4b565b34801561046257600080fd5b5061037e600160a060020a0360043516610c75565b34801561048357600080fd5b5061037e600160a060020a0360043516610c7c565b3480156104a457600080fd5b506102f3610caf565b3480156104b957600080fd5b5061037e600160a060020a0360043516602435610d1b565b3480156104dd57600080fd5b506102b3610dc8565b3480156104f257600080fd5b506102f3600160a060020a0360043516610dd7565b34801561051357600080fd5b5061037e600435610ea8565b34801561052b57600080fd5b50610226610eba565b34801561054057600080fd5b5061037e600435610ef1565b34801561055857600080fd5b5061037e600160a060020a0360043516610f03565b34801561057957600080fd5b506102f3600160a060020a03600435166024351515610f1e565b34801561059f57600080fd5b5061037e600435610fa2565b3480156105b757600080fd5b5061037e600435610fc1565b3480156105cf57600080fd5b5061037e600160a060020a0360043516602435604435606435610fd3565b3480156105f957600080fd5b50604080516020601f6064356004818101359283018490048402850184019095528184526102f394600160a060020a0381358116956024803590921695604435953695608494019181908401838280828437509497506110729650505050505050565b34801561066857600080fd5b5061037e60043561109a565b34801561068057600080fd5b5061037e6004356110ac565b34801561069857600080fd5b5061037e6004356110cb565b3480156106b057600080fd5b506101fd6004356110dd565b3480156106c857600080fd5b506101fd600160a060020a03600435811690602435166110f1565b3480156106ef57600080fd5b506102f3600160a060020a036004351661111f565b34801561071057600080fd5b506102b3611142565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191660009081526001602052604090205460ff1690565b60408051808201909152600b81527f464f414d205369676e616c000000000000000000000000000000000000000000602082015290565b600090815260036020526040902054600160a060020a031690565b60006107aa82610c4b565b9050600160a060020a0383811690821614156107c557600080fd5b33600160a060020a03821614806107e157506107e181336110f1565b15156107ec57600080fd5b600082815260036020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b7f01ffc9a70000000000000000000000000000000000000000000000000000000081565b600654604080517f214e52ca000000000000000000000000000000000000000000000000000000008152600160a060020a0380871660048301528086166024830152915186938693169163214e52ca9160448083019260209291908290030181600087803b1580156108ea57600080fd5b505af11580156108fe573d6000803e3d6000fd5b505050506040513d602081101561091457600080fd5b5051151561099757604080516000805160206118ef833981519152815260206004820152602260248201527f636f6e74726f6c6c6572206d75737420616c6c6f7720746865207472616e736660448201527f6572000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6109a2858585611151565b5050505050565b6000908152600f60209081526040808320548352600e90915290205490565b600c6020526000908152604090205481565b604080516000805160206118ef833981519152815260206004820152603760248201527f757365206d696e745369676e616c28616464726573732c75696e743235362c6260448201527f7974657333322c75696e743235362920696e73746561640000000000000000006064820152905160009181900360840190fd5b610a738383836020604051908101604052806000815250611072565b505050565b600081815260026020526040812054600160a060020a031690338214610aed57604080516000805160206118ef833981519152815260206004820152601d60248201527f6d73672e73656e646572203d3d206275726e74546f6b656e4f776e6572000000604482015290519081900360640190fd5b506000828152600a6020526040902054610b0782846111f4565b6000838152600c6020908152604080832042905560075481517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a038781166004830152602482018790529251929091169363a9059cbb9360448084019491939192918390030190829087803b158015610b8857600080fd5b505af1158015610b9c573d6000803e3d6000fd5b505050506040513d6020811015610bb257600080fd5b50511515610a7357604080516000805160206118ef833981519152815260206004820152600860248201527f7472616e73666572000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000908152600f60209081526040808320548352600c90915290205490565b600090815260026020526040902054600160a060020a0316151590565b600081815260026020526040812054600160a060020a0316801515610c6f57600080fd5b92915050565b6000610c6f825b6000600160a060020a0382161515610c9357600080fd5b50600160a060020a031660009081526004602052604090205490565b600054600160a060020a03163314610cc657600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600082826040516020018083600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310610d955780518252601f199092019160209182019101610d76565b5181516020939093036101000a600019018019909116921691909117905260405192018290039091209695505050505050565b600054600160a060020a031681565b600054600160a060020a03163314610dee57600080fd5b600160a060020a0381161515610e7957604080516000805160206118ef833981519152815260206004820152602260248201527f636f6e74726f6c6c6572206d75737420626520612076616c696420616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600d6020526000908152604090205481565b60408051808201909152600381527f4653580000000000000000000000000000000000000000000000000000000000602082015290565b600e6020526000908152604090205481565b600160a060020a031660009081526009602052604090205490565b600160a060020a038216331415610f3457600080fd5b336000818152600560209081526040808320600160a060020a03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b6000908152600f60209081526040808320548352600d90915290205490565b600a6020526000908152604090205481565b600080610fe08686611244565b6000818152600d60209081526040808320889055600e9091529020849055915061100a3083610d1b565b6000818152600f6020908152604091829020859055815183815290810185905280820187905260608101869052905191925030917fae066be719a025aa84ce2e5cb92f496010fb4a339d6d9a2aac332be5770d471a9181900360800190a25b50949350505050565b61107d848484610879565b611089848484846113db565b151561109457600080fd5b50505050565b600b6020526000908152604090205481565b6000908152600f60209081526040808320548352600b90915290205490565b600f6020526000908152604090205481565b6000908152600f6020526040902054151590565b600160a060020a03918216600090815260056020908152604080832093909416825291909152205460ff1690565b600054600160a060020a0316331461113657600080fd5b61113f81611558565b50565b600654600160a060020a031681565b61115b33826115d5565b151561116657600080fd5b600160a060020a038316151561117b57600080fd5b600160a060020a038216151561119057600080fd5b61119a8382611634565b6111a483826116a5565b6111ae8282611705565b8082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6111fe8282611634565b61120882826116a5565b6040518190600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600033600160a060020a038416146112ab57604080516000805160206118ef833981519152815260206004820152601e60248201527f6d73672e73656e646572203d3d206d696e746564546f6b656e4f776e65720000604482015290519081900360640190fd5b5060088054600101908190556000818152600a60209081526040808320859055600b90915290204290556112df8382611745565b600754604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a03868116600483015230602483015260448201869052915191909216916323b872dd9160648083019260209291908290030181600087803b15801561135457600080fd5b505af1158015611368573d6000803e3d6000fd5b505050506040513d602081101561137e57600080fd5b50511515610c6f57604080516000805160206118ef833981519152815260206004820152600c60248201527f7472616e7366657246726f6d0000000000000000000000000000000000000000604482015290519081900360640190fd5b6000806113f085600160a060020a03166117a0565b15156113ff5760019150611069565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081523360048201818152600160a060020a03898116602485015260448401889052608060648501908152875160848601528751918a169463150b7a0294938c938b938b93909160a490910190602085019080838360005b8381101561149257818101518382015260200161147a565b50505050905090810190601f1680156114bf5780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b1580156114e157600080fd5b505af11580156114f5573d6000803e3d6000fd5b505050506040513d602081101561150b57600080fd5b50517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f150b7a0200000000000000000000000000000000000000000000000000000000149695505050505050565b600160a060020a038116151561156d57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000806115e183610c4b565b905080600160a060020a031684600160a060020a0316148061161c575083600160a060020a031661161184610784565b600160a060020a0316145b8061162c575061162c81856110f1565b949350505050565b81600160a060020a031661164782610c4b565b600160a060020a03161461165a57600080fd5b600081815260036020526040902054600160a060020a0316156116a1576000818152600360205260409020805473ffffffffffffffffffffffffffffffffffffffff191690555b5050565b6116af82826117a8565b6000818152600a6020908152604080832054600160a060020a03861684526009909252909120546116e59163ffffffff61183e16565b600160a060020a0390921660009081526009602052604090209190915550565b61170f8282611850565b6000818152600a6020908152604080832054600160a060020a03861684526009909252909120546116e59163ffffffff6118e116565b600160a060020a038216151561175a57600080fd5b6117648282611705565b6040518190600160a060020a038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000903b1190565b81600160a060020a03166117bb82610c4b565b600160a060020a0316146117ce57600080fd5b600160a060020a0382166000908152600460205260409020546117f890600163ffffffff61183e16565b600160a060020a03909216600090815260046020908152604080832094909455918152600290915220805473ffffffffffffffffffffffffffffffffffffffff19169055565b60008282111561184a57fe5b50900390565b600081815260026020526040902054600160a060020a03161561187257600080fd5b6000818152600260209081526040808320805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038716908117909155835260049091529020546118c19060016118e1565b600160a060020a0390921660009081526004602052604090209190915550565b81810182811015610c6f57fe0008c379a000000000000000000000000000000000000000000000000000000000a165627a7a723058209ed8cc0b3cd4cc409d99c7c60edbaa8ca1050c4d6c06f13ba729301542023c1e0029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000004946fcea7c692606e8908002e55a582af44ac121
-----Decoded View---------------
Arg [0] : _token (address): 0x4946Fcea7C692606e8908002e55A582af44AC121
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000004946fcea7c692606e8908002e55a582af44ac121
Swarm Source
bzzr://9ed8cc0b3cd4cc409d99c7c60edbaa8ca1050c4d6c06f13ba729301542023c1e
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.