Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

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-url

Options:
-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._