koinos / koinos-cli

A command line utility used for key management and to interact with the Koinos blockchain.
Other
9 stars 7 forks source link

[BUG]: Koinos cli expects arguments even if the function doesn't have arguments #192

Closed joticajulian closed 10 months ago

joticajulian commented 1 year ago

Is there an existing issue for this?

Current behavior

Fogata pools have have functions like this in the ABI:

      "reburn_and_snapshot": {
      "argument": "",
      "return": "common.boole",
      "description": "Function to be called periodically by anyone to reburn the KOINs that was not withdrawn in the previous snapshot and take a new snapshot. The vapor that was not withdrawn is distributed to all users.",
      "entry_point": 2129709095,
      "entry-point": "0x7ef0c827",
      "read_only": false,
      "read-only": false
    },

as you see, the argument is empty. In koilib this is interpreted like a function without arguments. Koinos CLI has problems resolving this ABI because it expects an argument even if the function don't use it.

Expected behavior

ignore the "argument" type or "return" type if they are not provided.

Steps to reproduce

No response

Environment

- OS:

Anything else?

No response