All Projects → paritytech → substrate-contracts-node

paritytech / substrate-contracts-node

Licence: Unlicense license
Minimal Substrate node configured for smart contracts via pallet-contracts.

Programming Languages

rust
11053 projects
shell
77523 projects

Projects that are alternatives of or similar to substrate-contracts-node

trustbase
Smart Contract parachain interoperate with Polkadot and Ethereum
Stars: ✭ 22 (-68.57%)
Mutual labels:  smart-contracts, substrate
pallet-contracts-waterfall
Collection of simple Substrate smart contract examples written in Rust, AssemblyScript, Solang and the smart contract language ink! to test substrates pallet-contracts module
Stars: ✭ 28 (-60%)
Mutual labels:  smart-contracts, substrate
Zentanetwork
Zentanetwork is a forkless Proof of Stake consensus for communication and data storage.
Stars: ✭ 15 (-78.57%)
Mutual labels:  smart-contracts, substrate
jupiter
Wasm smart contract networks powered by Substrate FRAME Contracts pallet in Polkadot ecosystem.
Stars: ✭ 49 (-30%)
Mutual labels:  smart-contracts, substrate
europa
A sandbox to run and debug smart contracts for FRAME Contracts pallet and also a sandbox framework for Substrate runtime.
Stars: ✭ 71 (+1.43%)
Mutual labels:  smart-contracts, substrate
cheezyverse
Cheeze Wizards is the world's first battle royale on the blockchain (with cheese!)
Stars: ✭ 38 (-45.71%)
Mutual labels:  smart-contracts
ex-healthcare-claims-processing
Reference DAML application demonstrating a healthcare use case.
Stars: ✭ 27 (-61.43%)
Mutual labels:  smart-contracts
TranslucentMessages
Make the iOS Messages app translucent!
Stars: ✭ 18 (-74.29%)
Mutual labels:  substrate
v2-periphery
🎚 Peripheral smart contracts for interacting with Uniswap V2
Stars: ✭ 900 (+1185.71%)
Mutual labels:  smart-contracts
eth option
ERC20-compatible Option Contracts
Stars: ✭ 22 (-68.57%)
Mutual labels:  smart-contracts
Credits
Credits(CRDS) - An Evolving Currency For An Evolving Society
Stars: ✭ 14 (-80%)
Mutual labels:  smart-contracts
SubstrateNetApi
Just another Substrate .NET API
Stars: ✭ 36 (-48.57%)
Mutual labels:  substrate
zeneth
🏵️ Let Your ETH Chill — Gasless Ethereum account abstraction with Flashbots
Stars: ✭ 112 (+60%)
Mutual labels:  smart-contracts
learning-solidity-2018
Basic examples of Solidity smart contracts
Stars: ✭ 92 (+31.43%)
Mutual labels:  smart-contracts
trufflepig
🍄🐷Truffle contract artifact loading tool for local development
Stars: ✭ 45 (-35.71%)
Mutual labels:  smart-contracts
contracts
Neufund and platform smart contracts
Stars: ✭ 23 (-67.14%)
Mutual labels:  smart-contracts
eth-decoder
Simple library to decode ethereum transaction and logs
Stars: ✭ 32 (-54.29%)
Mutual labels:  smart-contracts
protocol
Livepeer protocol
Stars: ✭ 136 (+94.29%)
Mutual labels:  smart-contracts
awesome-smart-contracts
Awesome Ethereum Projects List
Stars: ✭ 35 (-50%)
Mutual labels:  smart-contracts
ethereum-crowdsale
0xcert protocol crowdsale contracts for Ethereum blockchain.
Stars: ✭ 15 (-78.57%)
Mutual labels:  smart-contracts

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 polkadot-v0.9.32 branch. When new Polkadot releases come out we may update to those.

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

  • The unstable features of the pallet-contracts are enabled by default (see the runtime/Cargo.toml).
  • The consensus algorithm has been switched to manual-seal in #42. Hereby blocks are authored immediately at every transaction, so there is none of the typical six seconds block time associated with grandpa or aura.
  • If no CLI arguments are passed the node is started in development mode by default.
  • A custom logging filter is applied by default that hides block production noise and prints the contracts debug buffer to the console.
  • With each start of the node process the chain starts from genesis ‒ so no chain state is retained, all contracts will be lost! If you want to retain chain state you have to supply a --base-path.
  • For pallet_contracts::Config we increased the allowed contract sizes. This avoids running into CodeTooLarge when uploading contracts during development. See the comment in runtime/src/lib.rs for more details.

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 --git https://github.com/paritytech/substrate-contracts-node.git

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

  • Check Substrate's node-template for new commits between the new polkadot release branch and the one this repository is currently synced with. The current branch is mentioned in this readme.
  • Apply each commit that happened in this node-template folder since the last sync.
  • Check commits for pallet-contracts since the last time someone synchronized this repository with Substrate in order to not miss any important changes.
  • Execute diener update -s --branch my_polkadot_release_branch. Manually upgrade the pallet-assets-chain-extension dependency to the latest release branch and then cargo update -p palle-contracts for this repository. The specific crate which is mentioned here is actually not important: since Substrate uses git references for its Substrate dependencies it means that once one package is updated all are.
  • Increment the minor version number in node/Cargo.toml and runtime/Cargo.toml.
  • Execute cargo run --release -- --tmp. If successful, it should produce blocks and a new, up to date, Cargo.lock will be created.
  • Update this readme with the hash of the Substrate master commit with which you synchronized. The hash appears two times in this readme.
  • Create a PR with the changes, have it reviewed and merged.
  • Replace XX in this command with your incremeted version number and execute it: git checkout main && git pull && git tag v0.XX.0 && git push origin v0.XX.0. This will push a new tag with the version number to this repository.
  • We have set this repository up in a way that tags à la vX.X.X trigger a CI run that creates a GitHub draft release. You can observe CI runs on GitLab. This draft release will contain a binary for Linux and Mac and appear under Releases. Add a description in the style of "Synchronized with Substrate commit c0ee2a." and publish it.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].