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

Stargate support #89

Closed
wants to merge 6 commits into from
Closed

Stargate support #89

wants to merge 6 commits into from

Conversation

DariuszDepta
Copy link
Member

@DariuszDepta DariuszDepta commented Oct 19, 2023

Added handling of CosmosMsg::Stargate and QueryRequest::Stargate messages.
Added support for external stargate module implementation.
Users may provide their custom stargate module with custom stargate message processing in tests.

@DariuszDepta DariuszDepta self-assigned this Oct 19, 2023
@DariuszDepta DariuszDepta added this to the 0.18.0 milestone Oct 19, 2023
@DariuszDepta DariuszDepta marked this pull request as draft October 19, 2023 14:51
@DariuszDepta DariuszDepta modified the milestones: 0.18.0, 0.19.0 Oct 20, 2023
@DariuszDepta DariuszDepta marked this pull request as ready for review October 20, 2023 13:45
Copy link
Member

@webmaster128 webmaster128 left a comment

Choose a reason for hiding this comment

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

Looks good so far. I wonder if we can add some sort of implementation or example to show users how to handle stargate messages in tests

value: msg.value,
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Do we need this conversion? Multitest handles a CosmosMsg by the contract, so StargateMsg -> CosmosMsg is something the contract does


pub trait Stargate: Module<ExecT = StargateMsg, QueryT = StargateQuery, SudoT = Empty> {}

pub type StargateAcceptingModule = AcceptingModule<StargateMsg, StargateQuery, Empty>;
Copy link
Member

Choose a reason for hiding this comment

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

Interesting approach. Stargate messages and queries are not really modules. But this seems to work fine with the current model.

When renaming "stargate" -> "any" (see e.g. CosmWasm/cosmwasm#1926) we can add an AnyMsg right in the CosmosMsg enum case instead of having the fields in the enum directly to make this easier for multitest.

@DariuszDepta DariuszDepta modified the milestones: 0.19.0, 0.20.0 Nov 23, 2023
@DariuszDepta DariuszDepta force-pushed the stargate-support branch 2 times, most recently from 8f4f81e to 60389b4 Compare November 24, 2023 11:17
@DariuszDepta
Copy link
Member Author

Closed in favour of #106.

@DariuszDepta DariuszDepta removed this from the 0.20.0 milestone Nov 28, 2023
@DariuszDepta DariuszDepta deleted the stargate-support branch December 4, 2023 09:02
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