Created
February 17, 2021 19:26
-
-
Save emishur/23374415bf094ba13de94d9cf9f6cbbd to your computer and use it in GitHub Desktop.
Taquito originate contract error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Unexpected error value: { message: "Wrong code parameter type, expected an array", data: "{ parameter\n (or (or (or %admin (unit %confirm_admin) (address %set_admin))\n (pair %transfer_tokens\n (address %fa2)\n (list %transfers\n (pair (address %from_)\n (list %txs (pair (address %to_) (pair (nat %token_id) (nat %amount))))))))\n (pair %update_ops\n (address %fa2)\n (list %updates\n (or (pair %add_operator (address %owner) (pair (address %operator) (nat %token_id)))\n (pair %remove_operator (address %owner) (pair (address %operator) (nat %token_id))))))) ;\n storage (pair (address %admin) (option %pending_admin address)) ;\n code { DUP ;\n CDR ;\n SWAP ;\n CAR ;\n IF_LEFT\n { IF_LEFT\n { IF_LEFT\n { DROP ;\n CDR ;\n IF_NONE\n { PUSH string \"NO_PENDING_ADMIN\" ; FAILWITH }\n { SENDER ;\n COMPARE ;\n EQ ;\n IF { NONE address ; SENDER ; PAIR }\n { PUSH string \"NOT_A_PENDING_ADMIN\" ; FAILWITH } } ;\n NIL operation ;\n PAIR }\n { SWAP ;\n DUP ;\n DUG 2 ;\n CAR ;\n SENDER ;\n COMPARE ;\n NEQ ;\n IF { PUSH string \"NOT_AN_ADMIN\" ; FAILWITH } {} ;\n PAIR ;\n DUP ;\n CAR ;\n SOME ;\n SWAP ;\n CDR ;\n CAR ;\n PAIR ;\n NIL operation ;\n PAIR } }\n { SWAP ;\n DUP ;\n DUG 2 ;\n CAR ;\n SENDER ;\n COMPARE ;\n NEQ ;\n IF { PUSH string \"NOT_AN_ADMIN\" ; FAILWITH } {} ;\n DUP ;\n CAR ;\n CONTRACT %transfer\n (list (pair (address %from_)\n (list %txs (pair (address %to_) (pair (nat %token_id) (nat %amount)))))) ;\n IF_NONE\n { DROP ; PUSH string \"NO_TRANSFER\" ; FAILWITH }\n { PUSH mutez 0 ; DIG 2 ; CDR ; TRANSFER_TOKENS } ;\n SWAP ;\n NIL operation ;\n DIG 2 ;\n CONS ;\n PAIR } }\n { SWAP ;\n DUP ;\n DUG 2 ;\n CAR ;\n SENDER ;\n COMPARE ;\n NEQ ;\n IF { PUSH string \"NOT_AN_ADMIN\" ; FAILWITH } {} ;\n DUP ;\n CAR ;\n CONTRACT %update_operators\n (list (or (pair %add_operator (address %owner) (pair (address %operator) (nat %token_id)))\n (pair %remove_operator (address %owner) (pair (address %operator) (nat %token_id))))) ;\n IF_NONE\n { DROP ; PUSH string \"NO_UPDATE_OPERATORS\" ; FAILWITH }\n { PUSH mutez 0 ; DIG 2 ; CDR ; TRANSFER_TOKENS } ;\n SWAP ;\n NIL operation ;\n DIG 2 ;\n CONS ;\n PAIR } } }\n\n", name: "InvalidCodeParameter" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ parameter | |
(or (or (or %admin (unit %confirm_admin) (address %set_admin)) | |
(pair %transfer_tokens | |
(address %fa2) | |
(list %transfers | |
(pair (address %from_) | |
(list %txs (pair (address %to_) (pair (nat %token_id) (nat %amount)))))))) | |
(pair %update_ops | |
(address %fa2) | |
(list %updates | |
(or (pair %add_operator (address %owner) (pair (address %operator) (nat %token_id))) | |
(pair %remove_operator (address %owner) (pair (address %operator) (nat %token_id))))))) ; | |
storage (pair (address %admin) (option %pending_admin address)) ; | |
code { DUP ; | |
CDR ; | |
SWAP ; | |
CAR ; | |
IF_LEFT | |
{ IF_LEFT | |
{ IF_LEFT | |
{ DROP ; | |
CDR ; | |
IF_NONE | |
{ PUSH string "NO_PENDING_ADMIN" ; FAILWITH } | |
{ SENDER ; | |
COMPARE ; | |
EQ ; | |
IF { NONE address ; SENDER ; PAIR } | |
{ PUSH string "NOT_A_PENDING_ADMIN" ; FAILWITH } } ; | |
NIL operation ; | |
PAIR } | |
{ SWAP ; | |
DUP ; | |
DUG 2 ; | |
CAR ; | |
SENDER ; | |
COMPARE ; | |
NEQ ; | |
IF { PUSH string "NOT_AN_ADMIN" ; FAILWITH } {} ; | |
PAIR ; | |
DUP ; | |
CAR ; | |
SOME ; | |
SWAP ; | |
CDR ; | |
CAR ; | |
PAIR ; | |
NIL operation ; | |
PAIR } } | |
{ SWAP ; | |
DUP ; | |
DUG 2 ; | |
CAR ; | |
SENDER ; | |
COMPARE ; | |
NEQ ; | |
IF { PUSH string "NOT_AN_ADMIN" ; FAILWITH } {} ; | |
DUP ; | |
CAR ; | |
CONTRACT %transfer | |
(list (pair (address %from_) | |
(list %txs (pair (address %to_) (pair (nat %token_id) (nat %amount)))))) ; | |
IF_NONE | |
{ DROP ; PUSH string "NO_TRANSFER" ; FAILWITH } | |
{ PUSH mutez 0 ; DIG 2 ; CDR ; TRANSFER_TOKENS } ; | |
SWAP ; | |
NIL operation ; | |
DIG 2 ; | |
CONS ; | |
PAIR } } | |
{ SWAP ; | |
DUP ; | |
DUG 2 ; | |
CAR ; | |
SENDER ; | |
COMPARE ; | |
NEQ ; | |
IF { PUSH string "NOT_AN_ADMIN" ; FAILWITH } {} ; | |
DUP ; | |
CAR ; | |
CONTRACT %update_operators | |
(list (or (pair %add_operator (address %owner) (pair (address %operator) (nat %token_id))) | |
(pair %remove_operator (address %owner) (pair (address %operator) (nat %token_id))))) ; | |
IF_NONE | |
{ DROP ; PUSH string "NO_UPDATE_OPERATORS" ; FAILWITH } | |
{ PUSH mutez 0 ; DIG 2 ; CDR ; TRANSFER_TOKENS } ; | |
SWAP ; | |
NIL operation ; | |
DIG 2 ; | |
CONS ; | |
PAIR } } } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment