Creating a DAO
This section outlines the data structures for DAO creation. For more information on available messages, visit the Messages page
Metadata
DaoMetadata
The DaoMetadata
contains general information about the DAO, including the name
, logo
, and social media information.
_5struct DaoMetadata {_5 pub name: String,_5 pub logo: Logo,_5 pub socials: DaoSocialData,_5}
Logo
Defines a DAO’s logo. Currently, only URL images are supported.
_4enum Logo {_4 Url(String),_4 None,_4}
DaoSocialData
Defines the social media usernames for a DAO.
_6struct DaoSocialData {_6 pub github_username: Option<String>,_6 pub discord_username: Option<String>,_6 pub twitter_username: Option<String>,_6 pub telegram_username: Option<String>,_6}
DaoMetadata
The DaoMetadata
contains general information about the DAO, including the name
, logo
, and social media information.
Logo
Defines a DAO’s logo. Currently, only URL images are supported.
DaoSocialData
Defines the social media usernames for a DAO.
_5struct DaoMetadata {_5 pub name: String,_5 pub logo: Logo,_5 pub socials: DaoSocialData,_5}
DAO creation
DaoType
There are three types of DAOs that can be created using Enterprise:
_11_11enum DaoType {_11 Token,_11 Nft,_11 Multisig,_11}_11_11enum DaoMembershipInfo {_11 New(NewDaoMembershipMsg),_11 Existing(ExistingDaoMembershipMsg),_11}
New or existing
DAOs can either be created from scratch as New
, or they can be imported as Existing
DAOs.
_11_11enum DaoType {_11 Token,_11 Nft,_11 Multisig,_11}_11_11enum DaoMembershipInfo {_11 New(NewDaoMembershipMsg),_11 Existing(ExistingDaoMembershipMsg),_11}
DaoType
There are three types of DAOs that can be created using Enterprise:
New or existing
DAOs can either be created from scratch as New
, or they can be imported as Existing
DAOs.
_11_11enum DaoType {_11 Token,_11 Nft,_11 Multisig,_11}_11_11enum DaoMembershipInfo {_11 New(NewDaoMembershipMsg),_11 Existing(ExistingDaoMembershipMsg),_11}
Creating a new DAO
code_id and info
When creating a new DAO, the appropriate on-chain membership_contract_code_id
of a contract must be specified (CW20 tokens, CW721 NFTs, CW3 multisigs), along with other necessary membership information for the governance asset.
_11_11struct NewDaoMembershipMsg {_11 pub membership_contract_code_id: u64,_11 pub membership_info: NewMembershipInfo,_11}_11_11enum NewMembershipInfo {_11 NewToken(NewTokenMembershipInfo),_11 NewNft(NewNftMembershipInfo),_11 NewMultisig(NewMultisigMembershipInfo),_11}
code_id and info
When creating a new DAO, the appropriate on-chain membership_contract_code_id
of a contract must be specified (CW20 tokens, CW721 NFTs, CW3 multisigs), along with other necessary membership information for the governance asset.
_11_11struct NewDaoMembershipMsg {_11 pub membership_contract_code_id: u64,_11 pub membership_info: NewMembershipInfo,_11}_11_11enum NewMembershipInfo {_11 NewToken(NewTokenMembershipInfo),_11 NewNft(NewNftMembershipInfo),_11 NewMultisig(NewMultisigMembershipInfo),_11}
New token
NewTokenMembershipInfo
is used to instantiate a new DAO governance membership token. This information is similar to a CW20 token's instantiation info.
_21_21struct NewTokenMembershipInfo {_21 pub token_name: String,_21 pub token_symbol: String,_21 pub token_decimals: u8,_21 pub initial_token_balances: Vec<Cw20Coin>,_21 pub token_mint: Option<MinterResponse>,_21 pub token_marketing: Option<TokenMarketingInfo>,_21}_21_21struct MinterResponse {_21 pub minter: String,_21 pub cap: Option<Uint128>,_21}_21_21struct TokenMarketingInfo {_21 pub project: Option<String>,_21 pub description: Option<String>,_21 pub marketing_owner: Option<String>,_21 pub logo_url: Option<String>,_21}
A new Token DAO must specify:
- A name.
- A token symbol (typically 3-4 letters).
- The number of decimal places a token can be divided into.
- A list of addresses and amount pairs that are the initial holders of the token.
_21_21struct NewTokenMembershipInfo {_21 pub token_name: String,_21 pub token_symbol: String,_21 pub token_decimals: u8,_21 pub initial_token_balances: Vec<Cw20Coin>,_21 pub token_mint: Option<MinterResponse>,_21 pub token_marketing: Option<TokenMarketingInfo>,_21}_21_21struct MinterResponse {_21 pub minter: String,_21 pub cap: Option<Uint128>,_21}_21_21struct TokenMarketingInfo {_21 pub project: Option<String>,_21 pub description: Option<String>,_21 pub marketing_owner: Option<String>,_21 pub logo_url: Option<String>,_21}
Optional minting info
- Addresses of accounts that can mint the token and its maximum supply.
- The
cap
is a hard cap on the total supply that can be achieved by minting. This refers to thetotal_supply
. If no cap is specified, the supply can be unlimited.
_21_21struct NewTokenMembershipInfo {_21 pub token_name: String,_21 pub token_symbol: String,_21 pub token_decimals: u8,_21 pub initial_token_balances: Vec<Cw20Coin>,_21 pub token_mint: Option<MinterResponse>,_21 pub token_marketing: Option<TokenMarketingInfo>,_21}_21_21struct MinterResponse {_21 pub minter: String,_21 pub cap: Option<Uint128>,_21}_21_21struct TokenMarketingInfo {_21 pub project: Option<String>,_21 pub description: Option<String>,_21 pub marketing_owner: Option<String>,_21 pub logo_url: Option<String>,_21}
- Marketing information about the Token's project and/or owner.
_21_21struct NewTokenMembershipInfo {_21 pub token_name: String,_21 pub token_symbol: String,_21 pub token_decimals: u8,_21 pub initial_token_balances: Vec<Cw20Coin>,_21 pub token_mint: Option<MinterResponse>,_21 pub token_marketing: Option<TokenMarketingInfo>,_21}_21_21struct MinterResponse {_21 pub minter: String,_21 pub cap: Option<Uint128>,_21}_21_21struct TokenMarketingInfo {_21 pub project: Option<String>,_21 pub description: Option<String>,_21 pub marketing_owner: Option<String>,_21 pub logo_url: Option<String>,_21}
NewTokenMembershipInfo
is used to instantiate a new DAO governance membership token. This information is similar to a CW20 token's instantiation info.
A new Token DAO must specify:
- A name.
- A token symbol (typically 3-4 letters).
- The number of decimal places a token can be divided into.
- A list of addresses and amount pairs that are the initial holders of the token.
Optional minting info
- Addresses of accounts that can mint the token and its maximum supply.
- The
cap
is a hard cap on the total supply that can be achieved by minting. This refers to thetotal_supply
. If no cap is specified, the supply can be unlimited.
- Marketing information about the Token's project and/or owner.
_21_21struct NewTokenMembershipInfo {_21 pub token_name: String,_21 pub token_symbol: String,_21 pub token_decimals: u8,_21 pub initial_token_balances: Vec<Cw20Coin>,_21 pub token_mint: Option<MinterResponse>,_21 pub token_marketing: Option<TokenMarketingInfo>,_21}_21_21struct MinterResponse {_21 pub minter: String,_21 pub cap: Option<Uint128>,_21}_21_21struct TokenMarketingInfo {_21 pub project: Option<String>,_21 pub description: Option<String>,_21 pub marketing_owner: Option<String>,_21 pub logo_url: Option<String>,_21}
New NFT
New NFT membership information contains:
- A name.
- A Symbol.
- An optional address of the minter who can create the NFTs.
_6struct NewNftMembershipInfo {_6 pub nft_name: String,_6 pub nft_symbol: String,_6 /// optional_6 pub minter: Option<String>,_6}
New NFT membership information contains:
- A name.
- A Symbol.
- An optional address of the minter who can create the NFTs.
_6struct NewNftMembershipInfo {_6 pub nft_name: String,_6 pub nft_symbol: String,_6 /// optional_6 pub minter: Option<String>,_6}
New multisig
New multisig DAOs require the addresses and weights of all the multisig members. To learn more about multisig weights, visit the Configurations and parameters page
_8struct NewMultisigMembershipInfo {_8 pub multisig_members: Vec<MultisigMember>,_8}_8_8struct MultisigMember {_8 pub address: String,_8 pub weight: Uint64,_8}
New multisig DAOs require the addresses and weights of all the multisig members. To learn more about multisig weights, visit the Configurations and parameters page
_8struct NewMultisigMembershipInfo {_8 pub multisig_members: Vec<MultisigMember>,_8}_8_8struct MultisigMember {_8 pub address: String,_8 pub weight: Uint64,_8}
Importing an existing DAO
To import an existing DAO, you must specify the contract address of an existing membership contract and DAO governance type.
_5_5struct ExistingDaoMembershipMsg {_5 pub dao_type: DaoType,_5 pub membership_contract_addr: String,_5}
To import an existing DAO, you must specify the contract address of an existing membership contract and DAO governance type.
_5_5struct ExistingDaoMembershipMsg {_5 pub dao_type: DaoType,_5 pub membership_contract_addr: String,_5}