def execute(cls, stack: MichelsonStack, stdout: List[str], context: AbstractContext): count = cls.args[0].get_int() assert count >= 2, f'invalid argument, must be >= 2' leaves = stack.pop(count=count) res = PairType.from_comb(leaves) stack.push(res) stdout.append(format_stdout(cls.prim, leaves, [res], count)) return cls()
def execute(cls, stack: MichelsonStack, stdout: List[str], context: AbstractContext): count = cls.args[0].get_int() dropped = stack.pop(count=count) stdout.append(format_stdout(cls.prim, dropped, [], count)) return cls()