Skip to content

Commit 54a6a87

Browse files
ElliotFriendclaudeleighmcculloch
authored
[chore]sdk-examples: fix broken py-stellar-base imports (#2545)
* chore(sdk-examples): fix broken py-stellar-base imports Standing-correctness audit against py-stellar-base 14.1.1: learn/migrate/evm/smart-contract-deployment.mdx imported from the pre-v9 `stellar_sdk.soroban.*` sub-package, which no longer exists (the module layout is flat: `soroban_server`, `soroban_rpc`). `SorobanServer` is re-exported at the top level, so the import is now `from stellar_sdk import SorobanServer`. The second import (`TransactionStatus` from `stellar_sdk.soroban.soroban_rpc`) referenced a symbol that no longer exists under that name and was unused in the snippet, so it was removed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Update docs/learn/migrate/evm/smart-contract-deployment.mdx Co-authored-by: Leigh <351529+leighmcculloch@users.noreply.github.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Leigh <351529+leighmcculloch@users.noreply.github.com>
1 parent 676111f commit 54a6a87

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

docs/learn/migrate/evm/smart-contract-deployment.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ import time
9999

100100
from stellar_sdk import Network, Keypair, TransactionBuilder
101101
from stellar_sdk import xdr as stellar_xdr
102-
from stellar_sdk.soroban import SorobanServer
103-
from stellar_sdk.soroban.soroban_rpc import TransactionStatus
102+
from stellar_sdk import SorobanServer
104103

105104
# TODO: You need to replace the following parameters according to the actual situation
106105
secret = "SAAPYAPTTRZMCUZFPG3G66V4ZMHTK4TWA6NS7U4F7Z3IMUD52EK4DDEV"
@@ -120,7 +119,7 @@ source = soroban_server.load_account(kp.public_key)
120119
tx = (
121120
TransactionBuilder(source, network_passphrase)
122121
.set_timeout(300)
123-
.append_install_contract_code_op(
122+
.append_upload_contract_wasm_op(
124123
contract=contract_file_path, # the path to the contract, or binary data
125124
source=kp.public_key,
126125
)

0 commit comments

Comments
 (0)