DA0-DA0 / dao-contracts

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

Items should map to String not Addr #234

Closed JakeHartnell closed 2 years ago

0xekez commented 2 years ago

Context: in the zeke/contracts-v1 branch the cw-core contract has a concept of an item. An item is a mapping between String and Addr. I think we should change this to a map between String and cosmwasm_std::Binary.

The initial idea is that this would primarily point towards sub contracts. The trouble with this is that if we want to store simple state in a DAO for the UI (ex. a code of conduct) we need to write a code of conduct contract that just stores a string. This is extra work + slow for the UI because it requires two queries (1. address of contract 2. code of conduct).

Binary will be nice because it means we can store pretty much whatever we want there (binary is base64 encoded 'stuff'). If we want to put an addr in there we can decide standards on the frontend. For example, we could make everything JSON under the hood.

JakeHartnell commented 2 years ago

What's the status on this?

0xekez commented 2 years ago

Slipped off my radar. Will implement this week. :)