2

im tryng to send a operation to a previously deployed contract and im geting these errors,

    error: "Operation Failed"
​
errors: (3) […]
​​
0: {…}
​​​
contract: "KT18qHvhEZUwiawA8QEURwuK8RGJj184725L"
​​​
id: "proto.003-PsddFKi3.badContractParameter"
​​​
kind: "permanent"
​​​
<prototype>: Object { … }
​​
1: {…}
​​​
expectedType: Object { prim: "or", args: (2) […], annots: (1) […] }
​​​
id: "proto.003-PsddFKi3.invalidConstantTypeError"
​​​
kind: "permanent"
​​​
location: 0
​​​
wrongExpression: Object { prim: "RIGHT", args: (2) […] }
​​​
<prototype>: Object { … }
​​
2: {…}
​​​
expectedNamespace: "constant"
​​​
id: "proto.003-PsddFKi3.invalidPrimitiveNamespaceTypeError"
​​​
kind: "permanent"
​​​
location: 0
​​​
primitiveName: "RIGHT"
​​​
wrongNamespace: "instruction"
​​​
<prototype>: Object { … }
​​
length: 3
​​
<prototype>: [

this my contract parameters and storage,

    parameter
  (or :_entries
     (pair :proposition %_Liq_entry_create_proposition
        (key_hash %destination)
        (mutez %amount))
     (or (unit %_Liq_entry_sign_proposition) (unit %_Liq_entry_execute_proposition)));
storage
  (pair :storage
     (set %owners address)
     (pair (set %owners_signed address)
           (option %last_proposition
              (pair :proposition (key_hash %destination) (mutez %amount)))));

and the entry point i want to call is the sign_proposition, can do u have any ideas on how to fix this?

1

This occured because the Michelson in the parameter was ill written and the fee was to low.

So these were the changes i made to the function ...

-Before:

eztz.contract
.send(
  "KT18qHvhEZUwiawA8QEURwuK8RGJj184725L",
  "tz1ddb9NMYHZi5UzPdzTZMYQQZoMub195zgv",
  keysextracted,
  5,
  "RIGHT LEFT UNIT",
  1000,
  400000,
  10000
)

-After:

eztz.contract
    .send(
      "KT18qHvhEZUwiawA8QEURwuK8RGJj184725L",
      "tz1ddb9NMYHZi5UzPdzTZMYQQZoMub195zgv",
      keysextracted,
      5,
      "(Right (Left Unit))",
      1000000,
      400000,
      10000
    )

this was also explained to me by @Klassare in

how can i send operation throught eztz to a contract specific entry point?

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.