-
Notifications
You must be signed in to change notification settings - Fork 42
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
Stargate support #89
Conversation
f480f8b
to
fd03c5b
Compare
22a1b8c
to
2e231fc
Compare
There was a problem hiding this 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, | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
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>; |
There was a problem hiding this comment.
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.
8745f94
to
9e87c79
Compare
b69250d
to
a65cced
Compare
8f4f81e
to
60389b4
Compare
60389b4
to
6f70f3c
Compare
Closed in favour of #106. |
Added handling of
CosmosMsg::Stargate
andQueryRequest::Stargate
messages.Added support for external stargate module implementation.
Users may provide their custom stargate module with custom stargate message processing in tests.