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

Issue Updating uploadAccess Param #804

Closed
czarcas7ic opened this issue Apr 12, 2022 · 5 comments
Closed

Issue Updating uploadAccess Param #804

czarcas7ic opened this issue Apr 12, 2022 · 5 comments

Comments

@czarcas7ic
Copy link

I have tried updating the wasm uploadAccess param on the Osmosis testnet with the following param-change gov prop:

{
  "title": "wasm",
  "description": "wasm test",
  "changes": [
    {
      "subspace": "wasm",
      "key": "uploadAccess",
      "value": "AllowEverybody"
    }
  ]
}

But keep getting this error:

raw_log: 'failed to execute message; message index: 0: key: uploadAccess, value: "AllowEverybody",
  err: json: cannot unmarshal string into Go value of type map[string]json.RawMessage:
  failed to set parameter: invalid proposal content'

I have also tried different keys such as CodeUploadAccess and nothing has worked. It could very well be something I am doing wrong, but nothing really stands out.

@alpe
Copy link
Member

alpe commented Apr 12, 2022

The value needs to be an encoded object of type AccessConfig. For example:

 "changes": [
      {
        "subspace": "wasm",
        "key": "uploadAccess",
        "value": "{\"permission\":\"Everybody\",\"address\":\"\"}"
      }
    ]

@czarcas7ic
Copy link
Author

Thanks for the quick response! It seems to still not like this as a value though

raw_log: 'failed to execute message; message index: 0: key: uploadAccess, value: "{\"permission\":\"Everybody\",\"address\":\"\"}",
  err: json: cannot unmarshal string into Go value of type map[string]json.RawMessage:
  failed to set parameter: invalid proposal content'

@webmaster128
Copy link
Member

Moving this ticket to wasmd

@webmaster128 webmaster128 transferred this issue from CosmWasm/cosmwasm Apr 12, 2022
@alpe
Copy link
Member

alpe commented Apr 13, 2022

Sorry, the proposal content was not correct. I looked deeper into client and server side encodings and tested successfully a submission with this proposal content:

{
  "title": "Foo",
  "description": "Bar",
  "changes": [
    {
      "subspace": "wasm",
      "key": "uploadAccess",
      "value": {
        "permission": "Everybody"
      }
    }
  ],
  "deposit": ""
}

Command used:

wasmd tx gov submit-proposal param-change <proposal-json-file> --from validator --chain-id=testing -b block

@czarcas7ic
Copy link
Author

This worked, thank you!

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

No branches or pull requests

3 participants