From f9630afae9ad2ce660e19fcc7f90a63cf41b69a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Wed, 10 Jan 2024 22:58:43 +0200 Subject: [PATCH 1/2] Uninstall rust installed using brew. --- docs/sdk-and-tools/troubleshooting/rust-setup.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/sdk-and-tools/troubleshooting/rust-setup.md b/docs/sdk-and-tools/troubleshooting/rust-setup.md index 3dda6a5e3..3bacf2ebd 100644 --- a/docs/sdk-and-tools/troubleshooting/rust-setup.md +++ b/docs/sdk-and-tools/troubleshooting/rust-setup.md @@ -25,6 +25,16 @@ If you've installed Rust using `rustup`: rustup self uninstall ``` +If you've installed Rust using `brew`: + +```bash +brew uninstall rust +``` + +:::note +We never recommend installing Rust using `brew`, especially because it makes it non-trivial to switch between different Rust versions. +::: + If you've installed Rust using `mxpy` with a version older than `v9`: ```bash From ef78f09ed6147f30de6403f9c4741fdc7469e0c6 Mon Sep 17 00:00:00 2001 From: Alexandru Popenta Date: Mon, 15 Jan 2024 14:30:54 +0200 Subject: [PATCH 2/2] update py-examples --- docs/sdk-and-tools/sdk-py/sdk-py-cookbook.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/sdk-and-tools/sdk-py/sdk-py-cookbook.md b/docs/sdk-and-tools/sdk-py/sdk-py-cookbook.md index 08f7a805b..30084239d 100644 --- a/docs/sdk-and-tools/sdk-py/sdk-py-cookbook.md +++ b/docs/sdk-and-tools/sdk-py/sdk-py-cookbook.md @@ -113,7 +113,7 @@ transaction = Transaction( gas_limit=50000, chain_id="D", nonce=77, - amount=1000000000000000000 + value=1000000000000000000 ) print(transaction.__dict__) @@ -132,7 +132,7 @@ transaction = Transaction( gas_limit=50000, chain_id="D", nonce=77, - amount=1000000000000000000, + value=1000000000000000000, data=b"for the book" ) @@ -144,7 +144,7 @@ Alternatively, we can create an EGLD transfer using a **transaction factory** (a ``` from multiversx_sdk_core.transaction_factories import TransactionsFactoryConfig -config = TransactionsFactoryConfig(chain_id="D") +config = TransactionsFactoryConfig("D") ``` The **transaction factory** is parametrized at instantiation, and the transaction is obtained by invoking the `create_transaction...` method: @@ -294,6 +294,7 @@ print(relayed_tx.__dict__) from multiversx_sdk_core.transaction_builders.relayed_v2_builder import RelayedTransactionV2Builder from multiversx_sdk_wallet.user_signer import UserSigner + signer = UserSigner.from_pem_file(Path("./testwallets/bob.pem")) inner_tx = Transaction( @@ -548,13 +549,13 @@ signer = UserSigner.from_pem_file(Path("./testwallets/alice.pem")) Signing a transaction: ``` -from multiversx_sdk_core import Transaction +from multiversx_sdk_core import Transaction, TransactionComputer tx = Transaction( nonce=90, sender="erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th", receiver="erd1spyavw0956vq68xj8y4tenjpq2wd5a9p2c6j8gsz7ztyrnpxrruqzu66jx", - amount=1000000000000000000, + value=1000000000000000000, gas_limit=50000, chain_id="D" ) @@ -741,5 +742,4 @@ tx_on_network = provider.get_transaction("9270a6879b682a7b310c659f58b641ccdd5f08 print("Status:", tx_on_network.status) print("Is completed:", tx_on_network.is_completed) ``` -