0

I write a contract and deployed it to babylonnet, address: KT1BcH97ZQas6zKMJBtNdmU4iBvyi2ihpsx8, the entry point is withdraw, parameter is amount, signatures, toAddr, txId(string). I use smartpy explorer to pack parameter, but the explorer doesn't support list of signatures. enter image description here

So I use tezos-client to invoke contarct, and I format a parameter by myself, but it doesn't work. My invoke command is:

tezos-client transfer 0 from alice to KT1BcH97ZQas6zKMJBtNdmU4iBvyi2ihpsx8 --entrypoint "withdraw" --arg '(Pair (Pair (Pair (Pair 1200000 (edsigtt9FQZSbtLvLx8UVZA1RJ29R7V9WUmmoSBjCcww1Y1pg3aXqWjspCFRc9kJ1MocXV7sMeULWtJuD8XLszQCk4J5FWC5ykh,edsigtpzq77tPRMeK1n9kdUiTroMfvnmGBXiQNib5cpRnAi4tiUReVydHQskB3q4hLvkaxpDYqP7ecUXzc2dR1sAvvYDbMG1idL)) "tz1WfxXzNgcsMrQBV6YHChmyQgNVvfo44ihi") "123123123")'

So what should I do to pack correct invoking parameter? Where is the description document about how to construct parameter?

After I modified command, there is a new error: enter image description here

  • Has someone show me the golang code example about how to construct this operation and inject it to node? – saiwaixiaowangzi Feb 25 at 7:05
  • I found the correct parameter format: pair (pair (pair 1200000 "edsigtt9FQZSbtLvLx8UVZA1RJ29R7V9WUmmoSBjCcww1Y1pg3aXqWjspCFRc9kJ1MocXV7sMeULWtJuD8XLszQCk4J5FWC5ykh" "edsigtpzq77tPRMeK1n9kdUiTroMfvnmGBXiQNib5cpRnAi4tiUReVydHQskB3q4hLvkaxpDYqP7ecUXzc2dR1sAvvYDbMG1idL") "tz1WfxXzNgcsMrQBV6YHChmyQgNVvfo44ihi") "123123123". But I got another error : Invalid argument passed to contract KT1TPBnfP...xrSxUuskS9. Contract has no entrypoint named withdraw. I have tried entry point name withdraw and Withdraw. And I am sure that my contract entry point name is withdraw. – saiwaixiaowangzi Feb 25 at 7:42
  • You are calling a different contract, your question is about contract KT1BcH but the error is about contract KT1TPB ... – Ezy Feb 25 at 9:53
2

The format you use for lists is wrong.

You can look at the Michelson / Storage tabs in tests on SmartPy.io.

Lists constants in Michelson are of the form {1; 2; 3}.

| improve this answer | |
0

Please remove the explicit call to the “—entrypoint” argument. The tezos node will figure it out by itself based on type checking of the “—args”

| improve this answer | |

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.