Skip to content

Commit

Permalink
feat: CI, docs, cleanup (#6)
Browse files Browse the repository at this point in the history
* feat: cleanup

* cleanup

* feat: workflows

* chore: fmt

* change to rust script

* feat: add contract deployment instructions

* cleanup

* chore: crates

* nit

* clean

* cleanup
  • Loading branch information
ratankaliani authored Oct 15, 2024
1 parent b81e463 commit c86dcd5
Show file tree
Hide file tree
Showing 24 changed files with 895 additions and 672 deletions.
27 changes: 16 additions & 11 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
# Required
CONTRACT_ADDRESS=
DEST_CHAIN_ID=
# The source chain is the chain that the light client will sync from.
SOURCE_CONSENSUS_RPC_URL=
SOURCE_CHAIN_ID=

# The destination chain is the chain that the light client will be deployed on.
DEST_RPC_URL=
PRIVATE_KEY=
DEST_CHAIN_ID=

# Required, change if using a different source chain (e.g sepolia or holesky instead of mainnet). See README.md for more info.
SOURCE_CHAIN_ID=1
SOURCE_CONSENSUS_RPC_URL=https://www.lightclientdata.org
# The private key of the account that will be deploying the contract.
PRIVATE_KEY=
# The API key for Etherscan verification.
ETHERSCAN_API_KEY=

# Required, set to mock for testing, or network to generate proofs on the SP1 Cluster
# Set to mock for testing, or network to generate proofs on the Succinct Prover Network.
SP1_PROVER=mock

# Required if using network prover
# SP1 Helios contract address
CONTRACT_ADDRESS=

# Optional configuration
SP1_PRIVATE_KEY=
SP1_VERIFIER_ADDRESS=

# Optional interval to check for updates, defaults to 5 minutes
GUARDIAN_ADDRESS=
LOOP_DELAY_MINS=
40 changes: 40 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: PR

on:
push:
branches: [main]
pull_request:
branches:
- "**"
merge_group:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
lint:
name: Formatting & Clippy
runs-on: [runs-on, runner=4cpu-linux-arm64 , "run-id=${{ github.run_id }}"]
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt

- name: Run rustfmt
run: cargo fmt --all -- --check
env:
CARGO_INCREMENTAL: 1

- name: Run cargo clippy
run: cargo clippy --all-features --all-targets -- -D warnings -A incomplete-features
env:
CARGO_INCREMENTAL: 1
22 changes: 22 additions & 0 deletions .github/workflows/pr_lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: PR Lint

on:
pull_request_target:
types:
- opened
- edited

permissions:
pull-requests: read

jobs:
main:
name: Title
runs-on:
- runs-on
- runner=2cpu-linux-arm64
- run-id=${{ github.run_id }}
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 0 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
[submodule "contracts/lib/forge-std"]
path = contracts/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "contracts/lib/succinctx"]
path = contracts/lib/succinctx
url = https://github.com/succinctlabs/succinctx
[submodule "contracts/lib/sp1-contracts"]
path = contracts/lib/sp1-contracts
url = https://github.com/succinctlabs/sp1-contracts
Loading

0 comments on commit c86dcd5

Please sign in to comment.