Transaction Hash:
Block:
22528085 at May-21-2025 01:46:35 AM +UTC
Transaction Fee:
0.000020039401198304 ETH
$0.04
Gas Used:
33,892 Gas / 0.591272312 Gwei
Emitted Events:
| 272 |
DIAOracleV2.OracleUpdate( key=PEAS/USD, value=348305996, timestamp=1747791992 )
|
Account State Difference:
| Address | Before | After | State Difference | ||
|---|---|---|---|---|---|
| 0x1EA2D013...91b62662b |
0.10613139327655163 Eth
Nonce: 9767
|
0.106111353875353326 Eth
Nonce: 9768
| 0.000020039401198304 | ||
|
0x4838B106...B0BAD5f97
Miner
| (Titan Builder) | 14.108048722675928509 Eth | 14.108050830863868197 Eth | 0.000002108187939688 | |
| 0xed6F4747...96727712e |
Execution Trace
DIAOracleV2.setValue( key=PEAS/USD, value=348305996, timestamp=1747791992 )
setValue[DIAOracleV2 (ln:16)]
OracleUpdate[DIAOracleV2 (ln:20)]
// compiled using solidity 0.8.19
pragma solidity 0.8.19;
contract DIAOracleV2 {
mapping (string => uint256) public values;
address oracleUpdater;
event OracleUpdate(string key, uint128 value, uint128 timestamp);
event UpdaterAddressChange(address newUpdater);
constructor() {
oracleUpdater = msg.sender;
}
function setValue(string memory key, uint128 value, uint128 timestamp) public {
require(msg.sender == oracleUpdater);
uint256 cValue = (((uint256)(value)) << 128) + timestamp;
values[key] = cValue;
emit OracleUpdate(key, value, timestamp);
}
function setMultipleValues(string[] memory keys, uint256[] memory compressedValues) public {
require(msg.sender == oracleUpdater);
require(keys.length == compressedValues.length);
for (uint128 i = 0; i < keys.length; i++) {
string memory currentKey = keys[i];
uint256 currentCvalue = compressedValues[i];
uint128 value = (uint128)(currentCvalue >> 128);
uint128 timestamp = (uint128)(currentCvalue % 2**128);
values[currentKey] = currentCvalue;
emit OracleUpdate(currentKey, value, timestamp);
}
}
function getValue(string memory key) external view returns (uint128, uint128) {
uint256 cValue = values[key];
uint128 timestamp = (uint128)(cValue % 2**128);
uint128 value = (uint128)(cValue >> 128);
return (value, timestamp);
}
function updateOracleUpdaterAddress(address newOracleUpdaterAddress) public {
require(msg.sender == oracleUpdater);
oracleUpdater = newOracleUpdaterAddress;
emit UpdaterAddressChange(newOracleUpdaterAddress);
}
}