Skip to content

Commit

Permalink
Merge pull request #12 from khaeljy/khaeljy/issue11
Browse files Browse the repository at this point in the history
feat: Improve devcontainer
  • Loading branch information
khaeljy authored Sep 17, 2023
2 parents 3be206b + 9007c31 commit b1f2302
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh && curl https://get.starkli.sh | sh && ~/.starkli/bin/starkliup",
"postCreateCommand": "chmod +x .devcontainer/postCreateCommand.sh && .devcontainer/postCreateCommand.sh",

// Configure tool-specific properties.
"customizations": {
Expand Down
14 changes: 14 additions & 0 deletions .devcontainer/postCreateCommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# Install scarb
curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh

# Install starkli
curl https://get.starkli.sh | sh
# Update starkli
~/.starkli/bin/starkliup

# Install Dojo
curl -L https://install.dojoengine.org | bash
# Update Dojo
~/.dojo/bin/dojoup
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
KATANA_FORK_RPC=https://starknet-mainnet.public.blastapi.io
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
target
.env
4 changes: 3 additions & 1 deletion Scarb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ starknet = ">=2.2.0"
[[target.starknet-contract]]

[scripts]
test = "scarb fmt && scarb cairo-test"
test = "scarb fmt && scarb cairo-test"
katana = "katana"
katana-fork = "/bin/bash scripts/katana_fork.sh"
5 changes: 5 additions & 0 deletions scripts/katana_fork.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Load env
source .env

# Run katana fork
katana --rpc-url $KATANA_FORK_RPC

0 comments on commit b1f2302

Please sign in to comment.