All Projects → paritytech → pallet-contracts-waterfall

paritytech / pallet-contracts-waterfall

Licence: GPL-3.0 license
Collection of simple Substrate smart contract examples written in Rust, AssemblyScript, Solang and the smart contract language ink! to test substrates pallet-contracts module

Programming Languages

typescript
32286 projects
solidity
1140 projects
rust
11053 projects
shell
77523 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to pallet-contracts-waterfall

jupiter
Wasm smart contract networks powered by Substrate FRAME Contracts pallet in Polkadot ecosystem.
Stars: ✭ 49 (+75%)
Mutual labels:  smart-contracts, ink, substrate
ts
Misc. TypeScript definitions that are not yet available on DefinitelyTyped but required by other projects in this repo. Should be merged with upstream projects or the DT project.
Stars: ✭ 13 (-53.57%)
Mutual labels:  substrate, polkadot-js
common
Utilities and base libraries for use across polkadot-js for Polkadot and Substrate. Includes base libraries, crypto helpers and cross-environment helpers. Full documentation & examples available.
Stars: ✭ 221 (+689.29%)
Mutual labels:  substrate, polkadot-js
metis
A library for secure ink! Wasm smart contract development.
Stars: ✭ 29 (+3.57%)
Mutual labels:  ink, substrate
guardian
Web3 Guardian - a blockchain monitoring and alerting tool
Stars: ✭ 34 (+21.43%)
Mutual labels:  substrate, polkadot-js
tools
Various cli tools for Polkadot and Substrate chains, including basic node monitoring, making API queries via a cli app and other command-line tools
Stars: ✭ 173 (+517.86%)
Mutual labels:  substrate, polkadot-js
ask
Ask! is a framework to write Wasm smart contracts for Substrate Frame Pallet-Contracts in AssemblyScript
Stars: ✭ 44 (+57.14%)
Mutual labels:  ink, assemblyscript
substrate-contracts-node
Minimal Substrate node configured for smart contracts via pallet-contracts.
Stars: ✭ 70 (+150%)
Mutual labels:  smart-contracts, substrate
trustbase
Smart Contract parachain interoperate with Polkadot and Ethereum
Stars: ✭ 22 (-21.43%)
Mutual labels:  smart-contracts, substrate
redstone-smartcontracts
An implementation of the Arweave SmartWeave smart contracts protocol.
Stars: ✭ 42 (+50%)
Mutual labels:  smart-contracts, assemblyscript
ui
UI utilities, libraries and Vue.js components in use across @polkadot-js projects
Stars: ✭ 19 (-32.14%)
Mutual labels:  substrate, polkadot-js
Zentanetwork
Zentanetwork is a forkless Proof of Stake consensus for communication and data storage.
Stars: ✭ 15 (-46.43%)
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 (+153.57%)
Mutual labels:  smart-contracts, substrate
erc721-extensions
A set of composable extension contracts for the OpenZeppelin ERC721 base contracts.
Stars: ✭ 157 (+460.71%)
Mutual labels:  smart-contracts
solidstate-solidity
💠 Upgradeable-first Solidity smart contract development library 💠
Stars: ✭ 264 (+842.86%)
Mutual labels:  smart-contracts
lamden
A Performant Blockchain that Isn't Confusing
Stars: ✭ 116 (+314.29%)
Mutual labels:  smart-contracts
ares
Completely decentralized oracle protocol
Stars: ✭ 51 (+82.14%)
Mutual labels:  substrate
SubstrateNetApi
Just another Substrate .NET API
Stars: ✭ 36 (+28.57%)
Mutual labels:  substrate
zeneth
🏵️ Let Your ETH Chill — Gasless Ethereum account abstraction with Flashbots
Stars: ✭ 112 (+300%)
Mutual labels:  smart-contracts
sube
SUBmit Extrinsics to a Substrate chain
Stars: ✭ 19 (-32.14%)
Mutual labels:  substrate

pallet-contracts test site

⚠️ This repository has been archived! ⚠️

It has been superseded by ink-waterfall.


This repo hosts tests for pallet-contracts.

It uses git submodules for some tests. To checkout the repository including the linked submodules, run the following command to clone it:

git clone --recursive https://github.com/paritytech/pallet-contracts-waterfall.git

Preparations

For running this test suite you would need to have:

  1. A nightly rust compiler equipped with the wasm32-unknown-unknown target.

    The easiest way to install it is with rustup. Please see https://rustup.rs.

    rustup toolchain install nightly
    rustup update
    rustup target add wasm32-unknown-unknown --toolchain nightly
    rustup component add rust-src --toolchain nightly

    Also, you might need to put cargo's bin directory on PATH. You can typically do it by executing:

    source ~/.cargo/env
  2. Yarn.

    Read on how to install it here.

  3. JavaScript test environment

    To install all depenmdencies used by the Jest testing suite, run the following command:

    yarn

    To upgrade to the latest versions of the Polkadot JS dependencies, run the following command:

    yarn upgrade --pattern @polkadot

  4. Initialize submodules manually

    If you cloned the repository without the --recursive parameter, you need to initialize the submodules manually:

    git submodule update --init
    

    If you were running this test suite before and want to update your local version to the latest master branches of the submodules, run:

    git submodule update --remote --merge
    

Compiling the examples

To build all artifacts required for running the tests, you need to invoke

./build.sh

This will also install https://github.com/WebAssembly/wabt on your computer.

Optional Solang test relying on Docker:

The recommended way to install Solang is currently to use the latest docker image from https://hub.docker.com/r/hyperledgerlabs/solang/tags. For this reason, the Solang tests-cases will only be compiled by running the build.sh script if Docker is installed and running on your machine. Alternatively you can also install Solang manually on your local machine.

Please see https://github.com/hyperledger-labs/solang for details.

Execute tests

To run the tests, launch the substrate node locally and run

yarn test

To only run a language specific subset of tests, the following commands are available:

Run AssemblyScript tests only: yarn test:as

Run Rust and ink! tests only: yarn test:rust

Run Solang tests only: yarn test:solang

Using a Docker image of Substrate for testing

To run this tests, you need to run a local Substrate on port ws://127.0.0.1:9944. The other alternative is to use one of the Docker images that are being automatically generated with every update to the master branch and published https://hub.docker.com/r/parity/substrate/.

The script to run this container is docker-compose.yml file in the root of this repository.

Before you can run this script, you need to install Docker and 'Docker Compose' on your machine. Please follow the steps described here (including the prerequisites): https://docs.docker.com/compose/install/

Usage:

  1. BUILD: Run docker-compose pull && docker-compose up to pull the latest docker imaged and run the Docker image of the latest Subtrate master.
  2. INFO: Run docker ps to get a list of Docker containers running in the background including their mapped ports on localhost
  3. QUIT: Run docker-compose down to stop and remove all running containers.

Provided endpoint for localhost: Substrate Master ws://127.0.0.1:9944/

Find more Docker images of Substrate https://hub.docker.com/r/parity/substrate/tags

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].