Code Monkey home page Code Monkey logo

mx-docs's Introduction

MultiversX Docs

The repository contains the documentation for the MultiversX Network protocol.

docs.multiversx.com

About

The documentation is built over a custom docusaurus solution and relies on Markdown files. This repository also has GitHub actions that will trigger the real-time updating of the official documentation website by merging into the master branch.

How to use locally

In order to ensure that the newly added content is correctly aligned and every Markdown feature is working as intended, one can run the project on a local machine.

Requirements

  • a git client installed
  • nodejs (v18.19.0 LTS) and npm installed
  • optional, but useful: an IDE (Visual Code for example)

Steps

  • clone the repository
  • run npm install (only for the first usage)
  • run npm start
  • access http://localhost:3000 to view your local version of the docs

Live reloading is supported, so you can view the changes in real time by saving the file and going back to the browser.

Contributions

About

Once a proposal to update the documentation is submitted, it will be subject to an internal review process for merging into the core repository.

Audience

Anyone can contribute to the docs. Any help is appreciated. Here are some ways in which you can contribute:

  • update parts of the documentation that no longer match the actual behaviour.
  • document features that aren't documented yet.
  • add additional information about a component.
  • fix grammar issues.
  • and so on...

Guidelines

Each documentation page should include a Edit this page link that will redirect the user to the corresponding GitHub edit page.

Alternatively, contributions can be made manually by following the steps below:

  • external contributions will be made to the development branch.
  • you can contribute from GitHub directly (not recommended) or by working locally and pushing the changes (recommended).
  • the documentation pages are to be found inside the docs directory at the corresponding category.
  • please follow docs/utils.md for Markdown examples.

A web version of the Markdown examples is available here.

Opening a pull request

  • create a new branch starting from development.
  • push the changes to the new branch.
  • open a pull request from your branch to development branch.
  • wait for MultiversX members to review your pull request.

Once approved, the pull request will be merged into the development branch. From time to time (and depending on the emergency of the changes) we will merge the development branch into master branch.

Thank you!

mx-docs's People

Contributors

alyn509 avatar andrei-marinica avatar andreibancioiu avatar anitaachu avatar axenteoctavian avatar biancaialangi avatar bogdan-rosianu avatar camilbancioiu avatar constantintovisi avatar cristure avatar danidrasovean avatar danielailie avatar dorin-iancu avatar dragos-rebegea avatar hermanos avatar ioandanpopa avatar iulianpascalau avatar lcswillems avatar mariusmihaic avatar mihaicalinluca avatar miiu96 avatar ovidiuolteanu avatar popenta avatar psorinionut avatar raduchis avatar radumojic avatar schimih avatar severmm avatar ssd04 avatar sstanculeanu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mx-docs's Issues

Add link to edit the page

Hi,

On each documentation page, it would be great to have a link "Edit the page", that once clicked, would redirect to the correct GitHub to edit the page.

Everytime I see a typo in the document, I want to report it, but then I spend 90% of the time finding how to report the typo: finding back the repo, then the correct .md file, then the button to edit.

Blackbox/Whitebox tests docs missing

Do we have any ETA for docs on the new testing approach? ๐Ÿ‘‡

There are two flavors of integration tests:

Black-box tests: execution imitates the blockchain, no access to private contract functions;
White-box tests: the test has access to the inner workings of the contract.

It isn't easy to learn the topic.
At least from the Testing overview section.
And I believe the Rust Testing Framework (in a different section) is outdated.

Topics to add:

  • What I can and can't test with whitebox/blackbox, very simple examples,
  • Which SC methods exactly can I access in both cases, and which not? For example, how to test the self.send().esdt_local_burn() triggered through the endpoint. What initial setup is required, what roles, how to set them, etc?
  • Simple initialization for both (whitebox/blackbox) - file structure, best practices, examples

The docs could be added systematically, not necessarily all at once, to split the work and gather feedback.

Rust environment setup undocumented

Currently if you follow the crowdfunding smart contract tutorial instructions you will end up with the error

the `wasm32-unknown-unknown` target may not be installed

Nowhere in Elrond documentation there are instructions how to set up Rust environment for Elrond smart contract development.

Legacy documentation in The Crowdfunding Smart Contract (part 2)

Hello,

The commit 22a3b8e introduced an inconsistency between the fund function implementation and its explanation below in the doc.

The commit removes the #[payment_amount] payment: BigUint argument in the fund function, but does not modify the text below it accordingly. Thus, the doc talks about the argument when it does not exist in the code anymore:

Notice the #[payment_amount] payment: BigUint argument. This is not a real argument, but just syntactic sugar to pass the paid sum to the function.

I did not investigated further to see if other inconsistencies exist on the page, but I figured it could be useful to signal this, just so that it is written somewhere :)


By the way, I tried to look for a documentation about #[payment_amount] for the payable annotation, but did not find it. Did I miss something?

Thank you very much!

mxpy installer: update docs for MacOS

Currently, the instructions are long deprecated.

E.g. pip3 install --user --upgrade --no-cache-dir mxpy - this is wrong, mxpy is not the package to be installed.

Elrond Documentation improvements suggestions

This issue is open so new feedback or suggestions are written in the comments.

Please write in the comments any relevant improvements suggestions. These can include lack of documentation in some areas, things that one tried to do but didn't find any documentation about, and so on.

Elrond config scripts page is messy, poorly understandable and dangerous

The config script page is here:

https://docs.elrond.com/validators/mainnet/config-scripts/

While the goal states "streamlining", this page has many issues that are opposite of this goal.

  • It asks user to figure out its username and host name (these are available to any shell script)

  • It asks user to hand edit config file (could be autogenerated)

  • It asks user to give sudo permission to a random stuff downloaded from Github, a matter that any security expert would say is critically dangerous

Suggestion

Design the scripts so that none of this is needed. If necessary, look other projects for inspiration how this can be done without developer experience usability issues like above.

Make "Networking" its own chapter

Currently networking (or open ports) is hidden at the end here:

https://docs.elrond.com/validators/system-requirements/

This should be promoted to its own chapter and updated.

  • System administrators installing Elrond nodes will first look at what ports they need to open and this information is hard to find

  • It does not describe traffic types (TCP/UDP) and RPC ports - this information should be also included

  • UFW command does not make sense sudo ufw allow 37373:38383/tcp - why is it like this?

Variable names mismatch in https://docs.elrond.com/sdk-and-tools/erdjs/erdjs-cookbook/

let payment = TokenPayment.nonFungible("ERDJS-38f249", 1);
let payload = new ESDTNFTTransferPayloadBuilder()
    .setPayment(payment)
    .setDestination(new Address("erd1..."))
    .build();

transactions.push(new Transaction({
    nonce: 7,
    // Same as sender address!
    receiver: new Address("erd1..."),
    data: data,
    gasLimit: 50000 + 1500 * data.length() + 1000000,
    chainID: "D"
}));

payload == data in the code.
There are many same mistakes in the page.

Base

Any 3 Rd. Company
Special units
Doc needed

Documentation lacks direct "Edit on Github" link

For open source projects and documentation frameworks, the best practice is backlink each individual document page to their Github source, so that drive-by developers can easily update documentation.

E.g.

  • "Edit on Github" on Sphinx
  • "Edit on Github" on MkDocs (GitBook)

I did not see such links in docs.elrond.com. Is this planned, as it might significantly bring down the barrier to contribute to the documentation?

The Counter smart contract lacks information how to generate testnet key PEM file and get balance

When the tutorial gets to Deploy section it states

In order to deploy the contract on the Testnet you need to have an account with sufficient balance (required for the deployment fee) and the associated private key in PEM format.

While this clearly describes what the developer needs, it does not answer the question how the developer gets these. Thus, the developer cannot get past this point of tutorial, without further research that may take a long time and lose the developer interest.

Suggested solution

  • Use a local development node, instead of a public testnet, for the tutorial

  • A web wizard that generates testnet PEM file with an account that has testnet EGLD balance on it

The first tutorial lacks information how to deploy locally

In the Hello World tutorial, the contract is deployed on a shared testnet:

https://docs.elrond.com/developers/tutorials/counter/

