Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wasm proposal.yml #48

Closed
Tracked by #52
daniel-farina opened this issue Jun 26, 2022 · 4 comments · Fixed by #64
Closed
Tracked by #52

Wasm proposal.yml #48

daniel-farina opened this issue Jun 26, 2022 · 4 comments · Fixed by #64
Assignees
Labels
⚙️ task A task belongs to an epic

Comments

@daniel-farina
Copy link
Contributor

daniel-farina commented Jun 26, 2022

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
  • We should be able hardcode maximum gas (In mainnet this won't be more than 1 OSMO)

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

  • create struct that has all proposal options
  • make the struct subcommand compatible and serde serializable
  • allow serialization for toml, yaml
  • put the code part as a metadata structure in the proposal description
@daniel-farina daniel-farina changed the title Wasm proposal improvements - proposal.yml Wasm proposal.yml Jun 26, 2022
@sunnya97
Copy link

sunnya97 commented Jun 27, 2022

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
Copy link
Member

ValarDragon commented Jun 27, 2022

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
Copy link
Contributor Author

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
Copy link
Collaborator

+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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ task A task belongs to an epic
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants