xdevguild / buildo-begins

MultiversX blockchain CLI helper tools - interaction with APIs, smart contracts and protocol
https://www.npmjs.com/package/buildo-begins
MIT License
23 stars 8 forks source link
blockchain cli elrond javascript multiversx sdk typescript

Buildo Begins 👷

Meet Buildo. He is here to help you start creating in the MultiversX blockchain ecosystem. Here is where everything begins.

Buildo is a cool guy 👊 \ — Beniamin Mincu (@beniaminmincu) June 4, 2022

Walkthrough videos

With what he will help you (not all is available yet!):

  1. Deriving PEM files
  2. All tokens-related operations (ESDTs (FT|NFT|SFT|META) issuing, sending, management)
  3. Making transactions
  4. Deploying smart contracts
  5. Smart contracts interactions
  6. Common API interactions and filtering

How to work with Buildo:

  1. Install globally npm install buildo-begins -g or you can also run commands with npx, for example npx buildo-begins@latest issue-esdt
  2. Derive the pem from seed phrase: buildo-begins derive-pem
  3. The walletKey.pem file will be created (Be careful with this file when working with the mainnet. Please don't share it with anyone!). (Other ways of signing, for example with hardware wallet are in plans)
  4. Check the commands with buildo-begins --help
  5. Use one of available commands, check them below.
  6. You will get some prompts, fill up the required data (report here if prompts are not clear enough)

Available commands for Buildo (there will be more):

Not all commands are ready yet, but you will find a complete list of token operations at: buildo.dev

Each command will display a set of self-explanatory prompts. If there is something that needs more explanation please let me know about it here.

General operations

FT ESDT (fungible tokens) operations

To create fungible ESDT keep the order of operations: issue-esdt -> set-special-roles-esdt

NFT ESDT operations (will be more...)

To create NFTs keep the order of operations: issue-nft -> set-special-roles-nft -> create-nft

SFT ESDT operations (will be more...)

To create SFTs keep the order of operations: issue-sft -> set-special-roles-sft -> create-sft

Meta ESDT operations (will be more...)

To create Meta ESDTs keep the order of operations: issue-meta-esdt -> set-special-roles-meta-esdt -> create-meta-esdt

Meta ESDTs are usually managed and used through smart contracts, but here you can issue, create and also set optional attributes as strings.

EGLD operations (will be more...)

How to use the config file?

Internally Buildo uses the config.ts file, but when you use it as a globally installed npm CLI tool, you don't have to touch that file. What you need to do is to create the .buildobeginsrc file, where you can change values (here are default values):

{
  "chain": "devnet",
  "customApi": "https://devnet-api.multiversx.com"
}

TODO

For now, the first version gives you basic stuff. But there will be much more:

Development:

  1. Clone the repo
  2. Each change needs npm run build
  3. You can link the lib locally by npm link
  4. If you want to build your version, find all the buildo-begins names and replace them with yours.

The Buildo tool is supposed to be not only a tool/product but also the source code for learning purposes and further derived tools.

The code is structured into directories based on the token type. The general-purpose functionality is in the root directory. Each Typescript file is a separate functionality. Some of them have to be triggered in proper order, like when issuing the token.

For now, some of the code is copied across token directories, and some functionality is almost the same for some token types. This is done for a purpose, to keep the logic for one token in one place and give the possibility for other developers to copy parts of the code without thinking much about what is where. It is also to make the learning path simpler. It may change in the future.

Other tools: