Skip to content

Minimal Substrate node configured for smart contracts via pallet-contracts.

License

Notifications You must be signed in to change notification settings

DukeCaesar/substrate-contracts-node

 
 

Repository files navigation

substrate-contracts-node

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

This repository is tracking Substrate's master.

Installation

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

Afterwards you can install this node via

cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --force --locked

The --locked flag makes the installation use the same versions as the Cargo.lock in those repositories ‒ ensuring that the last known-to-work version of the dependencies are used.

The latest confirmed working Substrate commit which will then be used is 3cad018bb4d8129f7ff199c3a5bb63ac78b19d6b.

Usage

To run a local dev node execute

substrate-contracts-node --dev

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

Show only Errors and Contract Debug Output

To have only errors and contract debug output show up on the console you can supply -lerror,runtime::contracts=debug when starting the node.

Important: Debug output is only printed for RPC calls or off-chain tests ‒ not for transactions!

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

Connect with Polkadot-JS Apps Front-end

Once the node template is running locally, you can connect to it with the Polkadot-JS Apps frontend to interact with your chain. Click here to connect the frontend to your local node.

About

Minimal Substrate node configured for smart contracts via pallet-contracts.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 97.5%
  • Shell 2.5%