DA0-DA0 / dao-contracts

CosmWasm smart contracts for Interchain DAOs.
https://docs.daodao.zone
BSD 3-Clause "New" or "Revised" License
202 stars 133 forks source link

Polytone account creation on instantiation #701

Open 0xekez opened 1 year ago

0xekez commented 1 year ago

a proposal module that:

  1. calls back into itself with instantiation hook
  2. calls proposal hook to create accounts with note modules specified at instantiation time
  3. removes itself

all three steps must succeed for the transaction to not error. if an error occurs during account creation on the remote chain, i don't think we need to do anything.

the timeout for messages executed via polytone should be specified at instantiation time.

0xekez commented 1 year ago

i think this is important for the meme of what it means to "deploy DAO DAO" on a new chain.

0xekez commented 1 year ago

there is probably a more general abstraction here of "proposal module that lets you execute messages when its added". before we get into the implementation here, we should figure out if that's what we want.

Art3miX commented 1 year ago

there is probably a more general abstraction here of "proposal module that lets you execute messages when its added"

Was thinking about it, the migrator and this module are basically not a proposal modules, but rather a "execute modules", you vote to add them, they fire up, do their own thing, and gets removed.

Im missing your diagrams for polytone general usage in Dao Dao, feels like we should have a general idea of how its gonna be used before we jump into creating this module, few questions that pops to mind:

  1. Is it gonna be a single note for whole Dao Dao?
  2. Where are the addresses stored? we probably gonna have multiple notes (stargaze note, osmosis note, etc)

Seems like the UI will take care of most of it, and we really only need an account creation module, which is pretty straight forward:

  1. Add module
  2. call the note with empty execute msgs
  3. wait for callback
  4. confirm no errors and remove module