-
Notifications
You must be signed in to change notification settings - Fork 15
Add zksync compilation scripts #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
ae6ec17
Add zksync compilation scripts
e7efb2d
Amend variable order
d8d7a25
Add docs
c368596
Simple generation
7628716
Add wrapper
ad037d7
Merge branch 'develop' into zksync
dd51cac
Merge branch 'zksync' into zksync-gethwrappers
43cc25f
Generate necessary contracts
adb849c
Merge branch 'develop' into zksync
ilanolkies f5e8988
Remove simple tempalte
6d80e2a
CI
0b6416d
Remove magic number
23be654
Update gethwrappers/generation/generate/zksync/vars.go
ilanolkies 21d83e2
Make forge-zksync phony + detect version as abigen
e2270e6
Detect version
8063a65
Merge branch 'develop' into zksync
18a1e06
Revert .github/workflows/solidity-wrappers.yml
e162c12
Merge branch 'develop' into zksync
6ca999d
Comment zksync-wrappers
901f39b
Remove FOUNDRY_PROJECT_SUFFIX variable usage
ilanolkies c1680ef
Fix FOUNDRY_PROFILE
4c22d6c
Remove variable
040f1f9
Use bytecode instead of dir
18aa182
Merge branch 'develop' into zksync
6596ad9
Refactor forge json decode
9cb11c6
Update install_forge_zksync
ilanolkies File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ tmp/ | |
| .pnp | ||
| .pnp.js | ||
| tools/bin/abigen | ||
| tools/bin/forge_zksync | ||
|
|
||
| /chainlink | ||
| core/chainlink | ||
|
|
||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ artifacts | |
| cache | ||
| node_modules | ||
| solc | ||
| zkout | ||
| abi | ||
| coverage | ||
| coverage.json | ||
|
|
||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,33 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -e | ||
|
|
||
| echo " ┌──────────────────────────────────────────────┐" | ||
| echo " │ Compiling ZKSync contracts... │" | ||
| echo " └──────────────────────────────────────────────┘" | ||
|
|
||
| FOUNDRY_PROJECT_SUFFIX="" | ||
ilanolkies marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| CONTRACTS_DIR="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; cd ../ && pwd -P )" | ||
|
|
||
| compileContract() { | ||
| local contract | ||
| contract=$(basename "$1") | ||
| echo "Compiling" "$contract" | ||
|
|
||
| PROJECT=$2 | ||
| export FOUNDRY_PROFILE="$PROJECT"$FOUNDRY_PROJECT_SUFFIX | ||
ilanolkies marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ${CONTRACTS_DIR}/../tools/bin/forge_zksync build $CONTRACTS_DIR/src/v0.8/$PROJECT/"$1.sol" --zksync \ | ||
| --root $CONTRACTS_DIR \ | ||
| $3 | ||
| } | ||
|
|
||
| compileContract token/ERC677/LinkToken shared "--use 0.8.19" | ||
| compileContract token/ERC677/BurnMintERC677 shared "--use 0.8.19" | ||
| compileContract multicall/ebd8b64/src/Multicall3 vendor "--use 0.8.19" | ||
| compileContract CapabilitiesRegistry keystone | ||
|
|
||
| # simplest way without modifications to list all ccip contracts | ||
| for x in $(grep "^compileContract .*$" ${CONTRACTS_DIR}/scripts/native_solc_compile_all_ccip | sed 's/compileContract //'); do \ | ||
| compileContract $x ccip; \ | ||
| done | ||
This file contains hidden or 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,22 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -e | ||
|
|
||
| VERSION="0.0.12" | ||
| if [[ "$OSTYPE" == "linux-gnu"* ]]; then | ||
| OS="linux" | ||
| ARCH="x86_64" | ||
| elif [[ "$OSTYPE" == "darwin"* ]]; then | ||
| OS="darwin" | ||
| ARCH=$(uname -m) | ||
| else | ||
| echo "Unsupported OS: $OSTYPE" | ||
| exit 1 | ||
| fi | ||
|
|
||
| ARTIFACT_URL="https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v${VERSION}/foundry_zksync_v${VERSION}_${OS}_${ARCH}.tar.gz" | ||
| THIS_DIR="$(realpath "$(dirname $0)")" | ||
| echo $ARTIFACT_URL | ||
| curl $ARTIFACT_URL -L -o- | tar -xv -C $THIS_DIR | ||
| rm $THIS_DIR/cast | ||
| mv $THIS_DIR/forge $THIS_DIR/forge_zksync |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.