cosmos / cosmjs

The Swiss Army knife to power JavaScript based client solutions ranging from Web apps/explorers over browser extensions to server-side clients like faucets/scrapers.
https://cosmos.github.io/cosmjs/
Apache License 2.0
649 stars 334 forks source link

Software upgrade proposal front end #1490

Closed mousaibrah closed 11 months ago

mousaibrah commented 12 months ago

Is it possible to create software proposal from the front end (react) if it is can i have an example of messages and the way to encrypt because i've tried to do it

i have this draft in JSON file but i need to create the proposal in react

{
  "messages": [
      {
          "@type": "/cosmos.gov.v1.MsgExecLegacyContent",
          "content": {
              "@type": "/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal",
              "title": "upgrade v2",
              "description": "upgrade v2",
              "plan": {
                  "name": "v2",
                  "time": "0001-01-01T00:00:00Z",
                  "height": "250",
                  "info": "{\"binaries\":{\"linux/amd64\":\"https://github.com/....\"}}",
                  "upgraded_client_state": null
                }
          },
          "authority": "authAddr"
      }
  ],
  "metadata": "ipfs://CID",
  "deposit": "1000000stake",
  "title": "upgrade v2",
  "summary": "upgrade after height 250"
}

I've tried to exec the legace msg and got this result

 "result": {
        "code": 18,
        "codespace": "sdk",
        "log": "proposal title cannot be empty: invalid request"
    }

I need vivid picture of the template , Thanks <3