Skip to content

Commit 9cfcb10

Browse files
committed
Add horizon_url in model and invoke docs
1 parent ec78e14 commit 9cfcb10

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

src/soroban/invoke.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,22 @@ def invoke(
2121
*,
2222
source_account: soroban_models.Identity | stellar_sdk.Keypair | str | None = None,
2323
network: soroban_models.NetworkConfig | soroban_models.NetworkConfig | None = None,
24-
):
24+
) -> xdr.SCVal:
25+
"""Invoke a Soroban contract.
26+
27+
Parameters
28+
----------
29+
contract_id : contract hash.
30+
function_name : name of the function to invoke.
31+
args : parameters passed to the contract function.
32+
source_account : signing account.
33+
network : network to use.
34+
35+
Returns
36+
-------
37+
result : return value of the contract invocation.
38+
39+
"""
2540
identity = (
2641
source_account
2742
if isinstance(source_account, soroban_models.Identity)

src/soroban/models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ def from_source_account(
6666

6767

6868
class NetworkConfig(BaseSettings):
69-
rpc_url: HttpUrl = HttpUrl("https://soroban-testnet.stellar.org:443")
69+
horizon_url: HttpUrl = HttpUrl("https://horizon-testnet.stellar.org")
70+
rpc_url: HttpUrl = HttpUrl("https://soroban-testnet.stellar.org")
7071
network_passphrase: str = Network.TESTNET_NETWORK_PASSPHRASE
7172
base_fee: int = 100
7273

0 commit comments

Comments
 (0)