Skip to content

Instantly share code, notes, and snippets.

@ethanfrey
Created October 27, 2021 17:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ethanfrey/86f24f4fa1cf44cff150e1dfa1e4e54b to your computer and use it in GitHub Desktop.
Save ethanfrey/86f24f4fa1cf44cff150e1dfa1e4e54b to your computer and use it in GitHub Desktop.
Parse Instantiation Address on Reply
use cw0::parse_reply_instantiate_data;
pub fn reply(deps: DepsMut, _env: Env, msg: Reply) -> Result<Response, ContractError> {
let res = parse_reply_instantiate_data(msg)?;
let child_contract = deps.api.addr_validate(res.contract_address)?;
// store this where it belongs...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment