Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Produce metadata with storage layout #541

Closed
seanyoung opened this issue Oct 29, 2021 · 2 comments
Closed

Produce metadata with storage layout #541

seanyoung opened this issue Oct 29, 2021 · 2 comments
Labels
enhancement New feature or request polkadot Concerns the Polkadot target solana The Solana target

Comments

@seanyoung
Copy link
Contributor

This will make it possible to walk storage and dump the entire state

@seanyoung seanyoung added the enhancement New feature or request label Nov 1, 2021
@leyafo
Copy link

leyafo commented Feb 17, 2022

How to parse the storage data like ethereum getStorageAt? What can I do for contribution?

@seanyoung
Copy link
Contributor Author

@leyafo sorry I missed your comment, @LucasSte reminded me.

The storage data layout is very blockchain dependant, and meta-data needs to be generated for each.

For Parity Substrate, metadata is produced for most data types here https://github.com/hyperledger-labs/solang/blob/main/src/abi/substrate.rs#L367-L388

For ewasm, we need to generate metadata like the storageLayout in https://docs.soliditylang.org/en/v0.8.12/using-the-compiler.html#compiler-api, and then pass this into getStorageAt api call.

For Solana, a new metadata format (probably very similar to the ewasm target) needs to be defined, and then an new api defined for @solana/solidity.

Please let me know if you get stuck and I aim to respond much quicker next time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request polkadot Concerns the Polkadot target solana The Solana target
Projects
None yet
Development

No branches or pull requests

3 participants