diff --git a/.github/workflows/submodules.yml b/.github/workflows/submodules.yml index 1531dcf91..b559c3be2 100644 --- a/.github/workflows/submodules.yml +++ b/.github/workflows/submodules.yml @@ -32,7 +32,7 @@ jobs: version: nightly - name: pull kakarot submodule and setup if: steps.cached-submodules.outputs.cache-hit != 'true' - run: make setup + run: make setup && make build-kakarot - name: Save submodules id: cached-submodules uses: actions/cache/save@v3 diff --git a/Makefile b/Makefile index fdeae6429..f4ab2a9ed 100644 --- a/Makefile +++ b/Makefile @@ -7,20 +7,17 @@ ifndef STARKNET_NETWORK override STARKNET_NETWORK = katana endif -pull-kakarot: .gitmodules +setup: .gitmodules git submodule update --init --recursive cd lib/kakarot && make setup -build-kakarot: pull-kakarot +build-kakarot: cd lib/kakarot && make build && make build-sol -build-and-deploy-kakarot: - cd lib/kakarot && STARKNET_NETWORK=$(STARKNET_NETWORK) make deploy - deploy-kakarot: cd lib/kakarot && STARKNET_NETWORK=$(STARKNET_NETWORK) poetry run python ./scripts/deploy_kakarot.py -setup: pull-kakarot build-kakarot +build-and-deploy-kakarot: build-kakarot deploy-kakarot # run devnet devnet: @@ -29,9 +26,6 @@ devnet: run-dev: KAKAROT_ADDRESS=$(shell jq -r '.kakarot.address' ./lib/kakarot/deployments/$(STARKNET_NETWORK)/deployments.json) RUST_LOG=trace cargo run -p kakarot-rpc -run-release: - cargo run --release -p kakarot-rpc - # Run Katana, Deploy Kakarot, Run Kakarot RPC katana-rpc-up: docker compose -f docker-compose.yaml -f docker-compose.katana.yaml up -d --force-recreate --pull always @@ -56,8 +50,7 @@ run-katana: install-katana kill-katana: kill -2 `cat .katana/pid` && rm -fr .katana/pid -dump-katana: run-katana build-and-deploy-kakarot kill-katana - cp -R lib/kakarot/deployments/katana/ deployments/katana/ +dump-katana: run-katana deploy-kakarot kill-katana dump-genesis: build-kakarot cargo run --bin dump-genesis @@ -71,4 +64,4 @@ test-coverage: test-examples: hurl $(HURL_FILES) -.PHONY: install run devnet test +.PHONY: devnet test diff --git a/crates/test-utils/src/sequencer/mod.rs b/crates/test-utils/src/sequencer/mod.rs index 6722e012f..7943d3d19 100644 --- a/crates/test-utils/src/sequencer/mod.rs +++ b/crates/test-utils/src/sequencer/mod.rs @@ -63,7 +63,7 @@ impl Katana { /// Initializes the Katana test environment. async fn initialize(sequencer: TestSequencer, starknet_provider: Arc>) -> Self { // Load deployments - let deployments_path = root_project_path!("deployments/katana/deployments.json"); + let deployments_path = root_project_path!("lib/kakarot/deployments/katana/deployments.json"); let deployments = std::fs::read_to_string(deployments_path).expect("Failed to read deployment file"); let deployments: HashMap<&str, serde_json::Value> = serde_json::from_str(&deployments).expect("Failed to deserialize deployments"); @@ -72,7 +72,7 @@ impl Katana { let kakarot_address = FieldElement::from_hex_be(kakarot_address).expect("Failed to parse Kakarot address"); // Load declarations - let declaration_path = root_project_path!("deployments/katana/declarations.json"); + let declaration_path = root_project_path!("lib/kakarot/deployments/katana/declarations.json"); let declarations = std::fs::read_to_string(declaration_path).expect("Failed to read declaration file"); let declarations: HashMap<&str, FieldElement> = serde_json::from_str(&declarations).expect("Failed to deserialize declarations"); diff --git a/deployments/.gitkeep b/deployments/.gitkeep deleted file mode 100644 index e69de29bb..000000000