Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge development in main #837

Merged
merged 14 commits into from
Feb 27, 2024
11 changes: 5 additions & 6 deletions docs/developers/tutorials/your-first-dapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,23 @@ Other rules:

For the web app we'll have two pages:

- The _Sign in_ page - here we can authenticate with ledger, web wallet or with Maiar Wallet
- The _Sign in_ page - here we can authenticate with ledger, web wallet or with xPortal app
- The _Dashboard_ page - here we can either ping or pong, if we already deposited, then we will see a countdown timer until the time interval clears out.

[comment]: # (mx-context-auto)

### **Blockchain Layer (The Backend)**

We will create a smart contract that can handle the deposit (`ping`), claim (`pong`) and status actions (`did_user_ping`, `get_time_to_pong`).
Let's say that, for now, this smart contract plays the role of an API in a dApp. Also this is where our business logic resides.
Let's say that, for now, this smart contract plays the role of an API in a dApp. Also, this is where our business logic resides.

The MultiversX _devnet_ is a public test network maintained by our community where any developer can test their smart contracts and dApps in a real world environment.

[comment]: # (mx-context-auto)

## **Set up the environment**

Let's set up the evironment for getting your first dapp up and running.
Let's set up the environment for getting your first dapp up and running.

[comment]: # (mx-context-auto)

Expand All @@ -71,6 +71,8 @@ In the end, we'll have three subfolders: wallet, contract and dapp. For convenie

![img](/developers/tutorial/folder-structure.png)

[comment]: # (mx-context-auto)

### **Create the owner wallet**

