I am trying to learn a little bit of yul and came across a scenario in the solmate library I don't quite understand. In all of the instances when they are appending addresses to the free memory pointer rather than using increases of 20 they use increases of 22. Why do they do it this way as opposed to using 20?

enter image description here

  • I'd recommend you doing the yul course on Udemy. And learning memory slot patterns.
    – Torof
    Dec 1, 2022 at 21:46

1 Answer 1


When invoking a contract they have to encode the parameters using the Contract ABI.

In the specification all fixed size parameters should be padded to 32 bytes. An address parameters, which is 20 bytes, should be padded to 32 bytes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.