Skip to content

Latest commit

 

History

History
48 lines (34 loc) · 1.32 KB

39.mdx

File metadata and controls

48 lines (34 loc) · 1.32 KB
fork group
Frontier
Environmental Information

Index 1 is top of the stack. See PUSH.

Notes

For out of bound bytes, 0s will be copied.

Stack input

  1. destOffset: byte offset in the memory where the result will be copied.
  2. offset: byte offset in the code to copy.
  3. size: byte size to copy.

Examples

Code
0x7DFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7F
* Input 1 * * Input 2
1 0 * 1 0
2 0 * 2 31
3 32 * 3 8
Memory before
0
Memory after input 1
0x7DFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7F
Memory after input 1 then 2
0x7F00000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7F

Reproduce in playground.

Error cases

The state changes done by the current context are reverted in those cases:

  • Not enough gas.
  • Not enough values on the stack.