MCPcopy Create free account
hub / github.com/Modulus-Labs/RockyBot / get_cairo_command

Function get_cairo_command

ContractStarter/start_contract.py:38–46  ·  view source on GitHub ↗
(contract_addr,
                      abi_filepath,
                      fn_name,
                      args=None,
                      invocation_type="call")

Source from the content-addressed store, hash-verified

36
37
38def get_cairo_command(contract_addr,
39 abi_filepath,
40 fn_name,
41 args=None,
42 invocation_type="call"):
43 ret = f"/home/aweso/cairo-venv/bin/starknet {invocation_type} --address {contract_addr} --abi {abi_filepath} --function {fn_name} "
44 if args is not None:
45 ret += f"--inputs {args}"
46 return ret
47
48def get_flattened_arr(arr):
49 return " ".join(str(int(x)) for x in list(arr))

Callers 1

Calls

no outgoing calls

Tested by 1