New answers tagged

0 votes

What is the reason for this assembly code?

The code is incomplete but the revert is returning Reentrant() (0xed3ba6a6). It could be some kind of reentrancy protection.
Ismael's user avatar
  • 31k
0 votes

Inline assembly loop doesn't update memory

While i was editing my question i realized: I just need to set the offset for calldata's reading point first to 34 outside the loop, then in every loop i must add 32 to it. outside: let loffset:= 34 ...
Igor József Vass's user avatar
0 votes

reading and writing to a packed nested struct using inline assembly

The code below shows an implementation for incrementing: // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; contract CalendarGasTest { struct ExampleNested_1 { uint88 e0; ...
jlbl's user avatar
  • 1
2 votes
Accepted

Is there a shortcut for "greater than or equals to" in Solidity assembly?

There is no such opcode and no assembly function. You can use iszero(lt()) for this
crystalbit's user avatar
2 votes
Accepted

Grab first 20 bytes of 32-bytes input

You could cast the value in byte20 case i.e(bytes20(bytes32)).
Saediek's user avatar
  • 36

Top 50 recent answers are included