Skip to content

Commit

Permalink
chore: SorobanServer uses testnet instead of futurenet by default (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
overcat committed Nov 27, 2023
1 parent c00d1c5 commit 2568748
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions examples/soroban_auth_atomic_swap.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
from stellar_sdk.exceptions import PrepareTransactionException
from stellar_sdk.soroban_rpc import GetTransactionStatus, SendTransactionStatus

rpc_server_url = "https://rpc-futurenet.stellar.org:443/"
rpc_server_url = "https://soroban-testnet.stellar.org:443"
soroban_server = SorobanServer(rpc_server_url)
network_passphrase = Network.FUTURENET_NETWORK_PASSPHRASE
network_passphrase = Network.TESTNET_NETWORK_PASSPHRASE

submitter_kp = Keypair.from_secret(
"SAAPYAPTTRZMCUZFPG3G66V4ZMHTK4TWA6NS7U4F7Z3IMUD52EK4DDEV"
Expand Down
4 changes: 2 additions & 2 deletions examples/soroban_auth_with_stellar_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
from stellar_sdk.exceptions import PrepareTransactionException
from stellar_sdk.soroban_rpc import GetTransactionStatus, SendTransactionStatus

rpc_server_url = "https://rpc-futurenet.stellar.org:443/"
network_passphrase = Network.FUTURENET_NETWORK_PASSPHRASE
rpc_server_url = "https://soroban-testnet.stellar.org:443"
network_passphrase = Network.TESTNET_NETWORK_PASSPHRASE
soroban_server = SorobanServer(rpc_server_url)

# https://github.com/stellar/soroban-examples/tree/v0.6.0/auth
Expand Down
4 changes: 2 additions & 2 deletions examples/soroban_auth_with_transaction_invoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
from stellar_sdk.exceptions import PrepareTransactionException
from stellar_sdk.soroban_rpc import GetTransactionStatus, SendTransactionStatus

rpc_server_url = "https://rpc-futurenet.stellar.org:443/"
rpc_server_url = "https://soroban-testnet.stellar.org:443"
soroban_server = SorobanServer(rpc_server_url)
network_passphrase = Network.FUTURENET_NETWORK_PASSPHRASE
network_passphrase = Network.TESTNET_NETWORK_PASSPHRASE

# https://github.com/stellar/soroban-examples/tree/v0.6.0/auth
contract_id = "CAROXTYEBHAQWS2DFQBFZPMHWDUMPB2HJRNPPUMJUNBC3USBZJYKTAKF"
Expand Down
4 changes: 2 additions & 2 deletions examples/soroban_deploy_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

# TODO: You need to replace the following parameters according to the actual situation
secret = "SAAPYAPTTRZMCUZFPG3G66V4ZMHTK4TWA6NS7U4F7Z3IMUD52EK4DDEV"
rpc_server_url = "https://rpc-futurenet.stellar.org:443/"
network_passphrase = Network.FUTURENET_NETWORK_PASSPHRASE
rpc_server_url = "https://soroban-testnet.stellar.org:443"
network_passphrase = Network.TESTNET_NETWORK_PASSPHRASE
contract_file_path = "/Users/overcat/repo/stellar/soroban-examples/hello_world/target/wasm32-unknown-unknown/release/soroban_hello_world_contract.wasm"

kp = Keypair.from_secret(secret)
Expand Down
4 changes: 2 additions & 2 deletions examples/soroban_deploy_create_wrapped_token_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

# TODO: You need to replace the following parameters according to the actual situation
secret = "SAAPYAPTTRZMCUZFPG3G66V4ZMHTK4TWA6NS7U4F7Z3IMUD52EK4DDEV"
rpc_server_url = "https://rpc-futurenet.stellar.org:443/"
network_passphrase = Network.FUTURENET_NETWORK_PASSPHRASE
rpc_server_url = "https://soroban-testnet.stellar.org:443"
network_passphrase = Network.TESTNET_NETWORK_PASSPHRASE
hello_asset = Asset("XLM", "GBCXQUEPSEGIKXLYODHKMZD7YMTZ4IUY3BYPRZL4D5MSJZHHE7HG6RWR")

kp = Keypair.from_secret(secret)
Expand Down
4 changes: 2 additions & 2 deletions examples/soroban_extend_footprint_ttl.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
from stellar_sdk.soroban_rpc import GetTransactionStatus

secret = "SAAPYAPTTRZMCUZFPG3G66V4ZMHTK4TWA6NS7U4F7Z3IMUD52EK4DDEV"
rpc_server_url = "https://rpc-futurenet.stellar.org:443/"
rpc_server_url = "https://soroban-testnet.stellar.org:443"
contract_id = "CBQHNAXSI55GX2GN6D67GK7BHVPSLJUGZQEU7WJ5LKR5PNUCGLIMAO4K"
network_passphrase = Network.FUTURENET_NETWORK_PASSPHRASE
network_passphrase = Network.TESTNET_NETWORK_PASSPHRASE

kp = Keypair.from_secret(secret)
soroban_server = SorobanServer(rpc_server_url)
Expand Down
4 changes: 2 additions & 2 deletions examples/soroban_invoke_contract_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

# TODO: You need to replace the following parameters according to the actual situation
secret = "SAAPYAPTTRZMCUZFPG3G66V4ZMHTK4TWA6NS7U4F7Z3IMUD52EK4DDEV"
rpc_server_url = "https://rpc-futurenet.stellar.org:443/"
rpc_server_url = "https://soroban-testnet.stellar.org:443"
contract_id = "CDJO3KQKJFHFEZY2ZSWS4CTZEAZUO2SZNRWO2Y7QQS4X3UWSOLFJHSS3"
network_passphrase = Network.FUTURENET_NETWORK_PASSPHRASE
network_passphrase = Network.TESTNET_NETWORK_PASSPHRASE

kp = Keypair.from_secret(secret)
soroban_server = SorobanServer(rpc_server_url)
Expand Down
6 changes: 3 additions & 3 deletions examples/soroban_payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
from stellar_sdk.exceptions import PrepareTransactionException
from stellar_sdk.soroban_rpc import GetTransactionStatus, SendTransactionStatus

rpc_server_url = "https://rpc-futurenet.stellar.org:443/"
rpc_server_url = "https://soroban-testnet.stellar.org:443"
soroban_server = SorobanServer(rpc_server_url)
network_passphrase = Network.FUTURENET_NETWORK_PASSPHRASE
network_passphrase = Network.TESTNET_NETWORK_PASSPHRASE

alice_kp = Keypair.from_secret(
"SAAPYAPTTRZMCUZFPG3G66V4ZMHTK4TWA6NS7U4F7Z3IMUD52EK4DDEV"
) # GDAT5HWTGIU4TSSZ4752OUC4SABDLTLZFRPZUJ3D6LKBNEPA7V2CIG54
bob_kp = Keypair.from_secret(
"SAEZSI6DY7AXJFIYA4PM6SIBNEYYXIEM2MSOTHFGKHDW32MBQ7KVO6EN"
) # GBMLPRFCZDZJPKUPHUSHCKA737GOZL7ERZLGGMJ6YGHBFJZ6ZKMKCZTM
native_token_contract_id = "CB64D3G7SM2RTH6JSGG34DDTFTQ5CFDKVDZJZSODMCX4NJ2HV2KN7OHT"
native_token_contract_id = "CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC"

alice_source = soroban_server.load_account(alice_kp.public_key)

Expand Down
2 changes: 1 addition & 1 deletion examples/soroban_restore_footprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from stellar_sdk.soroban_rpc import GetTransactionStatus, SendTransactionStatus

secret = "SAAPYAPTTRZMCUZFPG3G66V4ZMHTK4TWA6NS7U4F7Z3IMUD52EK4DDEV"
rpc_server_url = "https://rpc-futurenet.stellar.org:443/"
rpc_server_url = "https://soroban-testnet.stellar.org:443"
contract_id = "CAEZUQ3JTKBLIYFZEHKSK5X2K3MGU66B4F6MJFEKZKF6ZFRWBERV3BKF"
network_passphrase = Network.STANDALONE_NETWORK_PASSPHRASE

Expand Down
4 changes: 2 additions & 2 deletions stellar_sdk/soroban_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ class SorobanServer:
"""Server handles the network connection to a Soroban RPC instance and
exposes an interface for requests to that instance.
:param server_url: Soroban RPC server URL. (ex. ``https://rpc-futurenet.stellar.org:443/``)
:param server_url: Soroban RPC server URL. (ex. ``https://soroban-testnet.stellar.org:443``)
:param client: A client instance that will be used to make requests.
"""

def __init__(
self,
server_url: str = "https://rpc-futurenet.stellar.org:443/",
server_url: str = "https://soroban-testnet.stellar.org:443",
client: Optional[BaseSyncClient] = None,
) -> None:
self.server_url: str = server_url
Expand Down
4 changes: 2 additions & 2 deletions stellar_sdk/soroban_server_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ class SorobanServerAsync:
"""Server handles the network connection to a Soroban RPC instance and
exposes an interface for requests to that instance.
:param server_url: Soroban RPC server URL. (ex. ``https://rpc-futurenet.stellar.org:443/``)
:param server_url: Soroban RPC server URL. (ex. ``https://soroban-testnet.stellar.org:443``)
:param client: A client instance that will be used to make requests.
"""

def __init__(
self,
server_url: str = "https://rpc-futurenet.stellar.org:443/",
server_url: str = "https://soroban-testnet.stellar.org:443",
client: Optional[BaseAsyncClient] = None,
) -> None:
self.server_url: str = server_url
Expand Down

0 comments on commit 2568748

Please sign in to comment.