Skip to content

Commit

Permalink
EVM modules (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
seunlanlege authored Oct 10, 2023
1 parent e4fdf2e commit 84a5c2d
Show file tree
Hide file tree
Showing 50 changed files with 41,324 additions and 4 deletions.
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

0 comments on commit 84a5c2d

Please sign in to comment.