Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Update Authorize... | 7706284 | 2122 days ago | IN | 0 ETH | 0.00013113 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x192eA2a8...85aBe2aA0 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
SoarStorage
Compiler Version
v0.5.2+commit.1df8f40c
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2019-05-03 */ pragma solidity ^0.5.2; // File: node_modules/openzeppelin-solidity/contracts/access/Roles.sol /** * @title Roles * @dev Library for managing addresses assigned to a Role. */ library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an account access to this role */ function add(Role storage role, address account) internal { require(account != address(0)); require(!has(role, account)); role.bearer[account] = true; } /** * @dev remove an account's access to this role */ function remove(Role storage role, address account) internal { require(account != address(0)); require(has(role, account)); role.bearer[account] = false; } /** * @dev check if an account has this role * @return bool */ function has(Role storage role, address account) internal view returns (bool) { require(account != address(0)); return role.bearer[account]; } } // File: contracts/Adminable.sol contract Adminable { using Roles for Roles.Role; event AdminAdded(address indexed account); event AdminRemoved(address indexed account); Roles.Role private _admins; constructor () internal { _addAdmin(msg.sender); } modifier onlyAdmin() { require(isAdmin(msg.sender)); _; } function isAdmin(address account) public view returns (bool) { return _admins.has(account); } function addAdmin(address account) public onlyAdmin { _addAdmin(account); } function renounceAdmin() public { _removeAdmin(msg.sender); } function _addAdmin(address account) internal { _admins.add(account); emit AdminAdded(account); } function _removeAdmin(address account) internal { _admins.remove(account); emit AdminRemoved(account); } } // File: contracts/Authorizable.sol contract Authorizable is Adminable { address public authorizedAddress; modifier onlyAuthorized() { require(msg.sender == authorizedAddress); _; } function updateAuthorizedAddress(address _address) onlyAdmin public { authorizedAddress = _address; } } // File: contracts/SoarStorage.sol /** @title Soar Storage @author Marek Tlacbaba ([email protected]) @dev This smart contract behave as simple storage and can be accessed only by authorized caller who is responsible for any checks and validation. The authorized caller can updated by admins so it allows to update application logic and keeping data and events untouched. */ //TODO // use safeMath contract SoarStorage is Authorizable { /** Status: 0 - unknown 1 - created 2 - updated 3 - deleted */ struct ListingObject { address owner; address sponsor; bytes12 geohash; mapping (address => mapping (bytes32 => uint )) sales; uint256 salesCount; uint8 status; } uint public counter = 0; mapping (bytes32 => ListingObject) internal listings; event Listing ( bytes32 filehash, address indexed owner, address indexed sponsor, string previewUrl, string url, string pointWKT, bytes12 geohash, string metadata ); event ListingUpdated ( bytes32 filehash, address indexed owner, address indexed sponsor, string previewUrl, string url, string pointWKT, bytes12 geohash, string metadata ); event ListingDeleted ( bytes32 filehash, address indexed owner, address indexed sponsor ); event Sale( address indexed buyer, bytes32 id, address indexed owner, address sponsor, bytes32 indexed filehash, uint price ); function putListing ( bytes32 _filehash, address _owner, address _sponsor, string memory _previewUrl, string memory _url, string memory _pointWKT, bytes12 _geohash, string memory _metadata ) public onlyAuthorized { listings[_filehash].owner = _owner; listings[_filehash].sponsor = _sponsor; listings[_filehash].geohash = _geohash; listings[_filehash].status = 1; counter++; emit Listing( _filehash, _owner, _sponsor, _previewUrl, _url, _pointWKT, _geohash, _metadata ); } function updateListing ( bytes32 _filehash, address _owner, address _sponsor, string memory _previewUrl, string memory _url, string memory _pointWKT, bytes12 _geohash, string memory _metadata ) public onlyAuthorized { listings[_filehash].geohash = _geohash; listings[_filehash].status = 2; emit ListingUpdated( _filehash, _owner, _sponsor, _previewUrl, _url, _pointWKT, _geohash, _metadata ); } function deleteListing( bytes32 _filehash ) public onlyAuthorized { listings[_filehash].status = 3; counter--; emit ListingDeleted(_filehash, listings[_filehash].owner, listings[_filehash].sponsor); } function putSale ( address _buyer, bytes32 _id, bytes32 _filehash, uint256 _price ) public onlyAuthorized { listings[_filehash].sales[_buyer][_id] = _price; listings[_filehash].salesCount++; emit Sale(_buyer, _id, listings[_filehash].owner, listings[_filehash].sponsor, _filehash, _price); } function getListingDetails(bytes32 _filehash, address _user, bytes32 _id) public view returns ( address owner_, address sponsor_, bytes12 geohash_, uint8 status_, uint256 sale_ ) { owner_ = listings[_filehash].owner; sponsor_ = listings[_filehash].sponsor; geohash_ = listings[_filehash].geohash; status_ = listings[_filehash].status; sale_ = listings[_filehash].sales[_user][_id]; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"isAdmin","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"}],"name":"updateAuthorizedAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"authorizedAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_filehash","type":"bytes32"},{"name":"_owner","type":"address"},{"name":"_sponsor","type":"address"},{"name":"_previewUrl","type":"string"},{"name":"_url","type":"string"},{"name":"_pointWKT","type":"string"},{"name":"_geohash","type":"bytes12"},{"name":"_metadata","type":"string"}],"name":"updateListing","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"counter","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"addAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_buyer","type":"address"},{"name":"_id","type":"bytes32"},{"name":"_filehash","type":"bytes32"},{"name":"_price","type":"uint256"}],"name":"putSale","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_filehash","type":"bytes32"},{"name":"_owner","type":"address"},{"name":"_sponsor","type":"address"},{"name":"_previewUrl","type":"string"},{"name":"_url","type":"string"},{"name":"_pointWKT","type":"string"},{"name":"_geohash","type":"bytes12"},{"name":"_metadata","type":"string"}],"name":"putListing","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_filehash","type":"bytes32"}],"name":"deleteListing","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_filehash","type":"bytes32"},{"name":"_user","type":"address"},{"name":"_id","type":"bytes32"}],"name":"getListingDetails","outputs":[{"name":"owner_","type":"address"},{"name":"sponsor_","type":"address"},{"name":"geohash_","type":"bytes12"},{"name":"status_","type":"uint8"},{"name":"sale_","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"filehash","type":"bytes32"},{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"sponsor","type":"address"},{"indexed":false,"name":"previewUrl","type":"string"},{"indexed":false,"name":"url","type":"string"},{"indexed":false,"name":"pointWKT","type":"string"},{"indexed":false,"name":"geohash","type":"bytes12"},{"indexed":false,"name":"metadata","type":"string"}],"name":"Listing","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"filehash","type":"bytes32"},{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"sponsor","type":"address"},{"indexed":false,"name":"previewUrl","type":"string"},{"indexed":false,"name":"url","type":"string"},{"indexed":false,"name":"pointWKT","type":"string"},{"indexed":false,"name":"geohash","type":"bytes12"},{"indexed":false,"name":"metadata","type":"string"}],"name":"ListingUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"filehash","type":"bytes32"},{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"sponsor","type":"address"}],"name":"ListingDeleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"buyer","type":"address"},{"indexed":false,"name":"id","type":"bytes32"},{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"sponsor","type":"address"},{"indexed":true,"name":"filehash","type":"bytes32"},{"indexed":false,"name":"price","type":"uint256"}],"name":"Sale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"AdminAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"AdminRemoved","type":"event"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100c6576000357c010000000000000000000000000000000000000000000000000000000090048063704802751161008e57806370480275146104bf57806373596ee014610503578063741a1b0f146105655780638bad0c0a14610851578063d0491b9b1461085b578063de4108aa14610889576100c6565b806324d7806c146100cb57806328d389bc146101275780635539d4001461016b5780635e6ea10f146101b557806361bc221a146104a1575b600080fd5b61010d600480360360208110156100e157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061099d565b604051808215151515815260200191505060405180910390f35b6101696004803603602081101561013d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109ba565b005b610173610a12565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61049f60048036036101008110156101cc57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561023357600080fd5b82018360208201111561024557600080fd5b8035906020019184600183028401116401000000008311171561026757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156102ca57600080fd5b8201836020820111156102dc57600080fd5b803590602001918460018302840111640100000000831117156102fe57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561036157600080fd5b82018360208201111561037357600080fd5b8035906020019184600183028401116401000000008311171561039557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff191690602001909291908035906020019064010000000081111561041957600080fd5b82018360208201111561042b57600080fd5b8035906020019184600183028401116401000000008311171561044d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610a38565b005b6104a9610d6c565b6040518082815260200191505060405180910390f35b610501600480360360208110156104d557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d72565b005b6105636004803603608081101561051957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050610d92565b005b61084f600480360361010081101561057c57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156105e357600080fd5b8201836020820111156105f557600080fd5b8035906020019184600183028401116401000000008311171561061757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561067a57600080fd5b82018360208201111561068c57600080fd5b803590602001918460018302840111640100000000831117156106ae57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561071157600080fd5b82018360208201111561072357600080fd5b8035906020019184600183028401116401000000008311171561074557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff19169060200190929190803590602001906401000000008111156107c957600080fd5b8201836020820111156107db57600080fd5b803590602001918460018302840111640100000000831117156107fd57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610f91565b005b610859611381565b005b6108876004803603602081101561087157600080fd5b810190808035906020019092919050505061138c565b005b6108df6004803603606081101561089f57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506114fe565b604051808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff191681526020018360ff1660ff1681526020018281526020019550505050505060405180910390f35b60006109b382600061164a90919063ffffffff16565b9050919050565b6109c33361099d565b15156109ce57600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a9457600080fd5b81600360008a815260200190815260200160002060010160146101000a8154816bffffffffffffffffffffffff021916908374010000000000000000000000000000000000000000900402179055506002600360008a815260200190815260200160002060040160006101000a81548160ff021916908360ff1602179055508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f63da2c9773927c3e19d257cbc705bf76126b7722afcbe7be1147ad9473ba96898a8888888888604051808781526020018060200180602001806020018673ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff191681526020018060200185810385528a818151815260200191508051906020019080838360005b83811015610bee578082015181840152602081019050610bd3565b50505050905090810190601f168015610c1b5780820380516001836020036101000a031916815260200191505b50858103845289818151815260200191508051906020019080838360005b83811015610c54578082015181840152602081019050610c39565b50505050905090810190601f168015610c815780820380516001836020036101000a031916815260200191505b50858103835288818151815260200191508051906020019080838360005b83811015610cba578082015181840152602081019050610c9f565b50505050905090810190601f168015610ce75780820380516001836020036101000a031916815260200191505b50858103825286818151815260200191508051906020019080838360005b83811015610d20578082015181840152602081019050610d05565b50505050905090810190601f168015610d4d5780820380516001836020036101000a031916815260200191505b509a505050505050505050505060405180910390a35050505050505050565b60025481565b610d7b3361099d565b1515610d8657600080fd5b610d8f816116de565b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610dee57600080fd5b806003600084815260200190815260200160002060020160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000858152602001908152602001600020819055506003600083815260200190815260200160002060030160008154809291906001019190505550816003600084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fa3871ea6af4ae9f6ccd693738ddfb2ce921a7fe251d1379c87abf912d8389299866003600088815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1686604051808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a450505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610fed57600080fd5b86600360008a815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555085600360008a815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600360008a815260200190815260200160002060010160146101000a8154816bffffffffffffffffffffffff021916908374010000000000000000000000000000000000000000900402179055506001600360008a815260200190815260200160002060040160006101000a81548160ff021916908360ff1602179055506002600081548092919060010191905055508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f7449a451c4449725ac61ce8eaf8246eb1beaed3066c5e6484bf03f0a0ea171cc8a8888888888604051808781526020018060200180602001806020018673ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff191681526020018060200185810385528a818151815260200191508051906020019080838360005b838110156112035780820151818401526020810190506111e8565b50505050905090810190601f1680156112305780820380516001836020036101000a031916815260200191505b50858103845289818151815260200191508051906020019080838360005b8381101561126957808201518184015260208101905061124e565b50505050905090810190601f1680156112965780820380516001836020036101000a031916815260200191505b50858103835288818151815260200191508051906020019080838360005b838110156112cf5780820151818401526020810190506112b4565b50505050905090810190601f1680156112fc5780820380516001836020036101000a031916815260200191505b50858103825286818151815260200191508051906020019080838360005b8381101561133557808201518184015260208101905061131a565b50505050905090810190601f1680156113625780820380516001836020036101000a031916815260200191505b509a505050505050505050505060405180910390a35050505050505050565b61138a33611738565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156113e857600080fd5b600380600083815260200190815260200160002060040160006101000a81548160ff021916908360ff160217905550600260008154809291906001900391905055506003600082815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166003600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f4e64575058ad2cead54cf6af35850f08388147925a68d6d9fb75161d89d5b586836040518082815260200191505060405180910390a350565b60008060008060006003600089815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1694506003600089815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1693506003600089815260200190815260200160002060010160149054906101000a9004740100000000000000000000000000000000000000000292506003600089815260200190815260200160002060040160009054906101000a900460ff1691506003600089815260200190815260200160002060020160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000878152602001908152602001600020549050939792965093509350565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561168757600080fd5b8260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6116f281600061179290919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f44d6d25963f097ad14f29f06854a01f575648a1ef82f30e562ccd3889717e33960405160405180910390a250565b61174c81600061184290919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167fa3b62bc36326052d97ea62d63c3d60308ed4c3ea8ac079dd8499f1e9c4f80c0f60405160405180910390a250565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156117ce57600080fd5b6117d8828261164a565b1515156117e457600080fd5b60018260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561187e57600080fd5b611888828261164a565b151561189357600080fd5b60008260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550505056fea165627a7a72305820f715806698f0d99c799931f03f14096a03f997bdfd17559b88de454567ed91d10029
Swarm Source
bzzr://f715806698f0d99c799931f03f14096a03f997bdfd17559b88de454567ed91d1
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.