Skip to content

Instantly share code, notes, and snippets.

View emishur's full-sized avatar

Eugene Mishura emishur

View GitHub Profile
@emishur
emishur / error.txt
Created February 17, 2021 19:26
Taquito originate contract error
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
@emishur
emishur / test_pairs.py
Created March 18, 2020 15:27
reproducing pytezos pairs as big_map key storage parsing error
from unittest import TestCase
from pytezos import pytezos, ContractInterface
michelson = """
{ parameter
(or (or (or %admin (bool %pause) (address %set_admin))
(or %assets
(or %fa2
(or (or (pair %balance_of
(contract %callback