fork | group |
---|---|
Cancun |
Stack Memory Storage and Flow Operations |
Index 1 is top of the stack.
Copying takes place as if an intermediate buffer was used, allowing the destination and source to overlap.
If size > 0
and (src + size or dst + size)
is beyond the current memory size, the memory is extended with respective gas cost applied.
destOffset
: byte offset in the memory where the result will be copied.offset
: byte offset in the memory from which to copy.size
: byte size to copy.
* | Input 1 | * |
---|---|---|
1 |
0 |
* |
2 |
32 |
* |
3 |
32 |
* |
Memory before |
---|
0000000000000000000000000000000000000000000000000000000000000000 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f |
Memory after |
---|
000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f |
static_gas = 3
dynamic_gas = 3 * words_copied + memory_expansion_cost