Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated argsSize parameter to match exact size of calldata #3

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ contract B {

// call the function 23 of contract A
// and store the result in memory slot 0x00
if iszero(staticcall(gas(), _a, 28, 32, 0x00, 0x20)) {
if iszero(staticcall(gas(), _a, 28, 4, 0x00, 0x20)) {
revert(0, 0)
}
// return the result from memory slot 0x00
Expand Down Expand Up @@ -789,7 +789,7 @@ contract B {

// call the sum function of contract A
// and store the result in memory slot 0x00
if iszero(staticcall(gas(), _a, add(freeMemPointer, 28), mload(0x40), 0x00, 0x20)) {
if iszero(staticcall(gas(), _a, add(freeMemPointer, 28), 0x44, 0x00, 0x20)) {
revert(0,0)
}
// return the result from memory slot 0x00
Expand Down Expand Up @@ -826,7 +826,7 @@ contract B {
mstore(0x40, add(freeMemPointer, 0x40))

// call the getBytes function of contract A and don't store the result
if iszero(staticcall(gas(), _a, add(freeMemPointer, 28), mload(0x40), 0x00, 0x00)) {
if iszero(staticcall(gas(), _a, add(freeMemPointer, 28), 0x24, 0x00, 0x00)) {
revert(0,0)
}

Expand Down Expand Up @@ -916,7 +916,7 @@ contract B {
// 0x60 0000000000000000000000000000000000000000000000000000000000000003 - first element of the array is 0
// 0x80 0000000000000000000000000000000000000000000000000000000000000001 - second element of the array is 1

if iszero(staticcall(gas(), _a, add(freeMemPointer, 28), mload(0x40), 0x00, 0x20)) {
if iszero(staticcall(gas(), _a, add(freeMemPointer, 28), 0xa4, 0x00, 0x20)) {
revert(0,0)
}
// the function will return true
Expand Down