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

EVM modules #45

Merged
merged 9 commits into from
Oct 10, 2023
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
17 changes: 16 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
target
.github
.cargo
.cargo

# Compiler files
cache/
out/

# Ignores development broadcast logs
!/broadcast
/broadcast/*/31337/
/broadcast/**/dry-run/

# Docs
docs/

# Dotenv file
.env
45 changes: 43 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ concurrency:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-C link-args=-Wl,--allow-multiple-definition"
FOUNDRY_PROFILE: ci


jobs:
check:
check-rust:
name: Check Workspace
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -51,6 +53,7 @@ jobs:
cargo +nightly check -p ismp-sync-committee --no-default-features --target=wasm32-unknown-unknown --locked



check-runtime-wasm:
name: Check Runtime Wasm
runs-on: ubuntu-latest
Expand Down Expand Up @@ -100,7 +103,11 @@ jobs:
echo "TUID=$UID" >> $GITHUB_ENV

- name: Checkout sources
uses: actions/checkout@master
uses: actions/checkout@v2
with:
token: ${{ secrets.GH_TOKEN }}
submodules: recursive


- name: Install rust stable toolchain
uses: actions-rs/toolchain@v1
Expand All @@ -112,11 +119,17 @@ jobs:
sudo apt update
sudo apt install protobuf-compiler

- uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: ${{ secrets.SSH_KEY }}


- name: Run unit tests
run: |
cargo +nightly test -p pallet-ismp --all-targets --all-features --locked
cargo +nightly test -p ismp-testsuite --all-targets --all-features --locked
cargo +nightly test -p ethereum-trie --all-features --locked
cd evm/forge && cargo test

- name: Clone eth-pos-devnet repository
run: |
Expand All @@ -129,3 +142,31 @@ jobs:
- name: Run all tests
run: |
cargo +nightly test -p sync-committee-prover -- --nocapture


check-solidity:
strategy:
fail-fast: true

name: Foundry project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

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

- name: Run Forge build
run: |
forge --version
forge build --sizes
id: build

- name: Run Forge tests
run: |
forge test -vvv
id: test
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@
**/zombienet/zombienet
/pallet-ismp/evm/solidity/out
/pallet-ismp/evm/solidity/cache
.env
.env*

evm/out/
evm/cache/
evm/broadcast/
evm/forge/target/
15 changes: 15 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[submodule "evm/lib/ismp-solidity"]
path = evm/lib/ismp-solidity
url = https://github.com/polytope-labs/ismp-solidity
[submodule "evm/lib/solidity-merkle-trees"]
path = evm/lib/solidity-merkle-trees
url = https://github.com/polytope-labs/solidity-merkle-trees
[submodule "evm/lib/multi-chain-tokens"]
path = evm/lib/multi-chain-tokens
url = https://github.com/polytope-labs/multi-chain-tokens
[submodule "evm/lib/forge-std"]
path = evm/lib/forge-std
url = git@github.com:foundry-rs/forge-std
[submodule "evm/lib/openzeppelin-contracts"]
path = evm/lib/openzeppelin-contracts
url = https://github.com/openzeppelin/openzeppelin-contracts
7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,11 @@ members = [
"parachain/modules/consensus/sync-committee/prover",
"parachain/modules/consensus/sync-committee/verifier",
"parachain/modules/consensus/sync-committee/primitives",

# evm tests
# "evm/forge"
]
exclude = [
"evm/forge"
]

Loading
Loading