CosmWasm / wasmd

Basic cosmos-sdk app with web assembly smart contracts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Amino JSON representation changed between wasmd 0.45 and 0.50 (Cosmos SDK 0.50 upgrade)

chipshort opened this issue · comments

This is a regression in wasmd 0.50. The json representation changed from:

{
  "account_number": "0",
  "chain_id": "testing",
  "fee": {
    "amount": [],
    "gas": "1000000"
  },
  "memo": "",
  "msgs": [
    {
      "type": "wasm/MsgInstantiateContract",
      "value": {
        "admin": "wasm1j8gw0uewunngtga7k7uwjkqa0tt0e4w5cz7tmx",
        "code_id": "4",
        "funds": [
          {
            "amount": "100",
            "denom": "ustake"
          }
        ],
        "label": "local0.1.0",
        "msg": {
          "beneficiary": "wasm1xumh4m362u2tqm26suk48t8yhlgmlulp0602k5",
          "verifier": "wasm1j8gw0uewunngtga7k7uwjkqa0tt0e4w5cz7tmx"
        },
        "sender": "wasm1j8gw0uewunngtga7k7uwjkqa0tt0e4w5cz7tmx"
      }
    }
  ],
  "sequence": "6"
}

to

{
  "account_number": "0",
  "chain_id": "testing",
  "fee": {
    "amount": [],
    "gas": "1000000"
  },
  "memo": "",
  "msgs": [
    {
      "type": "wasm/MsgInstantiateContract",
      "value": {
        "admin": "wasm17k7v9wmmus09pe6l5kumkpacly44ca3kg4qfrz",
        "code_id": "1",
        "funds": [
          {
            "amount": "100",
            "denom": "ustake"
          }
        ],
        "label": "local0.1.0",
        "msg": "eyJ2ZXJpZmllciI6Indhc20xN2s3djl3bW11czA5cGU2bDVrdW1rcGFjbHk0NGNhM2tnNHFmcnoiLCAiYmVuZWZpY2lhcnkiOiJ3YXNtMXgzcnpycWdwM3R5cGY4eWM3YTR3aGg1dDhmMHN2NHZmY2Zhenh0In0=",
        "sender": "wasm17k7v9wmmus09pe6l5kumkpacly44ca3kg4qfrz"
      }
    }
  ],
  "sequence": "3"
}

So the msg is now base64 encoded binary.

This is a regression and should be reverted