dyne / Zenroom

Embedded no-code VM executing human-like language to manipulate data and process cryptographic operations.
https://dev.zenroom.org
GNU Affero General Public License v3.0
195 stars 62 forks source link

On empty string contract logs is not a json in js #891

Closed matteo-cristino closed 3 months ago

matteo-cristino commented 3 months ago

When running a empty string contract from js the logs is not a json:

import { zencode_exec } from "zenroom";

zencode_exec('')
  .then((res) => console.log(res))
  .catch((err) => console.log(err))

will result in

{
  "result": "",
  "logs": "Empty string as script argument\nExecution aborted\n"
}