I started creating this python library with most of the Plutus types represented as classes. I get their values by calling the json method, which returns the JSON equivalent of this type so it can be passed to cardano-cli, like the following:
class PubKeyHash(object):
...
def json(self):
return json.dumps({
"bytes": self.__pkh
})
This worked well while I was writing these values to files and passing the files path to cardano-cli, but since I'm using ssh to connect to the node and writing files all the time is not very performant, I think it would be great to, instead, pass the JSON values directly.
When I try to do this using the --mint-redeemer-value
argument, though, it returns me a weird error Exception: option --mint-redeemer-value: Failed reading: not a valid json value
, which makes me assume my JSON is not formatted correctly.
This is the command I'm running:
...
--mint-redeemer-value {"constructor":0,"fields":[{"constructor":0,"fields":[{"bytes":"
02fbd1c6934d888ec6575de3ec2f87dd75aec2891f20e0dc38fa7440e47a3803"}]},{"int":0}]} \
...
If it is the case that my JSON is formatted incorrectly, how should I format it? If it is not, can anyone bring me some light on why I'm running into this error?