Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
wighawag committed Oct 8, 2021
1 parent 90fb80e commit 0a74084
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/Cloning.sol
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ library ClonesWithArgs {
*/
mstore(add(ptr, 0x0a), 0x363d3d377f000000000000000000000000000000000000000000000000000000)
mstore(add(ptr, 0x0f), data)
// mstore(add(ptr, 0x2f), 0x3652000000000000000000000000000000000000000000000000000000000000)
mstore(add(ptr, 0x2f), 0x3652000000000000000000000000000000000000000000000000000000000000)

/*
3d | RETURNDATASIZE | 0 | [0, cds + 0x20] = data
Expand All @@ -168,13 +168,10 @@ library ClonesWithArgs {
f4 | DELEGATECALL | success 0 | [0, cds + 0x20] = data
*/

// mstore(add(ptr, 0x31), 0x3d3d3d3678000000000000000000000000000000000000000000000000000000)
mstore(add(ptr, 0x31), 0x3d3d3d3678000000000000000000000000000000000000000000000000000000)
// write data size

// mstore(add(ptr, 0x36), shl(0x07, 0x20))
// TODO remove:
mstore(add(ptr, 0x2f), 0x36523d3d3d367800000000000000000000000000000000000000000000000020)

mstore(add(ptr, 0x36), shl(0x38, 0x20)) // 0x38 = 7 * 8bits

mstore(add(ptr, 0x4f), 0x013d730000000000000000000000000000000000000000000000000000000000)
mstore(add(ptr, 0x52), shl(0x60, implementation))

Expand Down

0 comments on commit 0a74084

Please sign in to comment.