From caf78b2e24749baa6091166e7b0be3669bc7ab2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Fri, 29 Sep 2023 19:04:37 +0300 Subject: [PATCH 1/4] Fix URLs. --- docs/sdk-and-tools/sdk-dapp/internal-processes/guardians.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sdk-and-tools/sdk-dapp/internal-processes/guardians.md b/docs/sdk-and-tools/sdk-dapp/internal-processes/guardians.md index ddfc2f447..217804255 100644 --- a/docs/sdk-and-tools/sdk-dapp/internal-processes/guardians.md +++ b/docs/sdk-and-tools/sdk-dapp/internal-processes/guardians.md @@ -46,7 +46,7 @@ After formatting the transaction and applying the signature provided by the Ledg ```js import { WalletProvider } from '@multiversx/sdk-web-wallet-provider'; -const walletProvider = new WalletProvider('https://www.wallet.multiversx.com/dapp/init'); +const walletProvider = new WalletProvider('https://wallet.multiversx.com/dapp/init'); walletProvider.guardTransactions(transactions, { callbackUrl: encodeURIComponent('https://my-dapp.com'), }); @@ -54,6 +54,6 @@ walletProvider.guardTransactions(transactions, { Once transactions are back from the web wallet, they can be retrieved as follows: ```js -const signedTransactions = new WalletProvider('https://www.wallet.multiversx.com/dapp/init').getTransactionsFromWalletUrl(); +const signedTransactions = new WalletProvider('https://wallet.multiversx.com/dapp/init').getTransactionsFromWalletUrl(); ``` From 471219109674db72fb8767e055969ff56725b31d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Fri, 29 Sep 2023 19:38:56 +0300 Subject: [PATCH 2/4] Mention xSuite as an alternative of the now-deprecated erdjs-snippets. --- .../sdk-js/writing-and-running-sdk-js-snippets.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/sdk-and-tools/sdk-js/writing-and-running-sdk-js-snippets.md b/docs/sdk-and-tools/sdk-js/writing-and-running-sdk-js-snippets.md index 83b9048c5..f0ee8608a 100644 --- a/docs/sdk-and-tools/sdk-js/writing-and-running-sdk-js-snippets.md +++ b/docs/sdk-and-tools/sdk-js/writing-and-running-sdk-js-snippets.md @@ -9,4 +9,6 @@ In the past, this page was describing how to use the now-deprecated library [`sd Instead, it's now recommended to use [sc-meta CLI](/developers/meta/sc-meta-cli) to [generate the boilerplate code for your interactions](/developers/meta/sc-meta-cli/#calling-snippets). -Though, for writing contract interaction snippets in **JavaScript** or **TypeScript**, please refer to the [`sdk-js` cookbook](/sdk-and-tools/sdk-js/sdk-js-cookbook). A choice would be to structure them as Mocha or Jest tests - take the `*.local.net.spec.ts` tests in [`mx-sdk-js-core`](https://github.com/multiversx/mx-sdk-js-core) as examples. For writing contract interaction snippets in **Python**, please refer to the [`sdk-py` cookbook](/sdk-and-tools/sdk-py/sdk-py-cookbook) - you can write interaction snippets as Python unit tests, or as Jupyter notebooks. +Though, for writing contract interaction snippets in **JavaScript** or **TypeScript**, please refer to the [`sdk-js` cookbook](/sdk-and-tools/sdk-js/sdk-js-cookbook). If you'd like these snippets to function as system tests of your contract, a choice would be to structure them as Mocha or Jest tests - take the `*.local.net.spec.ts` tests in [`mx-sdk-js-core`](https://github.com/multiversx/mx-sdk-js-core) as examples. For writing contract interaction snippets in **Python**, please refer to the [`sdk-py` cookbook](/sdk-and-tools/sdk-py/sdk-py-cookbook) - if desired, you can shape them as simple scripts, as Python unit tests, or as Jupyter notebooks. + +You might also want to have a look over the [**xSuite**](https://xsuite.dev) toolkit, made by the [Arda team](https://arda.run). From 928aa8a91345760275c02fd772e5d6c5ced33d64 Mon Sep 17 00:00:00 2001 From: Alexander Cristurean Date: Tue, 21 Nov 2023 13:49:56 +0200 Subject: [PATCH 3/4] Removed config proxy and config from deprecated example commands. --- .../setup-local-testnet-advanced.md | 19 ++++++------------- docs/sdk-and-tools/sdk-py/configuring-mxpy.md | 15 ++------------- 2 files changed, 8 insertions(+), 26 deletions(-) diff --git a/docs/developers/setup-local-testnet-advanced.md b/docs/developers/setup-local-testnet-advanced.md index 7bafae26f..891b66166 100644 --- a/docs/developers/setup-local-testnet-advanced.md +++ b/docs/developers/setup-local-testnet-advanced.md @@ -170,18 +170,6 @@ Given the request above, extract and save the fields `erd_chain_id` and `erd_min [comment]: # (mx-context-auto) -## **Configuring mxpy** - -You can configure mxpy to point to your local Testnet by default: - -```bash -$ mxpy config set chainID 15... -$ mxpy config set txVersion 123 -$ mxpy config set proxy http://localhost:7950 -``` - -[comment]: # (mx-context-auto) - ## **Sending transactions** Let's send a simple transaction using **mxpy:** @@ -190,6 +178,7 @@ Let's send a simple transaction using **mxpy:** $ mxpy tx new --recall-nonce --data="Hello, World" --gas-limit=70000 \ --receiver=erd1... \ --pem=./sandbox/node/config/walletKey.pem --pem-index=0 \ + --proxy=http://localhost:7950 \ --send ``` @@ -211,6 +200,7 @@ mxpy --verbose contract deploy --bytecode=./mycontract/output/contract.wasm \ --recall-nonce --gas-limit=5000000 \ --pem=./sandbox/node/config/walletKey.pem --pem-index=0 \ --outfile=contract.json \ + --proxy=http://localhost:7950 \ --send ``` @@ -228,11 +218,14 @@ Call mxpy --verbose contract call erd1qqqqqqqqqqqqqpgql... \ --recall-nonce --gas-limit=1000000 --function=increment \ --pem=./sandbox/node/config/walletKey.pem --pem-index=0 --outfile=myCall.json \ + --proxy=http://localhost:7950 \ --send ``` ```bash Query -mxpy --verbose contract query erd1qqqqqqqqqqqqqpgqlq... --function=get +mxpy --verbose contract query erd1qqqqqqqqqqqqqpgqlq... \ + --function=get \ + --proxy=http://localhost:7950 ``` diff --git a/docs/sdk-and-tools/sdk-py/configuring-mxpy.md b/docs/sdk-and-tools/sdk-py/configuring-mxpy.md index bb1db88b9..654c7bb61 100644 --- a/docs/sdk-and-tools/sdk-py/configuring-mxpy.md +++ b/docs/sdk-and-tools/sdk-py/configuring-mxpy.md @@ -19,11 +19,9 @@ In order to view the current configuration, one can issue the command `mxpy conf ``` { - "proxy": "https://gateway.multiversx.com", "txVersion": "1", "dependencies.llvm.tag": "v...", "dependencies.vmtools.tag": "v...", - "chainID": "...", "dependencies.rust.tag": "" } ``` @@ -32,17 +30,8 @@ In order to view the current configuration, one can issue the command `mxpy conf ## Updating the `mxpy` configuration -One can alter the current configuration using the command `mxpy config set`. For example, in order to set the proxy URL or the chain ID, one would do the following: +One can alter the current configuration using the command `mxpy config set`. For example, in order to set the **_rust version_** to be used, one would do the following: ``` -$ mxpy config set chainID 1... -$ mxpy config set proxy https://gateway.multiversx.com +$ mxpy config set dependencies.rust.tag nightly-2023-05-26 ``` - -:::note -For `mainnet` use `proxy: https://gateway.multiversx.com` and `chainID: 1`. - -For `devnet` use `proxy: https://devnet-gateway.multiversx.com` and `chainID: D`. - -For `testnet` use `proxy: https://testnet-api.multiversx.com` and `chainID: T`. -::: From 5f2ff4d15f15d6f5d0ae5d6038a7b010fc964dd7 Mon Sep 17 00:00:00 2001 From: Alexander Cristurean Date: Wed, 22 Nov 2023 11:46:28 +0200 Subject: [PATCH 4/4] Removed txVersion field from configuring-mxpy.md. --- docs/sdk-and-tools/sdk-py/configuring-mxpy.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/sdk-and-tools/sdk-py/configuring-mxpy.md b/docs/sdk-and-tools/sdk-py/configuring-mxpy.md index 654c7bb61..d19af9fad 100644 --- a/docs/sdk-and-tools/sdk-py/configuring-mxpy.md +++ b/docs/sdk-and-tools/sdk-py/configuring-mxpy.md @@ -19,7 +19,6 @@ In order to view the current configuration, one can issue the command `mxpy conf ``` { - "txVersion": "1", "dependencies.llvm.tag": "v...", "dependencies.vmtools.tag": "v...", "dependencies.rust.tag": ""