Skip to content

Commit 84d41a6

Browse files
author
Michael Müller
authored
Misc updates (use-ink#214)
1 parent 69db247 commit 84d41a6

File tree

24 files changed

+6813
-47
lines changed

24 files changed

+6813
-47
lines changed

docs/intro/how-it-works.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Those chains typically take the off-the-shelf `pallet-contracts` and create some
5555
### Use Case 2: Smart Contracts as "second-class citizens"
5656
There is another not so obvious use case for `pallet-contracts`: smart contracts as “second-class citizens” on an existing chain. By this we mean that the central value proposition of the chain has nothing to do with smart contracts, but it still includes them as an add-on.
5757

58-
We provide an API (called [chain extensions](https://ink.substrate.io/macros-attributes/chain-extension)) with which a parachain can expose certain parts of its business logic to smart contract developers. Through this, smart contract developers can utilize the business logic primitives of the chain to build a new application on top of it. Think for example of a decentralized exchange blockchain. This chain would in its simplest form have an order book to place bids and asks ‒ there is no need for taking untrusted, Turing-complete, programs from the outside. The parachain could decide to expose the order book into smart contracts though, giving external developers the option of building new applications that utilize the order book. For example, to upload trading algorithms as smart contracts to the chain.
58+
We provide an API (called [chain extensions](https://use.ink/macros-attributes/chain-extension)) with which a parachain can expose certain parts of its business logic to smart contract developers. Through this, smart contract developers can utilize the business logic primitives of the chain to build a new application on top of it. Think for example of a decentralized exchange blockchain. This chain would in its simplest form have an order book to place bids and asks ‒ there is no need for taking untrusted, Turing-complete, programs from the outside. The parachain could decide to expose the order book into smart contracts though, giving external developers the option of building new applications that utilize the order book. For example, to upload trading algorithms as smart contracts to the chain.
5959

6060
Smart contracts here are an opportunity to up the user engagement and drive usage of the chain's native token. And the billing for utilizing the chain comes already built-in with the pallet ‒ users have to pay gas fees for the execution of their smart contract.
6161

docs/intro/ink-vs-cosmwasm.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ While CosmWasm unit tests have different modules for each of the three main entr
5959
functions, ink! allows for a more generalised approach, where the `#[ink(test)]` macro is
6060
used for each unit test.
6161

62-
You can read more about ink! unit tests [here](https://ink.substrate.io/basics/contract-testing#unit-tests).
62+
You can read more about ink! unit tests [here](https://use.ink/basics/contract-testing#unit-tests).
6363

6464
## Compiler
6565

docs/intro/ink-vs-solidity.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ pub struct ContractName {
274274
}
275275
```
276276

277-
When using a map in ink!, `ink_lang::utils::initialize_contract` must be used in the constructor. See [here](https://ink.substrate.io/datastructures/mapping) for more details.
277+
When using a map in ink!, `ink_lang::utils::initialize_contract` must be used in the constructor. See [here](https://use.ink/datastructures/mapping) for more details.
278278

279279
### `mapping usage`
280280

@@ -628,7 +628,7 @@ impl ink_storage::traits::PackedAllocate for Proposal {
628628

629629
### `cross-contract calling`
630630

631-
In ink!, to do [cross-contract calling](https://ink.substrate.io/basics/cross-contract-calling), the contract will need to be added to the project. Ensure the contract is properly exporting its Structs. See the `erc20` contract example:
631+
In ink!, to do [cross-contract calling](https://use.ink/basics/cross-contract-calling), the contract will need to be added to the project. Ensure the contract is properly exporting its Structs. See the `erc20` contract example:
632632

633633
```rust
634634
#![cfg_attr(not(feature = "std"), no_std)]
@@ -663,7 +663,7 @@ crate-type = [
663663
ink-as-dependency = []
664664
```
665665

666-
`ink-as-dependency` "tells the ink! code generator to always or never compile the smart contract as if it was used as a dependency of another ink! smart contract" ([source](https://ink.substrate.io/basics/cross-contract-calling)).
666+
`ink-as-dependency` "tells the ink! code generator to always or never compile the smart contract as if it was used as a dependency of another ink! smart contract" ([source](https://use.ink/basics/cross-contract-calling)).
667667

668668
Then, In the main contract's Cargo.toml, import the contract that will be cross-called.
669669

@@ -693,7 +693,7 @@ use erc20::Erc20Ref;
693693
There are two methods to setup the other contract.
694694

695695
1. Instantiate the cross-called-contract in the main contract's constructor.
696-
See [here](https://ink.substrate.io/basics/cross-contract-calling/) for a tutorial, and [here](https://github.com/paritytech/ink-examples/tree/main/delegator) for an example.
696+
See [here](https://use.ink/basics/cross-contract-calling/) for a tutorial, and [here](https://github.com/paritytech/ink-examples/tree/main/delegator) for an example.
697697
2. Or, add the `AccountId` of an already deployed contract.
698698
Here is an example constructor to set this up:
699699

docs/intro/intro.mdx

+33-19
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ hide_table_of_contents: false
1010
<img src="/img/title/ink!-4.0.svg" width="800" style={{ marginBottom: 10 }} />
1111

1212
<center>
13-
<a href="https://github.com/paritytech/ink">
14-
<img style={{height: 25}} src="https://img.shields.io/github/v/release/paritytech/ink?label=ink!%20on%20GitHub&labelColor=white&color=blue&include_prereleases" />
13+
<a href="https://github.com/paritytech/ink-examples">
14+
<img style={{height: 25}} src="https://img.shields.io/badge/click-white.svg?logo=GitHub&logoColor=black&label=ink!%20Examples&labelColor=white&color=blue" />
1515
</a>
1616
&nbsp;
1717
<a href="https://substrate.stackexchange.com/questions/tagged/ink?tab=Votes">
@@ -21,6 +21,10 @@ hide_table_of_contents: false
2121
<a href="https://twitter.com/ink_lang">
2222
<img style={{height: 25}} src="https://img.shields.io/twitter/follow/ink_lang?label=Follow" />
2323
</a>
24+
&nbsp;
25+
<a href="http://youtube.com/@ink-lang">
26+
<img style={{height: 25}} src="https://img.shields.io/badge/click-white.svg?logo=YouTube&logoColor=eb3f25&label=ink!%20YouTube&labelColor=white&color=blue" />
27+
</a>
2428
</center>
2529

2630
<h3 style={{ lineHeight: 1.4 + 'em', marginTop: 0.5 + 'em' }}>
@@ -109,22 +113,27 @@ hide_table_of_contents: false
109113
## Where can I deploy ink! contracts?
110114

111115
<div className="row">
112-
<div className="col text--center">
116+
<div className="col text--left">
113117
<h3><img src= "/img/chains/production.svg" className="chainHeader" /></h3>
118+
</div>
119+
</div>
120+
121+
<div className="row">
122+
<div className="col text--center">
114123
<a href="https://alephzero.org">
115124
<img src= "/img/chains/aleph-zero.svg" className="chain" />
116125
</a>
117-
<a href="https://shiden.astar.network">
118-
<img src= "/img/chains/shiden.svg" className="chain" />
126+
</div>
127+
<div className="col text--center">
128+
<a href="https://astar.network">
129+
<img src= "/img/chains/astar.svg" className="chain" />
119130
</a>
120131
</div>
121132
<div className="col text--center">
122-
<h3><img src= "/img/chains/on-testnet.svg" className="chainHeader" /></h3>
123-
<a href="/testnet">
124-
<img src= "/img/chains/testnet.svg" className="chain" />
133+
<a href="https://shiden.astar.network">
134+
<img src= "/img/chains/shiden.svg" className="chain" />
125135
</a>
126136
</div>
127-
<div className="col">&nbsp;</div>
128137
</div>
129138

130139
<div className="row">
@@ -135,8 +144,8 @@ hide_table_of_contents: false
135144

136145
<div className="row">
137146
<div className="col text--center">
138-
<a href="https://astar.network">
139-
<img src= "/img/chains/astar.svg" className="chain" />
147+
<a href="https://t3rn.io">
148+
<img src= "/img/chains/t3rn.svg" className="chain" />
140149
</a>
141150
</div>
142151
<div className="col text--center">
@@ -152,11 +161,6 @@ hide_table_of_contents: false
152161
</div>
153162

154163
<div className="row">
155-
<div className="col text--center">
156-
<a href="https://t3rn.io">
157-
<img src= "/img/chains/t3rn.svg" className="chain" />
158-
</a>
159-
</div>
160164
<div className="col text--center">
161165
<a href="http://phala.network">
162166
<img src= "/img/chains/phala.svg" className="chain" />
@@ -167,21 +171,31 @@ hide_table_of_contents: false
167171
<img src= "/img/chains/pendulum.svg" className="chain" />
168172
</a>
169173
</div>
170-
</div>
171-
172-
<div className="row">
173174
<div className="col text--center">
174175
<a href="https://www.peaq.network">
175176
<img src= "/img/chains/peaq.svg" className="chain" />
176177
</a>
177178
</div>
179+
</div>
180+
181+
<div className="row">
178182
<div className="col text--center">
179183
<a href="https://bit.country">
180184
<img src= "/img/chains/bitcountry.svg" className="chain" />
181185
</a>
182186
</div>
183187
</div>
184188

189+
<div className="row">
190+
<div className="col text--left">
191+
<h3><img src= "/img/chains/on-testnet.svg" className="chainHeader" /></h3>
192+
<a href="/testnet">
193+
<img src= "/img/chains/testnet.svg" className="chain" />
194+
</a>
195+
</div>
196+
<div className="col">&nbsp;</div>
197+
</div>
198+
185199
## Smart Contract Examples
186200

187201
<div className="row">

docs/intro/upcoming-events.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: Upcoming Events
3+
hide_title: true
4+
slug: /upcoming-events
5+
---
6+
7+
<img src="/img/title/monthly-update.svg" className="titlePic" />
8+
9+
10+
### April 5, 2023 | Office Hours
11+
12+
We will be having the first ever ink! Office Hours:
13+
[more details](https://twitter.com/ink_lang/status/1641103674561929216).
14+
We will talk a bit about what is currently going on and answer questions.
15+
16+
### April 6, 2023 | Astar launches ink! support to mainnet!
17+
18+
Astar is launching ink! support on their mainnet.
19+
You can read more about the Wasm launch day
20+
[here](https://twitter.com/AstarNetwork/status/1640352674611884033).

docs/monthly-update/2022/05.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ release of the
5353

5454
## The URL to this portal changed
5555

56-
It's now available at [https://ink.substrate.io](https://ink.substrate.io).
56+
It's now available at [https://use.ink](https://use.ink).
5757

5858
## Canvas Testnet ➜ Contracts Testnet
5959

docs/monthly-update/2022/09.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,5 @@ This changes now with the Polkadot Forum:
6969

7070
## New Domain 🏠
7171

72-
We've moved this documentation portal from `ink.substrate.io` to a new domain: [`use.ink`](http://use.ink).
72+
We've moved this documentation portal from `use.ink` to a new domain: [`use.ink`](http://use.ink).
7373
It was a three letter domain, we just couldn't resist!

docs/monthly-update/2023/02.md

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
title: February '23
3+
slug: /monthly-update/2023/02
4+
hide_title: true
5+
---
6+
7+
<img src="/img/title/monthly-update-feb.svg" className="titlePic" />
8+
9+
## ink! 4.0 + `cargo-contract` 2.0 released! 🥳
10+
11+
This is a biggie. We've released new major versions of ink! and `cargo-contract`.
12+
You can find more information in [our announcement blog post](https://www.parity.io/we-just-released-ink-4-0).
13+
14+
In order to update your local `cargo-contract` installation you just have
15+
to execute `cargo install cargo-contract --force`.
16+
17+
In order to update ink!, you can take a look at
18+
[our migration guide](/faq/migrating-from-ink-3-to-4).
19+
20+
## Buenos Aires 🇦🇷
21+
22+
Some people from our team spent a couple of weeks in Buenos Aires.
23+
24+
### Polkadot Blockchain Academy
25+
26+
<img src="/img/monthly-update/ba-academy.jpeg" className="titlePic" />
27+
28+
We gave a number of lectures on general smart contract concepts,
29+
`pallet-contracts` and ink! as part of
30+
[the Polkadot Blockchain Academy](https://polkadot.network/development/academy/).
31+
32+
### Spanish ink! Meetup
33+
34+
<img src="/img/monthly-update/ba-meetup.jpeg" className="titlePic" />
35+
36+
<img src="/img/monthly-update/ba-meetup1.jpeg" className="titlePic" />
37+
38+
### Met up with Open Zeppelin
39+
40+
We met up with OpenZeppelin, as part of [our Polkadot treasury engagement](/)
41+
with them.
42+
43+
## Berlin Meetup 🇩🇪
44+
45+
There was an ink! meetup in Berlin, at Full Node! And it was not organized by us!
46+
[Here's the lu.ma page](https://lu.ma/inkathon-meetup).
47+
48+
The meetup was organized by [Scio-Labs](https://scio.xyz) and [Aleph Zero](https://alephzero.org).
49+
There were maybe 15 people there. Amazing!
50+
51+
Scio-Labs has created two ink! related projects:
52+
53+
* [`useInkathon`](https://github.com/scio-labs/use-inkathon): React Hooks library abstracting
54+
functionality of polkadot.js for working with ink! contracts.
55+
* [INK!athon](https://inkathon.xyz/): Full-stack dApp boilerplate generator for ink! contracts +
56+
a React frontend using the [useInkathon](https://github.com/scio-labs/use-inkathon) hooks library.

docs/monthly-update/2023/03.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: March '23
3+
slug: /monthly-update/2023/03
4+
hide_title: true
5+
---
6+
7+
<img src="/img/title/monthly-update-mar.svg" className="titlePic" />
8+
9+
## Community Meetup in Berlin 📣
10+
11+
<img src="/img/monthly-update/ink-meetup-berlin-03-23.png" className="titlePic" />
12+
13+
Together with [@scio_xyz](https://scio.xyz), we are hosting an ink! meetup in Berlin.
14+
15+
The meetup will take place on Thursday, March 30, 2023.
16+
17+
You can view the agenda and register on [our Meetup page](https://www.meetup.com/de-DE/parity/events/292157078/).
18+
19+
## ink! on YouTube 📺
20+
21+
We have launched our very own YouTube channel!
22+
23+
Check out [@ink-lang](https://www.youtube.com/@ink-lang).
24+
25+
<iframe width="330" height="587" src="https://www.youtube.com/embed/PkqvnLp-Huo" title="What is Consensus?" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
26+
27+
## Community Space on ink! 4.0
28+
29+
<iframe width="560" height="315" src="https://www.youtube.com/embed/Hcht8vkkYRM" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
30+
31+
## Polkadot Blockchain Academy July 2023 🎓
32+
33+
Applications for the Polkadot Blockchain Academy are now open.
34+
35+
The next cohort will happen in Berkeley, California at UC Berkeley, USA,
36+
from July 10th until August 10th, 2023.
37+
38+
Check out [https://polkadot.network/academy](https://polkadot.network/academy)!

docs/third-party-tools/swanky/node.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ To print errors and contract debug output to the console log, supply `-lerror,ru
9898

9999
Important: Debug output is only printed for RPC calls or off-chain tests ‒ not for transactions.
100100

101-
See the ink! [FAQ](https://ink.substrate.io/faq/#how-do-i-print-something-to-the-console-from-the-runtime) for more details: How do I print something to the console from the runtime?.
101+
See the ink! [FAQ](https://use.ink/faq/#how-do-i-print-something-to-the-console-from-the-runtime) for more details: How do I print something to the console from the runtime?.
102102

103103
### Connect with Polkadot.js Apps Portal
104104

i18n/es/docusaurus-plugin-content-docs/current/intro/how-it-works.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Estas cadena toman por lo general el off-the-shelf `pallet-contracts` y crean al
5959
### Caso de uso 2: Smart Contracts como "ciudadanos de segunda clase"
6060
Existe otro no tan obvio caso de uso para `pallet-contracts`: smart contracts como “ciudadanos de segunda clase” en una cadena existente. Con esto queremos decir que la propuesta de valor central de la cadena no tiene nada que ver con los smart contracts, pero aún así los incluye como complemento.
6161

62-
Proveemos una API (llamada [chain extensions](https://ink.substrate.io/macros-attributes/chain-extension)) con la que una parachain
62+
Proveemos una API (llamada [chain extensions](https://use.ink/macros-attributes/chain-extension)) con la que una parachain
6363
puede exponer ciertas partes de su lógica de negocio a los desarrolladores de smart contracts. A través de esto,, los desarrolladores de smart contracts pueden utilizar primitivas de la lógica de negocio de la cadena para construir una nueva aplicación sobre ella. Imagina por ejemplo una blockchain con un exchange descentralizado. Esta cadena, en su forma más simple, tendría un libro de pedidos para realizar ofertas y demandas - no hay necesidad de tomar programas no confiables, turing completos ni programas del exterior. La parachain podria decidir exponer el libro de pedidos a traves del smart contract, dando a desarrolladores externos la opción de construir nuevas aplicaciones que utilicen el libro de pedidos. Por ejemplo, para For example, para cargar algoritmos de trading como smart contracts en la cadena.
6464

6565
Los smart contracts aqui son una oportunidad para aumentar la participación del usuario e impulsar el uso del token nativo de la cadena. Y la facturación por utilizar la cadena ya viene integrada con el pallet - los usuarios tienen que pagar gas fees para la ejecución de sus smart contracts.

i18n/es/docusaurus-plugin-content-docs/current/intro/ink-vs-cosmwasm.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Mientras que los tests unitarios de CosmWasm tienen diferentes módules para cad
5353
posibles funciones de entrada, ink! permite un enfoque más general, `#[ink(test)]` será usado
5454
para cada test.
5555

56-
Puedes leer más sobre ink! y los test unitarios [aqui](https://ink.substrate.io/basics/contract-testing#unit-tests).
56+
Puedes leer más sobre ink! y los test unitarios [aqui](https://use.ink/basics/contract-testing#unit-tests).
5757

5858
## Compilador
5959

i18n/es/docusaurus-plugin-content-docs/current/intro/ink-vs-solidity.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ pub struct ContractName {
278278
}
279279
```
280280

281-
when using a map in ink!, `ink_lang::utils::initialize_contract` must be used in the constructor. See [here](https://ink.substrate.io/datastructures/mapping) for more details.
281+
when using a map in ink!, `ink_lang::utils::initialize_contract` must be used in the constructor. See [here](https://use.ink/datastructures/mapping) for more details.
282282

283283
### `mapping usage`
284284

@@ -632,7 +632,7 @@ impl ink_storage::traits::PackedAllocate for Proposal {
632632

633633
### `cross-contract calling`
634634

635-
In ink!, to do [cross-contract calling](https://ink.substrate.io/basics/cross-contract-calling), the contract will need to be added to the project. Ensure the contract is properly exporting its Structs. See the `erc20` contract example:
635+
In ink!, to do [cross-contract calling](https://use.ink/basics/cross-contract-calling), the contract will need to be added to the project. Ensure the contract is properly exporting its Structs. See the `erc20` contract example:
636636

637637
```rust
638638
#![cfg_attr(not(feature = "std"), no_std)]
@@ -667,7 +667,7 @@ crate-type = [
667667
ink-as-dependency = []
668668
```
669669

670-
`ink-as-dependency` "tells the ink! code generator to always or never compile the smart contract as if it was used as a dependency of another ink! smart contract" ([source](https://ink.substrate.io/basics/cross-contract-calling)).
670+
`ink-as-dependency` "tells the ink! code generator to always or never compile the smart contract as if it was used as a dependency of another ink! smart contract" ([source](https://use.ink/basics/cross-contract-calling)).
671671

672672
Then, In the main contract's Cargo.toml, import the contract that will be cross-called.
673673

@@ -697,7 +697,7 @@ use erc20::Erc20Ref;
697697
There are two methods to setup the other contract.
698698

699699
1. Instantiate the cross-called-contract in the main contract's constructor.
700-
See [here](https://ink.substrate.io/basics/cross-contract-calling/) for a tutorial, and [here](https://github.com/paritytech/ink-examples/tree/main/delegator) for an example.
700+
See [here](https://use.ink/basics/cross-contract-calling/) for a tutorial, and [here](https://github.com/paritytech/ink-examples/tree/main/delegator) for an example.
701701
2. Or, add the `AccountId` of an already deployed contract.
702702
Here is an example constructor to set this up:
703703

i18n/es/docusaurus-plugin-content-docs/version-3.x/monthly-update/2022/05.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ release of the
5353

5454
## The URL to this portal changed
5555

56-
It's now available at [https://ink.substrate.io](https://ink.substrate.io).
56+
It's now available at [https://use.ink](https://use.ink).
5757

5858
## Canvas Testnet ➜ Contracts Testnet
5959

i18n/es/docusaurus-plugin-content-docs/version-3.x/monthly-update/2022/09.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,5 @@ This changes now with the Polkadot Forum:
6969

7070
## New Domain 🏠
7171

72-
We've moved this documentation portal from `ink.substrate.io` to a new domain: [`use.ink`](http://use.ink).
72+
We've moved this documentation portal from `use.ink` to a new domain: [`use.ink`](http://use.ink).
7373
It was a three letter domain, we just couldn't resist!

0 commit comments

Comments
 (0)