New answers tagged

0

If you'll look at the code you posted, you'll notice that the code where the new contract is deployed is in an object with assembly written before it. Solidity supports a kind of inline assembly in an assembly language called Yul. The Solidity docs on inline assembly are here, and for Yul here. You're used to seeing the normal Solidity new, whereas the ...


1

Solution function getStorageValue(uint num, uint slot) public view returns (address result) { assembly { // Store num in memory scratch space (note: lookup "free memory pointer" if you need to allocate space) mstore(0, num) // Store slot number in scratch space after num mstore(32, slot) // Create hash from ...


2

Well, it's pretty obvious when looking into the set of input arguments passed in each case. For the non-assembly call, you pass: Destination address (addr) Amount of ether (value) Executable code (data) For the assembly call, you pass: Number of gas units Destination address Amount of ether Executable code (data buffer + data length) Output address (data ...


Top 50 recent answers are included