A Concordium piggy bank

The piggy bank smart contract#

In this tutorial, you are going to build a simple smart contract modelling a piggy bank. It should allow any account to insert CCD and only the owner to smash it, taking all of the CCD inside.

In the first part, you will learn how to write the very basic piggy bank smart contract using the Rust programming language.

The second part is about how to test your piggy bank smart contract with integration tests.

The third part is about how to deploy your piggy bank smart contract to the Concordium testnet and interact with it.

Finally, the fourth part explains how to set up a web-based frontend for interacting with the piggy bank smart contract.

Warning

The reader is assumed to have basic knowledge of what a blockchain and smart contracts are, and to have some experience with Rust.

Before starting the tutorial, make sure that you have all of the necessary tools installed and running as described in Setup the development environment.

To start the tutorial click here.

Was this article helpful?
Legal information