Contract 0x8055d0504666e2B6942BeB8D6014c964658Ca591

 

TxHash Block Age From To Value [TxFee]
0xe8eab76a18aca80b5edae3b3cbcd2244205cb679f205fa9cf58404dfc8dbcbb5742377916 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000125158
0x7167ae5310680afb954ae81e9ce2620b9a12d2cb1961fbb9e8981cdc95c1e33b74234841 hr 25 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000062579
0x9f0dbcc7fe506c6eb1d16f0eecbdc284491b14d6fde1398178181eef1890d3f074232432 hrs 25 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.00006946269
0x3713329e36ca7266b90ddded4a84b16025646078164887c82c14412ac748091974229853 hrs 25 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000238582437
0x512f7aa52e969fb7be94c798374ede533b54703e0d03a0dbdb3958f3acaa6f6174227224 hrs 24 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000125158
0x8736c0bc7b856930cfd7571095e7187b8344970658cd85881011840813bba45074224695 hrs 24 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000125158
0xb9631b323b24ae41ebe22cfaeeb6c7f58a742d562c52b6dcfbcbdca705bf091674221886 hrs 23 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000125158
0xb271d2224938ebf02465deeb8e69169e58527015fba977654a5f40f5e4f4142774219137 hrs 24 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000062579
0x83c7b6bdbc97cb57b2e186226db80872c6e43fb05ebf49cffbf463122524232274216208 hrs 25 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000125158
0x191770780e572a7aa032c3d87147a2801efd8c49a128f60083ccf07686022afa74213509 hrs 25 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000125158
0xc0ca7b8e30d56411224c5c3221159b53dbd5aa679c3ca2ffe08f432c99910ea6742107510 hrs 25 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000125158
0x8cf6e56274b59c6c23949581c3236054f92af25ab5d465c63643f104175076ec742079911 hrs 25 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000062579
0x044321a98696823dbf46faad83734b9b99c0cabd949552e32fe82535c512f154742056212 hrs 25 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000062579
0xaf1e3820bc70325fcf4e599c0d41d9e30939f3e05ded1f321081ff04384401f0742027613 hrs 24 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000125158
0x7f0246a22075e6184b205683117b294c84449a005ffe51c8a12e41307748a808742002414 hrs 24 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000062579
0xb43ca79a2a756623694b06568391d414098f87cd00bf4b4fb30234362ba90291741977915 hrs 25 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000125158
0x6720def2d8c72dd54adb80646baea366792b94a0a3eb8e57b8bb586ea64881e0741949516 hrs 25 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.00012503
0x376b098d180f5202da291d2e49688acc434b03f517611ecb576266cb623baef2741922117 hrs 22 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000563211
0xe5eebf2c60fc9e6e681bcef9cc1fffb04da0ee91516c88c13dbdcf7046de92fb741901118 hrs 12 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.00012503
0x769ace0f026ae00a5db09427fd67f65e9752014ec03c06add7e99427dac881d6741869719 hrs 20 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.0002315423
0xda926a2bfbcbf658aec9ea2ad096368787f2389bc8b15ddca72174a0ea95b0e5741842020 hrs 19 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000125158
0x6fb48a79b516f53e74b62c11c968cb2f64711ccdada9e5e2578292f84fd289c0741816321 hrs 22 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.0001501896
0xd513cbb7272d256eaaac1de282f539d6ec6812dc48b6eaaebe3371545a351c32741791622 hrs 23 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000125158
0x8a2798be8b2b9a2bf43b60443e124c35e4191f2847b800020abf7ad296bc0d11741765823 hrs 24 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000125158
0x8e7bd96f3da35d734141f6902514539bb980bd5716cccc4b31b37a96122fcf4674173681 day 25 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000125158
[ Download CSV Export 

Latest 1 internal transaction Internal Transactions as a result of Contract Execution

Parent TxHash Block Age From To Value
0xdee834cb0d046830836fb1712cd52e11711b0040d1c63ecdac54e797eca8c3b55911221260 days 14 hrs ago0x8055d0504666e2b6942beb8d6014c964658ca5910x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f0.025 Ether
[ Download CSV Export 

Contract Source Code Verified (Exact Match)

Contract Name:
FiatContract

Compiler Version
v0.4.15+commit.bbb8e64f

Optimization Enabled:
No

Runs (Optimizer):
200

Contract Source Code

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/fiatcontract
    Website: https://fiatcontract.com

    Examples:

      FiatContract price = FiatContract(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
      
    Please look at Repo or Website to get Currency ID values.

    @author Hunter Long
*/

contract FiatContract {

    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);
    event Donation(address from);

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

    // initialize function
    function FiatContract() {
        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==creator);
        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);
        Donation(msg.sender);
    }

}

Contract ABI

[{"constant":true,"inputs":[],"name":"creator","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_id","type":"uint256"}],"name":"USD","outputs":[{"name":"","type":"uint256"}],"payable":false,"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,"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,"type":"function"},{"constant":true,"inputs":[{"name":"_id","type":"uint256"}],"name":"GBP","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"}],"name":"deleteToken","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"sender","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_id","type":"uint256"}],"name":"ETH","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_creator","type":"address"}],"name":"changeCreator","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_sender","type":"address"}],"name":"changeSender","outputs":[],"payable":false,"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,"type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"}],"name":"requestUpdate","outputs":[],"payable":true,"type":"function"},{"constant":true,"inputs":[{"name":"_id","type":"uint256"}],"name":"updatedAt","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_id","type":"uint256"}],"name":"EUR","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"donate","outputs":[],"payable":true,"type":"function"},{"inputs":[],"payable":false,"type":"constructor"},{"payable":true,"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"},{"anonymous":false,"inputs":[{"indexed":false,"name":"from","type":"address"}],"name":"Donation","type":"event"}]

