-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add your own precompiles guide (#152)
- Loading branch information
1 parent
b23a364
commit 228e0e3
Showing
1 changed file
with
11 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# How to add and test your own precompile | ||
|
||
> **DISCLAIMER**: This guide assumes you’re developing in the `zksync_era_precompiles` repo, if not, step one should be done differently. | ||
|
||
1. Create a file in `precompiles/`. | ||
2. Add the precompile name to the refresh precompiles script in the `era-test-node` submodule `submodules/era-test-node/scripts/refresh_precompiles.sh` | ||
3. Wiring the precompile to the node | ||
1. Assign an address to it in `submodules/era-test-node/src/deps/system_contracts.rs`. | ||
2. Add it to the `yul_contracts` array inside `COMPILED_IN_SYSTEM_CONTRACTS` in `submodules/era-test-node/src/deps/system_contracts.rs`. | ||
4. Now, running `make run` should run the node with your added precompile. |