-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
CCIP gethwrappers with zkstack support (integrated with main flow) #15487
base: develop
Are you sure you want to change the base?
Changes from all commits
f2c6a91
4d31dea
0bf13d1
26eb91e
058da9c
44912a2
c58d1cf
78a9d08
8d21f2e
74d46ad
79539d1
10128e9
a3c61ab
03a4a7a
4b73bd3
4697679
28bb116
fa1e1b2
118ec38
1cd6ec8
b0957f2
cb4d6e4
311ee9a
f46568d
9f16729
ceae356
a4c6d33
dce6eac
5359428
11bfbca
86eaefe
a0775fc
66eb8ec
c2927bb
1413c61
e75485d
d8ff804
20c7c2e
c7788f7
1079efe
0a2425d
cc40fa4
6873664
4d1c29d
aa868d5
6cc2be5
fe7c5be
1188149
9c4d285
ff6bdff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ artifacts | |
cache | ||
node_modules | ||
solc | ||
zksolc | ||
abi | ||
coverage | ||
coverage.json | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,16 @@ pnpmdep: ## Install solidity contract dependencies through pnpm | |
abigen: ## Build & install abigen. | ||
../tools/bin/build_abigen | ||
|
||
|
||
# env var example | ||
# export ZKSOLC_VERSION=1.5.6 | ||
# make setup_zksolc | ||
# make call example | ||
# make ZKSOLC_VERSION=1.5.6 setup_zksolc | ||
.PHONY: setup_zksolc | ||
setup_zksolc: ## Download and install zksolc | ||
../tools/bin/setup_zksolc.sh $(ZKSOLC_VERSION) | ||
|
||
.PHONY: mockery | ||
mockery: $(mockery) ## Install mockery. | ||
go install github.com/vektra/mockery/[email protected] | ||
|
@@ -76,15 +86,15 @@ ccip-lcov: | |
# make call example | ||
# make FOUNDRY_PROFILE=llo-feeds wrappers | ||
.PHONY: wrappers | ||
wrappers: pnpmdep mockery abigen ## Recompiles solidity contracts and their go wrappers. | ||
wrappers: pnpmdep mockery abigen setup_zksolc ## Recompiles solidity contracts and their go wrappers. | ||
./scripts/native_solc_compile_all_$(FOUNDRY_PROFILE) | ||
go generate ../core/gethwrappers/$(FOUNDRY_PROFILE) | ||
|
||
# This call generates all gethwrappers for all products. It does so based on the | ||
# assumption that native_solc_compile_all contains sub-calls to each product, and | ||
# go_generate does the same. | ||
.PHONY: wrappers-all | ||
wrappers-all: pnpmdep mockery abigen ## Recompiles solidity contracts and their go wrappers. | ||
wrappers-all: pnpmdep mockery abigen setup_zksolc ## Recompiles solidity contracts and their go wrappers. | ||
# go_generate contains a call to compile all contracts before generating wrappers | ||
go generate ../core/gethwrappers/go_generate.go | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ echo " └─────────────────────── | |
SOLC_VERSION="0.8.24" | ||
OPTIMIZE_RUNS=26000 | ||
OPTIMIZE_RUNS_OFFRAMP=500 | ||
ZKSOLC_VERSION="1.5.3" | ||
|
||
|
||
SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" | ||
|
@@ -38,6 +39,13 @@ compileContract () { | |
--bin-runtime --hashes --metadata --metadata-literal --combined-json abi,hashes,metadata,srcmap,srcmap-runtime \ | ||
--evm-version paris \ | ||
"$ROOT"/contracts/src/v0.8/"$1" | ||
|
||
zksolc --overwrite -O3 --metadata-hash none \ | ||
-o "$ROOT"/contracts/zksolc/v$ZKSOLC_VERSION/"$contract" \ | ||
--bin --allow-paths "$ROOT"/contracts/src/v0.8 \ | ||
--metadata-literal \ | ||
--evm-version paris \ | ||
"$ROOT"/contracts/src/v0.8/"$1" | ||
} | ||
|
||
|
||
|
@@ -78,11 +86,11 @@ compileContract ccip/test/helpers/receivers/MaybeRevertMessageReceiver.sol | |
compileContract ccip/test/helpers/MultiOCR3Helper.sol | ||
compileContract ccip/test/mocks/MockE2EUSDCTokenMessenger.sol | ||
compileContract ccip/test/mocks/MockE2EUSDCTransmitter.sol | ||
compileContract ccip/test/WETH9.sol | ||
# compileContract ccip/test/WETH9.sol (error) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can completely exclude these test contracts? no? |
||
compileContract ccip/test/helpers/CCIPReaderTester.sol | ||
|
||
# Encoding Utils | ||
compileContract ccip/interfaces/encodingutils/ICCIPEncodingUtils.sol | ||
# compileContract ccip/interfaces/encodingutils/ICCIPEncodingUtils.sol (error) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm, what is the error here? something we can fix? or is this file not being used by any contract? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
# Customer contracts | ||
compileContract ccip/pools/USDC/USDCTokenPool.sol | ||
|
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the overwrite same as the "mode"?
& any other option to provide "fallback_to_optimizing_for_size"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think unless you dont specify this flag, it should be false.
--overwrite
is for overwriting a file if the wrapper already exists