Skip to content

Commit

Permalink
Merge pull request #756 from multiversx/development
Browse files Browse the repository at this point in the history
Propagate changes from Development to Main branch.
  • Loading branch information
cristure authored Nov 22, 2023
2 parents 17ac64a + 699187d commit 0e57107
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 27 deletions.
19 changes: 6 additions & 13 deletions docs/developers/setup-local-testnet-advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:**
Expand All @@ -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
```

Expand All @@ -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
```

Expand All @@ -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
```
16 changes: 2 additions & 14 deletions docs/sdk-and-tools/sdk-py/configuring-mxpy.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@ 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": ""
}
```
Expand All @@ -32,17 +29,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`.
:::

0 comments on commit 0e57107

Please sign in to comment.