ETH Price: $1,979.98 (-3.60%)

Transaction Decoder

Block:
10121711 at May-23-2020 11:00:51 AM +UTC
Transaction Fee:
0.0014996989 ETH $2.97
Gas Used:
93,149 Gas / 16.1 Gwei

Emitted Events:

209 StoredBatches.Update( ipfsHash=QmQsxi3PNwCdJYNN1jnYtNvVTmXSCtqeZhTzf7Jq1GZ17n )

Account State Difference:

  Address   Before After State Difference Code
0x4Cd90231...7A80d60E4
(Spark Pool)
112.934695433760366586 Eth112.936195132660366586 Eth0.0014996989
0x6058233f...6cf3c6c7e
2.794788102448329214 Eth
Nonce: 126256
2.793288403548329214 Eth
Nonce: 126257
0.0014996989

Execution Trace

StoredBatches.registerBatch( _ipfsHash=QmQsxi3PNwCdJYNN1jnYtNvVTmXSCtqeZhTzf7Jq1GZ17n )
pragma solidity ^0.5.9;


contract StoredBatches {

    struct Batch {
        string ipfsHash;
    }

    event Update(string ipfsHash);

    address protocol;

    constructor() public {
        protocol = msg.sender;
    }

    modifier onlyProtocol() {
        if (msg.sender == protocol) {
            _;
        }
    }

    Batch[] public batches;


    /// Option to reduce gas usage: https://ethereum.stackexchange.com/questions/17094/how-to-store-ipfs-hash-using-bytes
    function registerBatch(string memory _ipfsHash) public onlyProtocol {
        batches.push(Batch(_ipfsHash));
        emit Update(_ipfsHash);
    }
}