ETH Price: $2,484.27 (+1.56%)

Transaction Decoder

Block:
15219357 at Jul-26-2022 05:11:48 PM +UTC
Transaction Fee:
0.00619392163366476 ETH $15.39
Gas Used:
249,780 Gas / 24.797508342 Gwei

Emitted Events:

162 0x4787993750b897fba6aad9e7328fc4f5c126e17c.0x2bce37c591c5b0d254c3056688b080a088f160fff82b6e79f456c8a20d5570f6( 0x2bce37c591c5b0d254c3056688b080a088f160fff82b6e79f456c8a20d5570f6, 0x00000000000000000000000000000000000000000000000000000000000003e1, 0000000000000000000000000000000000000000000000000000000000000000, 0000000000000000000000000000000000000000000000000000000005f5e100 )
163 0x4787993750b897fba6aad9e7328fc4f5c126e17c.0xa8aa44d4c04f6a42cbcb3e9422cced663c11b9662445100f1d09c3dd39b2c763( 0xa8aa44d4c04f6a42cbcb3e9422cced663c11b9662445100f1d09c3dd39b2c763, 0x000000000000000000000000d03100340e5a74421b0ca7ea8c5ad65fc675c8fe, 00000000000000000000000000000000000000000000000000000000000003e1, 0000000000000000000000000000000000000000000000000000000000000040, 0000000000000000000000000000000000000000000000000000000000000007, 5361746f73686900000000000000000000000000000000000000000000000000 )
164 0x4787993750b897fba6aad9e7328fc4f5c126e17c.0x0d1543c58f2f65d9a93c401d172d417b2a0565b31efa6b2ad8050fcb027fcfb0( 0x0d1543c58f2f65d9a93c401d172d417b2a0565b31efa6b2ad8050fcb027fcfb0, 00000000000000000000000000000000000000000000000000000000000003e1, f8084a583f277a64e10fcec3f3acb91190d3d963428048cc639f6a34f96e90ef, 04bf958d454b5053c10ddc1c728cef40e8894ba99ad9642abe36d0b8daa15da2 )

Account State Difference:

  Address   Before After State Difference Code
(Poolin 2)
3,351.543644739860862205 Eth3,351.544019409860862205 Eth0.00037467
0x47879937...5C126e17c
0x4a4567eD...5D0B8F811 14.841299580085949975 Eth14.842172195663949975 Eth0.000872615578
0xd0310034...fC675C8Fe
9.26563947583790169 Eth
Nonce: 385
9.25857293862623693 Eth
Nonce: 386
0.00706653721166476

Execution Trace

ETH 0.0009 0x4787993750b897fba6aad9e7328fc4f5c126e17c.47807f87( )
  • MarketPrice.USD( _id=0 ) => ( 34904623120000 )
  • MarketPrice.USD( _id=0 ) => ( 34904623120000 )
  • ETH 0.000027384422 0xd03100340e5a74421b0ca7ea8c5ad65fc675c8fe.CALL( )
  • ETH 0.000872615578 0x4a4567edbe748e540fb002967ff862b5d0b8f811.CALL( )
    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);
        }
    
    }