The smart contract can only be deployed on the blockchain by an owner, so let's create an owner's wallet **PEM file**. The owner can also update the contract, later on, if needed. Keep in mind we only use PEM wallets for testing and playing around with non-production code. For real applications please follow best practices, use secure wallets that can be generated [here](https://wallet.multiversx.com).
Expand Down Expand Up @@ -112,8 +114,6 @@ git clone https://github.com/multiversx/mx-ping-pong-sc contract

We now have the source code for the smart contract, but we need to compile it into a _binary_ that the MultiversX Virtual Machine can run. The VM can run Web Assembly code, so we need to compile our Rust source code into Web Assembly (WASM).

We now have the source code for the smart contract, but we need to compile it into a _binary_ that the MultiversX (previously Elrond) Virtual Machine can run. The VM can run Web Assembly code, so we need to compile our Rust source code into Web Assembly (WASM).

Run the following command in order to build the rust smart contract into a _wasm file_.

```sh
Expand Down Expand Up @@ -207,7 +207,6 @@ Then edit this instruction, and change it to the contract address that was shown

![img](/developers/tutorial/config-screenshot.png)


[comment]: # (mx-context-auto)

### **Build the dApp**
Expand Down
2 changes: 1 addition & 1 deletion docs/developers/tutorials/your-first-microservice.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,6 @@ Now we provide you a starting point in order to build your ideas and projects.
Break down this guide and learn more about how to extend the microservice, the dapp and the smart contract. Learn more on the MultiversX official documentation site here: [https://docs.multiversx.com](/).

If you have any questions, feel free to ask them using stackoverflow here:
[https://stackoverflow.com/questions/tagged/elrond](https://stackoverflow.com/questions/tagged/elrond).
[https://stackoverflow.com/questions/tagged/multiversx](https://stackoverflow.com/questions/tagged/multiversx).

Share this guide if you found it useful.
41 changes: 41 additions & 0 deletions docs/sdk-and-tools/chain-simulator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
id: chain-simulator
title: Chain simulator
---

[comment]: # (mx-context-auto)

## Overview

Chain simulator is a piece of software that provides all the `mx-chain-proxy-go` endpoints and includes additional endpoints
for specific operations.

Instead of setting up a local testnet with a proxy and nodes, using chain simulator is a simpler option.
It mimics the behavior of a local testnet, making it easier to test smart contracts in a simulated environment.

The chain simulator offers faster testing since it eliminates the need for consensus, allowing blocks to be generated
in milliseconds rather than the typical 6-second intervals on a local testnet.

The chain simulator provides new endpoints that allow developers to replicate the state of a contract from the mainnet to the simulator.
This enables testing with the same state as on the mainnet, facilitating more accurate and realistic development scenarios.

[comment]: # (mx-context-auto)

## Architectural Overview

![img](/technology/chainsimulator.png)

This simulator is designed to replicate the behavior of a local testnet. Unlike a traditional testnet, this simulator
operates without a consensus group, allowing for isolated testing and development.


[comment]: # (mx-context-auto)

## Features

- Implements all `mx-chain-proxy-go` endpoints.
- Extra endpoints for specific operations.
- Simulates the behavior of a local testnet without a consensus group.

The GitHub repository for the chain simulator and more information
about how to use can be found [here](https://github.com/multiversx/mx-chain-simulator-go).
11 changes: 11 additions & 0 deletions docs/sdk-and-tools/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,17 @@ Events notifier is an external service that can be used to fetch block events an

[comment]: # (mx-context-auto)

### Chain simulator

Chain simulator is designed to replicate the behavior of a local testnet.
It can also be pre-initialized / initialized with blockchain state from other networks, such as mainnet or something similar.

| Name | Description |
|---------------------------------------------------|------------------------------|
| [Chain simulator](/sdk-and-tools/chain-simulator) | A service for local testing. |

[comment]: # (mx-context-auto)

### Devcontainers (for VSCode or GitHub Codespaces)

| Name | Description |
Expand Down
6 changes: 3 additions & 3 deletions docs/sdk-and-tools/rest-api/multiversx-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ Devnet: [https://devnet-api.multiversx.com](https://devnet-api.multiversx.com).

**Blastapi**

Mainnet: [https://elrond-api.public.blastapi.io](https://elrond-api.public.blastapi.io).
Mainnet: [https://multiversx-api.public.blastapi.io](https://multiversx-api.public.blastapi.io).

Devnet: [https://elrond-api-devnet.public.blastapi.io](https://elrond-api-devnet.public.blastapi.io).
Devnet: [https://multiversx-api-devnet.public.blastapi.io](https://multiversx-api-devnet.public.blastapi.io).

Checkout information about [pricing](https://blastapi.io/pricing) and API [limitations per plan](https://docs.blastapi.io/blast-documentation/apis-documentation/elrond).
Checkout information about [pricing](https://blastapi.io/pricing) and API [limitations per plan](https://docs.blastapi.io/blast-documentation/apis-documentation/core-api/multiversx).

More details on how to get your private endpoint can be found [here](https://docs.blastapi.io/blast-documentation/tutorials-and-guides/using-blast-to-get-a-blockchain-endpoint-1).

Expand Down
2 changes: 0 additions & 2 deletions pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<!-- For external contributors: Make sure that you are on a new branch that started from the `external` branch. -->

#### Description of the pull request (what is new / what has changed)

#### Did you test the changes locally ?
Expand Down
1 change: 1 addition & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ const sidebars = {
],
},
"sdk-and-tools/notifier",
"sdk-and-tools/chain-simulator",
"sdk-and-tools/google-bigquery",
"sdk-and-tools/devcontainers",
{
Expand Down
Binary file modified static/developers/tutorial/dapp-architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/developers/tutorial/dapp-problem.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/developers/tutorial/folder-structure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions static/technology/chainsimulator.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<mxfile host="app.diagrams.net" modified="2024-02-27T10:39:15.564Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36" etag="ph4Y5ugfU1mbP7bKnenz" version="23.1.7" type="device">
<diagram name="Page-1" id="XZ3qhjXyUbHVMeMBHV_s">
<mxGraphModel dx="1728" dy="983" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="EWHMPKfBnV-rQj-S9Va0-1" value="" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="30" y="30" width="265" height="300" as="geometry" />
</mxCell>
<mxCell id="EWHMPKfBnV-rQj-S9Va0-2" value="Chain Simulator" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;strokeWidth=1;fontSize=12;fontStyle=1" vertex="1" parent="1">
<mxGeometry x="115" y="20" width="95" height="40" as="geometry" />
</mxCell>
<mxCell id="EWHMPKfBnV-rQj-S9Va0-4" value="node&lt;br&gt;shard 0" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="55" y="60" width="70" height="60" as="geometry" />
</mxCell>
<mxCell id="EWHMPKfBnV-rQj-S9Va0-5" value="node&lt;br&gt;shard 1" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="55" y="130" width="70" height="60" as="geometry" />
</mxCell>
<mxCell id="EWHMPKfBnV-rQj-S9Va0-6" value="node&amp;nbsp;&lt;br&gt;shard meta" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="55" y="250" width="70" height="60" as="geometry" />
</mxCell>
<mxCell id="EWHMPKfBnV-rQj-S9Va0-12" value="" style="endArrow=none;dashed=1;html=1;rounded=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="145" y="60" as="sourcePoint" />
<mxPoint x="145" y="320" as="targetPoint" />
<Array as="points">
<mxPoint x="145" y="60" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="EWHMPKfBnV-rQj-S9Va0-13" value="proxy endpoints" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="182.5" y="80" width="72.5" height="120" as="geometry" />
</mxCell>
<mxCell id="EWHMPKfBnV-rQj-S9Va0-14" value="new&amp;nbsp;&lt;br&gt;endpoints" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="182.5" y="230" width="72.5" height="50" as="geometry" />
</mxCell>
<mxCell id="EWHMPKfBnV-rQj-S9Va0-15" value="" style="endArrow=none;dashed=1;html=1;dashPattern=1 3;strokeWidth=2;rounded=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="89.57999999999998" y="240" as="sourcePoint" />
<mxPoint x="89.57999999999998" y="210" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="EWHMPKfBnV-rQj-S9Va0-16" value="User" style="shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;" vertex="1" parent="1">
<mxGeometry x="395" y="150" width="30" height="60" as="geometry" />
</mxCell>
<mxCell id="EWHMPKfBnV-rQj-S9Va0-19" value="" style="endArrow=classic;startArrow=classic;html=1;rounded=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="310" y="179.57999999999998" as="sourcePoint" />
<mxPoint x="380" y="179.57999999999998" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="EWHMPKfBnV-rQj-S9Va0-20" value="REST APIS" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="306" y="150" width="80" height="30" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
Binary file added static/technology/chainsimulator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
102 changes: 102 additions & 0 deletions static/technology/indexer.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<mxfile host="app.diagrams.net" modified="2024-02-27T10:43:34.521Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36" etag="aEpt2a9mltiY280u4Ev0" version="23.1.7" type="device">
<diagram name="Page-1" id="2CUQH800xFhHVJmL9mho">
<mxGraphModel dx="2074" dy="1180" grid="1" gridSize="20" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" background="none" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="6Ij9C6XUDUhVDzcWqF8C-30" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="6Ij9C6XUDUhVDzcWqF8C-1" target="6Ij9C6XUDUhVDzcWqF8C-29" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="285" y="200" as="targetPoint" />
<Array as="points">
<mxPoint x="285" y="110" />
<mxPoint x="285" y="200" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="6Ij9C6XUDUhVDzcWqF8C-1" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#5EFFEF;" parent="1" vertex="1">
<mxGeometry x="175" y="80" width="60" height="60" as="geometry" />
</mxCell>
<mxCell id="6Ij9C6XUDUhVDzcWqF8C-31" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="6Ij9C6XUDUhVDzcWqF8C-6" target="6Ij9C6XUDUhVDzcWqF8C-29" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="6Ij9C6XUDUhVDzcWqF8C-6" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#5EFFEF;" parent="1" vertex="1">
<mxGeometry x="175" y="170" width="60" height="60" as="geometry" />
</mxCell>
<mxCell id="6Ij9C6XUDUhVDzcWqF8C-32" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="6Ij9C6XUDUhVDzcWqF8C-7" target="6Ij9C6XUDUhVDzcWqF8C-29" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="285" y="200" as="targetPoint" />
<Array as="points">
<mxPoint x="285" y="340" />
<mxPoint x="285" y="200" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="6Ij9C6XUDUhVDzcWqF8C-7" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#5EFFEF;" parent="1" vertex="1">
<mxGeometry x="175" y="310" width="60" height="60" as="geometry" />
</mxCell>
<mxCell id="6Ij9C6XUDUhVDzcWqF8C-13" value="Shard 0" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="105" y="95" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="6Ij9C6XUDUhVDzcWqF8C-14" value="Shard 1" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="105" y="185" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="6Ij9C6XUDUhVDzcWqF8C-15" value="Metachain" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="105" y="325" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="6Ij9C6XUDUhVDzcWqF8C-16" value="" style="shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;" parent="1" vertex="1">
<mxGeometry x="195" y="240" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="6Ij9C6XUDUhVDzcWqF8C-17" value="" style="shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;" parent="1" vertex="1">
<mxGeometry x="195" y="260" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="6Ij9C6XUDUhVDzcWqF8C-18" value="" style="shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;" parent="1" vertex="1">
<mxGeometry x="195" y="280" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="6Ij9C6XUDUhVDzcWqF8C-23" value="" style="endArrow=none;dashed=1;html=1;rounded=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="375" y="370" as="sourcePoint" />
<mxPoint x="375" y="40" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="6Ij9C6XUDUhVDzcWqF8C-24" value="Observer Nodes" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;" parent="1" vertex="1">
<mxGeometry x="155" y="30" width="100" height="30" as="geometry" />
</mxCell>
<mxCell id="6Ij9C6XUDUhVDzcWqF8C-25" value="Elastic indexer service" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;" parent="1" vertex="1">
<mxGeometry x="415" y="30" width="130" height="30" as="geometry" />
</mxCell>
<mxCell id="6Ij9C6XUDUhVDzcWqF8C-27" value="" style="endArrow=none;dashed=1;html=1;rounded=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="575" y="370" as="sourcePoint" />
<mxPoint x="575" y="40" as="targetPoint" />
<Array as="points">
<mxPoint x="575" y="190" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="6Ij9C6XUDUhVDzcWqF8C-36" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.017;entryY=0.465;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" source="6Ij9C6XUDUhVDzcWqF8C-29" target="6Ij9C6XUDUhVDzcWqF8C-35" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="6Ij9C6XUDUhVDzcWqF8C-29" value="Elasticindexer instance" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#CCE5FF;" parent="1" vertex="1">
<mxGeometry x="420" y="170" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="6Ij9C6XUDUhVDzcWqF8C-33" value="WebSocket messages" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="305" y="170" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="6Ij9C6XUDUhVDzcWqF8C-34" value="Elasticsearch&lt;br&gt;cluster" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;" parent="1" vertex="1">
<mxGeometry x="620" y="30" width="130" height="30" as="geometry" />
</mxCell>
<mxCell id="6Ij9C6XUDUhVDzcWqF8C-37" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="6Ij9C6XUDUhVDzcWqF8C-35" target="6Ij9C6XUDUhVDzcWqF8C-29" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="615" y="200" />
<mxPoint x="615" y="200" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="6Ij9C6XUDUhVDzcWqF8C-35" value="Elasticsearch&amp;nbsp;&lt;br&gt;cluster" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#D5E8D4;" parent="1" vertex="1">
<mxGeometry x="625" y="120" width="120" height="170" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
Loading