Skip to content

Improvement - Incorrect Smart Contract call Error Message #25

@chilligerchief

Description

@chilligerchief

When trying to execute the smart contract call as described in the documentation:

window.xpll.callContract({
    address: 'xXAbY4DmeOHHuRCmE9dXczV38BoO-CTKYeWra8YOlLw',
    method: "transfer_from",
    args: [
        { type: 'base64', value: 'YChzIE0ZGwKuuJSSVugZ-SlY3RvBzzjjz3__VkftgCY' },
        { type: 'base64', value: 'ggYKJ-RGIfs2YVzAW2W5KV39NpPSUIzabo7m0dSC_Hs' },
        { type: 'u64', value: '0.001' }
    ],
});

I get the following error:

script.js:6 Uncaught (in promise) XPLL - RPC Error: [
  {
    "code": "custom",
    "message": "Input not instance of Uint8Array",
    "fatal": true,
    "path": [
      0
    ]
  },
  {
    "code": "custom",
    "message": "Input not instance of Uint8Array",
    "fatal": true,
    "path": [
      1
    ]
  },
  {
    "code": "custom",
    "message": "Input not instance of Uint8Array",
    "fatal": true,
    "path": [
      2
    ]
  }
]
    at chrome-extension://gpfllmjckejjhmmdmgbgmclmhopekjpf/background/index.mjs:1:14639

It seems like the wallet exension does not manage to convert the parameters to uint8 arrays even though the type is correctly specified.

This makes it currently impossible to make smart contract calls with parameters at the moment (except when serializing the parameters yourself, which is a total pain).

@kayac-parallel-chain Again, this is most likely not an issue with the docs, but with the xperience wallet extension. I don't know where to report theses issues. Are there any plans on making this open source so I can properly report bugs and create pull requests for fixes?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions