Skip to content

[pallet-revive] Re-export account and code info structs#9490

Open
cmichi wants to merge 2 commits intoparitytech:masterfrom
use-ink:cmichi-reexport-account-code-infos
Open

[pallet-revive] Re-export account and code info structs#9490
cmichi wants to merge 2 commits intoparitytech:masterfrom
use-ink:cmichi-reexport-account-code-infos

Conversation

@cmichi
Copy link
Copy Markdown
Contributor

@cmichi cmichi commented Aug 14, 2025

Are you up for re-exporting these info structs publicly? We query the following storage items in cargo contract info and use the result to compile information about an on-chain contract:

/// A mapping from a contract's code hash to its code info.
#[pallet::storage]
pub(crate) type CodeInfoOf<T: Config> = StorageMap<_, Identity, H256, CodeInfo<T>>;

/// The data associated to a contract or externally owned account.
#[pallet::storage]
pub(crate) type AccountInfoOf<T: Config> = StorageMap<_, Identity, H160, AccountInfo<T>>;

Making them public would allow us to depend on the re-exports, avoiding having to copy them.

cc @athei @pgherveou

@pgherveou
Copy link
Copy Markdown
Contributor

Aren't you using the generated metadata subxt types for these storage in cargo contract?

@cmichi
Copy link
Copy Markdown
Contributor Author

cmichi commented Aug 29, 2025

Aren't you using the generated metadata subxt types for these storage in cargo contract?

We are using the metadata, but not for that particular functionality. I'm not sure if amything prevented using it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants