abieos icon indicating copy to clipboard operation
abieos copied to clipboard

inconsistency in handling redefined types

Open cc32d9 opened this issue 7 years ago • 1 comments

On mainnet, mydex1engine has ABI that redefines some standard types:

    },{
      "name": "extended_symbol",
      "base": "",
      "fields": [{
          "name": "sym",
          "type": "symbol"
        },{
          "name": "contract",
          "type": "account_name"
        }
      ]
    },{
      "name": "extended_asset",
      "base": "",
      "fields": [{
          "name": "quantity",
          "type": "asset"
        },{
          "name": "contract",
          "type": "account_name"
        }
      ]
    }

when parsing the binary output from state history plugin, abieos throws an exception:

error: abi redefines type "extended_asset"

So, it needs to be more consistent: either nodeos should reject uploading of such an ABI, or abieos should tolerate and work around this error. Probably both should be done, as this wrong ABI is already carved in history.

cc32d9 avatar Dec 09 '18 10:12 cc32d9

One more issue in mainnet: fastwinitemf is using account_name as a typ0e, and abieos complains about invalid type:

    },{
      "name": "transfer",
      "base": "",
      "fields": [{
          "name": "from",
          "type": "account_name"
        },{
          "name": "to",
          "type": "account_name"
        },{
          "name": "quantity",
          "type": "asset"
        },{
          "name": "memo",
          "type": "string"
        }
      ]
    },{

cc32d9 avatar Dec 11 '18 06:12 cc32d9