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

Store code proposal file (yaml/toml) #64

Merged
merged 6 commits into from
Jul 5, 2022
Merged

Store code proposal file (yaml/toml) #64

merged 6 commits into from
Jul 5, 2022

Conversation

iboss-ptk
Copy link
Collaborator

@iboss-ptk iboss-ptk commented Jul 4, 2022

closes #48

  • support proposal file with metatdata required for verification
  • append the metadata in the proposal description in a serializable format
  • share the same options in the command and proposal file
  • pretty print multiline response
  • support toml and yaml as input file
  • make deposit optional (Make the deposit step part of the new YAML configuration #49)

example

with toml

proposal.toml

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]
repo = "https://github.com/osmosis-labs/beaker/templates/project"
rust_flags = "-C link-arg=-s"
optimizer = "workspace-optimizer:0.12.6"

with yaml

proposal.yaml or proposal.yml

title: Proposal to allow DappName to be enabled in Osmosis
description: |
    A lengthy proposal description
    goes here
    so many lines...
deposit: 1000uosmo
code:
    repo: https://github.com/osmosis-labs/beaker/templates/project
    rust_flags: -C link-arg=-s
    optimizer: workspace-optimizer:0.12.6
$ beaker wasm proposal store-code counter --signer-account test1 --proposal proposal.yaml # `.yml` works as well

Result

$ beaker wasm proposal query store-code counter

  Proposal found!
    +
    ├── proposal_id: 1
    ├── title: Proposal to allow DappName to be enabled in Osmosis
    ├── description:
    │
    │     A lengthy proposal description
    │     goes here
    │     we expect this to be many lines...
    │     
    │     ---
    │     
    │     [metadata]
    │     repo = "https://github.com/osmosis-labs/beaker/templates/project"
    │     rust_flags = "-C link-arg=-s"
    │     optimizer = "workspace-optimizer:0.12.6"
    │
    ├── run_as: osmo1cyyzpxplxdzkeea7kwsydadg87357qnahakaks
    ├── total_deposit:  (min_deposit: 10000000uosmo)
    └── status: DepositPeriod


  Tally Result
    +
    ├── yes: 0
    ├── no: 0
    ├── no_with_veto: 0
    └── abstain: 0


  Time
    +
    ├── submit_time: 2022-07-04T08:58:03Z
    ├── deposit_end_time: 2022-07-06T08:58:03Z
    ├── voting_start_time: –
    └── voting_end_time: –


The string below is stored in the proposal description:

A lengthy proposal description
goes here
we expect this to be many lines...

---

[metadata]
repo = "https://github.com/osmosis-labs/beaker/templates/project"
rust_flags = "-C link-arg=-s"
optimizer = "workspace-optimizer:0.12.6"

Which includes the metadata that structured, deserializable and gives enough information to do #57 on proposal later.

While #48 suggests the settings part, I think that should be kept separated and keep this proposal part as primitive for later more sophisticated workflow automation which I believe require more thoughts and not the current focus.

@iboss-ptk iboss-ptk merged commit b227fe7 into main Jul 5, 2022
@iboss-ptk iboss-ptk deleted the boss/proposal_file branch July 8, 2022 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wasm proposal.yml
1 participant