You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 17, 2026. It is now read-only.
in the implementation of #297, we found that reading the complete call data could be complex: CALLDATA -> memory -> stack, for templates of implementing this (with return but not writing it on stack):
// load the complete call data to memory
PUSH0 // from 0
PUSH0 // from 0
CALLDATASIZE // to size
CALDATALOAD // calldataload(dest_mem_offset: 0, offest: 0, size: size)// return the selected memory
PUSH0
CALLDATASIZE
RETURN
considering about the memory pointer:
MSIZE // first we get the memory size as the start pointer for the memory allocation
PUSH0 // to get the complete calldata, we start form offset 0
CALLDATASIZE // complete calldata
CALLDATALOAD // load the calldata to memory// now we return the calldata
MSIZE
CALLDATASIZE
SUB
CALLDATASIZE
RETURN
for the real implementation, we might need to write the calldata on stack, need to do sort of research on it, mb learn from solidity or huff!
in the implementation of #297, we found that reading the complete call data could be complex:
CALLDATA->memory->stack, for templates of implementing this (withreturnbut not writing it onstack):considering about the memory pointer:
for the real implementation, we might need to write the calldata on stack, need to do sort of research on it, mb learn from solidity or huff!