Unverified Commit 2f4f4f05 authored by Dan Shields's avatar Dan Shields Committed by GitHub
Browse files

move to substrate.io (#957)


Co-authored-by: default avatarDan Shields <danwshields@gmail.com>
parent ff723b17
Pipeline #162025 passed with stages
in 47 minutes and 43 seconds
......@@ -31,7 +31,7 @@
<br/>
[Guided Tutorial for Beginners](https://substrate.dev/substrate-contracts-workshop/#/0/building-your-contract)&nbsp;&nbsp;&nbsp;&nbsp;
[Guided Tutorial for Beginners](https://docs.substrate.io/tutorials/v3/ink-workshop/pt1)&nbsp;&nbsp;&nbsp;&nbsp;
[ink! Documentation Portal](https://paritytech.github.io/ink-docs)
<br/>
......@@ -191,13 +191,13 @@ cargo contract build
You should now have an `<name>.contract` file in the `target` folder of the contract.
For information on how to deploy this to a chain, please have a look at the [Play with It](#play-with-it) section or our [smart contracts workshop](https://substrate.dev/substrate-contracts-workshop/).
For information on how to deploy this to a chain, please have a look at the [Play with It](#play-with-it) section or our [smart contracts workshop](https://docs.substrate.io/tutorials/v3/ink-workshop/pt1).
## How it Works
* Substrate's [Framework for Runtime Aggregation of Modularised Entities (FRAME)](https://substrate.dev/docs/en/knowledgebase/runtime/frame) contains
a module which implements an API for typical functions smart contracts need (storage, querying information about accounts, …).
* Substrate's [Framework for Runtime Aggregation of Modularized Entities (FRAME)](https://docs.substrate.io/v3/runtime/frame)
contains a module which implements an API for typical functions smart contracts need (storage,querying information about accounts, …).
This module is called the `contracts` pallet,
* The `contracts` pallet requires smart contracts to be uploaded to the blockchain as a Wasm blob.
* ink! is a smart contract language which targets the API exposed by `contracts`.
......@@ -216,7 +216,7 @@ In a module annotated with `#[ink::contract]` these attributes are available:
| `#[ink(storage)]` | On `struct` definitions. | Defines the ink! storage struct. There can only be one ink! storage definition per contract. |
| `#[ink(event)]` | On `struct` definitions. | Defines an ink! event. A contract can define multiple such ink! events. |
| `#[ink(anonymous)]` | Applicable to ink! events. | Tells the ink! codegen to treat the ink! event as anonymous which omits the event signature as topic upon emitting. Very similar to anonymous events in Solidity. |
| `#[ink(topic)]` | Applicate on ink! event field. | Tells the ink! codegen to provide a topic hash for the given field. Every ink! event can only have a limited number of such topic field. Similar semantics as to indexed event arguments in Solidity. |
| `#[ink(topic)]` | Applicable on ink! event field. | Tells the ink! codegen to provide a topic hash for the given field. Every ink! event can only have a limited number of such topic field. Similar semantics as to indexed event arguments in Solidity. |
| `#[ink(message)]` | Applicable to methods. | Flags a method for the ink! storage struct as message making it available to the API for calling the contract. |
| `#[ink(constructor)]` | Applicable to method. | Flags a method for the ink! storage struct as constructor making it available to the API for instantiating the contract. |
| `#[ink(payable)]` | Applicable to ink! messages. | Allows receiving value as part of the call of the ink! message. ink! constructors are implicitly payable. |
......
......@@ -92,7 +92,7 @@ pub fn selector_bytes(input: TokenStream) -> TokenStream {
/// Entry point for writing ink! smart contracts.
///
/// If you are a beginner trying to learn ink! we recommend you to check out
/// our extensive [ink! workshop](https://substrate.dev/substrate-contracts-workshop/#/).
/// our extensive [ink! workshop](https://docs.substrate.io/tutorials/v3/ink-workshop/pt1).
///
/// **Note:** In all below examples we will be using `ink_lang` crate aliased as just `ink`.
/// You can do this yourself by adding the following line to your code:
......
......@@ -7,7 +7,7 @@ edition = "2018"
license = "Apache-2.0"
readme = "../README.md"
repository = "https://github.com/paritytech/ink"
documentation = "https://substrate.dev/substrate-contracts-workshop/#/"
documentation = "https://docs.rs/ink_storage_derive"
homepage = "https://www.parity.io/"
description = "[ink!] Derive macros for common ink_storage defined traits."
keywords = ["wasm", "parity", "webassembly", "blockchain", "edsl"]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment