Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
overcat committed Aug 26, 2023
1 parent 0482fc0 commit 8ea07b9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/soroban_auth_with_transaction_invoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
network_passphrase = Network.FUTURENET_NETWORK_PASSPHRASE

# https://github.com/stellar/soroban-examples/tree/v0.6.0/auth
contract_id = "CDNTSPC5WR5MF5J42B5JTVFWR6NXVYBP7VUMB74J7IYT6JYDWT67NV5T"
contract_id = "CAROXTYEBHAQWS2DFQBFZPMHWDUMPB2HJRNPPUMJUNBC3USBZJYKTAKF"
tx_submitter_kp = Keypair.from_secret(
"SAAPYAPTTRZMCUZFPG3G66V4ZMHTK4TWA6NS7U4F7Z3IMUD52EK4DDEV"
)
Expand Down
2 changes: 1 addition & 1 deletion examples/soroban_deploy_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
secret = "SAAPYAPTTRZMCUZFPG3G66V4ZMHTK4TWA6NS7U4F7Z3IMUD52EK4DDEV"
rpc_server_url = "https://rpc-futurenet.stellar.org:443/"
network_passphrase = Network.FUTURENET_NETWORK_PASSPHRASE
contract_file_path = "/Users/overcat/repo/stellar/soroban-examples/hello_world/target/wasm32-unknown-unknown/release/soroban_hello_world_contract.wasm"
contract_file_path = "/home/overcat/repo/sdf/soroban-examples/hello_world/target/wasm32-unknown-unknown/release/soroban_hello_world_contract.wasm"

kp = Keypair.from_secret(secret)
soroban_server = SorobanServer(rpc_server_url)
Expand Down
2 changes: 1 addition & 1 deletion examples/soroban_invoke_contract_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# TODO: You need to replace the following parameters according to the actual situation
secret = "SAAPYAPTTRZMCUZFPG3G66V4ZMHTK4TWA6NS7U4F7Z3IMUD52EK4DDEV"
rpc_server_url = "https://rpc-futurenet.stellar.org:443/"
contract_id = "CCQVDTV3WGU73LTPTTG3YFBOCS7VJ5ODJQJI7XTBYATZTA4WMV5XAILW"
contract_id = "CDJO3KQKJFHFEZY2ZSWS4CTZEAZUO2SZNRWO2Y7QQS4X3UWSOLFJHSS3"
network_passphrase = Network.FUTURENET_NETWORK_PASSPHRASE

kp = Keypair.from_secret(secret)
Expand Down
15 changes: 8 additions & 7 deletions examples/soroban_payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@

from stellar_sdk import Keypair, Network, TransactionBuilder
from stellar_sdk import xdr as stellar_xdr
from stellar_sdk.soroban import SorobanServer
from stellar_sdk.soroban.soroban_rpc import GetTransactionStatus
from stellar_sdk.soroban.types import Address, Int128

from stellar_sdk import SorobanServer
from stellar_sdk.soroban_rpc import GetTransactionStatus
from stellar_sdk import scval
rpc_server_url = "https://rpc-futurenet.stellar.org:443/"
soroban_server = SorobanServer(rpc_server_url)
network_passphrase = Network.FUTURENET_NETWORK_PASSPHRASE
Expand All @@ -25,9 +24,9 @@
alice_source = soroban_server.load_account(alice_kp.public_key)

args = [
Address(alice_kp.public_key), # from
Address(bob_kp.public_key), # to
Int128(100 * 10**7), # amount, 100 XLM
scval.to_address(alice_kp.public_key), # from
scval.to_address(bob_kp.public_key), # to
scval.to_int128(100 * 10**7), # amount, 100 XLM
]

tx = (
Expand Down Expand Up @@ -64,3 +63,5 @@
)
if transaction_meta.v3.soroban_meta.return_value.type == stellar_xdr.SCValType.SCV_VOID: # type: ignore[union-attr]
print("swap success")
else:
print(f"Transaction failed: {get_transaction_data.result_xdr}")

0 comments on commit 8ea07b9

Please sign in to comment.