Home

Awesome

substrate-contracts-node

Open in GitHub Codespaces

This repository contains Substrate's node-template configured to include Substrate's pallet-contracts ā€’ a smart contract module.

This repository contains a couple of modifications that make it unsuitable for a production deployment, but a great fit for development and testing:

If you are looking for a node suitable for production see these configurations:

Installation

Download Binary

The easiest way is to download a binary release from our releases page and just execute ./substrate-contracts-node.

Build Locally

Follow the official installation steps to set up all Substrate prerequisites.

Afterwards you can install this node via

cargo install contracts-node

Usage

To run a local dev node execute

substrate-contracts-node

A new chain in temporary directory will be created each time the command is executed. This is the default for this node. If you want to persist chain state across runs you need to specify a directory with --base-path.

See our FAQ for more details: How do I print something to the console from the runtime?.

Connect with frontend

Once the node template is running locally, you can connect to it with frontends like Contracts UI or Polkadot-JS Apps and interact with your chain.

How to upgrade to new Polkadot release

We can have two types of releases:

TAG="v0.XX.0"
git checkout main
git pull
git tag -a ${TAG} -m "${TAG}"
git push origin ${TAG}