var img = document.createElement('img'); img.src = "https://terradocs.matomo.cloud//piwik.php?idsite=4&rec=1&url=https://docs.enterprise.money" + location.pathname; img.style = "border:0"; img.alt = "tracker"; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(img,s);
Skip to main content

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.


_5
struct DaoMetadata {
_5
pub name: String,
_5
pub logo: Logo,
_5
pub socials: DaoSocialData,
_5
}

Defines a DAO’s logo. Currently, only URL images are supported.


_4
enum Logo {
_4
Url(String),
_4
None,
_4
}

DaoSocialData

Defines the social media usernames for a DAO.


_6
struct 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.

Defines a DAO’s logo. Currently, only URL images are supported.

DaoSocialData

Defines the social media usernames for a DAO.


_5
struct 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
_11
enum DaoType {
_11
Token,
_11
Nft,
_11
Multisig,
_11
}
_11
_11
enum 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
_11
enum DaoType {
_11
Token,
_11
Nft,
_11
Multisig,
_11
}
_11
_11
enum 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
_11
enum DaoType {
_11
Token,
_11
Nft,
_11
Multisig,
_11
}
_11
_11
enum 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
_11
struct NewDaoMembershipMsg {
_11
pub membership_contract_code_id: u64,
_11
pub membership_info: NewMembershipInfo,
_11
}
_11
_11
enum 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
_11
struct NewDaoMembershipMsg {
_11
pub membership_contract_code_id: u64,
_11
pub membership_info: NewMembershipInfo,
_11
}
_11
_11
enum 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
_21
struct 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
_21
struct MinterResponse {
_21
pub minter: String,
_21
pub cap: Option<Uint128>,
_21
}
_21
_21
struct 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
_21
struct 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
_21
struct MinterResponse {
_21
pub minter: String,
_21
pub cap: Option<Uint128>,
_21
}
_21
_21
struct 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 the total_supply. If no cap is specified, the supply can be unlimited.

_21
_21
struct 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
_21
struct MinterResponse {
_21
pub minter: String,
_21
pub cap: Option<Uint128>,
_21
}
_21
_21
struct 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
_21
struct 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
_21
struct MinterResponse {
_21
pub minter: String,
_21
pub cap: Option<Uint128>,
_21
}
_21
_21
struct 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 the total_supply. If no cap is specified, the supply can be unlimited.
  • Marketing information about the Token's project and/or owner.

_21
_21
struct 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
_21
struct MinterResponse {
_21
pub minter: String,
_21
pub cap: Option<Uint128>,
_21
}
_21
_21
struct 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.

_6
struct 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.

_6
struct 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


_8
struct NewMultisigMembershipInfo {
_8
pub multisig_members: Vec<MultisigMember>,
_8
}
_8
_8
struct 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


_8
struct NewMultisigMembershipInfo {
_8
pub multisig_members: Vec<MultisigMember>,
_8
}
_8
_8
struct 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
_5
struct 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
_5
struct ExistingDaoMembershipMsg {
_5
pub dao_type: DaoType,
_5
pub membership_contract_addr: String,
_5
}