You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Neutron DAO is based on CosmWasm contracts but still is the core part of Neutron chain. This means two things:
There's no CLI support for governance operations.
Regardless of being the part of neutrond binary, DAO contracts are a crucial part of Neutron, and having support for them in neutrond binary is a good thing.
The current process of making a proposal, voting for it, and executing it looks something like that:
The user here has to work with obscure addresses of specific contracts which should not be messed up, and also hast to manually craft the jsons for messages for any action. What would be great to have instead is something like that:
The code that gets the set of Neutron contracts based on the admin module (the chain admin is Neutron DAO core, all the other contracts can be queried from the core; we already have the code that solves it in the tests (the getDaoContracts function))
The interface code that will transform all human-readable commands to wasm messages to the corresponding contracts.
The text was updated successfully, but these errors were encountered:
// This is only a try // neutron-dao modulefuncProposeCommand(cliCtx context.CLIContext, title, descriptionstring, msgs []Msg) (sdk.TxResponse, error) {
// Transform user-friendly inputs to wasm messagesproposeMsg:=NewMsgPropose(title, description, msgs)
// Construct and broadcast the transactionreturnutils.BuildAndBroadcast(cliCtx, []sdk.Msg{proposeMsg})
}
// CLI command registrationvar (
CmdPropose=&cobra.Command{
Use: "propose",
Short: "Propose a governance action",
RunE: func(cmd*cobra.Command, args []string) error {
title, _:=cmd.Flags().GetString("title")
description, _:=cmd.Flags().GetString("description")
msgs, _:=cmd.Flags().GetString("msgs")
cliCtx:=context.NewCLIContext().WithCodec(appCodec)
response, err:=neutronDao.ProposeCommand(cliCtx, title, description, msgs)
// Handle response and error
},
}
)
// Add flags to the propose commandfuncinit() {
CmdPropose.Flags().String("title", "", "Proposal title")
CmdPropose.Flags().String("description", "", "Proposal description")
CmdPropose.Flags().String("msgs", "", "JSON array of messages")
// Add other necessary flags here // hmm... My code could be mess and wrong, but that what I came up with after taking a look at some of the files
}
Neutron DAO is based on CosmWasm contracts but still is the core part of Neutron chain. This means two things:
neutrond
binary, DAO contracts are a crucial part of Neutron, and having support for them inneutrond
binary is a good thing.The current process of making a proposal, voting for it, and executing it looks something like that:
The user here has to work with obscure addresses of specific contracts which should not be messed up, and also hast to manually craft the jsons for messages for any action. What would be great to have instead is something like that:
The same for queries, etc., etc.
It will require the following:
getDaoContracts
function))The text was updated successfully, but these errors were encountered: