Messages
This page outlines important messages for Enterprise smart contracts. For more information on DAO creation, visit Creating a DAO.
To learn how to write messages for governance proposals, visit the Message templates section.
InstantiateMsg
The InstantiateMsg
contains all the necessary info for creating a DAO, including the DAO metadata, governance config, creation contract address, membership info, and whitelists.
The enterprise_factory_contract
field refers to the address of the enterprise-factory contract that is creating the DAO.
asset_whitelist
Token assets that are allowed to show in DAO’s treasury. A whitelist helps prevent spam by users creating and sending random tokens to the DAO.
nft_whitelist
The NFT assets that are allowed to be shown in DAO’s treasury.
The InstantiateMsg
contains all the necessary info for creating a DAO, including the DAO metadata, governance config, creation contract address, membership info, and whitelists.
The enterprise_factory_contract
field refers to the address of the enterprise-factory contract that is creating the DAO.
asset_whitelist
Token assets that are allowed to show in DAO’s treasury. A whitelist helps prevent spam by users creating and sending random tokens to the DAO.
nft_whitelist
The NFT assets that are allowed to be shown in DAO’s treasury.
Execute messages
The following section outlines the Enterprise's various execute messages.
CreateProposalMsg
This message creates a proposal using a title, description, and the proposal_actions. If a proposal passes, actions are executed in the order received.
CastVoteMsg
Used to cast a vote for a proposal in the voting period using a proposal id and an outcome. The possible choices are:
Yes
: in favorNo
: not in favorAbstain
: a vote that counts toward meeting quorum, but is neither for nor against.Veto
: vetoes the proposal.
ExecuteProposalMsg
Used to execute a passed proposal.
UnstakeMsg
Used to unstake tokens or an NFT from governance staking. Users will have to claim their unstaked assets after the unstaking period ends.
Claim
Claims all assets available to the sender after they have unstaked and the unlocking period has passed.
Hooks
These hook messages are used for receiving CW20 tokens and CW721 NFTs that are going to be staked.
The following section outlines the Enterprise's various execute messages.
CreateProposalMsg
This message creates a proposal using a title, description, and the proposal_actions. If a proposal passes, actions are executed in the order received.
CastVoteMsg
Used to cast a vote for a proposal in the voting period using a proposal id and an outcome. The possible choices are:
Yes
: in favorNo
: not in favorAbstain
: a vote that counts toward meeting quorum, but is neither for nor against.Veto
: vetoes the proposal.
ExecuteProposalMsg
Used to execute a passed proposal.
UnstakeMsg
Used to unstake tokens or an NFT from governance staking. Users will have to claim their unstaked assets after the unstaking period ends.