You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remix has a fantastic debugger that let's you grab a transaction and allows you to see each opcode EVM executed step by step and so on. My question is: given an arbitrary transaction, is it possible somehow to get the amount of gas spent up to a certain point within the transaction? For example:
contract Test {
uint256 a;
uint256 b;
uint256 c;
function assignValues(uint256 _a, uin256 _b) external {
a = _a;
b = _b;
c = _a*_b;
}
}
Is there a way to know how much gas was spent up until b = _b when calling Test.assignValues(4, 7)? I imagine one could get all the EVM opcodes executed up until that point, and then manually adding the gas costs of each opcode... Is there an easier way?
The text was updated successfully, but these errors were encountered:
Remix has a fantastic debugger that let's you grab a transaction and allows you to see each opcode EVM executed step by step and so on. My question is: given an arbitrary transaction, is it possible somehow to get the amount of gas spent up to a certain point within the transaction? For example:
Is there a way to know how much gas was spent up until
b = _b
when callingTest.assignValues(4, 7)
? I imagine one could get all the EVM opcodes executed up until that point, and then manually adding the gas costs of each opcode... Is there an easier way?The text was updated successfully, but these errors were encountered: