Closed morarafrank closed 2 years ago
This error is saying that the JSON sent to the contract was missing a required key here first_candidate
. Can you share your full command?
near call abc.testnet get_first_candidate abc.testnet
You need to serialize the call in JSON:
near call abc.testnet get_first_candidate '{"first_candidate": "abc.testnet" }'
Currently you are pass abc.testnet
as the whole argument.
Thanks @willemneal . It worked. Seems I was not passing the whole argument.
"Smart contract panicked: panicked at 'Failed to deserialize input from JSON.: Error("missing field
first_candidate
", line: 1, column: 2)', src/lib.rs:114:1"}}