Skip to content

Commit

Permalink
feat(supersim): configure l1 and l2 genesis state
Browse files Browse the repository at this point in the history
  • Loading branch information
tremarkley committed Jun 27, 2024
1 parent aa2d91a commit d320d75
Show file tree
Hide file tree
Showing 8 changed files with 16,964 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: contracts-tests
name: Unit Tests

on:
workflow_dispatch:
Expand All @@ -20,14 +20,11 @@ env:
FOUNDRY_PROFILE: ci

jobs:
check:
strategy:
fail-fast: true

name: Foundry project
contracts-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

Expand All @@ -46,3 +43,25 @@ jobs:
run: |
forge test -vvv --root ./contracts
id: test

go-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

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

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '^1.22'

- name: Install dependencies
run: go mod download

- name: Run tests
run: go test ./... -v
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ go.work
go.work.sum

# env file
.env
.env

.DS_Store
6 changes: 4 additions & 2 deletions anvil/anvil.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ import (
)

type Config struct {
ChainId uint64
Port uint64
ChainId uint64
Port uint64
GenesisPath string
}

type Anvil struct {
Expand Down Expand Up @@ -53,6 +54,7 @@ func (a *Anvil) Start(ctx context.Context) error {
"--host", "127.0.0.1",
"--chain-id", fmt.Sprintf("%d", a.cfg.ChainId),
"--port", fmt.Sprintf("%d", a.cfg.Port),
"--init", fmt.Sprintf("%s", a.cfg.GenesisPath),
}

a.cmd = exec.CommandContext(a.resourceCtx, "anvil", args...)
Expand Down
Loading

0 comments on commit d320d75

Please sign in to comment.