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

Instantiate2 support #1500

Closed
5 tasks done
webmaster128 opened this issue Nov 21, 2022 · 2 comments
Closed
5 tasks done

Instantiate2 support #1500

webmaster128 opened this issue Nov 21, 2022 · 2 comments
Milestone

Comments

@webmaster128
Copy link
Member

webmaster128 commented Nov 21, 2022

The goal here is to allow contracts to use instantiate2 to instantiate other contracts (not be instantiated, which works already).

This consists of 3 parts:

  1. Allow sending an MsgInstantiateContract2
  2. calculate the address such that re don't need to process the reply
  3. Allow querying the checksum by code ID

which is implemented as follows:

cosmwasm

Add checksum field to ContractInfoResponse. This one might be tricky since it adds a required field to ContractInfoResponse::new(code_id, creator). As long as we don't have that, the contract doing Instantiate2 needs to know both code ID and checksum. (#1546)

wasmvm

Add ContractInfoResponse.Checksum (CosmWasm/wasmvm#376)

@webmaster128
Copy link
Member Author

webmaster128 commented Nov 28, 2022

Interesting use case brought up by @assafmo: with this a contract A can instantiate and immediately execute a contract B. That would be cool to showcase with WasmMsg::Instantiate2 and instantiate2_address.

@webmaster128
Copy link
Member Author

I think we're done here :)

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

No branches or pull requests

1 participant