def load(context: ExecutionContext, with_code=False): cls = type( MichelsonProgram.__name__, (MichelsonProgram, ), dict( parameter=ParameterSection.match(context.get_parameter_expr()), storage=StorageSection.match(context.get_storage_expr()), code=CodeSection.match( context.get_code_expr() if with_code else []), ), ) return cast(Type['MichelsonProgram'], cls)
def load(context: ExecutionContext, with_code=False): cls = type( TztMichelsonProgram.__name__, (TztMichelsonProgram, ), dict( input=InputSection.match(context.get_input_expr()), output=OutputSection.match(context.get_output_expr()), code=CodeSection.match( context.get_code_expr() if with_code else []), big_maps=BigMapsSection.match(context.get_big_maps_expr()) if context.get_big_maps_expr() else None, ), ) return cast(Type['TztMichelsonProgram'], cls)