Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
54 views

call getReserves() function using yul in solidity

what wrong with getReserves2 in A contract, why I cannot staticcall to Pair contract? // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; contract Pair { function getReserves() external ...
Anh DH's user avatar
  • 3
2 votes
1 answer
82 views

Assembly 'create2' and 'new' with salt not determining the same address

Since solidity 0.8.0, we can now specify the salt for contract creation using new keyword Using 'new' bytes32 _salt = bytes32("0x4"); address addr = address(new DummyContract{salt: _salt}());...
Xirexor's user avatar
  • 176
1 vote
1 answer
59 views

how come loading the funcSig from data isn't enough, you have to shift it also to use it in the rest of the code/function

basically we have this function function FlaggedMethods( bytes memory data ) public returns (address) { bytes4 funcSig; assembly { // Shift right by 224 bits ...
owl's user avatar
  • 13