Skip to main content

A Counter on the Testnet

This tutorial installs a simple counter contract on the Casper Testnet. The contract is straightforward and simply maintains a counter variable. If you want to learn to send deploys to a local Casper Network, you can follow a similar tutorial and work with NCTL. Once you are familiar with this process, the next step will be to write more practical smart contracts.

Before we go through the tutorial, we will give a high-level overview of this tutorial's walkthrough and briefly summarize the relevant commands (and respective arguments).

Prerequisites​

  1. You have completed the Getting Started tutorial to set up your development environment, including tools like cmake (version 3.1.4+), cargo, and Rust.
  2. Follow the installation instructions for the Casper client. We will use the casper-client to send deploys to the chain.
  3. Proceed to setting up and funding an account on the Casper Testnet. Make note of two critical pieces of information that you will need in order to complete this tutorial:
    • The location of your account’s secret_key.pem file
    • Your account’s account-hash identifier
  4. Select a node whose RPC port will be receiving the deploys coming from your account to the Testnet.

Video Tutorial​

If you prefer a video walkthrough of this guide, you can check out this video.