2

The contract code is

[{"prim":"parameter","args":[{"prim":"pair","args":[{"prim":"pair","args":[{"prim":"nat","annots":["%counter"]},{"prim":"or","args":[{"prim":"pair","args":[{"prim":"mutez","annots":["%amount"]},{"prim":"contract","args":[{"prim":"unit"}],"annots":["%dest"]}],"annots":[":transfer"]},{"prim":"or","args":[{"prim":"option","args":[{"prim":"key_hash"}],"annots":["%delegate"]},{"prim":"pair","args":[{"prim":"nat","annots":["%threshold"]},{"prim":"list","args":[{"prim":"key"}],"annots":["%keys"]}],"annots":["%change_keys"]}]}],"annots":[":action"]}],"annots":[":payload"]},{"prim":"list","args":[{"prim":"option","args":[{"prim":"signature"}]}],"annots":["%sigs"]}]}]},{"prim":"storage","args":[{"prim":"pair","args":[{"prim":"nat","annots":["%stored_counter"]},{"prim":"pair","args":[{"prim":"nat","annots":["%threshold"]},{"prim":"list","args":[{"prim":"key"}],"annots":["%keys"]}]}]}]},{"prim":"code","args":[[[[{"prim":"DUP"},{"prim":"CAR"},{"prim":"DIP","args":[[{"prim":"CDR"}]]}]],{"prim":"SWAP"},{"prim":"DUP"},{"prim":"DIP","args":[[{"prim":"SWAP"}]]},{"prim":"DIP","args":[[[[{"prim":"DUP"},{"prim":"CAR"},{"prim":"DIP","args":[[{"prim":"CDR"}]]}]],{"prim":"DUP"},{"prim":"SELF"},{"prim":"ADDRESS"},{"prim":"CHAIN_ID"},{"prim":"PAIR"},{"prim":"PAIR"},{"prim":"PACK"},{"prim":"DIP","args":[[[[{"prim":"DUP"},{"prim":"CAR","annots":["@counter"]},{"prim":"DIP","args":[[{"prim":"CDR"}]]}]],{"prim":"DIP","args":[[{"prim":"SWAP"}]]}]]},{"prim":"SWAP"}]]},[[{"prim":"DUP"},{"prim":"CAR","annots":["@stored_counter"]},{"prim":"DIP","args":[[{"prim":"CDR"}]]}]],{"prim":"DIP","args":[[{"prim":"SWAP"}]]},[[{"prim":"COMPARE"},{"prim":"EQ"}],{"prim":"IF","args":[[],[[{"prim":"UNIT"},{"prim":"FAILWITH"}]]]}],{"prim":"DIP","args":[[{"prim":"SWAP"}]]},[[{"prim":"DUP"},{"prim":"CAR","annots":["@threshold"]},{"prim":"DIP","args":[[{"prim":"CDR","annots":["@keys"]}]]}]],{"prim":"DIP","args":[[{"prim":"PUSH","args":[{"prim":"nat"},{"int":"0"}],"annots":["@valid"]},{"prim":"SWAP"},{"prim":"ITER","args":[[{"prim":"DIP","args":[[{"prim":"SWAP"}]]},{"prim":"SWAP"},{"prim":"IF_CONS","args":[[[{"prim":"IF_NONE","args":[[{"prim":"SWAP"},{"prim":"DROP"}],[{"prim":"SWAP"},{"prim":"DIP","args":[[{"prim":"SWAP"},{"prim":"DIP","args":[{"int":"2"},[[{"prim":"DIP","args":[[{"prim":"DUP"}]]},{"prim":"SWAP"}]]]},[[{"prim":"DIP","args":[{"int":"2"},[{"prim":"DUP"}]]},{"prim":"DIG","args":[{"int":"3"}]}],{"prim":"DIP","args":[[{"prim":"CHECK_SIGNATURE"}]]},{"prim":"SWAP"},{"prim":"IF","args":[[{"prim":"DROP"}],[{"prim":"FAILWITH"}]]}],{"prim":"PUSH","args":[{"prim":"nat"},{"int":"1"}]},{"prim":"ADD","annots":["@valid"]}]]}]]}]],[[{"prim":"UNIT"},{"prim":"FAILWITH"}]]]},{"prim":"SWAP"}]]}]]},[[{"prim":"COMPARE"},{"prim":"LE"}],{"prim":"IF","args":[[],[[{"prim":"UNIT"},{"prim":"FAILWITH"}]]]}],{"prim":"DROP"},{"prim":"DROP"},{"prim":"DIP","args":[[[[{"prim":"DUP"},{"prim":"CAR"},{"prim":"DIP","args":[[{"prim":"CDR"}]]}]],{"prim":"PUSH","args":[{"prim":"nat"},{"int":"1"}]},{"prim":"ADD","annots":["@new_counter"]},{"prim":"PAIR"}]]},{"prim":"NIL","args":[{"prim":"operation"}]},{"prim":"SWAP"},{"prim":"IF_LEFT","args":[[[[{"prim":"DUP"},{"prim":"CAR"},{"prim":"DIP","args":[[{"prim":"CDR"}]]}]],{"prim":"UNIT"},{"prim":"TRANSFER_TOKENS"},{"prim":"CONS"}],[{"prim":"IF_LEFT","args":[[{"prim":"SET_DELEGATE"},{"prim":"CONS"}],[{"prim":"DIP","args":[[{"prim":"SWAP"},{"prim":"CAR"}]]},{"prim":"SWAP"},{"prim":"PAIR"},{"prim":"SWAP"}]]}]]},{"prim":"PAIR"}]]}]

When I used tezos-client to transfer token to KT19rDcohu62eBqqRQ9gx3KyaYzfrm8issCA. Something went wrong.

./tezos-client transfer 1 from alice to KT19rDcohu62eBqqRQ9gx3KyaYzfrm8issCA

Warning:
             This is NOT the Tezos Mainnet.

  The node you are connecting to claims to be running on the
             Tezos Zeronet DEVELOPMENT NETWORK.
       Do NOT use your fundraiser keys on this network.
Zeronet is a testing network, with free tokens and frequent resets.
Node is bootstrapped, ready for injecting operations.
This simulation failed:
Manager signed operations:
From: tz1SoipFhLFjFhVBCEfNUWSRZ3EwMAYrhe9z
Fee to the baker: ┌
Expected counter: 437674
Gas limit: 800000
Storage limit: 600000 bytes
Transaction:
Amount: ┍
From: tz1SoipFhLFjFhVBCEfNUWSRZ3EwMAYrhe9z
To: KT19rDcohu62eBqqRQ9gx3KyaYzfrm8issCA

This operation FAILED.

Invalid argument passed to contract KT19rDcohu62eBqqRQ9gx3KyaYzfrm8issCA.
At (unshown) location 0, value Unit
is invalid for type

pair (pair :payload
(nat %counter)
(or :action
(pair :transfer (mutez %amount) (contract %dest unit))
(or (option %delegate key_hash)
(pair %change_keys (nat %threshold) (list %keys key)))))
(list %sigs (option signature)).
At (unshown) location 0, invalid primitive Unit, only Pair can be used here.
Fatal error:
transfer simulation failed

How to fix this?

1 Answer 1

2

The version of the multisig contract that you are using does not feature unauthorized donations to the contract. If possible, I encourage you to use the following one instead: https://gitlab.com/nomadic-labs/mi-cho-coq/-/blob/master/src/contracts/arthur/generic_multisig.tz.

If you need to keep using this version, you need to do the donation as a side effect of a multisigned operation (such as a %change_key action with the same keys and threshold as before).

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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