Michelson instructions

Base Class

class pytezos.michelson.instructions.base.MichelsonInstruction(stack_items_added: int = 0)[source]
args: List[Union[Type[pytezos.michelson.instructions.base.MichelsonInstruction], Any]] = []
classmethod as_micheline_expr()dict[source]
classmethod create_type(args: List[Type[pytezos.michelson.micheline.Micheline]], annots: Optional[list] = None, **kwargs)Type[pytezos.michelson.instructions.base.MichelsonInstruction][source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
field_names: List[str] = []
static match(expr)Type[pytezos.michelson.instructions.base.MichelsonInstruction][source]
var_names: List[str] = []
class pytezos.michelson.instructions.base.Wildcard[source]
static n(count: int)List[pytezos.michelson.instructions.base.Wildcard][source]
pytezos.michelson.instructions.base.dispatch_types(*args: Type[pytezos.michelson.micheline.Micheline], mapping: Dict[Tuple[Type[pytezos.michelson.micheline.Micheline], ], Tuple[Any, ]])[source]
pytezos.michelson.instructions.base.format_stdout(prim: str, inputs: list, outputs: list, arg=None)[source]

ADT operations

class pytezos.michelson.instructions.adt.CarInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'CAR'
class pytezos.michelson.instructions.adt.CdrInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'CDR'
class pytezos.michelson.instructions.adt.GetnInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'GET'
class pytezos.michelson.instructions.adt.LeftInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'LEFT'
class pytezos.michelson.instructions.adt.PairInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'PAIR'
class pytezos.michelson.instructions.adt.PairnInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'PAIR'
class pytezos.michelson.instructions.adt.RightInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'RIGHT'
class pytezos.michelson.instructions.adt.UnpairInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'UNPAIR'
class pytezos.michelson.instructions.adt.UnpairnInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'UNPAIR'
class pytezos.michelson.instructions.adt.UpdatenInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'UPDATE'
pytezos.michelson.instructions.adt.execute_cxr(prim: str, stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], idx: int)[source]

Arithmetic operations

class pytezos.michelson.instructions.arithmetic.AbsInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'ABS'
class pytezos.michelson.instructions.arithmetic.AddInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'ADD'
class pytezos.michelson.instructions.arithmetic.EdivInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'EDIV'
class pytezos.michelson.instructions.arithmetic.IntInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'INT'
class pytezos.michelson.instructions.arithmetic.IsNatInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'ISNAT'
class pytezos.michelson.instructions.arithmetic.LslInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'LSL'
class pytezos.michelson.instructions.arithmetic.LsrInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'LSR'
class pytezos.michelson.instructions.arithmetic.MulInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'MUL'
class pytezos.michelson.instructions.arithmetic.NegInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'NEG'
class pytezos.michelson.instructions.arithmetic.SubInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'SUB'
pytezos.michelson.instructions.arithmetic.execute_shift(prim: str, stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], shift: Callable[[Tuple[int, int]], int])[source]

Boolean operations

class pytezos.michelson.instructions.boolean.AndInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'AND'
class pytezos.michelson.instructions.boolean.NotInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'NOT'
class pytezos.michelson.instructions.boolean.OrInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'OR'
class pytezos.michelson.instructions.boolean.XorInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'XOR'
pytezos.michelson.instructions.boolean.execute_boolean_add(prim: str, stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], add: Callable)[source]

Comparison operations

class pytezos.michelson.instructions.compare.CompareInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'COMPARE'
class pytezos.michelson.instructions.compare.EqInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'EQ'
class pytezos.michelson.instructions.compare.GeInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'GE'
class pytezos.michelson.instructions.compare.GtInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'GT'
class pytezos.michelson.instructions.compare.LeInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'LE'
class pytezos.michelson.instructions.compare.LtInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'LT'
class pytezos.michelson.instructions.compare.NeqInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'NEQ'
pytezos.michelson.instructions.compare.compare(a, b)int[source]
pytezos.michelson.instructions.compare.execute_zero_compare(prim: str, stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], compare: Callable[[int], bool])[source]

Control flow operations

class pytezos.michelson.instructions.control.ApplyInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'APPLY'
class pytezos.michelson.instructions.control.DipInstruction(item: pytezos.michelson.instructions.base.MichelsonInstruction)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'DIP'
class pytezos.michelson.instructions.control.DipnInstruction(item: pytezos.michelson.instructions.base.MichelsonInstruction)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'DIP'
class pytezos.michelson.instructions.control.ExecInstruction(item: pytezos.michelson.instructions.base.MichelsonInstruction)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'EXEC'
class pytezos.michelson.instructions.control.FailwithInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'FAILWITH'
class pytezos.michelson.instructions.control.IfConsInstruction(stack_items_added: int, item: pytezos.michelson.instructions.base.MichelsonInstruction)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'IF_CONS'
class pytezos.michelson.instructions.control.IfInstruction(item: pytezos.michelson.instructions.base.MichelsonInstruction)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'IF'
class pytezos.michelson.instructions.control.IfLeftInstruction(item: pytezos.michelson.instructions.base.MichelsonInstruction)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'IF_LEFT'
class pytezos.michelson.instructions.control.IfNoneInstruction(stack_items_added: int, item: pytezos.michelson.instructions.base.MichelsonInstruction)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'IF_NONE'
class pytezos.michelson.instructions.control.IterInstruction(stack_items_added: int, items: List[pytezos.michelson.instructions.base.MichelsonInstruction])[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'ITER'
class pytezos.michelson.instructions.control.LambdaInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'LAMBDA'
class pytezos.michelson.instructions.control.LoopInstruction(items: List[pytezos.michelson.instructions.base.MichelsonInstruction])[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'LOOP'
class pytezos.michelson.instructions.control.LoopLeftInstruction(stack_items_added: int, items: List[pytezos.michelson.instructions.base.MichelsonInstruction])[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'LOOP_LEFT'
class pytezos.michelson.instructions.control.MapInstruction(stack_items_added: int, items: List[pytezos.michelson.instructions.base.MichelsonInstruction])[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'MAP'
pytezos.michelson.instructions.control.execute_dip(prim: str, stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], count: int, body: Type[pytezos.michelson.instructions.base.MichelsonInstruction], context: pytezos.context.abstract.AbstractContext)pytezos.michelson.instructions.base.MichelsonInstruction[source]

Crypto operations

class pytezos.michelson.instructions.crypto.Blake2bInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'BLAKE2B'
class pytezos.michelson.instructions.crypto.CheckSignatureInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'CHECK_SIGNATURE'
class pytezos.michelson.instructions.crypto.HashKeyInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'HASH_KEY'
class pytezos.michelson.instructions.crypto.KeccakInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'KECCAK'
class pytezos.michelson.instructions.crypto.PairingCheckInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'PAIRING_CHECK'
class pytezos.michelson.instructions.crypto.SaplingEmptyStateInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'SAPLING_EMPTY_STATE'
class pytezos.michelson.instructions.crypto.SaplingVerifyUpdateInstruction(stack_items_added: int = 0)[source]
prim: Optional[str] = 'SAPLING_VERIFY_UPDATE'
class pytezos.michelson.instructions.crypto.Sha256Instruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'SHA256'
class pytezos.michelson.instructions.crypto.Sha3Instruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'SHA3'
class pytezos.michelson.instructions.crypto.Sha512Instruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'SHA512'
pytezos.michelson.instructions.crypto.execute_hash(prim: str, stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], hash_digest: Callable[[bytes], bytes])[source]

Generic operations

class pytezos.michelson.instructions.generic.ConcatInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'CONCAT'
class pytezos.michelson.instructions.generic.NeverInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'NEVER'
class pytezos.michelson.instructions.generic.PackInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'PACK'
class pytezos.michelson.instructions.generic.SizeInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'SIZE'
class pytezos.michelson.instructions.generic.SliceInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'SLICE'
class pytezos.michelson.instructions.generic.UnitInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'UNIT'
class pytezos.michelson.instructions.generic.UnpackInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'UNPACK'

Stack operations

class pytezos.michelson.instructions.stack.CastIntruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'CAST'
class pytezos.michelson.instructions.stack.DigInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'DIG'
class pytezos.michelson.instructions.stack.DropInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'DROP'
class pytezos.michelson.instructions.stack.DropnInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'DROP'
class pytezos.michelson.instructions.stack.DugInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'DUG'
class pytezos.michelson.instructions.stack.DupInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'DUP'
class pytezos.michelson.instructions.stack.DupnInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'DUP'
class pytezos.michelson.instructions.stack.PushInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'PUSH'
class pytezos.michelson.instructions.stack.RenameInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'RENAME'
class pytezos.michelson.instructions.stack.SwapInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'SWAP'

Operations with structures

class pytezos.michelson.instructions.struct.ConsInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'CONS'
class pytezos.michelson.instructions.struct.EmptyBigMapInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'EMPTY_BIG_MAP'
class pytezos.michelson.instructions.struct.EmptyMapInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'EMPTY_MAP'
class pytezos.michelson.instructions.struct.EmptySetInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'EMPTY_SET'
class pytezos.michelson.instructions.struct.GetAndUpdateInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'GET_AND_UPDATE'
class pytezos.michelson.instructions.struct.GetInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'GET'
class pytezos.michelson.instructions.struct.MemInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'MEM'
class pytezos.michelson.instructions.struct.NilInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'NIL'
class pytezos.michelson.instructions.struct.NoneInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'NONE'
class pytezos.michelson.instructions.struct.SomeInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'SOME'
class pytezos.michelson.instructions.struct.UpdateInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'UPDATE'

Tezos-specific operations

class pytezos.michelson.instructions.tezos.AddressInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'ADDRESS'
class pytezos.michelson.instructions.tezos.AmountInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'AMOUNT'
class pytezos.michelson.instructions.tezos.BalanceInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'BALANCE'
class pytezos.michelson.instructions.tezos.ChainIdInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'CHAIN_ID'
class pytezos.michelson.instructions.tezos.ContractInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'CONTRACT'
class pytezos.michelson.instructions.tezos.CreateContractInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'CREATE_CONTRACT'
class pytezos.michelson.instructions.tezos.ImplicitAccountInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'IMPLICIT_ACCOUNT'
class pytezos.michelson.instructions.tezos.LevelInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'LEVEL'
class pytezos.michelson.instructions.tezos.NowInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'NOW'
class pytezos.michelson.instructions.tezos.SelfAddressInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'SELF_ADDRESS'
class pytezos.michelson.instructions.tezos.SelfInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'SELF'
class pytezos.michelson.instructions.tezos.SenderInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'SENDER'
class pytezos.michelson.instructions.tezos.SetDelegateInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'SET_DELEGATE'
class pytezos.michelson.instructions.tezos.SourceInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'SOURCE'
class pytezos.michelson.instructions.tezos.TotalVotingPowerInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'TOTAL_VOTING_POWER'
class pytezos.michelson.instructions.tezos.TransferTokensInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'TRANSFER_TOKENS'
class pytezos.michelson.instructions.tezos.VotingPowerInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'VOTING_POWER'
pytezos.michelson.instructions.tezos.get_entrypoint_type(context: pytezos.context.abstract.AbstractContext, name: str, address=None)Optional[Type[pytezos.michelson.types.base.MichelsonType]][source]

Ticket operations

class pytezos.michelson.instructions.ticket.JoinTicketsInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'JOIN_TICKETS'
class pytezos.michelson.instructions.ticket.ReadTicketInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'READ_TICKET'
class pytezos.michelson.instructions.ticket.SplitTicketInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'SPLIT_TICKET'
class pytezos.michelson.instructions.ticket.TicketInstruction(stack_items_added: int = 0)[source]
classmethod execute(stack: pytezos.michelson.stack.MichelsonStack, stdout: List[str], context: pytezos.context.abstract.AbstractContext)[source]
prim: Optional[str] = 'TICKET'