Draft: Tezlink/RPC : Add get storage RPC to Tezlink
What
Expose the storage RPC for smart contracts in the Tezlink service.
Why
This RPC enables users and external tooling to query a contract's current storage state directly via Tezlink. It is essential for smart contract introspection and tooling interoperability.
How
- Imported the
storageRPC from the protocol plugin contract services. - Registered it under the block services in
tezos_services.ml. - Implemented
storagein the Tezlink backend using durable storage reads. - Added the
Path.storagehelper and used it to locate contract storage in the durable tree. - Edited Octez-client contract_storage function so that endpoint can be edited.
- Wrote a Tezt test
test_tezlink_storageto verify retrieval of the storage forbootstrap1.
Manually testing the MR
Run the test suite and ensure test_tezlink_storage passes:
make octez-client && make octez-evm-node && dune exec etherlink/tezt/tests/main.exe -- tezlink storage
You can also test manually using curl at this path on the node :
curl http://localhost:<port>/tezlink/chains/main/blocks/head/context/contracts/<contract>/storage
Edited by Brahima Dibassi