Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ save.json
signatures.json
*.so
/historical/
/historical-idl/
.idea/
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@ eyre = "0.6.12"
serde_with = "3.16.1"
itertools = "0.14.0"
governor = "0.10.4"
flate2 = "1.0"
serde_json = "1.0"


15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@ e5a8ba9d4d886cdadc74a00dd6b4de41929af779916c2e01fea0d59ae62d7e7c 382628780.so

Outputs are stored under `historical/<PROGRAM>/<SLOT>.so`. If a slot file already exists, it will be skipped.

### Extract historical IDL versions:

Reconstruct and store historical Anchor IDL versions for a program:

```bash
./target/release/gg-program-resurrect idl-history --program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P --output ./idl-versions
```

The command:
- Derives the Anchor IDL account address using the canonical `anchor:idl` seed pattern
- Detects IDL versions through Create and SetBuffer instructions
- Reconstructs IDL content from Write instruction sequences
- Handles zlib-compressed IDL data
- Saves each version as `{slot}.json` in the output directory

## License

MIT.
Expand Down
Loading