Skip to content

Commit

Permalink
chore: migrate to foundry (#24)
Browse files Browse the repository at this point in the history
* chore: forge init

* forge install: forge-std

v1.6.0

* forge install: openzeppelin-contracts

v4.9.2

* chore: migrate to foundry

* chore: update README

* chore: add natspec for core contracts

* chore: fix README compile script

* fix: natspec and out/ folder
  • Loading branch information
sujithsomraaj authored Jul 19, 2023
1 parent 3edb239 commit 952e117
Show file tree
Hide file tree
Showing 66 changed files with 664 additions and 17,839 deletions.
9 changes: 0 additions & 9 deletions .eslintignore

This file was deleted.

50 changes: 0 additions & 50 deletions .eslintrc.js

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: test

on: workflow_dispatch

env:
FOUNDRY_PROFILE: ci

jobs:
check:
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
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ artifacts/
bin/
build/
cache/
deployments/hardhat/
genfiles/
failing_metadata/
node_modules/
typechain/
out/

*.pid
*.log
Expand Down
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/openzeppelin/openzeppelin-contracts
24 changes: 0 additions & 24 deletions .prettierrc.json

This file was deleted.

35 changes: 25 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,36 @@ The flow of the message and how it is transformed and relayed is detailed below:

![Illustration of ](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyWOfgotvwuIBhzylK0ud%2Fuploads%2Fco073eKSrR7xUmhObi7v%2FMMA_Highlevel.png?alt=media&token=bff8ec55-c04f-4ab9-b362-caae601154db)

## Development
### Installation
```
npm i
```
### Compile
## Local Development

**Step 1:** Clone the repository

```sh
$ git clone https://github.com/MultiMessageAggregation/multibridge
```
npx hardhat compile

**note:** Please make sure [foundry](https://github.com/foundry-rs/foundry) is installed to proceed further.

**Step 2:** Install required forge submodules

```sh
$ forge install
```
### Run test
We use Hardhat to test MultiMessageSender and MultiMessageReceiver contracts on simple behaviors.

**Step 3:** Compile

```sh
$ forge build
```
npx hardhat test

**Step 4:** Run Tests

```sh
$ forge test
```

**note:** We use [pigeon](https://github.com/exp-table/pigeon/tree/docs) to simulate the cross-chain behavior on forked mainnets.

## Contribution guidelines
Thank you for your interest in contributing to MMA! We welcome all contributions to make our project better!

Expand Down
42 changes: 0 additions & 42 deletions contracts/MessageStruct.sol

This file was deleted.

Loading

0 comments on commit 952e117

Please sign in to comment.