def execute(cls, stack: MichelsonStack, stdout: List[str], context: AbstractContext): literal: Type[MichelineLiteral] literal = cls.args[0] # type: ignore shell = literal.get_string() if shell not in nodes: raise Exception(f'Expected one of {nodes}, got {shell}') if shell.endswith('.pool'): shell = shell.split('.')[0] assert shell in nodes, f'unknown network {shell}' context.shell = ShellQuery(RpcMultiNode( nodes[shell])) # type: ignore elif shell in nodes: context.shell = ShellQuery(RpcNode( nodes[shell][0])) # type: ignore else: context.shell = ShellQuery(RpcNode(shell)) # type: ignore context.network = shell # type: ignore context.chain_id = context.shell.chains.main.chain_id() # type: ignore context.big_maps = {} # type: ignore stack.items = [] return cls()
def execute(cls, stack: MichelsonStack, stdout: List[str], context: AbstractContext): context.shell = None # type: ignore context.network = None # type: ignore context.chain_id = None # type: ignore context.big_maps = {} # type: ignore stack.items = [] return cls()
def execute(cls, stack: MichelsonStack, stdout: List[str], context: AbstractContext): literal: Type[MichelineLiteral] literal = cls.args[0] # type: ignore network = literal.get_string() if network not in nodes: raise Exception(f'Expected one of {nodes}, got {network}') context.network = network # type: ignore context.chain_id = context.shell.chains.main.chain_id() # type: ignore context.big_maps = {} # type: ignore stack.items = [] return cls()