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 26, 2024
1 parent aa2d91a commit 6e8bf66
Show file tree
Hide file tree
Showing 7 changed files with 16,963 additions and 13 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/go-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: go-tests

on:
push:
branches:
- main
pull_request:
branches:
- main
merge_group:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check:
strategy:
fail-fast: true

test:
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.16' # Adjust the Go version as needed

- name: Cache Go modules
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- 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 6e8bf66

Please sign in to comment.