Skip to content

Commit

Permalink
ZK-382: Implement deposit for shortlist of tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
kroist committed Jan 22, 2025
1 parent dbccaec commit 33a4a93
Show file tree
Hide file tree
Showing 11 changed files with 844 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ target/
.DS_Store
.vscode/
contracts/*Key.sol
contracts/*Verifier.sol
contracts/*Verifier*.sol
contracts/Poseidon2T8Assembly.sol
**/*output.log
*.txt
Expand Down
63 changes: 52 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ sha3 = { version = "0.10" }
shellexpand = { version = "3.1.0" }
# https://github.com/Cardinal-Cryptography/zkOS-circuits/tree/7743b2f084d80685041c1b16718e6388226e9631
shielder-circuits = { git = "ssh://git@github.com/Cardinal-Cryptography/zkOS-circuits", rev = "7743b2f" }
# https://github.com/Cardinal-Cryptography/zkOS-circuits/tree/4f413a87dac5ceb7cf7581691e1b799c2914cdcc
shielder-circuits-v0_1_0 = { package = "shielder-circuits", git = "ssh://git@github.com/Cardinal-Cryptography/zkOS-circuits", rev = "4f413a8" }
testcontainers = { version = "0.19.0" }
thiserror = { version = "2.0.9" }
tokio = { version = "1.38.0" }
Expand Down
22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ else
PRIVATE_KEY=$(PRIVATE_KEY) OWNER_ADDRESS=$(OWNER_ADDRESS) forge script DeployShielderScript --broadcast --rpc-url $(NETWORK) --sender $(shell cast wallet address $(PRIVATE_KEY))
endif

.PHONY: deploy-contracts-v0_1_0
deploy-contracts-v0_1_0: # Deploy solidity contracts
deploy-contracts-v0_1_0:
ifeq ($(NETWORK),anvil)
$(eval PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80) \
PRIVATE_KEY=$(PRIVATE_KEY) OWNER_ADDRESS=$(OWNER_ADDRESS) forge script DeployShielderV0_1_0Script --broadcast --rpc-url anvil --sender $(shell cast wallet address $(PRIVATE_KEY))
else
PRIVATE_KEY=$(PRIVATE_KEY) OWNER_ADDRESS=$(OWNER_ADDRESS) forge script DeployShielderV0_1_0Script --broadcast --rpc-url $(NETWORK) --sender $(shell cast wallet address $(PRIVATE_KEY))
endif

.PHONY: generate-poseidon-contracts
generate-poseidon-contracts: # Generate Poseidon contract
generate-poseidon-contracts:
Expand All @@ -69,10 +79,22 @@ generate-verifier-contracts:
cargo run --release --bin halo2_solidity_verifier_generator
$(MAKE) format-contracts


.PHONY: generate-verifier-contracts-v0_1_0
generate-verifier-contracts-v0_1_0: # Generate relation verifier contracts for v0_1_0 contract
generate-verifier-contracts-v0_1_0:
cd crates/halo2-verifier
cargo run --release --bin halo2_solidity_verifier_generator_v0_1_0
$(MAKE) format-contracts

.PHONY: generate-contracts
generate-contracts: # Generate poseidon & relation verifier contracts
generate-contracts: generate-poseidon-contracts generate-verifier-contracts

.PHONY: generate-contracts-v0_1_0
generate-contracts-v0_1_0: # Generate poseidon & relation verifier contracts
generate-contracts-v0_1_0: generate-poseidon-contracts generate-verifier-contracts-v0_1_0

.PHONY: measure-gas
measure-gas: # measure shielder gas usage
measure-gas: compile-contracts
Expand Down
Loading

0 comments on commit 33a4a93

Please sign in to comment.