Skip to content

Commit

Permalink
link extcodecopy limitation with its mitigation
Browse files Browse the repository at this point in the history
  • Loading branch information
nbaztec committed Sep 9, 2024
1 parent ff5ca7f commit edf9bf1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/zksync-specifics/limitations/compilation.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ contract FooTest is Test {
}
```

See [here](./general.md#accessing-contract-bytecode-and-hash) on how to circumvent this issue.

### Contract Size Limit

`zksolc` currently limits the number of instructions to 2^16 that are compiled for a contract. As such for large contracts, the compilation will fail with the error:
Expand Down
2 changes: 1 addition & 1 deletion src/zksync-specifics/limitations/general.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function createAddress(sender: Address, senderNonce: BigNumberish) {

### Accessing Contract Bytecode and Hash

zkEVM does not allow obtaining bytecodes from `address.code` or computing their respective hashes. This is particularly useful when computing CREATE2 addresses.
zkEVM does not allow obtaining bytecodes from `address.code` or computing their respective hashes, which will be raised as an error during [compilation](./compilation.md#contract-bytecode-access). This is particularly useful when computing CREATE2 addresses.

To circumvent this limitation, it is recommended to use the FFI functionality of cheatcodes:

Expand Down

0 comments on commit edf9bf1

Please sign in to comment.