Sponsored Link:   ARNA Genomics - FIRST BLOCKCHAIN BIOTECH ECOSYSTEM. Join ICO Now!
Contract Overview
ETH Balance: 0 Ether
ETH USD Value: $0
No Of Transactions: 280 txns
  Latest 25 txns from a total Of 280 transactions View All

TxHash Age From To Value [TxFee]
0x83506839ddb79d09ed47a24f38c775f1dc0b361da18cd4b6e4c215cabba2810763 days 19 hrs ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f  IN   0x2138ffe292fd0953f7fe2569111246e4de9ff1dc0 Ether0.000125158
0x8c1af03086a3cfc6b37280f8cf70e554ad11217474132dd18afa5509a87761d263 days 20 hrs ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f  IN   0x2138ffe292fd0953f7fe2569111246e4de9ff1dc0 Ether0.000125158
0xcf099285bff18525fe56ace8edce41183551ebf3443c1d430052a4ad799e42c963 days 21 hrs ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f  IN   0x2138ffe292fd0953f7fe2569111246e4de9ff1dc0 Ether0.000125158
0x081b231a3d07e3ea9051723ff057f1b96817f0da499e7f9a58ef14a8cce3618563 days 22 hrs ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f  IN   0x2138ffe292fd0953f7fe2569111246e4de9ff1dc0 Ether0.000125158
0xf8ead812305f7a0a353c401b2cb10611777a64f02b2911182781ea362d22539263 days 23 hrs ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f  IN   0x2138ffe292fd0953f7fe2569111246e4de9ff1dc0 Ether0.000125158
0x2f8ec8b23c2602b3bb31b8077a709f0e275fa8868fb0c7d0645a9544a984795c64 days 41 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f  IN   0x2138ffe292fd0953f7fe2569111246e4de9ff1dc0 Ether0.000125158
0x95f9e14ef0289aef73265794695b943f6a66b8608f854aabecfc3f11cf79131f64 days 1 hr ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f  IN   0x2138ffe292fd0953f7fe2569111246e4de9ff1dc0 Ether0.000125158
0x0ba5c9f6aacc02043bb5234558528e9707e74ca8ec6900697de34b117c5acb3564 days 3 hrs ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f  IN   0x2138ffe292fd0953f7fe2569111246e4de9ff1dc0 Ether0.000125158
0xdca2e3f4fe9f68242c4bb3ae8b778b27afb26816c4f44ae1954c4c466f6bb9cf64 days 5 hrs ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f  IN   0x2138ffe292fd0953f7fe2569111246e4de9ff1dc0 Ether0.000250316
0x03979f882bc53efa5ec93ab243d17119b77b8cce27a7b440fe7744885a746a2064 days 7 hrs ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f  IN   0x2138ffe292fd0953f7fe2569111246e4de9ff1dc0 Ether0.000250316
0x7b44bebbcb60df7bbfca51b7d8f67053c5cd910036bdf3ec73f7de1975f9351164 days 9 hrs ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f  IN   0x2138ffe292fd0953f7fe2569111246e4de9ff1dc0 Ether0.000250316
0xeb6a49e5a5a3cb4f02c0f4a76c7bef82a79a8ecda3ceb02ee542ee422517102e64 days 11 hrs ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f  IN   0x2138ffe292fd0953f7fe2569111246e4de9ff1dc0 Ether0.000250316
0xa66dfa1e66e03f51ebf39b5392fa894e8142f8b8411e6f89c2fafcf61f1006b764 days 13 hrs ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f  IN   0x2138ffe292fd0953f7fe2569111246e4de9ff1dc0 Ether0.000250316
0x862d91663e3fc0c915f98d1a1e8d67e84920eb0081823a599df5cc06e210623064 days 15 hrs ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f  IN   0x2138ffe292fd0953f7fe2569111246e4de9ff1dc0 Ether0.000250316
0xeb13a03bc797017c01118d848e512f361ad96fdfa1665d47226ddc11526b420364 days 17 hrs ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f  IN   0x2138ffe292fd0953f7fe2569111246e4de9ff1dc0 Ether0.000250316
0x13c6fc99acddf3118ea76d317bebfc47dab5571be48149414ca0aec154fb527664 days 19 hrs ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f  IN   0x2138ffe292fd0953f7fe2569111246e4de9ff1dc0 Ether0.000250316
0x9de3054371e1741e0cc9b35098e6556f6d52770eabcae88afef9a1b30bd20fa764 days 21 hrs ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f  IN   0x2138ffe292fd0953f7fe2569111246e4de9ff1dc0 Ether0.000250316
0xd44ce24433740a7862f97532097723ed7a49da8359b1f4e5e3fd1547ec8c41a564 days 23 hrs ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f  IN   0x2138ffe292fd0953f7fe2569111246e4de9ff1dc0 Ether0.000250316
0x5f4e89050273a7641c39186167ed540a25e1e8a78e1dca7989320463f88f67a265 days 1 hr ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f  IN   0x2138ffe292fd0953f7fe2569111246e4de9ff1dc0 Ether0.000250316
0xffab8fd47b348d75e55109f891637953eb5af83fa3dfd1713f319649939b96a765 days 3 hrs ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f  IN   0x2138ffe292fd0953f7fe2569111246e4de9ff1dc0 Ether0.00025006
0xe2992e40b0b4e047460eba8024ddd6d372dda72aa5bdc8840adafb14bf959e7065 days 5 hrs ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f  IN   0x2138ffe292fd0953f7fe2569111246e4de9ff1dc0 Ether0.000250316
0xb31e28b23b48f195e661c12d910b9b55fb9898690aa6e5fe64d347b18938f0bc65 days 7 hrs ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f  IN   0x2138ffe292fd0953f7fe2569111246e4de9ff1dc0 Ether0.000250316
0x383bd1417fdad7184f4566826bc52a363128ddb922a2c960cf1cafe08407add765 days 9 hrs ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f  IN   0x2138ffe292fd0953f7fe2569111246e4de9ff1dc0 Ether0.000250316
0x2fb9b93739da3487cf70bba9e533117c57be8b6d587625351094851b13eaee7c65 days 11 hrs ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f  IN   0x2138ffe292fd0953f7fe2569111246e4de9ff1dc0 Ether0.000250316
0x721fc2175f14d7b791b5340a096574365b407f328c743a9873e022648caf2d5965 days 13 hrs ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f  IN   0x2138ffe292fd0953f7fe2569111246e4de9ff1dc0 Ether0.000250316
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
  Latest 1 Internal Transaction

