We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ee549b commit 79490a4Copy full SHA for 79490a4
1 file changed
src/soroban/cli.py
@@ -1,3 +1,7 @@
1
+import json
2
+
3
+from typing_extensions import Annotated
4
5
import soroban
6
import typer
7
@@ -10,10 +14,20 @@ def invoke(
10
14
contract_id: str,
11
15
function_name: str,
12
16
source_account: str = None,
17
+ args: Annotated[typer.FileBinaryRead, typer.Option()] | None = None,
13
18
):
19
identity = soroban.Identity(secret_key=source_account)
20
21
+ if args is not None:
22
+ args = json.load(args)
23
+ args = soroban.Parameters(args=args).model_dump()
24
+ print(args)
25
26
res = soroban.invoke(
- contract_id=contract_id, function_name=function_name, source_account=identity
27
+ contract_id=contract_id,
28
+ function_name=function_name,
29
+ source_account=identity,
30
+ args=args,
31
)
32
print(res)
33
0 commit comments