Hi, Guys, I am a solidity newbie and I am learning this language. I am trying to understand how the byte code works. Here is a piece of code I disassembled from the byte code.
//——————————————————————————-
function test( uint256 arg0,bytes arg1) public return ()
{
var2 = arg0;
var3 = arg1;
var4 = arg2;
//——————————————————————————-
As you can see, this function has two parameters(arg0 and arg1), and I am confused and wondering what the arg2 is?
Apr 11, 2021, 3:17 AM
Reproduced a similar example below and got something fine to me. You may want to post your original function as well.
function getSthDone(uint256 x, uint256 y) public view returns(bool) {
if (msg.sender == _owner) {
return x + y < 100;
}
return false;
}
if (msg.sender == _owner) {
return x + y < 100;
}
return false;
}
def unknown3a107ec8(uint256 _param1, uint256 _param2) payable:
require calldata.size - 4 >=′ 64
if stor0 != caller:
return 0
if _param1 > !_param2:
revert with 0, 17
return (_param1 + _param2 < 100)
require calldata.size - 4 >=′ 64
if stor0 != caller:
return 0
if _param1 > !_param2:
revert with 0, 17
return (_param1 + _param2 < 100)
Apr 11, 2021, 4:42 AM
your disassembled code looks interesting.
What kind of tool did you use to disassemble your byte code.
What kind of tool did you use to disassemble your byte code.
Apr 11, 2021, 4:56 AM
According to Etherscan, the decompiler uses Panoramix decompiler.
Apr 11, 2021, 4:58 AM
Thanks for that.
I did that with a tool called: smart-contract-guardian-an-online-evm-decompiler
I did that with a tool called: smart-contract-guardian-an-online-evm-decompiler
Apr 11, 2021, 5:00 AM