-
Notifications
You must be signed in to change notification settings - Fork 1
2026 03 12 sg #96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+271
−45
Merged
2026 03 12 sg #96
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
09641c4
Add CLAUDE.md for Claude Code onboarding
thedavidmeister 5e73dd4
Fix subgraph deployed addresses to match deterministic deploy
thedavidmeister 39ebe60
update deploy
thedavidmeister 701ea68
Add start block constants and enforce subgraph config consistency
thedavidmeister b4749f2
Add missing files to REUSE.toml license annotations
thedavidmeister 28ff66b
Fix markdown lint in CLAUDE.md
thedavidmeister c55c933
Suppress slither unindexed-event-address warnings and format
thedavidmeister c5c86e1
Skip findDeployBlock tests in CI to avoid RPC rate limits
thedavidmeister File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| # CLAUDE.md | ||
|
|
||
| This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. | ||
|
|
||
| ## Project Overview | ||
|
|
||
| Rain Protocol metadata system — Solidity contracts, Rust CLI/bindings, and a Graph subgraph for emitting and indexing on-chain metadata following the [MetadataV1 spec](https://github.com/rainprotocol/specs/blob/main/metadata-v1.md). | ||
|
|
||
| The core contract is **MetaBoard** — deterministically deployed at `0xfb8437AeFBB8031064E274527C5fc08e30Ac6928` across all supported networks. It emits `MetaV1_2` events that the subgraph indexes. | ||
|
|
||
| ## Build & Test Commands | ||
|
|
||
| All commands require the Nix development shell. Use `nix develop` to enter it, or prefix commands with `nix develop -c`. | ||
|
|
||
| | Task | Command | | ||
| |------|---------| | ||
| | Solidity tests | `nix develop -c rainix-sol-test` | | ||
| | Solidity static analysis | `nix develop -c rainix-sol-static` | | ||
| | Solidity build artifacts | `nix develop -c rainix-sol-artifacts` | | ||
| | Rust tests | `nix develop -c rainix-rs-test` | | ||
| | Rust static analysis | `nix develop -c rainix-rs-static` | | ||
| | Rust build artifacts | `nix develop -c rainix-rs-artifacts` | | ||
| | Subgraph build | `nix develop -c subgraph-build` | | ||
| | Subgraph tests | `nix develop -c subgraph-test` | | ||
| | REUSE license check | `nix develop -c rainix-sol-legal` | | ||
|
|
||
| Run a single Solidity test (inside nix shell): | ||
|
|
||
| ```sh | ||
| forge test --match-test testFunctionName | ||
| forge test --match-contract MetaBoardTest | ||
| ``` | ||
|
|
||
| Run a single Rust test (inside nix shell): | ||
|
|
||
| ```sh | ||
| cargo test test_name | ||
| ``` | ||
|
|
||
| ## Architecture | ||
|
|
||
| ### Solidity (`src/`) | ||
| - `src/concrete/MetaBoard.sol` — Main contract; emits `MetaV1_2` events with sender, subject, and metadata bytes | ||
| - `src/lib/LibMeta.sol` — Metadata validation; checks magic number prefix `0xff0a89c674ee7874` | ||
| - `src/lib/LibDescribedByMeta.sol` — Helper for contracts implementing `IDescribedByMetaV1` | ||
| - `src/lib/deploy/LibMetaBoardDeploy.sol` — Deterministic deployment using Zoltu deployer pattern | ||
|
|
||
| ### Rust (`crates/`) | ||
| - `crates/cli` — `rain-metadata` binary; metadata generation/validation for multiple types (authoring, dotrain, Solidity ABI, etc.) | ||
| - `crates/bindings` — Solidity bindings generated via `alloy::sol!` from JSON ABIs in `/out` | ||
| - `crates/metaboard` — GraphQL client (Cynic) for querying MetaBoard subgraph data | ||
|
|
||
| ### Subgraph (`subgraph/`) | ||
| - AssemblyScript handlers indexing `MetaV1_2` events from MetaBoard | ||
| - Deployed across ~15 networks (Arbitrum, Base, Polygon, Flare, etc.) | ||
|
|
||
| ## Key Configuration | ||
|
|
||
| - **Solidity**: `foundry.toml` — solc 0.8.25, Cancun EVM, optimizer 1M runs, `bytecode_hash = "none"`, `cbor_metadata = false` | ||
| - **Rust workspace**: `Cargo.toml` at root, three crates | ||
| - **Fuzz runs**: 5,096 (foundry.toml `[fuzz]`) | ||
| - **Remappings**: `rain.deploy/=lib/rain.deploy/src/` | ||
|
|
||
| ## Licensing | ||
|
|
||
| DecentraLicense 1.0 (DCL-1.0). REUSE 3.2 compliant — all files need SPDX license headers. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule rain.deploy
updated
2 files
| +84 −0 | src/lib/LibRainDeploy.sol | |
| +125 −0 | test/src/lib/LibRainDeploy.t.sol |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,38 +1,32 @@ | ||
| { | ||
| "matic": { | ||
| "metaboard0": { | ||
| "address": "0x23F77e7Bc935503e437166498D7D72f2Ea290E1f", | ||
| "startBlock": 55856789 | ||
| "address": "0xfb8437AeFBB8031064E274527C5fc08e30Ac6928", | ||
| "startBlock": 82855948 | ||
| } | ||
| }, | ||
| "arbitrum-one": { | ||
| "metaboard0": { | ||
| "address": "0x1eFd85E6C384fAD9B80C6D508E9098Eb91C4eD30", | ||
| "startBlock": 256572417 | ||
| "address": "0xfb8437AeFBB8031064E274527C5fc08e30Ac6928", | ||
| "startBlock": 431042729 | ||
| } | ||
| }, | ||
| "base": { | ||
| "metaboard0": { | ||
| "address": "0x59401C9302E79Eb8AC6aea659B8B3ae475715e86", | ||
| "startBlock": 18309350 | ||
| "address": "0xfb8437AeFBB8031064E274527C5fc08e30Ac6928", | ||
| "startBlock": 42021282 | ||
| } | ||
| }, | ||
| "mainnet": { | ||
| "base-sepolia": { | ||
| "metaboard0": { | ||
| "address": "0x8F61d274aaB5D8CFD82dc266529EAe33020386a9", | ||
| "startBlock": 21041769 | ||
| "address": "0xfb8437AeFBB8031064E274527C5fc08e30Ac6928", | ||
| "startBlock": 38683088 | ||
| } | ||
| }, | ||
| "berachain-mainnet": { | ||
| "flare": { | ||
| "metaboard0": { | ||
| "address": "0x8F61d274aaB5D8CFD82dc266529EAe33020386a9", | ||
| "startBlock": 3092258 | ||
| } | ||
| }, | ||
| "sonic": { | ||
| "metaboard0": { | ||
| "address": "0x8F61d274aaB5D8CFD82dc266529EAe33020386a9", | ||
| "startBlock": 17707513 | ||
| "address": "0xfb8437AeFBB8031064E274527C5fc08e30Ac6928", | ||
| "startBlock": 55347067 | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| // SPDX-License-Identifier: LicenseRef-DCL-1.0 | ||
| // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd | ||
| import { Address } from "@graphprotocol/graph-ts"; | ||
|
|
||
| export const CONTRACT_ADDRESS = Address.fromString("0xfb8437AeFBB8031064E274527C5fc08e30Ac6928"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.