contracts: Release as v3.0.0 and add reserved field to ContractInfoOf (#8175)

* contracts: Update README

* contracts: Add CHANGELOG.md

* contracts: Bump version to v3.0.0 and allow publish

* Typos

Co-authored-by: Andrew Jones <ascjones@gmail.com>

* Improve wording in the changelog

* contracts: Add reserved field to ContractInfoOf for future proofing

* also bump frame-benchmarking

* update lockfile

Co-authored-by: Andrew Jones <ascjones@gmail.com>
Co-authored-by: Benjamin Kampmann <ben@parity.io>
This commit is contained in:
Alexander Theißen
2021-02-25 17:04:48 +01:00
committed by GitHub
parent 0b4126ca40
commit 4bf0387237
17 changed files with 118 additions and 44 deletions
+12 -12
View File
@@ -2,8 +2,10 @@
The Contract module provides functionality for the runtime to deploy and execute WebAssembly smart-contracts.
- [`contract::Trait`](https://docs.rs/pallet-contracts/latest/pallet_contracts/trait.Trait.html)
- [`Call`](https://docs.rs/pallet-contracts/latest/pallet_contracts/enum.Call.html)
- [`Config`](https://docs.rs/pallet-contracts/latest/pallet_contracts/trait.Config.html)
- [`Error`](https://docs.rs/pallet-contracts/latest/pallet_contracts/enum.Error.html)
- [`Event`](https://docs.rs/pallet-contracts/latest/pallet_contracts/enum.Event.html)
## Overview
@@ -32,6 +34,9 @@ reverted at the current call's contract level. For example, if contract A calls
then all of B's calls are reverted. Assuming correct error handling by contract A, A's other calls and state
changes still persist.
One gas is equivalent to one [weight](https://substrate.dev/docs/en/knowledgebase/learn-substrate/weight)
which is defined as one picosecond of execution time on the runtime's reference machine.
### Notable Scenarios
Contract call failures are not always cascading. When failures occur in a sub-call, they do not "bubble up",
@@ -42,19 +47,14 @@ fails, A can decide how to handle that failure, either proceeding or reverting A
### Dispatchable functions
Those are documented in the reference documentation of the `Module`.
Those are documented in the [reference documentation](https://docs.rs/pallet-contracts/latest/pallet_contracts/#dispatchable-functions).
## Usage
The Contract module is a work in progress. The following examples show how this Contract module
can be used to instantiate and call contracts.
- [`ink`](https://github.com/paritytech/ink) is
an [`eDSL`](https://wiki.haskell.org/Embedded_domain_specific_language) that enables writing
WebAssembly based smart contracts in the Rust programming language. This is a work in progress.
## Related Modules
- [Balances](https://docs.rs/pallet-balances/latest/pallet_balances/)
This module executes WebAssembly smart contracts. These can potentially be written in any language
that compiles to web assembly. However, using a language that specifically targets this module
will make things a lot easier. One such language is [`ink`](https://github.com/paritytech/ink)
which is an [`eDSL`](https://wiki.haskell.org/Embedded_domain_specific_language) that enables
writing WebAssembly based smart contracts in the Rust programming language.
License: Apache-2.0