Currently it's a little tedious to track the state machine progress of all covenants.
Lets try to introduce an event notification system that would help deal with this:
upon advancing the state of any covenant-instantiated contract, the contract submits a message to its admin (=covenant) that includes a timestamp and description of what happened
covenant validates the sender of msg to be one of its instantiated contracts
covenant stores the events in a sorted ds (BTreeSet?) and exposes it via query
Logic for this is generic enough to sit in covenant_utils.
Things to consider:
query the covenant address on-demand via query_wasm_contract_info(env.contract.address)?.creator or store the admin address in storage
use a specific event structure or just the cw_utils::Event
is it worth to paginate the query (as the swap covenant may be like 5 events in the happy case)
how much do we want to notify of? bare minimum or fully lean into event sourcing?
I really like this. However, I'd like to prioritize getting the two-party functionality and Osmosis integration complete before we work on quality of life improvements for users
Currently it's a little tedious to track the state machine progress of all covenants.
Lets try to introduce an event notification system that would help deal with this:
BTreeSet
?) and exposes it via queryLogic for this is generic enough to sit in
covenant_utils
.Things to consider:
query_wasm_contract_info(env.contract.address)?.creator
or store the admin address in storagecw_utils::Event