Wrapper for create an `CREATE_APP` Operation with configuration. This op will do nothing but provide required information for `BOUND_APP`
(app_assets)
| 32 | |
| 33 | |
| 34 | def create_app(app_assets): |
| 35 | """Wrapper for create an `CREATE_APP` Operation with configuration. |
| 36 | |
| 37 | This op will do nothing but provide required information for `BOUND_APP` |
| 38 | """ |
| 39 | config = {types_pb2.APP_ALGO: utils.s_to_attr(app_assets.algo)} |
| 40 | if app_assets.gar is not None: |
| 41 | config[types_pb2.GAR] = utils.bytes_to_attr(app_assets.gar) |
| 42 | op = Operation( |
| 43 | None, types_pb2.CREATE_APP, config=config, output_types=types_pb2.APP |
| 44 | ) |
| 45 | return op |
| 46 | |
| 47 | |
| 48 | def bind_app(graph, app_assets): |