Quick Start

Guide overview

This guide will help you get started with such essential Everscale tools as:

You will learn how to:

  • Create and compile your first Solidity contract

  • Run Local blockchain for testing

  • Deploy your first contract

  • Run it on-chain

  • Run a getter-function

  • Make a transfer

  • Explore contract data in Explorer and GraphQL playground

  • Switch to the developer network

  • Configure Evercloud access

  • Configure devnet giver

Table of Contents

Install everdev - single interface to access all the developer tools

If you experience any problems with installation, check out our troubleshooting section.

Create helloWorld contract

Compile it

Using Solidity compiler:

You can also use the Solidity compiler driver:

Run Local Blockchain

Attention: Docker should be running.

Configure default network

Set Local Blockchain SE (Simple Emulator)arrow-up-right as the default network:

Configure Giver wallet that will sponsor deploy operation

Here we use address and private key of SE High Load Giverarrow-up-right.

Note: it may be already configured if you make a clean install of the latest Everdev. Then you can skip this step. If you are updating from some old version, it is necessary.

Attention! This giver is available only in SE. If you work in mainnet or devnet, you need to deploy your own giver - more details below.

Generate the keys for contract ownership

*Note that there are shortcuts for all the commands: s l = signer list :)

**Don't forget to make the owner key default otherwise giver keys will be used as default.

Calculate the contract address

You can see that the contract does not exist yet (is not deployed) but you can already see its future address.

Deploy

Here we deploy the contract, sponsoring it with 10 Tokens (Everscale native currency has 9 decimals). The money for deploy are taken from the giver we configured in the previous steps.

View contract information with Explorer

Go to localhostarrow-up-right and search for your contract address in search bar. Open your account page. You will need it later to see its transactions and messages, that we will produce in the next steps.

Explore contract information with GraphQL

Go to localhost/graphqlarrow-up-right. Enter in the left pane and click Run button (replace the contract's address with the one you got in the previous steps).

You will see:

You can specify any other fields in the result section that are available in GraphQL Schema. (Click Docs on the right side of your screen to explore it).

What is GraphQL? This is the API of blockchain, to retrieve data from it and to send data into it. You can use this playground later, if you will need need to test some queries.

Run on-chain

Let's move on and run an on-chain method.

Let's enter 3. You will see the transaction ID of the operation.

You can also execute it inline like this: $ everdev c run helloWorld touch

In the result you can see the transaction_id. Search for it on your Contract's page in Explorer and in GraphQL playground (use transactions collection instead of accounts).

Run a getter function

Transfer some tokens

Attention!

  • Contracts take value in nanotokens, so in this step we transferred 1 token.

  • Bounce = true means that if the recipient does not exist, money will be returned back. If you plan to transfer money for deploy, specify Bounce = false!

Again, now you can find this transaction in Explorer or GraphQL API.

Switch to Development Network

The Development Network, aka devnet is the Everscale test network with free test tokens that has an identical configuration to mainnet. You can test your contracts in a live environment on it.

To access devnet, you need to create an account and a project on https://dashboard.evercloud.dev/arrow-up-right. Follow this guidearrow-up-right to do it.

You will get your personal project ID, optional secret key and an endpoint of the following format: https://devnet.evercloud.dev/<projectID>/graphqlarrow-up-right

To set devnet up as the default network in everdev, do the following:

Go to your Evercloud dashboardarrow-up-right, find your "Project Id" and "Secret" (optional) on the "Security" tab, and pass them as parameters:

Example:

Set a giver contract on your network

While working with SE network, you already have a preset giver. In Devnet you need to configure your own.

This contract can be some multisig wallet, for example your Surfarrow-up-right account (don't forget to switch it to devnet tooarrow-up-right!).

To get test tokens to your future giver, go to your Evercloud dashboardarrow-up-right, open the Endpoints tab of your project, and click the faucet button next to Development Network. Specify the address and you will get some free test tokens.

To set the giver up in everdev, first get your giver keys ready. In Surf it is your seed phrasearrow-up-right.

Save the keys of your giver account into a signer that will be used to sign giver transactions:

Then add the giver address specifying the signer to be used with it.

Where

giver_type is the type of the giver contract you selected (GiverV1 | GiverV2 | GiverV3 | SafeMultisigWallet | SetcodeMultisigWallet) - for Surf use SetcodeMultisigWallet.

Now you can do all the steps of this guide on devnet and see your transactions on your GraphQL playground at https://devnet.evercloud.dev/<projectID>/graphqlarrow-up-right and ever.livearrow-up-right!

What's next?

  1. Also take a look at our blockchain basics pagearrow-up-right that will help you understand the core concepts of Everscale:)

  2. If you want to integrate your application with Everscale - dive into our SDK Quick Startarrow-up-right!

  3. If you want to explore the GraphQL API more, here is the documentationarrow-up-right!

  4. If you are an exchange - check out our exchange guidearrow-up-right!

We hope this guide was helpful to you! If you have any difficulties/questions/suggestions/etc. please write to out telegram channelarrow-up-right.

Last updated