All professional development happens on a local development node that can be spin up and tear down with a single line command. The development workflow advertised in the Hello World tutorial is not practical, though is good for tutorial purposes. Still, a local node development workflow similar to Ganache (Web3.js) or py-evm (Web3.py) should be described in the docs, as this is what professional developers want.

The documentation later describes how to set up a local testnet, but this is not what developers want. The developers want a single line node up and down, with some local explorer or logging output for transactions.

https://docs.elrond.com/developers/setup-local-testnet/

ROF-c85ab7 LOGO

IMG_3380
IMG_3381

ROF-c85ab7

I'm trying to put a logo on the ROF token
can anyone help?

Documents lacks tooling detail how to issue out a token

The ESDT tokens chapter details how to issue out a new token.

https://docs.elrond.com/developers/esdt-tokens/#issuance-of-fungible-esdt-tokens

This documentation is very outlining and is not helpful enough for outside readers - as it has gaps to let the user to understand the complete steps to issue and manage tokens.

  • It does not cross-reference to any tooling (JavaScript, Python erdpy, Rust, how to issue out a token)

  • It does not refer to have source code, or related, how the tokens are managed, or any detailed discussion about token standards - for example it asks to community feedback, but does not discuss how to give such feedback and where relevant discussion should take a place

Available chain ids and their rationale undocumented

Elrond chain ids are not covered in the documentation

image

The information like that D means devnet can be uncovered from the source code, but nowhere in the documentation it is not explained what chain ids are available now, how they are chosen, will they stay the same, how to have your own chain id and is it ever needed and so on.

Counter "Hello World" tutorial should cover local development node

The first tutorial should cover how to use a local testnet, deploy the contract locally and explore the testnet. This is because testing on a public testnet is difficult, as you need to access undocumented faucet to get testnet EGLD.

https://docs.elrond.com/developers/tutorials/counter/

Currently there exists erdpy tutorial for a local testnet, but it is not not connected to other tutorials. E.g. what keys are created and how to use them to deploy local testnet contracts.

multiversx/mx-sdk-py-cli#19

This is also important, because the public testnet is unstable, slower and trying to rely it for development is causing a drop of developer efficiency.

Outdated tutorial

Feedback and Suggestions for Development Process Improvements

Hello,

I've been working with your development resources and templates and wanted to share some feedback and suggestions that could enhance the user experience and efficiency.

Issues and Suggestions

  1. Outdated YouTube Videos

    • The YouTube tutorials linked seem outdated, leading to confusion.
    • Suggestion: Update these videos or remove them to avoid misleading information.
  2. Node.js Version Recommendation

    • The default installation on Ubuntu 22 sets Node.js to version 12.
    • Suggestion: Recommend Node.js version 18, or suggest using NVM (Node Version Manager) to allow users to select a compatible Node.js version.
  3. Contract Template Cloning Issue

    • The JSON configuration file in the contract template is no longer valid (Proxy and Chain ID settings are deprecated).
    • Suggestion: Update the template or provide instructions to use a fully parameterized command via the CLI.
  4. DApp Template Configuration

    • After cloning the DApp template, 'src/config.tsx' file is missing.
    • Suggestion: Include steps in documentation to copy 'src/config/config.devnet.ts' to './config.tsx' and modify the import path of 'sharedConfig', or automate this process.
  5. NPM Start Command in DApp Template

    • The command 'npm run start' is invalid; 'npm run start:devnet' is the correct command.
    • Suggestion: Update the documentation to reflect the correct command.

I hope these suggestions help in improving the development experience for this project. Thank you for your hard work and dedication.

Best regards,
@Noun

Token issuance and magical random number undocumented

The token issuance documentation

https://docs.elrond.com/developers/esdt-tokens/

describes

The contract will add a random string to the ticker thus creating the token identifier. The random string starts with โ€œ-โ€ and has 6 more random characters. For example, a token identifier could look like ALC-6258d2.

However, the documentation fails to explain how the issuer will find out what the token identifier he or she has received. There is a random number created, but there is no documentation how to find out what this random number was.

The signature field

There is no documentation of signature response value on the login webhook. So, there is no way to validate that signature on background.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.