ParentTxHash Block Age From To Value
0xc6b3ad23403886021f0e79ff89b5fc292a138b04969bbe188ea7a47b84504d49426870969 days 6 hrs ago0x2138ffe292fd0953f7fe2569111246e4de9ff1dc0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f0.005 Ether
[ Download CSV Export  ] 
Warning: The compiled contract might be susceptible to ZeroFunctionSelector (very low-severity) Solidity compiler bugs.

Contract Source Code Verified
Contract Name: MarketPrice
Compiler Version: v0.4.16+commit.d7661dd9
Optimization Enabled: No
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts
pragma solidity ^0.4.15;

/*

    Crypto Market Prices via Ethereum Smart Contract

    A community driven smart contract that lets your contracts use fiat
    amounts in USD, EURO, and GBP. Need to charge $10.50 for a contract call?
    With this contract, you can convert ETH and other crypto's.

    Repo: https://github.com/hunterlong/marketprice
    Look at repo for more token examples

    Examples:

      MarketPrice price = MarketPrice(CONTRACT_ADDRESS);

      uint256 ethCent = price.USD(0);        // returns $0.01 worth of ETH in USD.
      uint256 weiAmount = ethCent * 2500     // returns $25.00 worth of ETH in USD
      require(msg.value == weiAmount);       // require $25.00 worth of ETH as a payment

    @author Hunter Long
*/

