diff --git a/docs/developers/developer-reference/sc-payments.md b/docs/developers/developer-reference/sc-payments.md index 879c605e9..23f73ecb4 100644 --- a/docs/developers/developer-reference/sc-payments.md +++ b/docs/developers/developer-reference/sc-payments.md @@ -87,4 +87,4 @@ Additional restrictions on the incoming tokens can be imposed in the body of the ## Sending payments -We have seen how contracts can accommodate receiving tokens. Sending them is, in principle, even more straightforward, as it only involves specializing the `Payment` generic of the transaction using specific methods, or better said, attaching a payload to a regular transaction. Read more about payments [here](../../developers/transactions/tx-payment). \ No newline at end of file +We have seen how contracts can accommodate receiving tokens. Sending them is, in principle, even more straightforward, as it only involves specializing the `Payment` generic of the transaction using specific methods, or better said, attaching a payload to a regular transaction. Read more about payments [here](../transactions/tx-payment.md). diff --git a/docs/sdk-and-tools/proxy.md b/docs/sdk-and-tools/proxy.md index 4284a87e0..ae2cd3cc4 100644 --- a/docs/sdk-and-tools/proxy.md +++ b/docs/sdk-and-tools/proxy.md @@ -76,6 +76,10 @@ The Proxy holds its configuration within the `config` folder: - `apiConfig/credentials.toml` - this file holds the configuration needed for enabling secured endpoints - only accessible by using BasicAuth. - `apiConfig/v1_0.toml` - this file contains all the endpoints with their settings (open, secured and rate limit). +:::note +If the provided observers' addresses from `config.toml` are not physical addresses of each observer, but rather addresses of providers that manage multiple observers for each shard, with self handling of health checks, the Proxy must be started with `--no-status-check` flag. +::: + [comment]: # (mx-context-auto) ## **Snapshotless observers support** 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 d2f05ff22..543d071dd 100644 --- a/docs/sdk-and-tools/sdk-dapp/internal-processes/guardians.md +++ b/docs/sdk-and-tools/sdk-dapp/internal-processes/guardians.md @@ -62,4 +62,9 @@ crossWindowProvider.setShouldShowConsentPopup(true); const guardedTransactions = await crossWindowProvider.guardTransactions( signedTransactions ); -``` \ No newline at end of file +``` + +For a working example see the code used in [signing-providers](https://github.com/multiversx/mx-sdk-js-examples/releases/tag/v0.9.0) + + + diff --git a/docs/sdk-and-tools/sdk-js/sdk-js-cookbook-v14.md b/docs/sdk-and-tools/sdk-js/sdk-js-cookbook-v14.md index 875b9929b..76f507f53 100644 --- a/docs/sdk-and-tools/sdk-js/sdk-js-cookbook-v14.md +++ b/docs/sdk-and-tools/sdk-js/sdk-js-cookbook-v14.md @@ -1240,7 +1240,7 @@ First, we load the abi file, then we fetch the transaction, we extract the event } ``` -#### Decoding transaction events +#### Encoding / decoding custom types Whenever needed, the contract ABI can be used for manually encoding or decoding custom types. Let's encode a struct called EsdtTokenPayment (of [multisig](https://github.com/multiversx/mx-contracts-rs/tree/main/contracts/multisig) contract) into binary data. diff --git a/docs/sovereign/distributed-setup.md b/docs/sovereign/distributed-setup.md index d60bf3868..86d856e0f 100644 --- a/docs/sovereign/distributed-setup.md +++ b/docs/sovereign/distributed-setup.md @@ -13,9 +13,9 @@ Before proceeding, ensure that a **SSH key** for GitHub is configured on your ma git clone git@github.com:multiversx/mx-chain-sovereign-go.git ``` -2. Navigate to testnet directory: +2. Navigate to project directory: ```bash - cd mx-chain-sovereign-go/scripts/testnet + cd mx-chain-sovereign-go ``` ### Step 2: Seeder Build @@ -206,7 +206,7 @@ Adjust the flags as needed. You can find all the available flags in `/mx-chain-s #### # observer ``` -./sovereignnode --profile-mode --log-save --log-level *:INFO --log-logger-name --log-correlation --use-health-service --rest-api-interface :8080 --working-directory ~/my_observer_node +./sovereignnode --profile-mode --log-save --log-level *:INFO --log-logger-name --log-correlation --use-health-service --destination-shard-as-observer 0 --rest-api-interface :8080 --operation-mode db-lookup-extension --working-directory ~/my_observer_node ``` ### Staking transaction diff --git a/docs/sovereign/local-setup.md b/docs/sovereign/local-setup.md index 25304d3e4..f5e8a3bdc 100644 --- a/docs/sovereign/local-setup.md +++ b/docs/sovereign/local-setup.md @@ -34,6 +34,17 @@ Before proceeding, ensure that a **SSH key** for GitHub is configured on your ma ### Step 2: Deploy Sovereign setup +#### Sovereign chain with no main chain connection + +1. Update chain parameters in `variables.sh` file + +2. Start the chain with local scripts: +```bash +./config.sh && ./sovereignStart.sh +``` + +#### Sovereign chain with main chain connection + Navigate to the `sovereignBridge` folder: ```bash cd sovereignBridge diff --git a/docs/sovereign/sovereign-api.md b/docs/sovereign/sovereign-api.md index 684305937..c789160ca 100644 --- a/docs/sovereign/sovereign-api.md +++ b/docs/sovereign/sovereign-api.md @@ -1,5 +1,50 @@ # API service +## Deploy Sovereign Proxy service + +:::info +Proxy service is automatically deployed if the sovereign chain was started with [local setup](/sovereign/local-setup) +::: + +### Step 1: Get the `mx-chain-proxy-sovereign-go` Repository + +Before proceeding, ensure that a **SSH key** for GitHub is configured on your machine. + +1. Clone the GitHub repository: + ```bash + git clone git@github.com:multiversx/mx-chain-proxy-sovereign-go.git + ``` + +2. Navigate to proxy directory: + ```bash + cd mx-chain-proxy-sovereign-go/cmd/proxy + ``` + +### Step 2: Edit Proxy `config.toml` file + +Example: +``` +[[Observers]] + ShardId = 0 + Address = "http://127.0.0.1:10000" + +[[Observers]] + ShardId = 4294967295 + Address = "http://127.0.0.1:10000" +``` + +:::note +For sovereign proxy there are 2 Observers required for `ShardId` 0 and 4294967295. The `Address` should be the same for both. +::: + +### Step 3: Start Sovereign Proxy service + +Build and run the proxy +```bash +go build +./proxy --sovereign +``` + ## Deploy Sovereign API service ### Step 1: Get the `mx-api-service` Repository @@ -28,6 +73,8 @@ ### Step 3: Start Sovereign API service ```bash +npm install +npm run init npm run start:testnet ``` diff --git a/docs/sovereign/sovereign-explorer.md b/docs/sovereign/sovereign-explorer.md index 6f4111f55..4d0909162 100644 --- a/docs/sovereign/sovereign-explorer.md +++ b/docs/sovereign/sovereign-explorer.md @@ -17,6 +17,24 @@ git clone https://github.com/multiversx/mx-explorer-dapp.git 2. Update the parameters and URLs with your own configuration in `config.testnet.ts` file +Example configuration: +``` +{ + default: true, + id: 'sovereign', + name: 'Sovereign', + chainId: 'S', + adapter: 'api', + theme: 'default', + egldLabel: 'SOV', + walletAddress: 'https://localhost:3000', + explorerAddress: 'https://localhost:3003', + apiAddress: 'https://localhost:3002', + hrp: 'erd', + isSovereign: true +} +``` + ### Step 3: Start Sovereign Explorer ```bash diff --git a/docs/sovereign/sovereign-wallet.md b/docs/sovereign/sovereign-wallet.md index 13aa3c1dd..5ddcba205 100644 --- a/docs/sovereign/sovereign-wallet.md +++ b/docs/sovereign/sovereign-wallet.md @@ -15,7 +15,7 @@ git clone https://github.com/multiversx/mx-lite-wallet-dapp.git cd src/config ``` -2. Update the `config.sovereign.ts` file: +2. Update the `sharedNetworks.ts` file: - for `sovereign` item - update the URLs with your own - update `sovereignContractAddress` with contract address from `sovereignConfig.toml` -> `SubscribedEvents` from `OutgoingSubscribedEvents` @@ -26,7 +26,7 @@ git clone https://github.com/multiversx/mx-lite-wallet-dapp.git ```bash yarn install -yarn start:sovereign +yarn start-sovereign ``` Read more about deploying lite wallet in [GitHub](https://github.com/multiversx/mx-lite-wallet-dapp/tree/main#multiversx-lite-wallet-dapp).