### Install Dependencies and Start Explorer Source: https://docs.multiversx.com/sovereign/sovereign-explorer Run these commands to install project dependencies and start the testnet version of the explorer. Ensure Node.js and npm/yarn are installed. ```bash yarn ``` ```bash npm run start-testnet ``` -------------------------------- ### Install and start Redis Source: https://docs.multiversx.com/sovereign/services Commands to update package lists, install Redis, and configure it to start automatically on system boot. ```bash sudo apt update sudo apt install redis sudo systemctl start redis sudo systemctl enable redis ``` -------------------------------- ### Install Dependencies and Start Application Source: https://docs.multiversx.com/sovereign/sovereign-wallet Install required packages and launch the sovereign lite wallet instance. ```bash yarn install yarn start-sovereign ``` -------------------------------- ### Install and Start Microservice Source: https://docs.multiversx.com/developers/tutorials/your-first-microservice Commands to install project dependencies and launch the microservice for the devnet environment. ```sh npm install ``` ```sh npm run start:devnet ``` -------------------------------- ### Setup and start localnet Source: https://docs.multiversx.com/developers/setup-local-testnet Commands to configure and launch the localnet environment. ```bash mxpy localnet setup ``` ```bash mxpy localnet start ``` -------------------------------- ### Setup Observing Squad with Docker Source: https://docs.multiversx.com/integrators/observing-squad Commands to clone the repository, install dependencies, and start the stack. ```bash git clone https://github.com/multiversx/mx-chain-observing-squad.git ``` ```bash apt install docker-compose ``` ```bash cd mainnet ./start_stack.sh ``` -------------------------------- ### Start Observing Squad Services Source: https://docs.multiversx.com/integrators/observing-squad After installation, use the script to start all the newly created systemd units for the nodes and the Proxy. ```bash ./script.sh start ``` -------------------------------- ### Install dependencies from file Source: https://docs.multiversx.com/sdk-and-tools/sdk-py Installs all packages listed in the requirements.txt file. ```bash pip install -r requirements.txt ``` -------------------------------- ### Install and Start Sovereign API Service Source: https://docs.multiversx.com/sovereign/sovereign-api Commands to install dependencies and launch the API service for the testnet environment. ```bash npm install npm run init npm run start:testnet ``` -------------------------------- ### Individual localnet setup steps Source: https://docs.multiversx.com/developers/setup-local-testnet The sub-commands executed automatically by the setup command. ```bash mxpy localnet new mxpy localnet prerequisites mxpy localnet build mxpy localnet config ``` -------------------------------- ### Start Chain Simulator Source: https://docs.multiversx.com/developers/meta/sc-meta-cli The `start` subcommand for `cs` starts the chain simulator in verbose mode at `localhost:8085`. Ensure Docker is running. ```bash sc-meta cs start ``` -------------------------------- ### Setup MultiversX Observing Squad Source: https://docs.multiversx.com/bridge/axelar Commands to clone the repository, configure variables, and start the squad. ```bash git clone https://github.com/multiversx/mx-chain-scripts ``` ```bash ENVIRONMENT="mainnet" ... CUSTOM_HOME="/home/ubuntu" CUSTOM_USER="ubuntu" ``` ```bash ./script.sh observing_squad ``` ```bash ./script.sh start ``` -------------------------------- ### Deploy Sovereign Chain (No Main Chain Connection) Source: https://docs.multiversx.com/sovereign/local-setup Start the sovereign chain setup locally using configuration and start scripts. This is for a sovereign chain without connection to the main MultiversX chain. ```bash ./config.sh && ./sovereignStart.sh ``` -------------------------------- ### Trigger Node Installation Directly Source: https://docs.multiversx.com/validators/nodes-scripts/install-update Alternatively, the installation can be initiated by directly calling the script with the 'install' argument. ```bash ~/mx-chain-scripts/script.sh install ``` -------------------------------- ### Install development dependencies Source: https://docs.multiversx.com/developers/toolchain-setup Use sc-meta to install WebAssembly targets and tools, and install twiggy for binary size analysis. ```bash # Installs `wasm32`, `wasm-opt`, and others in one go: sc-meta install all cargo install twiggy ``` -------------------------------- ### Install Rust Source: https://docs.multiversx.com/developers/toolchain-setup Download and install the Rust toolchain using the official rustup script. ```bash curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` -------------------------------- ### Initial Nodes Setup Configuration Source: https://docs.multiversx.com/sovereign/distributed-setup This JSON file defines the initial network configuration, including start time, round duration, consensus group size, and the list of initial nodes with their public keys, addresses, and initial ratings. Ensure `consensusGroupSize` equals `minNodesPerShard` and `startTime` is in the future. ```json { "startTime": 1733138599, "roundDuration": 6000, "consensusGroupSize": 2, "minNodesPerShard": 2, "metaChainConsensusGroupSize": 0, "metaChainMinNodes": 0, "hysteresis": 0, "adaptivity": false, "initialNodes": [ { "pubkey": "6a1ee46baa8da9279f53addbfbc61a525604eb42d964bd3a25bf7f34097c3b3a31706728718ccdbe3d43386c37ec3011df6ceb4188e14025ab149bd568cafaba18a78b51e71c24046c5276a187a6c1d6da83e30590a6025875b8f6df8984ec05", "address": "erd1a2jq3rrqa0heta0fmlkrymky7yj247mrs54g6fyyx8dm45menkrsmu3dez", "initialRating": 0 }, { "pubkey": "40f3857218333f0b2ba8592fc053cbaebec8e1335f95957c89f6c601ce0758372ba31c30700f10f25202d8856bb948055f9f0ef53dea57b62f013ee01c9dc0346a2b3543f2b4d423166ee1981b310f2549fb879d4cd89de6c392d902a823d116", "address": "erd1pn564xpwk4anq9z50th3ae99vplsf7d2p55cnugf00eu0gcq6gdqcg7ytx", "initialRating": 0 } ] } ``` -------------------------------- ### Verbose TOML Configuration Example Source: https://docs.multiversx.com/developers/meta/sc-config This TOML configuration demonstrates a more verbose setup, explicitly defining various settings that could otherwise be defaulted. It includes contract-specific settings and proxy configurations. ```toml [settings] main = "main" [contracts.main] name = "my-contract" add-unlabelled = true panic-message = false ei = "1.2" allocator = "fail" stack-size = "2 pages" features = [] kill-legacy-callback = false [[proxy]] path = "output/proxy.rs" override-import = "" add-unlabelled = true add-labels = [] add-endpoints = [] [[proxy.path-rename]] from = "" to = "" ``` -------------------------------- ### Install and Configure Redis Source: https://docs.multiversx.com/developers/tutorials/your-first-microservice Commands to install, run, and verify the status of the Redis server. ```sh sudo apt install redis-server ``` ```sh redis-server --daemonize yes ``` ```sh ps aux | grep redis ``` -------------------------------- ### Install MultiversX SDK Source: https://docs.multiversx.com/sdk-and-tools/sdk-py Installs the SDK package. Use the ledger variant if hardware wallet support is required. ```bash pip install multiversx-sdk ``` ```bash pip install multiversx-sdk[ledger] ``` -------------------------------- ### Install wget Source: https://docs.multiversx.com/sovereign/software-dependencies Command to install the wget network utility. ```bash apt install wget ``` -------------------------------- ### Install multiversx-sdk Source: https://docs.multiversx.com/sovereign/software-dependencies Command to install the MultiversX SDK library using pip. ```bash pip install multiversx-sdk ``` -------------------------------- ### Install system dependencies Source: https://docs.multiversx.com/developers/toolchain-setup Install essential build tools and libraries required for Rust and sc-meta on Ubuntu or WSL. ```bash sudo apt-get install build-essential pkg-config libssl-dev ``` -------------------------------- ### Troubleshooting Guide Source: https://docs.multiversx.com/llms.txt A guide to common MultiversX development and runtime issues, with suggested resolutions. ```APIDOC ## Troubleshooting Guide ### Description Covers common MultiversX development and runtime issues and their resolutions. ### Endpoint N/A (Troubleshooting Resource) ### Usage Refer to this guide when encountering problems during MultiversX development or runtime. ``` -------------------------------- ### Select Install Option from Script Menu Source: https://docs.multiversx.com/validators/nodes-scripts/install-update After running the main script, select option '1' from the presented menu to begin the node installation process. ```bash 1) install 2) observing_squad 3) multikey_group 4) upgrade 5) upgrade_multikey 6) upgrade_squad 7) upgrade_proxy 8) remove_db 9) start 10) start_all 11) stop 12) stop_all 13) cleanup 14) github_pull 15) add_nodes 16) get_logs 17) benchmark 18) quit Please select an action:1 ``` -------------------------------- ### LinkedListMapper Example Source: https://docs.multiversx.com/developers/developer-reference/storage-mappers Example of how to get a LinkedListMapper. It supports fast insertion/removal and iteration. ```rust fn my_linked_list(&self) -> LinkedListMapper ``` -------------------------------- ### WhitelistMapper Example Source: https://docs.multiversx.com/developers/developer-reference/storage-mappers Example of how to get a WhitelistMapper. It stores a whitelist of items and checks for their presence. ```rust fn my_whitelist(&self) -> WhitelistMapper ``` -------------------------------- ### Clone mx-chain-scripts Repository Source: https://docs.multiversx.com/integrators/observing-squad Clone the installer repository to begin the setup process. Ensure you have git installed. ```bash git clone https://github.com/multiversx/mx-chain-scripts ``` -------------------------------- ### Initialize Contract Setup Source: https://docs.multiversx.com/developers/tutorials/staking-contract Configures the ScenarioWorld environment, registers the contract, and simulates the initial deployment. ```rust pub fn new() -> Self { let mut world = ScenarioWorld::new(); world.set_current_dir_from_workspace("staking-contract"); world.register_contract(WASM_PATH, staking_contract::ContractBuilder); world.account(OWNER_ADDRESS).nonce(1).balance(0); world.account(USER_ADDRESS).nonce(1).balance(USER_BALANCE); // simulate deploy world .tx() .from(OWNER_ADDRESS) .typed(staking_contract_proxy::StakingContractProxy) .init(APY) .code(WASM_PATH) .new_address(STAKING_CONTRACT_ADDRESS) .run(); ContractSetup { world } } } ``` -------------------------------- ### Instantiate Controllers and Factories Source: https://docs.multiversx.com/sdk-and-tools/sdk-py Demonstrates how to initialize controllers and factories either via an entrypoint or through manual instantiation. ```python from multiversx_sdk import DevnetEntrypoint, TransfersController, TransferTransactionsFactory, TransactionsFactoryConfig entrypoint = DevnetEntrypoint() # getting the controller and the factory from the entrypoint transfers_controller = entrypoint.create_transfers_controller() transfers_factory = entrypoint.create_transfers_transactions_factory() # manually instantiating the controller and the factory controller = TransfersController(chain_id="D") config = TransactionsFactoryConfig(chain_id="D") factory = TransferTransactionsFactory(config=config) ``` -------------------------------- ### UnorderedSetMapper Example Source: https://docs.multiversx.com/developers/developer-reference/storage-mappers Example of how to get an UnorderedSetMapper. It offers similar methods to SetMapper but uses swap_remove for item removal. ```rust fn my_set(&self) -> UnorderedSetMapper; ``` -------------------------------- ### Start Development Server Source: https://docs.multiversx.com/developers/tutorials/your-first-dapp Run this command within the 'dapp' folder to start the local development server for testing your dApp. ```sh pnpm start-devnet ``` -------------------------------- ### Execute Initialization Test Source: https://docs.multiversx.com/developers/testing/rust/whitebox-legacy Run the setup and write the resulting scenario to a JSON file. ```rust #[test] fn init_test() { let cf_setup = setup_crowdfunding(crowdfunding_esdt::contract_obj); cf_setup .blockchain_wrapper .write_mandos_output("_generated_init.scen.json"); } ``` -------------------------------- ### Install tmux and gnome-terminal Source: https://docs.multiversx.com/developers/setup-local-testnet-advanced Install tmux and gnome-terminal if they are not already present on your Linux distribution. These are often required for managing terminal sessions during localnet setup. ```bash sudo apt install tmux sudo apt install gnome-terminal ``` -------------------------------- ### Initialize Accounts Source: https://docs.multiversx.com/sdk-and-tools/sdk-js/sdk-js-cookbook Create account instances from entrypoints or various credential sources. ```javascript { const entrypoint = new DevnetEntrypoint(); const account = entrypoint.createAccount(); } ``` ```javascript { const secretKeyHex = "413f42575f7f26fad3317a778771212fdb80245850981e48b58a4f25e344e8f9"; const secretKey = new UserSecretKey(Buffer.from(secretKeyHex, "hex")); const accountFromSecretKey = new Account(secretKey); } ``` ```javascript { const filePath = path.join("../src", "testdata", "testwallets", "alice.pem"); const accountFromPem = Account.newFromPem(filePath); } ``` ```javascript { const keystorePath = path.join("../src", "testdata", "testwallets", "alice.json"); const accountFromKeystore = Account.newFromKeystore(keystorePath, "password"); } ``` ```javascript const mnemonic = Mnemonic.generate(); const accountFromMnemonic = Account.newFromMnemonic(mnemonic.toString()); ``` ```javascript const keypair = KeyPair.generate(); const accountFromKeyPairs = Account.newFromKeypair(keypair); ``` -------------------------------- ### Equivalent Commands for Building Contracts Source: https://docs.multiversx.com/developers/meta/sc-meta-cli Demonstrates two equivalent ways to build a smart contract project: using the standalone 'sc-meta all build' command from the project root, or navigating to the contract's meta directory and using 'cargo run build'. ```bash cd my-contract sc-meta all build ``` ```bash cd my-contract/meta cargo run build ``` -------------------------------- ### Example Response: All ESDT Tokens for an Address Source: https://docs.multiversx.com/tokens/fungible-tokens This is an example response structure for the 'Get all ESDT tokens for an address' API endpoint, showing a list of token identifiers. ```json { "data": { "tokens": ["ABC-0d0060", "DEF-d00600"] }, "error": "", "code": "successful" } ``` -------------------------------- ### Initialize a new smart contract project Source: https://docs.multiversx.com/developers/tutorials/crowdfunding-p1 Use the sc-meta tool to generate a new smart contract project from the empty template. ```bash sc-meta new --name crowdfunding --template empty ``` -------------------------------- ### Example Response: ESDT Token Balance for an Address Source: https://docs.multiversx.com/tokens/fungible-tokens An example response for the 'Get balance for an address and an ESDT token' API endpoint, detailing the token balance and identifier. ```json { "data": { "tokenData": { "balance": "99502603", "properties": "", "tokenIdentifier": "GLD-0d0060" } }, "error": "", "code": "successful" } ``` -------------------------------- ### Example Response: All Roles for Tokens of an Address Source: https://docs.multiversx.com/tokens/fungible-tokens This JSON shows an example response for the 'Get all roles for tokens of an address' API endpoint, listing roles assigned to different token identifiers. ```json { "data": { "roles": { "TCK-0cv5hj": ["ESDTRoleNFTAddQuantity", "ESDTRoleNFTBurn"], "TCK-ft90kn": ["ESDTRoleLocalBurn"] } }, "error": "", "code": "successful" } ``` -------------------------------- ### Deployment output example Source: https://docs.multiversx.com/developers/tutorials/staking-contract Shows the expected output after a successful contract deployment. ```bash sender's recalled nonce: 0 -- tx nonce: 0 sc deploy tx hash: 8a007... deploy address: erd1qqqqqqqqqqqqq... new address: erd1qqqqqqqqqqqqq... ``` -------------------------------- ### Initialize a new smart contract Source: https://docs.multiversx.com/developers/tutorials/staking-contract Creates a new smart contract project directory using the empty template. ```bash sc-meta new --name staking-contract --template empty ``` -------------------------------- ### Deploying a Smart Contract Source: https://docs.multiversx.com/sdk-and-tools/sdk-js/sdk-js-cookbook Demonstrates initializing a controller, loading bytecode and ABI, and broadcasting a deployment transaction. ```typescript { const filePath = path.join("../src", "testdata", "testwallets", "alice.pem"); const sender = await Account.newFromPem(filePath); const entrypoint = new DevnetEntrypoint(); // the developer is responsible for managing the nonce sender.nonce = await entrypoint.recallAccountNonce(sender.address); // load the contract bytecode const bytecode = await promises.readFile("../src/testData/adder.wasm"); // load the abi file const abi = await loadAbiRegistry("../src/testdata/adder.abi.json"); const controller = entrypoint.createSmartContractController(abi); // For deploy arguments, use "TypedValue" objects if you haven't provided an ABI to the factory: let args: any[] = [new U32Value(42)]; // Or use simple, plain JavaScript values and objects if you have provided an ABI to the factory: args = [42]; const deployTransaction = await controller.createTransactionForDeploy(sender, sender.getNonceThenIncrement(), { bytecode: bytecode, gasLimit: 6000000n, arguments: args, }); // broadcasting the transaction const txHash = await entrypoint.sendTransaction(deployTransaction); } ``` -------------------------------- ### Get Shard Status Response Source: https://docs.multiversx.com/sdk-and-tools/rest-api/network Example JSON response structure for the shard status endpoint. ```json { "data": { "status": { "erd_current_round": 187068, "erd_epoch_number": 12, "erd_highest_final_nonce": 187019, "erd_nonce": 187023, "erd_nonce_at_epoch_start": 172770, "erd_nonces_passed_in_current_epoch": 14253, "erd_round_at_epoch_start": 172814, "erd_rounds_passed_in_current_epoch": 14254, "erd_rounds_per_epoch": 14400 } }, "error": "", "code": "successful" } ``` -------------------------------- ### Initialize Project Directory Source: https://docs.multiversx.com/sdk-and-tools/sdk-py Basic shell commands to create and enter a new project directory. ```bash mkdir hello-multiversx cd hello-multiversx ``` -------------------------------- ### Get Network Configuration Response Source: https://docs.multiversx.com/sdk-and-tools/rest-api/network Example JSON response structure for the network configuration endpoint. ```json { "data": { "config": { "erd_chain_id": "1", "erd_denomination": 18, "erd_gas_per_data_byte": 1500, "erd_latest_tag_software_version": "v1.1.0.0", "erd_meta_consensus_group_size": 400, "erd_min_gas_limit": 50000, "erd_min_gas_price": 1000000000, "erd_min_transaction_version": 1, "erd_num_metachain_nodes": 400, "erd_num_nodes_in_shard": 400, "erd_num_shards_without_meta": 3, "erd_round_duration": 6000, "erd_shard_consensus_group_size": 63, "erd_start_time": 1596117600 } }, "error": "", "code": "successful" } ``` -------------------------------- ### Environment Setup Function Source: https://docs.multiversx.com/developers/testing/rust/sc-blackbox-example Initializes the ScenarioWorld and registers the contract for testing. ```rust fn world() -> ScenarioWorld { let mut blockchain = ScenarioWorld::new(); blockchain.register_contract(CODE_PATH, adder::ContractBuilder); blockchain } ``` -------------------------------- ### Example Response: Token Supply, Burnt, and Minted Values Source: https://docs.multiversx.com/tokens/fungible-tokens An example response for the 'Get token's supply, burnt and minted values' API endpoint, providing supply metrics for a token. ```json { "data": { "supply": "95000000000000000000", "minted": "5000000000000000000", "burned": "10000000000000000000", "initialMinted": "100000000000000000000" }, "error": "", "code": "successful" } ``` -------------------------------- ### Instantiate transaction controllers and factories Source: https://docs.multiversx.com/sdk-and-tools/sdk-js/sdk-js-cookbook Demonstrates how to obtain controllers and factories from an entrypoint or instantiate them manually with configuration. ```javascript { const entrypoint = new DevnetEntrypoint(); // getting the controller and the factory from the entrypoint const transfersController = entrypoint.createTransfersController(); const transfersFactory = entrypoint.createTransfersTransactionsFactory(); // manually instantiating the controller and the factory const controller = new TransfersController({ chainID: "D" }); const config = new TransactionsFactoryConfig({ chainID: "D" }); const factory = new TransferTransactionsFactory({ config }); } ``` -------------------------------- ### Clone Sovereign Go Repository Source: https://docs.multiversx.com/sovereign/distributed-setup Clone the mx-chain-sovereign-go repository to start the setup process. Ensure your GitHub SSH key is configured. ```bash git clone git@github.com:multiversx/mx-chain-sovereign-go.git ``` -------------------------------- ### Example: Deploying Multisig Contract with ABI and Arguments File Source: https://docs.multiversx.com/sdk-and-tools/mxpy/mxpy-cli This command deploys the multisig contract using its ABI file and a JSON file for constructor arguments. It specifies the bytecode, proxy, ABI path, arguments file, a higher gas limit, and the sender's PEM file. ```sh mxpy contract deploy --bytecode ~/contracts/multisig/output/multisig.wasm \ --proxy=https://devnet-gateway.multiversx.com \ --abi ~/contracts/multisig/output/multisig.abi.json \ --arguments-file deploy_multisig_arguments.json \ --gas-limit 500000000 \ --pem=~/multiversx-sdk/testwallets/latest/users/alice.pem \ --send ``` -------------------------------- ### Full Blackbox Test Implementation Source: https://docs.multiversx.com/developers/testing/rust/sc-blackbox-example A complete example of a blackbox test for an adder contract, including deployment, state setup, and transaction assertions. ```rust use multiversx_sc_scenario::imports::*; use adder::*; const OWNER_ADDRESS: TestAddress = TestAddress::new("owner"); const ADDER_ADDRESS: TestSCAddress = TestSCAddress::new("adder"); const CODE_PATH: MxscPath = MxscPath::new("output/adder.mxsc.json"); fn world() -> ScenarioWorld { let mut blockchain = ScenarioWorld::new(); blockchain.register_contract(CODE_PATH, adder::ContractBuilder); blockchain } #[test] fn adder_blackbox() { let mut world = world(); world.start_trace(); world.account(OWNER_ADDRESS).nonce(1); let new_address = world .tx() .from(OWNER_ADDRESS) .typed(adder_proxy::AdderProxy) .init(5u32) .code(CODE_PATH) .new_address(ADDER_ADDRESS) .returns(ReturnsNewAddress) .run(); assert_eq!(new_address, ADDER_ADDRESS.to_address()); world .query() .to(ADDER_ADDRESS) .typed(adder_proxy::AdderProxy) .sum() .returns(ExpectValue(5u32)) .run(); world .tx() .from(OWNER_ADDRESS) .to(ADDER_ADDRESS) .typed(adder_proxy::AdderProxy) .add(1u32) .run(); world .query() .to(ADDER_ADDRESS) .typed(adder_proxy::AdderProxy) .sum() .returns(ExpectValue(6u32)) .run(); world.check_account(OWNER_ADDRESS); world .check_account(ADDER_ADDRESS) .check_storage("str:sum", "6"); world.write_scenario_trace("trace1.scen.json"); } ``` -------------------------------- ### Start Smart Contract Chain Simulator Interaction Source: https://docs.multiversx.com/developers/meta/sc-meta-cli Use `cargo run cs` or `sc-meta cs` to initiate interaction with the chain simulator. This command requires Docker to be installed and running. ```bash cargo run cs ``` ```bash sc-meta cs ``` -------------------------------- ### Localnet process logs Source: https://docs.multiversx.com/developers/setup-local-testnet Example output showing the initialization of nodes and proxy processes. ```text INFO:cli.localnet:Starting localnet... ... INFO:localnet:Starting process ['./seednode', ... ... INFO:localnet:Starting process ['./node', ... ... INFO:localnet:Starting process ['./proxy', ... [PID=...] DEBUG[...] [process/block] started committing block ... ``` -------------------------------- ### Create and Login with Custom Provider Source: https://docs.multiversx.com/sdk-and-tools/sdk-dapp Demonstrates how to create a custom provider and log in. Ensure the custom provider extends the IProvider interface and is correctly registered. ```javascript const provider = await ProviderFactory.create({ type: 'custom-provider' }); await provider?.login(); ``` -------------------------------- ### Check pip Installation Source: https://docs.multiversx.com/sdk-and-tools/mxpy/installing-mxpy Verify that pip is installed on your system. This is a prerequisite for installing argcomplete. ```sh pip3 --version ``` -------------------------------- ### Set up tofnd with Docker Source: https://docs.multiversx.com/bridge/axelar Use Docker to run the tofnd service on a new machine. ```bash docker pull axelarnet/tofnd:v1.0.1 docker run -p 50051:50051 --env MNEMONIC_CMD=auto --env NOPASSWORD=true --env ADDRESS=0.0.0.0 -v tofnd:/.tofnd axelarnet/tofnd:v1.0.1 ``` -------------------------------- ### Clone and Set Up dApp Template Source: https://docs.multiversx.com/developers/tutorials/your-first-dapp Clone the dApp template and install dependencies. Customize the smart contract address in the configuration file with the address obtained after deployment. ```sh git clone https://github.com/multiversx/mx-template-dapp dapp cd dapp npm install --global pnpm pnpm install ``` -------------------------------- ### Run Observing Squad Installation Script Source: https://docs.multiversx.com/integrators/observing-squad Execute the main installation script with the 'observing_squad' argument to install the Observing Squad. This enables the DBLookupExtension feature by default. ```bash ./script.sh observing_squad ``` -------------------------------- ### Clone Repositories for Localnet Setup Source: https://docs.multiversx.com/developers/setup-local-testnet-advanced Clone the mx-chain-go and mx-chain-proxy-go repositories to your chosen directory. This is the initial step for manual localnet setup. ```bash mkdir mytestnet && cd mytestnet git clone git@github.com:multiversx/mx-chain-go.git git clone git@github.com:multiversx/mx-chain-proxy-go.git ``` -------------------------------- ### Start Chain Simulator Source: https://docs.multiversx.com/developers/tutorials/chain-simulator-adder Initiates the Chain Simulator process using the sc-meta tool. ```bash my-adder/interactor$ sudo my-path/.cargo/bin/sc-meta cs start Attempting to start the Chain Simulator... Successfully started the Chain Simulator. INFO [2024-11-11 13:09:15.683] using the override config files files = [./config/nodeOverrideDefault.toml] WARN [2024-11-11 13:09:15.684] signature bypass = true INFO [2024-11-11 13:09:15.699] updated config value file = systemSmartContractsConfig.toml path = ESDTSystemSCConfig.BaseIssuingCost value = 50000000000000000 INFO [2024-11-11 13:09:15.699] updated config value file = config.toml path = Debug.Process.Enabled value = false INFO [2024-11-11 13:09:15.699] updated config value file = config.toml path = VirtualMachine.Execution.WasmVMVersions value = [map[StartEpoch:0 Version:1.5]] INFO [2024-11-11 13:09:15.699] updated config value file = config.toml path = VirtualMachine.Querying.WasmVMVersions value = [map[StartEpoch:0 Version:1.5]] INFO [2024-11-11 13:09:15.699] updated config value file = config.toml path = WebServerAntiflood.WebServerAntifloodEnabled value = false INFO [2024-11-11 13:09:15.699] updated config value file = config.toml path = WebServerAntiflood.SimultaneousRequests value = 100000 ... ``` -------------------------------- ### Install tmux Source: https://docs.multiversx.com/sovereign/software-dependencies Command to install the tmux terminal multiplexer. ```bash sudo apt install tmux ``` -------------------------------- ### Install mxpy using pipx Source: https://docs.multiversx.com/sdk-and-tools/mxpy/installing-mxpy Install the latest version of the mxpy SDK CLI using pipx. The --force flag can be used to overwrite existing installations. ```sh pipx install multiversx-sdk-cli --force ``` -------------------------------- ### Install Chain Simulator Docker Image Source: https://docs.multiversx.com/developers/meta/sc-meta-cli The `install` subcommand for `cs` pulls the latest chain simulator Docker image. This command requires Docker to be installed and running. ```bash sc-meta cs install ``` -------------------------------- ### Sovereign Chain Configuration Example Source: https://docs.multiversx.com/sovereign/local-setup Example configuration settings for connecting a sovereign chain to the MultiversX testnet. Update paths, wallet, and network constants as needed. ```bash # Sovereign Paths SOVEREIGN_DIRECTORY="~/sovereign" TXS_OUTFILE_DIRECTORY="${SOVEREIGN_DIRECTORY}/txsOutput" CONTRACTS_DIRECTORY="${SOVEREIGN_DIRECTORY}/contracts" # Owner Configuration WALLET="~/wallet.pem" # Main chain network config MAIN_CHAIN_ELASTIC=https://testnet-index.multiversx.com PROXY = https://testnet-gateway.multiversx.com CHAIN_ID = T # Native token NATIVE_ESDT_TICKER=SOV NATIVE_ESDT_NAME=SovToken ``` -------------------------------- ### Example Deployment Output Source: https://docs.multiversx.com/developers/tutorials/your-first-dapp Review this output after deployment to identify the contract address and transaction hash. These are crucial for further interaction and monitoring. ```sh Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.48s Running `/ping-pong/contract/target/debug/ping-pong-interact deploy --amount 1000000000000000000 --duration 180000` sender's recalled nonce: 0 -- tx nonce: 0 sc deploy tx hash: 93ff495b02eb84f0f427f4f02e2c0ce10e667a3511807db8781e1eaed47f9d16 deploy address: erd1qqqqqqqqqqqqqpgq0dw0cfqeknm43sxzzeg5h5j3ewwu8gyd0vdqq4jutd new address: erd1qqqqqqqqqqqqqpgq0dw0cfqeknm43sxzzeg5h5j3ewwu8gyd0vdqq4jutd ``` -------------------------------- ### Install screen Source: https://docs.multiversx.com/sovereign/software-dependencies Command to install the screen terminal utility on Linux. ```bash sudo apt install screen ``` -------------------------------- ### Install Python3 Source: https://docs.multiversx.com/sovereign/software-dependencies Command to install the Python3 interpreter on Ubuntu systems. ```bash sudo apt install python3 ```