solidity – What Are the Two Arguments in Revert Opcode

assemblyrevertsolidity

I am trying to understand the revert opcode and how it works . I understood that it will stop the execution of current context and return 0 to the calling context.
It seems it also takes in 2 arguments according to evm.codes. Can someone help me understand what the two arguments does?
enter image description here

Best Answer

offset is the starting position of the desired return data in memory and size is the size of the desired return data in memory. Offset and size are used to designate where the return data starts (offset) and ends (offset + size) in memory.

See: https://medium.com/@jtriley15/yul-vs-solidity-contract-comparison-2b6d9e9dc833

Related Topic