Skip to content

Commit

Permalink
Merge branch 'master' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
kiruxaspb authored Jul 29, 2024
2 parents 53daf30 + 75a599b commit 01a7a75
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ print(snet_sdk.get_services_list("26072b8b6a0e448180f8c0e702ab6d2f"))
##### Free call configuration

If you want to use the free calls you will need to pass these arguments to the create_service_client() method:

```
"free_call_auth_token-bin":"f2548d27ffd319b9c05918eeac15ebab934e5cfcd68e1ec3db2b92765",
"free-call-token-expiry-block":172800,
Expand Down Expand Up @@ -104,6 +105,7 @@ print(service_client.get_services_and_messages_info_as_pretty_string())

To invoke the service`s methods, you can use the the call_rpc() method. This method requires the names of the method and data object, along with the data itself, to be passed into it.
To continue with our example, here’s a call to the *mul* method of the *Exampleservice* from the *26072b8b6a0e448180f8c0e702ab6d2f* organization:

```python
result = service_client.call_rpc("mul", "Numbers", a=20, b=3)
print(f"Calculating 20 * 3: {result}") # Calculating 20 * 3: 60.0
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jsonschema==4.0.0
eth-account==0.9.0
snet.cli==2.1.3
snet.contracts==0.1.1
urllib3>=2.2.2
urllib3>=2.2.2
1 change: 1 addition & 0 deletions testcases/functional_tests/test_sdk_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def get_test_service_data():
}

snet_sdk = sdk.SnetSDK(config)

service_client = snet_sdk.create_service_client(org_id="26072b8b6a0e448180f8c0e702ab6d2f",
service_id="Exampleservice", group_name="default_group")
path_to_pb_files = snet_sdk.get_path_to_pb_files(org_id="26072b8b6a0e448180f8c0e702ab6d2f",
Expand Down

0 comments on commit 01a7a75

Please sign in to comment.