Our great sponsors
-
mx-sdk-js-core
MultiversX SDK for interacting with the MultiversX blockchain (in general) and Smart Contracts (in particular).
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Let's look at how we can start to write Smart Contracts on the Elrond blockchain. There are pretty good docs on how to start. They use an example of a Crowdfunding Smart Contract. But let's leave it for a moment. You can always read it later. For now, let's jump into the code. I prepared a custom Smart Contract that has all dependencies up to date and is so simple that you will learn a lot by just reading the code. It is a simple PiggyBank Smart Contract. The functionality is basic for now. You can create a Piggy, add tokens, lock them, and claim them when the lock time will expire. You can clone it from Github here: PiggyBank Smart Contract.
In the case of the Elrond Blockchain, there is a couple of options. You can use JavaScript SDK, but you can also use a Python-based CLI tool called erdpy. It is what we will use here for now. Later I plan to write a frontend app for it, so I'll use JavaScript SDK.
Lately, I started to explore through docs of many different blockchain protocols out there to find the quickest and simplest entry point to learn how to write Smart Contracts using Rust language. There are fantastic tools from the Polkadot ecosystem. Solana and Terra also look great, and I will for sure take a closer look at these later. But I found that Elrond blockchain has many simple examples of straightforward code. The tooling is also quite impressive, so I decided to spend some time with it first.
Lately, I started to explore through docs of many different blockchain protocols out there to find the quickest and simplest entry point to learn how to write Smart Contracts using Rust language. There are fantastic tools from the Polkadot ecosystem. Solana and Terra also look great, and I will for sure take a closer look at these later. But I found that Elrond blockchain has many simple examples of straightforward code. The tooling is also quite impressive, so I decided to spend some time with it first.