Skip to content

Commit f76ef1f

Browse files
authored
op-fetcher: add README.md (#15280)
1 parent 830ad18 commit f76ef1f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

op-fetcher/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## op-fetcher
2+
3+
This is a service that takes `SystemConfigProxy` and `L1StandardBridgeProxy` as inputs, and uses those addresses to fetch additional chain configuration information from onchain. All of the L1 rpc calls are made via a single solidity script, `FetchChainInfo.s.sol`. The compiled `forge-artifacts` for that script are then embedded in the go code so that `op-fetcher` can be used as a go library in addition to a cli tool. Current information fetched from onchain with this service (can be expanded in the future):
4+
* all L1 contract addresses except `SystemConfigProxy` and `L1StandardBridgeProxy`
5+
* all L1 roles
6+
* `fault_proof_status` fields (to determine no fault proofs vs. permissioned vs. permissionless)
7+
8+
## Usage
9+
1. Build (compiles solidity script used by this service, as well as go code):
10+
```
11+
cd <repo-root>/op-fetcher
12+
just build-all
13+
```
14+
2. Fetch data onchain for a single opchain and write results to json file
15+
```
16+
./bin/op-fetcher fetch \
17+
--l1-rpc-url "<l1-rpc-url>" \
18+
--system-config "<system-config-proxy-address>" \
19+
--l1-standard-bridge "<l1-standard-bridge-proxy-address>" \
20+
--output-file "./.fetcher/out.json"
21+
```

0 commit comments

Comments
 (0)