N3developertoolkit / neo3-visual-tracker

Neo N3 blockchain explorer that is directly available within Visual Studio Code for developer usage and development scenarios.
https://marketplace.visualstudio.com/items?itemName=ngd-seattle.neo3-visual-tracker
MIT License
7 stars 11 forks source link

Accept parameter value `null` in neo-invoke.json interactive mode #161

Open mialbu opened 1 year ago

mialbu commented 1 year ago

When trying to invoke the transfer method of the NeoToken, it is not intuitive what to do when one does not want to pass any data (i.e., the 4th parameter). I tried with simply null but that disregards that parameter and tries to invoke a method transfer with only 3 parameters (which doesn't exist and thus fails).

image

Suggestion: Allow passing a value in interactive mode which would translate to the opcode PUSHNULL in the invoke script. For example, simply null like mentioned above.

mialbu commented 1 year ago

New observation: If you write null in the interactive mode, nothing is added to the actual .json file. If I add null manually in the JSON editor mode, it converts to the PUSHNULL opcode in the invoke script as expected.