1

I have a Truffle instance of the contract and I call the method like this

contract_instance.test(1);

Where test in a function that takes a timestamp as parameter.

This gives me this error message:

Http error response: (400) Failed to parse the request body: No case matched:
  At /kind, unexpected string instead of endorsement
  At /kind, unexpected string instead of seed_nonce_revelation
  At /kind, unexpected string instead of double_endorsement_evidence
  At /kind, unexpected string instead of double_baking_evidence
  At /kind, unexpected string instead of activate_account
  At /kind, unexpected string instead of proposals
  At /kind, unexpected string instead of ballot
  At /kind, unexpected string instead of reveal
  At /parameters/value, no case matched:
    Missing object field int
    At /string, no case matched:
      Unexpected number instead of string
      Unexpected number instead of object
    Missing object field bytes
    Unexpected object instead of array
    Missing object field prim
  At /kind, unexpected string instead of origination
  At /kind, unexpected string instead of delegation

How do I express a timestamp value in JS?

1

For some reason you need to represent the timestamp as a string. So contract_instance.test("1"); will work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.