Git Product home page Git Product logo

contracts-parachain-template's Introduction

Substrate Cumulus Parachain Template

Polkadot version v0.9.26 Rust version: 1.64-nightly

A new Cumulus-based Substrate node, ready for hacking ☁️..

This project is originally a fork of the Substrate Node Template modified to include dependencies required for registering this node as a parathread or parachain to a relay chain.

The stand-alone version of this template is hosted on the Substrate Devhub Parachain Template for each release of Polkadot. It is generated directly to the upstream Parachain Template in Cumulus at each release branch using the Substrate Template Generator.

πŸ‘‰ Learn more about parachains here, and parathreads here.

πŸ§™ Learn about how to use this template and run your own parachain testnet for it in the Devhub Cumulus Tutorial.

πŸ‘‰Create a smart contract using ink and implement

β‡’ The first tool we will be installing is cargo-contract, a CLI tool for helping setting up and managing WebAssembly smart contracts written with ink!. As a pre-requisite for the tool you need to install the binaryen package, which is used to optimize the WebAssembly bytecode of the contract.

cargo install cargo-contract --force --locked

β‡’ The ink! contract requires the specification of two additional dependencies. This is done to alert consumers to potential security risks while accessing, for example, APIs.

cargo install cargo-dylint dylint-link

β‡’ Creating an ink! Project

cargo contract new xyz

β‡’ Testing Your Contrac

cargo +nightly test

β‡’ Compile Your Contract

cargo +nightly contract build

β‡’ Run a Substrate Node

β‡’ Deploy Your Contract

1. Click the Add New Contract button in the sidebar.
2. Click the Upload New Contract Code button in the Add New Contract page.
3. Choose an Instantiation account (e.g. ALICE).
4. Give the contract a descriptive Name (e.g. xyz Contract).
5. Drag the xyz.contract file that contains the bundled Wasm blob and metadata into the drag & drop area. You will see the UI parse the metadata and enabling the button that takes you to the next step.
6. Click the Next button

contracts-parachain-template's People

Contributors

dashmahavir avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.