Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kariy/jin
Starknet contract storage dumper
https://github.com/kariy/jin
rust starknet tui
Last synced: 24 days ago
JSON representation
Starknet contract storage dumper
- Host: GitHub
- URL: https://github.com/kariy/jin
- Owner: kariy
- Created: 2023-03-18T04:53:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-22T09:15:19.000Z (over 1 year ago)
- Last Synced: 2024-08-04T01:03:53.541Z (4 months ago)
- Topics: rust, starknet, tui
- Language: Rust
- Homepage:
- Size: 80.1 KB
- Stars: 11
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-starknet - jin - Contract storage dumper. (Additional developer resources)
README
# jin
A tool for dumping storage slots of a Starknet contract.
## How it works
This tool relies on the `starknet_getStateUpdate` endpoint. It will query the state updates of each block from `--from-block` to `--to-block` and filter the storage changes of only the specified `--contract`.
In order to ensure you fetch the full contract state properly, you would have to set `--from-block` to the block number the contract was deployed at and set `--to-block` to the latest block.
## Usage
```
Usage: jin [OPTIONS] --contract --from-block --to-block --rpc-urlOptions:
-c, --contract The contract address whose storage to be dumped.
-f, --from-block
-t, --to-block
--ui Display a UI for browsing through the contract storages.
-o, --output The output file path.
-u, --rpc-url The RPC endpoint. [env: STARKNET_RPC_URL=]
-h, --help Print help
```The storage data will be saved in the `--output` file `(default: ./output/storage_slot.json)`.
## Keybinds
```
Select previous item.
Select next item.
Exit the UI.
```## Note
_If you are using a RPC provider like INFURA, you might have to update the rate limits depending on the total of blocks you are querying because the requests will be done in parallel._