Transaction Hash:
Block:
6681440 at Nov-11-2018 12:12:02 AM +UTC
Transaction Fee:
0.000082083000054722 ETH
$0.16
Gas Used:
54,722 Gas / 1.500000001 Gwei
Emitted Events:
| 92 |
DiaOracle.newCoinInfo( name=Stellar, symbol=XLM, price=26138, supply=18937256480, lastUpdateTimestamp=1541894381 )
|
Account State Difference:
| Address | Before | After | State Difference | ||
|---|---|---|---|---|---|
| 0xa6490b73...337AC0166 |
0.343086490512308954 Eth
Nonce: 1584
|
0.343004407512254232 Eth
Nonce: 1585
| 0.000082083000054722 | ||
| 0xD47FDf51...F19fa23Ef | |||||
|
0xEA674fdD...16B898ec8
Miner
| (Ethermine) | 1,143.647303640212749687 Eth | 1,143.647385723212804409 Eth | 0.000082083000054722 |
Execution Trace
DiaOracle.updateCoinInfo( name=Stellar, symbol=XLM, newPrice=26138, newSupply=18937256480, newTimestamp=1541894381 )
updateCoinInfo[DiaOracle (ln:32)]
CoinInfo[DiaOracle (ln:34)]newCoinInfo[DiaOracle (ln:35)]
pragma solidity ^0.4.21;
contract DiaOracle {
address owner;
struct CoinInfo {
uint256 price;
uint256 supply;
uint256 lastUpdateTimestamp;
string symbol;
}
mapping(string => CoinInfo) diaOracles;
event newCoinInfo(
string name,
string symbol,
uint256 price,
uint256 supply,
uint256 lastUpdateTimestamp
);
constructor() public {
owner = msg.sender;
}
function changeOwner(address newOwner) public {
require(msg.sender == owner);
owner = newOwner;
}
function updateCoinInfo(string name, string symbol, uint256 newPrice, uint256 newSupply, uint256 newTimestamp) public {
require(msg.sender == owner);
diaOracles[name] = (CoinInfo(newPrice, newSupply, newTimestamp, symbol));
emit newCoinInfo(name, symbol, newPrice, newSupply, newTimestamp);
}
function getCoinInfo(string name) public view returns (uint256, uint256, uint256, string) {
return (
diaOracles[name].price,
diaOracles[name].supply,
diaOracles[name].lastUpdateTimestamp,
diaOracles[name].symbol
);
}
}