Contract 0x8055d0504666e2b6942beb8d6014c964658ca591

 

TxHash Block Age From To Value [TxFee]
0x7ce7a2e043d932a317bdfba3f147fe87f1e12577e2c3f584b0c9befed45f6975724540952 secs ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000312895
0xa3cde610e8c3f9416230c081a9dc1877222d2f7ed7ef1aa8a6c75232855f0d7572451691 hr 19 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000312575
0x48c3acdea88b6bfa4bdb7dd055e8b644fd716eb7a56e7f318ff0e62f9d1b8e7072449872 hrs 25 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.00063329948
0xca5a9f4a1c23f061d375601904486368542e2b18de7737a0471e3c2c705268b672448223 hrs 24 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.00037509
0x4c037dc2e271d0698663a2db7bd916864a7adb0c58171febb472060f61bea9f472447104 hrs 5 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.00062451
0x7e0405fa07d3e6e4b216fbc23b19b8ed4778659f03d1dcc29e71e164699f6d4e72444815 hrs 25 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000312895
0xe008543d6c85a92e1bb515f31974c1b47efb269429832744aa8cfc5b956ab6bf72442906 hrs 25 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.0005506952
0x999b23e08ee1ddf94ddc839878266638d5685f70a19c98b69615e1560eadf1e272441287 hrs 23 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000375474
0xe12820b4cd39f3986083ba2d7e11bc23b49c717fb62740a7518639366415209772439618 hrs 25 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.00062579
0xd6d53d240c328e6dcfaa562c1a751625e9e40e4f80ba8323c3ddeffc3abf679172437879 hrs 25 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000312895
0x937299bd6b54917184e9e790345a113438a1d23ce6603ae8453fea57c49a88ca724359810 hrs 25 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000375474
0xd1f906bc1983870533613b00de59d79fafa59825c1053f1af55ab7fc0ec4b1ca724342711 hrs 25 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.0004693425
0xb69ecf22ada824b161daa666729326cc8c32219f9dfbea3f10ad968b9f8083e1724325912 hrs 25 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000312895
0x35c08236a295af1590ed927dd70f944bff2225cee34ffa52bf52369b8bc353df724309013 hrs 26 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000312575
0x13a2e190d9afec313d1e2f09f165b9ad624457669e83830dbc73a3c6104885bc724292414 hrs 24 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000312895
0x976f9fab5e90b689e4ba3bd1ae024421b90e1c747adec9de598bf202586d2455724273415 hrs 24 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.0012503
0xe0a9a3bf9cd31022ea2cdf2649e82edc966aff47b909300e49c422eed0ece6ae724255516 hrs 25 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000312895
0x4be4cb0bb1e7e3b47fa27354098f5eccbb62786cdeeca52037c4a40686a3ef36724236217 hrs 23 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.0002440581
0xc39031237d0c367a12e29ea9f5a102616aa26031d2499570d889f108527669f4724219218 hrs 24 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000187737
0x7745040be8afd381f152e6f0a55be012a691774d45c0cfcd064ad5e0f13b9455724201119 hrs 25 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000312895
0xbb1ce676c2366e7b493f980e210549fc062768bff73fa3b51dccf627301fc8e1724183420 hrs 23 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.0001564475
0x6ceb94e231fe8eb2412435d5867bb08a1f44905df5cc4a349676a0138c801351724164721 hrs 24 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.0004693425
0xc103b4a435aabcf81a470aa274f60a0cc327e11b3490c909bb781b9f8f37fc13724148222 hrs 23 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000312895
0x9ba3c993859a72f2e5db6ec82b633221bb1dd750ff0cbd2ceeb528d3d6ca5949724131123 hrs 25 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000750948
0x1deaa0e95ceb9d0a6ae048d4ab5869c2d7600e295184ac0e2fa2b31ef5af096872411401 day 23 mins ago0x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f IN  0x8055d0504666e2b6942beb8d6014c964658ca5910 Ether0.000375474
[ Download CSV Export 

Latest 1 Internal Transaction Internal Transactions as a result of Contract Execution

Parent TxHash Block Age From To Value
0xdee834cb0d046830836fb1712cd52e11711b0040d1c63ecdac54e797eca8c3b55911221229 days 23 hrs ago0x8055d0504666e2b6942beb8d6014c964658ca5910x004f3e7ffa2f06ea78e14ed2b13e87d710e8013f0.025 Ether
[ Download CSV Export 
Warning: The compiled contract might be susceptible to ExpExponentCleanup (medium/high-severity), NestedArrayFunctionCallDecoder (medium-severity), ZeroFunctionSelector (very low-severity) Solidity Compiler Bugs.

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.