Skip to main content

Substrate contract

Contract overview#

This book introduces a series of knowledge related to the contract system in Substrate. It is written by Patract and maintained by Aten. The repository address is located in substrate-contracts-book, and we welcome you to contribute to this book.

This book mainly elaborates from the following three aspects.

  • Contract platform (module) for running contracts
  • Language for writing contracts
  • Tools to assist contract development

Among them,pallet-evm(that is, the contract of the EVM/Solidity system) has relatively rich information in the Ethereum ecosystem, so I will not focus on it in this contract book. Other contract systems, such as pallet-actor,libra transplantation contract platform, , are in the early stage of research, so they will not be explained in this book.

This book introduces pallet-contracts (Wasm contracts) as the main body, and the content mainly includes:

Contract platform (module) to run the contract

  • pallet-contracts

Language for writing contracts

  • ink!
  • Ask!
  • Solang

Tools to assist in contract development

  • Redspot
  • Europa
  • Elara

In order to give you a better understanding of how the pallet-contracts module and Wasm contracts operate, this book will also involve an introduction to Wasm and the blockchain contract model. I believe this book will definitely benefit you.