Learning to Code on MultiversX—A Non-Dev Journey (Part I)
MultiversX has, arguably, one of the best DevX in this space, which motivated me to join the coding crew and learn to code on MultiversX. Here's how it all started.
Hello, my name is Vinicius ‘Vini’ Barbosa.
I'm not a developer and I’m learning to code on MultiversX.
This is the documented journey of a non-dev trying to understand some lines of code, with a special focus on the MultiversX tech stack and the SpaceVM.
Before we start, a brief introduction to my background.
I love learning. I love learning so much that I have already spent significant hours learning how to learn better. Yes. That’s my level of obsession with learning. I get bored once I spend too much time without learning new things. I need to learn.
Being bored recently, the strong development-focused ‘BUIDL’ culture in the MultiversX community inspired me to learn coding, developing smart contracts, and building tools to interact with the blockchain in a more direct way.
MultiversX also has, arguably, one of the best Developer Experience (DevX) in this space, which was a boost of motivation for my journey.
My goals, here, are as follows:
Improve my content creation skills and understanding of related topics;
Create more in-depth content covering (and explaining) code-related stuff;
Onboard devs to MultiversX, guiding them in the process;
Read and verify open-source protocols and smart contracts on my own;
Have the basic skills to build something interesting, if ever needed and/or desired;
Gather blockchain data for reports and analyses;
Participate more actively in the ecosystem via code line;
Stop boredom. Learn something new.
Here’s how I’m learning to code on MultiversX with Rust
The best thing that works for me, while learning, is getting my hands dirty. I learn by doing. Looking at the MultiversX Docs, a tutorial got my attention: “Build your first dApp in 15 minutes.”
Well… I can promise you that it didn’t take only 15 minutes, which was expected as my experience was zero on coding.
Therefore, you can imagine how proud I was once my first deployed smart contract was running on the devnet. It was a very simple ping-pong smart contract, which introduced me to basic premises of interacting with the MultiversX blockchain and virtual machine in a nerdish way. I loved it!
Through the tutorial, I learned how to create a wallet, how to create a smart contract, how to create a dapp, and how to make all three work together. Moreover, I had my first contact with Rust, which then led me to discover all the interesting things it will allow me to do as the journey goes on.
My method was simple (in theory, at least):
Follow the tutorial;
Research (AI mostly) any new terms or concepts;
Make sure to understand what I'm doing in each step;
Check results of every action, every time;
Try solving issues on my own (with AI's help);
Ask for help if I can't solve it by myself;
Check results again and recap what was done;
Dive into some theory before moving to the next tutorial.
Right now, I’m finishing to study some Rust theory, as there is a lot to grasp and digest. For that, I’m mostly using “The Book” (as “rustaceans” like to call it, see how much I have learned? “Rustaceans.”).
Once you have Rust installed in your device, you can open (dramatic pause) “The Book” (dramatic pause) simply by typing `rustup doc --book` on your terminal. Pretty cool, right?
Get your hands dirty – A simple coding exercise
If you want to really get your hands dirty, I strongly suggest visiting MvX Tutorials, like I did. The “Build a dApp in 15 minutes” [docs.multiversx.com/developers/tutorials/your-first-dapp] is a great starting point.
However, if you still think coding is too complicated, I can give you a hand here for a quick warm up in what could be your first experience interacting with a blockchain directly from a CLI like terminal. Everything starts with opening the terminal on Mac/Linux or cmd on Windows.
For this task, we will use the command `curl`, which sends HTTP requests to API endpoints. We will use MultiversX’s Rest API through the MvX Gateway. Our goal here is to retrieve blockchain information from your ‘erd…’ address, directly from the terminal.
Run the following command, with the following adjustment:
curl -X GET "https://gateway.multiversx.com/address/:bench32Address"
Adjust – `:bench32Address` is a placeholder for the address you want to investigate.
Replace this placeholder for your ‘erd…’ address, as in the following example, using the devnet gateway, and my address from the ping-pong contract we talked about before.
curl -X GET "https://devnet-gateway.multiversx.com/address/erd1z7y27jrdpp57qcszcgrp0827htgjy8p9sns9tld7w0l8ftls808qum3nh4"
This should result something like:
{"data":{"account":{"address":"erd1z7y27jrdpp57qcszcgrp0827htgjy8p9sns9tld7w0l8ftls808qum3nh4","nonce":3,"balance":"4986702930190000000","username":"","code":"","codeHash":null,"rootHash":null,"codeMetadata":null,"developerReward":"0","ownerAddress":""},"blockInfo":{"nonce":7985017,"hash":"5f832f5e2bc813c7e1ac7706ff9221368fd7416daa520b29e03ea08fca22ce0d","rootHash":"0c156a6617066eff3aa641253179f80055075520444fd1ec3434d9bd44fd1712"}},"error":"","code":"successful"}
Which we can make prettier with tools like `jq`, for a JSON readable output.
{"data": {
"account": {
"address": "erd1z7y27jrdpp57qcszcgrp0827htgjy8p9sns9tld7w0l8ftls808qum3nh4",
"nonce": 3,
"balance": "4986702930190000000",
"username": "",
"code": "",
"codeHash": null,
"rootHash": null,
"codeMetadata": null,
"developerReward": "0",
"ownerAddress": ""
},
"blockInfo": {
"nonce": 7985018,
"hash": "46b1b88718e7538edc7811aa2d11cc65cd71242dda9c12bdca92b463d0d43dfd",
"rootHash": "0c156a6617066eff3aa641253179f80055075520444fd1ec3434d9bd44fd1712"
}
},
"error": "",
"code": "successful"
}
The roadmap
In conclusion, I started this journey with near to zero knowledge on coding. Now, I can set up a testing wallet, create a project, understand the basics of a Rust source code, deploy a smart contract to MultiversX, send and receive transactions to and from this contract, and check the account’s information in the blockchain from my terminal.
All that accomplished in just a few weeks, studying approximately one hour per day.
If I can do it, you can do it too.
At the time of writing, I’ve already covered the item “4. Understanding Ownership,” of the Rust book, and I am applying some of these concepts at the CryptoZombie MultiversX tutorial. The tutorial has also introduced me to a bunch of very interesting concepts about the MultiversX tech stack that I will talk more about in a next post on X.
Therefore, if you don’t follow me there yet, what are you waiting for?
𝕏 vinibarbosabr
My next challenge will be to build something real (although simple) interacting with the mainnet. More updates on that soon!
The best way to follow my learning journey in real time is by following me on 𝕏 (vinibarbosabr) and/or subscribing to the xAlliance blog.chain, as I will probably come back to write more about all that (and other stuff – give me some ideas!).
If you have started a similar journey—learning to code on MultiversX—make sure to share it in the comments or in other social platforms and tag me and the xAlliance account (xAllianceDAO).
I (we) will love to follow your experience on that too; and exchange some insights.
Time to build!