Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

Commit

Permalink
clean makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
greged93 committed Nov 10, 2023
1 parent 6dbe74b commit 9854851
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/submodules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 5 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -71,4 +64,4 @@ test-coverage:
test-examples:
hurl $(HURL_FILES)

.PHONY: install run devnet test
.PHONY: devnet test
4 changes: 2 additions & 2 deletions crates/test-utils/src/sequencer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl Katana {
/// Initializes the Katana test environment.
async fn initialize(sequencer: TestSequencer, starknet_provider: Arc<JsonRpcClient<HttpTransport>>) -> 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");
Expand All @@ -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");
Expand Down
Empty file removed deployments/.gitkeep
Empty file.

0 comments on commit 9854851

Please sign in to comment.