Skip to content
Request an audit

Clone-pattern immutable args: reading a calldata offset and shifting to the bytes you want

We continued the Panoptic contest on Code4rena.

Lesson Summary:

  • Offset is the byte position in calldata where immutable arguments start. It's used by the Clone pattern to read immutable args.
  • Calldata loads 32 bytes at a time. When you load 32 bytes from an offset, you then shift by whatever amount is needed to isolate the bytes you actually want.
  • One epoch is 4 seconds.
  • Strengthen your knowledge of bits, bytes and shifting.
  • Try to memorise the variables; if it helps, close your eyes and recite them. This matters for holding context.
Watch the session on YouTube ↗
Message on Telegram All 62 posts