From d2d871a1e1993c2b00b65159c9deea1bcf618ef6 Mon Sep 17 00:00:00 2001 From: 0xAA Date: Mon, 4 Sep 2023 22:35:17 +0800 Subject: [PATCH] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 16c846e..458db81 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ wherein the bytes at indices 9 - 28 (inclusive) are replaced with the 20 byte ad The disassembly of the standard proxy contract code: +```shell | pc | op | opcode | stack | |------|--------|----------------|--------------------| | [00] | 36 | CALLDATASIZE | cds | @@ -66,6 +67,7 @@ The disassembly of the standard proxy contract code: | [29] | fd | REVERT | | | [2a] | 5b | JUMPDEST | 0 rds | | [2b] | f3 | RETURN | | +``` ### Minimal Creation Code @@ -138,12 +140,14 @@ The contract is built from [first principals](https://blog.openzeppelin.com/deep To copy the calldata, we need to provide the arguments for the `CALLDATACOPY` opcodes, which are `[0, 0, cds]`, where `cds` represents calldata size. +```shell | pc | op | opcode | stack | |------|--------|----------------|--------------------| | [00] | 36 | CALLDATASIZE | cds | | [01] | 5f | PUSH0 | 0 cds | | [02] | 5f | PUSH0 | 0 0 cds | | [03] | 37 | CALLDATACOPY | | +``` ### Step 2: Delegatecall