Using traceTransaction
we can get the following data:
debug.traceTransaction("0x0cec118d22fbd572bf25c7e4143919e608989bec7da08512f2a6f3171df3b3b8")
{
gas: 104030,
returnValue: "0000000000000000000000000000000000000000000000000000000000000001",
structLogs: [{
depth: 1,
error: null,
gas: 247189,
gasCost: 3,
memory: null,
op: "PUSH1",
pc: 0,
stack: [],
storage: {}
}, {
depth: 1,
error: null,
gas: 247186,
gasCost: 3,
memory: null,
op: "PUSH1",
pc: 2,
stack: ["0000000000000000000000000000000000000000000000000000000000000060"],
storage: {}
},
...
{
depth: 1,
error: null,
gas: 165970,
gasCost: 0,
memory: ["0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000", "00000000000000000000000000000000000000000000000000000000000000c0", "532e204d61747468657700000000000000000000000000000000000000000000", "456e676c69736800000000000000000000000000000000000000000000000000", "000000000000000000000000000000000000000000000000000000000000001c", "0000000000000000000000000000000000000000000000000000000000000001"],
op: "RETURN",
pc: 349,
stack: ["00000000000000000000000000000000000000000000000000000000773b82a3", "0000000000000000000000000000000000000000000000000000000000000020", "00000000000000000000000000000000000000000000000000000000000000c0"],
storage: {
0000000000000000000000000000000000000000000000000000000000000000: "0000000000000000000000000000000000000000000000000000000000000001",
290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563: "532e204d61747468657700000000000000000000000000000000000000000000",
290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e564: "456e676c69736800000000000000000000000000000000000000000000000000",
290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e565: "000000000000000000000000000000000000000000000000000000000000001c"
}
}]
}
Is there some way to get the amount of time it takes for each opcode (op
) to execute?