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

Parse contract address from instantiate event, not message event #1046

Merged
merged 3 commits into from
Aug 11, 2021

Conversation

ethanfrey
Copy link
Member

Fixes an issue that occurred when we updated the events handling in wasmd.

Notably CosmWasm/wasmd#586

(This is also a good argument that we stabilise the events before a 1.0 release)

@@ -355,9 +355,7 @@ mod tests {
}

fn fake_events(reflect_addr: &str) -> Vec<Event> {
let event = Event::new("message").add_attributes(vec![
attr("module", "wasm"),
attr("signer", MOCK_CONTRACT_ADDR),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were these unnecessary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The events changed. We no longer emit message events (or no longer expose those to the contracts), However, we have instantiate/execute/migrate events with a subset of the event types.

I wrote this to document the new behavior, which we need to model/mock: https://github.com/CosmWasm/wasmd/blob/master/EVENTS.md (and we are updating wasmd to it right now)

Copy link
Contributor

@uint uint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ethanfrey
Copy link
Member Author

Thanks. I also rebuilt the vm test contract.

I would merge and tag v0.16.0+contracts to get the CI to rebuild a set of wasm contracts, but never publish that (or use that as a crate version). It is Simon's technique to do a contract-only release when we need to patch for wasmd testing (these contracts are just for testing purposes and not released as crates)

@ethanfrey ethanfrey mentioned this pull request Aug 11, 2021
3 tasks
@uint
Copy link
Contributor

uint commented Aug 11, 2021

I would merge and tag v0.16.0+contracts to get the CI to rebuild a set of wasm contracts, but never publish that (or use that as a crate version). It is Simon's technique to do a contract-only release when we need to patch for wasmd testing (these contracts are just for testing purposes and not released as crates)

Sure, sounds good to me.

@uint uint merged commit 36f60b0 into main Aug 11, 2021
@uint uint deleted the fix-ibc-contract-event-parsing branch August 11, 2021 09:11
@ethanfrey
Copy link
Member Author

Done

@webmaster128
Copy link
Member

I would merge and tag v0.16.0+contracts to get the CI to rebuild a set of wasm contracts, but never publish that (or use that as a crate version). It is Simon's technique to do a contract-only release when we need to patch for wasmd testing (these contracts are just for testing purposes and not released as crates)

To elaborate here: we use the semver build metadata for tags that do not affect the code in packages/*.

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.

3 participants