Skip to content
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

feat : code update as per zaun #18

Merged
merged 25 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/linters-cargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,49 @@ jobs:
# before the plugin, as the cache uses the current rustc version as its cache key
- run: rustup show

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"

- name: Install Ganache
run: |
npm install -g [email protected]
ganache --version

- name: Install Solc
run: |
pip install solc-select
solc-select install 0.8.19
solc-select use 0.8.19
solc --version

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

# ---------------------------------------------------
# workaround : https://github.com/asdf-vm/actions/issues/562
# asdf installation
- name: Detect ASDF .tool-versions file in repo
shell: bash
id: detect_tool_versions_file
run: |
if [ -s .tool-versions ]; then
echo "exists=1" >> $GITHUB_OUTPUT
fi

- name: ASDF install tools
if: ${{ steps.detect_tool_versions_file.outputs.exists == '1' }}
uses: asdf-vm/actions/install@6a442392015fbbdd8b48696d41e0051b2698b2e4
# ---------------------------------------------------

- uses: Swatinem/rust-cache@v2
- name: Format and clippy
run: |
git submodule update --init --recursive
make artifacts-linux
cargo fmt -- --check
cargo clippy --no-deps -- -D warnings
cargo clippy --tests --no-deps -- -D warnings
40 changes: 40 additions & 0 deletions .github/workflows/rust-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,46 @@ jobs:

- uses: Swatinem/rust-cache@v2

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"

- name: Install Ganache
run: |
npm install -g [email protected]
ganache --version

- name: Install Solc
run: |
pip install solc-select
solc-select install 0.8.19
solc-select use 0.8.19
solc --version

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

# ---------------------------------------------------
# workaround : https://github.com/asdf-vm/actions/issues/562
# asdf installation
- name: Detect ASDF .tool-versions file in repo
shell: bash
id: detect_tool_versions_file
run: |
if [ -s .tool-versions ]; then
echo "exists=1" >> $GITHUB_OUTPUT
fi

- name: ASDF install tools
if: ${{ steps.detect_tool_versions_file.outputs.exists == '1' }}
uses: asdf-vm/actions/install@6a442392015fbbdd8b48696d41e0051b2698b2e4
# ---------------------------------------------------

- name: Build the project
run: |
git submodule update --init --recursive
make artifacts-linux
cargo build --release --workspace
48 changes: 35 additions & 13 deletions .github/workflows/test-bridge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ jobs:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

# ---------------------------------------------------
# workaround : https://github.com/asdf-vm/actions/issues/562
# asdf installation
- name: Detect ASDF .tool-versions file in repo
shell: bash
id: detect_tool_versions_file
run: |
if [ -s .tool-versions ]; then
echo "exists=1" >> $GITHUB_OUTPUT
fi

- name: ASDF install tools
if: ${{ steps.detect_tool_versions_file.outputs.exists == '1' }}
uses: asdf-vm/actions/install@6a442392015fbbdd8b48696d41e0051b2698b2e4
# ---------------------------------------------------

- name: Setup build deps
run: |
sudo apt-get update
Expand All @@ -37,26 +53,30 @@ jobs:
with:
version: nightly

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"

- name: Install Ganache
run: |
npm install -g [email protected]
ganache --version

- name: Install Solc
run: |
pip install solc-select
solc-select install 0.8.19
solc-select use 0.8.19
solc --version

- name: Checkout Madara
uses: actions/checkout@v4
with:
repository: madara-alliance/madara
ref: "d188aa91efa78bcc54f92aa1035295fd50e068d2"
path: madara

- name: Move Madara Devnet config
working-directory: madara
run: |
ls
mv configs/presets/devnet.yaml ../bin/devnet.yaml

- name: Build Madara
working-directory: madara
run: |
cargo build
mv target/debug/madara ../bin/madara
cd ..

- name: Run anvil
run: |
anvil &
Expand All @@ -70,6 +90,8 @@ jobs:

- name: Run llvm-cov
run: |
git submodule update --init --recursive
make artifacts-linux
cargo llvm-cov nextest --release --lcov --output-path lcov.info

- name: Coveralls
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
.env
addresses.json
/bin/madara
/bin/devnet.yaml
/bin/devnet.yaml
.cairo
/artifacts
madara-dbs
madara/
24 changes: 16 additions & 8 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
[submodule "starkgate contracts 2.0.1"]
path = starkgate-contracts-2-0-1
url = https://github.com/starknet-io/starkgate-contracts
branch = cairo-1
[submodule "starkgate contracts 0.9.0"]
path = starkgate-contracts
url = https://github.com/starknet-io/starkgate-contracts
branch = update-cairo-0.9.0
[submodule "lib/argent-contracts-starknet"]
path = lib/argent-contracts-starknet
url = https://github.com/argentlabs/argent-contracts-starknet
[submodule "lib/braavos-account-cairo"]
path = lib/braavos-account-cairo
url = https://github.com/myBraavos/braavos-account-cairo
[submodule "lib/starkgate-contracts-old"]
path = lib/starkgate-contracts-old
url = https://github.com/starknet-io/starkgate-contracts
branch = update-cairo-0.9.0
[submodule "lib/starkgate-contracts-latest"]
path = lib/starkgate-contracts-latest
url = https://github.com/starknet-io/starkgate-contracts
[submodule "lib/starkgate-contracts-82e651f"]
path = lib/starkgate-contracts-82e651f
url = https://github.com/starknet-io/starkgate-contracts.git
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
scarb 2.8.2
18 changes: 9 additions & 9 deletions Cargo.lock

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

18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ serde_with = { version = "2.3.3", default-features = false }
url = "2.4.1"

# Zaun Deps
ethereum-instance = { git = "https://github.com/karnotxyz/zaun", package = "ethereum-instance", rev = "782967e5" }
starkgate-manager-client = { git = "https://github.com/karnotxyz/zaun", package = "starkgate-manager-client", rev = "782967e5" }
starkgate-registry-client = { git = "https://github.com/karnotxyz/zaun", package = "starkgate-registry-client", rev = "782967e5" }
starknet-core-contract-client = { git = "https://github.com/karnotxyz/zaun", package = "starknet-core-contract-client", rev = "782967e5" }
starknet-erc20-client = { git = "https://github.com/karnotxyz/zaun", package = "starknet-erc20-client", rev = "782967e5" }
starknet-eth-bridge-client = { git = "https://github.com/karnotxyz/zaun", package = "starknet-eth-bridge-client", rev = "782967e5" }
starknet-proxy-client = { git = "https://github.com/karnotxyz/zaun", package = "starknet-proxy-client", rev = "782967e5" }
starknet-token-bridge-client = { git = "https://github.com/karnotxyz/zaun", package = "starknet-token-bridge-client", rev = "782967e5" }
zaun-utils = { git = "https://github.com/karnotxyz/zaun", package = "utils", rev = "782967e5" }
ethereum-instance = { git = "https://github.com/karnotxyz/zaun", package = "ethereum-instance", rev = "34bda2ccb69fb26be9cdfe091c11f27480850c96" }
starkgate-manager-client = { git = "https://github.com/karnotxyz/zaun", package = "starkgate-manager-client", rev = "34bda2ccb69fb26be9cdfe091c11f27480850c96" }
starkgate-registry-client = { git = "https://github.com/karnotxyz/zaun", package = "starkgate-registry-client", rev = "34bda2ccb69fb26be9cdfe091c11f27480850c96" }
starknet-core-contract-client = { git = "https://github.com/karnotxyz/zaun", package = "starknet-core-contract-client", rev = "34bda2ccb69fb26be9cdfe091c11f27480850c96" }
starknet-erc20-client = { git = "https://github.com/karnotxyz/zaun", package = "starknet-erc20-client", rev = "34bda2ccb69fb26be9cdfe091c11f27480850c96" }
starknet-eth-bridge-client = { git = "https://github.com/karnotxyz/zaun", package = "starknet-eth-bridge-client", rev = "34bda2ccb69fb26be9cdfe091c11f27480850c96" }
starknet-proxy-client = { git = "https://github.com/karnotxyz/zaun", package = "starknet-proxy-client", rev = "34bda2ccb69fb26be9cdfe091c11f27480850c96" }
starknet-token-bridge-client = { git = "https://github.com/karnotxyz/zaun", package = "starknet-token-bridge-client", rev = "34bda2ccb69fb26be9cdfe091c11f27480850c96" }
zaun-utils = { git = "https://github.com/karnotxyz/zaun", package = "utils", rev = "34bda2ccb69fb26be9cdfe091c11f27480850c96" }

# Starknet Deps
starknet = "0.11.0"
Expand Down
Loading
Loading