Intro to VeChain

I. Getting started

Set up the essentials to begin building on VeChain

Buy Me a Coffee App

Over the next few lessons, you’ll be guided step-by-step, from understanding the basics to deploying your first application (app) on VeChain.

The Buy Me a Coffee App allows supporters to send small donations in VET to a content creator (the contract owner) along with a message. Each “coffee” purchase is logged onchain, and the VET tips are stored in the smart contract until the owner withdraws them.

What You Will Learn

  1. Basic structure of a Solidity smart contract, and use Hardhat to compile and deploy it on VeChainThor.

  2. You’ll also use VeChain-specific tools, such as the official wallet (VeWorld) and public endpoints, when deploying.

  3. Node.js and npm: Make sure you have Node.js and npm installed. Hardhat runs as an npm package.

Before you continue, make sure you set up the VeWorld wallet to connect to VeChain Apps. VeWorld allows websites to connect to VeChain and sign transactions.

Getting Started

At this point, you should have:

To get started, use the command below in your terminal to create an app using one of the pre-existing templates:

npm create vechain-dapp

Follow the prompt on the terminal and select the Buy Me Coffee Example template:

? Select template » - Use arrow-keys. Return to submit.
    X-App Template
    React dApp Template (using VeChain Kit)
    React dApp Template (using DAppKit)
>>> Buy Me Coffee Example
    VeChain Hardhat Template

Name your app (for example: buymeacoffee), navigate to the correct directory, and install all the dependencies required:

cd buymeacoffee
npm install

And you're ready! The repository already includes the Hardhat setup and the smart contract file.

In the next lesson, you'll go through the basics of Solidity smart contracts, deploy your first VeChain smart contract, and interact with your first app.