Contract Creation Code

6060604052341561000f57600080fd5b5b33600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b610d40806100a36000396000f300606060405236156100d9576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f146100dd5780630c560c64146101325780631833fa4c146101695780634f64b2be146101c45780635a8ef28a146102a05780636297c16c146102d757806367e404ce146102fa57806367f01c041461034f57806374580e2f14610386578063b280a7e7146103bf578063b61d27f6146103f8578063c14c1ce31461046a578063c818faec14610482578063d67ae54d146104b9578063ed88c68e146104f0575b5b5b005b34156100e857600080fd5b6100f06104fa565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561013d57600080fd5b6101536004808035906020019091905050610520565b6040518082815260200191505060405180910390f35b341561017457600080fd5b6101c260048080359060200190919080359060200190820180359060200191909192908035906020019091908035906020019091908035906020019091908035906020019091905050610540565b005b34156101cf57600080fd5b6101e560048080359060200190919050506106c3565b604051808060200187815260200186815260200185815260200184815260200183815260200182810382528881815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561028c5780601f106102615761010080835404028352916020019161028c565b820191906000526020600020905b81548152906001019060200180831161026f57829003601f168201915b505097505050505050505060405180910390f35b34156102ab57600080fd5b6102c160048080359060200190919050506106fe565b6040518082815260200191505060405180910390f35b34156102e257600080fd5b6102f8600480803590602001909190505061071e565b005b341561030557600080fd5b61030d610802565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561035a57600080fd5b6103706004808035906020019091905050610828565b6040518082815260200191505060405180910390f35b341561039157600080fd5b6103bd600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610848565b005b34156103ca57600080fd5b6103f6600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506108e9565b005b341561040357600080fd5b61044c600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091908035906020019082018035906020019190919290505061098a565b60405180826000191660001916815260200191505060405180910390f35b6104806004808035906020019091905050610a45565b005b341561048d57600080fd5b6104a36004808035906020019091905050610b0f565b6040518082815260200191505060405180910390f35b34156104c457600080fd5b6104da6004808035906020019091905050610b2f565b6040518082815260200191505060405180910390f35b6104f8610b4f565b005b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008381526020019081526020016000206002015490505b919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561059c57600080fd5b60c06040519081016040528087878080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050815260200185815260200184815260200183815260200182815260200143815250600080898152602001908152602001600020600082015181600001908051906020019061062a929190610c27565b506020820151816001015560408201518160020155606082015181600301556080820151816004015560a082015181600501559050507fd766911918e4a4ff28516cc02a5ae3c2096061ee7408787974101985cf9e062887878760405180848152602001806020018281038252848482818152602001925080828437820191505094505050505060405180910390a15b50505050505050565b600060205280600052604060002060009150905080600001908060010154908060020154908060030154908060040154908060050154905086565b60008060008381526020019081526020016000206004015490505b919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561077a57600080fd5b7f8c8f94f5f1a74ad515cd6e033cb9e9cfae911da33cb003cf67cc57b444fd3dd3816040518082815260200191505060405180910390a1600080828152602001908152602001600020600080820160006107d49190610ca7565b6001820160009055600282016000905560038201600090556004820160009055600582016000905550505b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008381526020019081526020016000206001015490505b919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156108a457600080fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561094557600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109e857600080fd5b8473ffffffffffffffffffffffffffffffffffffffff168484846040518083838082843782019150509250505060006040518083038185876187965a03f1925050501515610a3557600080fd5b600060010290505b949350505050565b6000602360008080815260200190815260200160002060020154029050803410151515610a7157600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501515610ad357600080fd5b7fbb23a8e369bdbb341ed2a26729ed4c9e616f51e510b78ef899f5c1791b50de9c826040518082815260200191505060405180910390a15b5050565b60008060008381526020019081526020016000206005015490505b919050565b60008060008381526020019081526020016000206003015490505b919050565b60003410151515610b5f57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501515610bc157600080fd5b7f187f451f92c6a4236353b5331d5fb67bdbfcc66b54367037fba41d6bcef08ce733604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15b565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610c6857805160ff1916838001178555610c96565b82800160010185558215610c96579182015b82811115610c95578251825591602001919060010190610c7a565b5b509050610ca39190610cef565b5090565b50805460018160011615610100020316600290046000825580601f10610ccd5750610cec565b601f016020900490600052602060002090810190610ceb9190610cef565b5b50565b610d1191905b80821115610d0d576000816000905550600101610cf5565b5090565b905600a165627a7a7230582087ba2447cee31b65d51114566c66a3e29c2703755653036218a99cce54a382740029

Swarm Source

bzzr://87ba2447cee31b65d51114566c66a3e29c2703755653036218a99cce54a38274
Block Age Transaction Difficulty GasUsed Reward
Block Age Uncle Number Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.