contract MarketPrice {

    mapping(uint => Token) public tokens;

    address public sender;
    address public creator;

    event NewPrice(uint id, string token);
    event DeletePrice(uint id);
    event UpdatedPrice(uint id);
    event RequestUpdate(uint id);

    struct Token {
        string name;
        uint256 eth;
        uint256 usd;
        uint256 eur;
        uint256 gbp;
        uint block;
    }

    // initialize function
    function MarketPrice() {
        creator = msg.sender;
        sender = msg.sender;
    }

    // returns the Token struct
    function getToken(uint _id) internal constant returns (Token) {
        return tokens[_id];
    }

    // returns rate price of coin related to ETH.
    function ETH(uint _id) constant returns (uint256) {
        return tokens[_id].eth;
    }

    // returns 0.01 value in United States Dollar
    function USD(uint _id) constant returns (uint256) {
        return tokens[_id].usd;
    }

    // returns 0.01 value in Euro
    function EUR(uint _id) constant returns (uint256) {
        return tokens[_id].eur;
    }

    // returns 0.01 value in British Pound
    function GBP(uint _id) constant returns (uint256) {
        return tokens[_id].gbp;
    }

    // returns block when price was updated last
    function updatedAt(uint _id) constant returns (uint) {
        return tokens[_id].block;
    }

    // update market rates in USD, EURO, and GBP for a specific coin
    function update(uint id, string _token, uint256 eth, uint256 usd, uint256 eur, uint256 gbp) external {
        require(msg.sender==sender);
        tokens[id] = Token(_token, eth, usd, eur, gbp, block.number);
        NewPrice(id, _token);
    }

    // delete a token from the contract
    function deleteToken(uint id) {
        require(msg.sender==sender);
        DeletePrice(id);
        delete tokens[id];
    }

    // change creator address
    function changeCreator(address _creator){
        require(msg.sender==creator);
        creator = _creator;
    }

    // change sender address
    function changeSender(address _sender){
        require(msg.sender==creator);
        sender = _sender;
    }

    // execute function for creator if ERC20's get stuck in this wallet
    function execute(address _to, uint _value, bytes _data) external returns (bytes32 _r) {
        require(msg.sender==creator);
        require(_to.call.value(_value)(_data));
        return 0;
    }

    // default function so this contract can accept ETH with low gas limits.
    function() payable {

    }

    // public function for requesting an updated price from server
    // using this function requires a payment of $0.35 USD
    function requestUpdate(uint id) external payable {
        uint256 weiAmount = tokens[0].usd * 35;
        require(msg.value >= weiAmount);
        sender.transfer(msg.value);
        RequestUpdate(id);
    }

    // donation function that get forwarded to the contract updater
    function donate() external payable {
        require(msg.value >= 0);
        sender.transfer(msg.value);
    }

}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"creator","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_id","type":"uint256"}],"name":"USD","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"},{"name":"_token","type":"string"},{"name":"eth","type":"uint256"},{"name":"usd","type":"uint256"},{"name":"eur","type":"uint256"},{"name":"gbp","type":"uint256"}],"name":"update","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"tokens","outputs":[{"name":"name","type":"string"},{"name":"eth","type":"uint256"},{"name":"usd","type":"uint256"},{"name":"eur","type":"uint256"},{"name":"gbp","type":"uint256"},{"name":"block","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_id","type":"uint256"}],"name":"GBP","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"}],"name":"deleteToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"sender","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_id","type":"uint256"}],"name":"ETH","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_creator","type":"address"}],"name":"changeCreator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_sender","type":"address"}],"name":"changeSender","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"execute","outputs":[{"name":"_r","type":"bytes32"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"}],"name":"requestUpdate","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"_id","type":"uint256"}],"name":"updatedAt","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_id","type":"uint256"}],"name":"EUR","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"donate","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"id","type":"uint256"},{"indexed":false,"name":"token","type":"string"}],"name":"NewPrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"id","type":"uint256"}],"name":"DeletePrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"id","type":"uint256"}],"name":"UpdatedPrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"id","type":"uint256"}],"name":"RequestUpdate","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604052341561000f57600080fd5b5b33600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b610cdd806100a36000396000f300606060405236156100d9576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f146100dd5780630c560c64146101325780631833fa4c146101695780634f64b2be146101c45780635a8ef28a146102a05780636297c16c146102d757806367e404ce146102fa57806367f01c041461034f57806374580e2f14610386578063b280a7e7146103bf578063b61d27f6146103f8578063c14c1ce31461046a578063c818faec14610482578063d67ae54d146104b9578063ed88c68e146104f0575b5b5b005b34156100e857600080fd5b6100f06104fa565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561013d57600080fd5b6101536004808035906020019091905050610520565b6040518082815260200191505060405180910390f35b341561017457600080fd5b6101c260048080359060200190919080359060200190820180359060200191909192908035906020019091908035906020019091908035906020019091908035906020019091905050610540565b005b34156101cf57600080fd5b6101e560048080359060200190919050506106c3565b604051808060200187815260200186815260200185815260200184815260200183815260200182810382528881815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561028c5780601f106102615761010080835404028352916020019161028c565b820191906000526020600020905b81548152906001019060200180831161026f57829003601f168201915b505097505050505050505060405180910390f35b34156102ab57600080fd5b6102c160048080359060200190919050506106fe565b6040518082815260200191505060405180910390f35b34156102e257600080fd5b6102f8600480803590602001909190505061071e565b005b341561030557600080fd5b61030d610802565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561035a57600080fd5b6103706004808035906020019091905050610828565b6040518082815260200191505060405180910390f35b341561039157600080fd5b6103bd600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610848565b005b34156103ca57600080fd5b6103f6600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506108e9565b005b341561040357600080fd5b61044c600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091908035906020019082018035906020019190919290505061098a565b60405180826000191660001916815260200191505060405180910390f35b6104806004808035906020019091905050610a45565b005b341561048d57600080fd5b6104a36004808035906020019091905050610b0f565b6040518082815260200191505060405180910390f35b34156104c457600080fd5b6104da6004808035906020019091905050610b2f565b6040518082815260200191505060405180910390f35b6104f8610b4f565b005b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008381526020019081526020016000206002015490505b919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561059c57600080fd5b60c06040519081016040528087878080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050815260200185815260200184815260200183815260200182815260200143815250600080898152602001908152602001600020600082015181600001908051906020019061062a929190610bc4565b506020820151816001015560408201518160020155606082015181600301556080820151816004015560a082015181600501559050507fd766911918e4a4ff28516cc02a5ae3c2096061ee7408787974101985cf9e062887878760405180848152602001806020018281038252848482818152602001925080828437820191505094505050505060405180910390a15b50505050505050565b600060205280600052604060002060009150905080600001908060010154908060020154908060030154908060040154908060050154905086565b60008060008381526020019081526020016000206004015490505b919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561077a57600080fd5b7f8c8f94f5f1a74ad515cd6e033cb9e9cfae911da33cb003cf67cc57b444fd3dd3816040518082815260200191505060405180910390a1600080828152602001908152602001600020600080820160006107d49190610c44565b6001820160009055600282016000905560038201600090556004820160009055600582016000905550505b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008381526020019081526020016000206001015490505b919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156108a457600080fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561094557600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109e857600080fd5b8473ffffffffffffffffffffffffffffffffffffffff168484846040518083838082843782019150509250505060006040518083038185876187965a03f1925050501515610a3557600080fd5b600060010290505b949350505050565b6000602360008080815260200190815260200160002060020154029050803410151515610a7157600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501515610ad357600080fd5b7fbb23a8e369bdbb341ed2a26729ed4c9e616f51e510b78ef899f5c1791b50de9c826040518082815260200191505060405180910390a15b5050565b60008060008381526020019081526020016000206005015490505b919050565b60008060008381526020019081526020016000206003015490505b919050565b60003410151515610b5f57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501515610bc157600080fd5b5b565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610c0557805160ff1916838001178555610c33565b82800160010185558215610c33579182015b82811115610c32578251825591602001919060010190610c17565b5b509050610c409190610c8c565b5090565b50805460018160011615610100020316600290046000825580601f10610c6a5750610c89565b601f016020900490600052602060002090810190610c889190610c8c565b5b50565b610cae91905b80821115610caa576000816000905550600101610c92565b5090565b905600a165627a7a72305820d26fc37a22c2fb5d3041148d95ba3cbd4420bc5bd4bc6745dd33f949edd89df40029

   Swarm Source:
bzzr://d26fc37a22c2fb5d3041148d95ba3cbd4420bc5bd4bc6745dd33f949edd89df4
View All
Block Age txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "downvote" button for any spammy posts, and the "upvote" for interesting conversations.