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
Describe the bug
While debugging a smart contract in Remix IDE, I noticed that the displayed calldata in the Debugger section seems to be incorrect. The calldata representation does not match the expected format, leading to confusion when analyzing function calls.
To Reproduce
Steps to reproduce the behavior:
Open Remix IDE in the browser.
Deploy the following example smart contract C:
// SPDX-License-Identifier: GPL-3.0pragma solidity^0.8.0;
contractC {
function test() public {
Test testInstance =newTest();
testInstance.alloc(9);
}
}
contractTest {
function alloc(intlen) externalpurereturns (stringmemoryr) {
bytesmemory data =newbytes(uint(len));
for (uint i =0; i <uint(len); i++) {
data[i] ="A";
}
returnstring(data);
}
}
Call test
Open the Debugger after the transaction is executed.
Check the displayed calldata calling the testInstance.alloc(9) function in the Test contract before and after staticcall instruction in the Debugger tab.
Expected behavior staticcall(gas, address, in, insize, out, outsize)
It seems that in and insize are swapped during parsing. The display might show them incorrectly, but it looks like the actual behavior works as expected.
Screenshots
function signature 0x2318a79b
before staticcall
after staticcall
I think the correct call data display is 0x2318a79b0000000000000000000000000000000000000000000000000000000000000009.
But it seems that the following image is showing the data from the 0x24 pointer with a size of 0x80.
Desktop (please complete the following information):
OS: Windows
Browser: chrome
Version: 131
The text was updated successfully, but these errors were encountered:
Describe the bug
While debugging a smart contract in Remix IDE, I noticed that the displayed calldata in the Debugger section seems to be incorrect. The calldata representation does not match the expected format, leading to confusion when analyzing function calls.
To Reproduce
Steps to reproduce the behavior:
C
:test
testInstance.alloc(9)
function in theTest
contract before and afterstaticcall
instruction in the Debugger tab.Expected behavior
staticcall(gas, address, in, insize, out, outsize)
It seems that
in
andinsize
are swapped during parsing. The display might show them incorrectly, but it looks like the actual behavior works as expected.Screenshots
function signature
0x2318a79b
before
staticcall
after
staticcall
I think the correct call data display is
0x2318a79b0000000000000000000000000000000000000000000000000000000000000009
.But it seems that the following image is showing the data from the 0x24 pointer with a size of 0x80.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: