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

multi-test: Store more data in ContractData #350

Closed
ethanfrey opened this issue Jul 26, 2021 · 2 comments
Closed

multi-test: Store more data in ContractData #350

ethanfrey opened this issue Jul 26, 2021 · 2 comments
Assignees

Comments

@ethanfrey
Copy link
Member

ethanfrey commented Jul 26, 2021

When we instantiate a contract, we just store the code id, indexed by it's address.

In x/wasm, we store quite a bit more: https://github.com/CosmWasm/wasmd/blob/master/proto/cosmwasm/wasm/v1/types.proto#L68-L84

I think minimally we should add:

pub struct ContractData {
  pub code_id: u64,
  pub creator: Addr,
  pub admin: Option<Addr>,
  pub label: String,
}

Maybe add some created field with the block height set?

We do not need to store this in protobuf, but the info should be available to query in the tests. (And we should enforce some sanity checks there)

@ethanfrey
Copy link
Member Author

Good point. I fixed the link to wasmd

@ethanfrey
Copy link
Member Author

Closed by #360

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

No branches or pull requests

2 participants