New feature --> No ID replies
This PR aims at removing the reply ids all-together from the Abstract Framework. The rationale behind that is that they are hard to manage, easy to miss and difficult to maintain. Instead, the user will register the replies to a specific endpoint by returning the following new structure inside their endpoints:
// Old
// SubMsg::reply_always(cosmos_msg, REPLY_ID)
// New
SubMsg::reply_always(cosmos_msg, reply_func)
In addition, they will need to register reply_func with the App object for the rust engine to be able to match it and call it accordingly.
This allows for code to be easier to read (register a callback function instead of a random ID) and less error-prone. We could also use this concept for IBC Callbacks
Checklist
- [ ] CI is green.
- [ ] Changelog updated.
Deploying abstract-docs with
Cloudflare Pages
| Latest commit: |
a7a1232
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://da55cfca.abstract-docs.pages.dev |
| Branch Preview URL: | https://feature-no-id-replies.abstract-docs.pages.dev |
Since it removes reply ids entirely, how would developers build examples with dynamic replies like:
https://github.com/CyberHoward/interchain-gov/blob/main/contracts/interchain-gov/src/contract.rs#L37-L45
Since it removes reply ids entirely, how would developers build examples with dynamic replies like:
https://github.com/CyberHoward/interchain-gov/blob/main/contracts/interchain-gov/src/contract.rs#L37-L45
And makes it more difficult to migrate existing cosmwasm contracts to abstract (if this is a concern).
Since it removes reply ids entirely, how would developers build examples with dynamic replies like:
https://github.com/CyberHoward/interchain-gov/blob/main/contracts/interchain-gov/src/contract.rs#L37-L45
They wouldn't, but using ID as a value field shouldn't not be done and this is a basis for this change (checkout the cosmwasm docs)
Since it removes reply ids entirely, how would developers build examples with dynamic replies like: https://github.com/CyberHoward/interchain-gov/blob/main/contracts/interchain-gov/src/contract.rs#L37-L45
And makes it more difficult to migrate existing cosmwasm contracts to abstract (if this is a concern).
It does !
Don't think this is worth pursuing either. Seems to add complexity for not too much gain.
This was a POC, closing as this introduces too much complexity for very little gain