Smart Contract Template VSCode Extension

This tutorial demonstrates how to quickly set up Concordium blockchain projects using the VSCode extension, streamlining project initialization and contract building.

Concordium now has a direct extension on VSCode that allows you to set up your projects within minutes quickly. Follow the steps below to get started with this extension:

Step 1: Install the Extension

  1. Open VSCode and navigate to the Extensions view (Ctrl+Shift+X).

  2. Use the search box to find the Concordium extension.

  3. Click the "Install" button, and then click "Enable" to activate the extension:

Step 2: Create a Project

  1. Open the Command Palette:

    • macOS: Press Command+Shift+P

    • Windows: Press Ctrl+Shift+P

    • Linux: Press Ctrl+Shift+P

  2. Type "Concordium" to filter applicable commands. By default, you can open up using the shortcuts below:

  1. Select "Initialize a smart contract project" from the list.

  2. Choose your project folder when prompted:

Step 3: Select Template and Provide Details

  1. You will be presented with template options. Choose "cis2-nft" (or "default" if preferred).

  2. Provide the following details for your project:

    • Project name

    • URL of your token’s metadata

    • Description

This is how it will look in your terminal:

Step 4: Build the Project

  1. Open the Command Palette again.

  2. Select "Build contract" to compile your contract and embed your schema in the module:

  1. You can locate the module file in the "concordium-out" folder within your project directory:

Last updated