osmosis-labs / beaker

Beaker helps streamlining CosmWasm development workflow.
Apache License 2.0
106 stars 30 forks source link

Wasm proposal.yml #48

Closed daniel-farina closed 2 years ago

daniel-farina commented 2 years ago

Submitting a proposal is currently done this way:

beaker wasm proposal store-code --title "Testnet Contract" --description "Testnet Contract" --signer-account test1 --network testnet counter --gas 25000000uosmo --gas-limit 25000000

I think we could simplify this by making a yaml file instead or json. This will be really useful as the description can be quite long.

beaker wasm proposal store-code --proposal proposal_407.yaml counter

Example proposal.yml idea

title: Proposal to allow DappName to be enabled in Osmosis
description: |
            A lengthy proposal description
            goes here  
            we expect this to be many lines...
code:
    github:   https://github.com/osmosis-labs/beaker/
    reviewed_by: https://....
settings: 
    gas:  25000000uosmo 
    network: testnet

Notes

sunnya97 commented 2 years ago

The osmosisd cli already supports submitting governance proposals using a json file. We should have this just be an extension of the format already used.

Base json for text proposals: https://github.com/cosmos/gaia/blob/main/docs/governance/proposals/proposal-template.json

Json for Community Pool Spend proposals: https://github.com/cosmos/gaia/blob/main/docs/governance/community-pool-spend/proposal.json

ValarDragon commented 2 years ago

I'd prefer to use the YML. The proposal.json has persistently been trash UX, with JSON's not supporting newlines in the description.

I like the code section! For now, its likely just going get included into the description text per some beaker-defined structure, but we can change the chain code later to use whatever structure we find best

daniel-farina commented 2 years ago

The osmosisd cli already supports submitting governance proposals using a json file. We should have this just be an extension of the format already used.

Base json for text proposals: https://github.com/cosmos/gaia/blob/main/docs/governance/proposals/proposal-template.json

Json for Community Pool Spend proposals: https://github.com/cosmos/gaia/blob/main/docs/governance/community-pool-spend/proposal.json

Looking at the template. I guess another good point is to make the deposit part of this YAML. I think this is low priority, it can be added later. Issue created #49 to that that.

I'd prefer to use the YML. The proposal.json has persistently been trash UX, with JSON's not supporting newlines in the description.

I like the code section! For now, its likely just going get included into the description text per some beaker-defined structure, but we can change the chain code later to use whatever structure we find best

I agree, Beaker is all about making the UX better. Although JSON is faster, YAML provides a much better experience.

iboss-ptk commented 2 years ago

+1 for not json, mainly because of multi-line string problem. Whether it's yaml or toml (toml is an option here to reduce the variety of the format).