Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISC - Restructure and Edit docs #1166

Merged
merged 40 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
f7ae3bb
initial sorting
lucas-tortora Sep 5, 2023
1cbd2eb
initial sorting
lucas-tortora Sep 11, 2023
de597ac
apply diataxis 1
lucas-tortora Sep 11, 2023
622e78b
* change switcher labels
lucas-tortora Sep 11, 2023
787226c
* edit learn
lucas-tortora Sep 12, 2023
04e8f80
revert unwanted change
lucas-tortora Sep 12, 2023
5f256d8
format
lucas-tortora Sep 12, 2023
0685c6d
initial sorting
lucas-tortora Sep 5, 2023
ca1c7c2
initial sorting
lucas-tortora Sep 11, 2023
ad6c345
apply diataxis 1
lucas-tortora Sep 11, 2023
47171d2
* change switcher labels
lucas-tortora Sep 11, 2023
70bd8dd
* edit learn
lucas-tortora Sep 12, 2023
2a7e0ce
revert unwanted change
lucas-tortora Sep 12, 2023
d8c1b88
format
lucas-tortora Sep 12, 2023
723e53d
Merge remote-tracking branch 'origin/ISC/restructure-docs' into ISC/r…
lucas-tortora Sep 12, 2023
e5d757f
add admonition that was lost in rebase
lucas-tortora Sep 12, 2023
e9fdaf8
fix redirect
lucas-tortora Sep 12, 2023
e33f190
fix redirect
lucas-tortora Sep 12, 2023
58d3a5c
fix redirect
lucas-tortora Sep 12, 2023
bd67bdc
reduce Wasm intro content
lucas-tortora Sep 12, 2023
de3401e
fix link
lucas-tortora Sep 12, 2023
75aa9a7
edit wasm, damn it's long.
lucas-tortora Sep 12, 2023
af9773a
fix links
lucas-tortora Sep 13, 2023
86bebac
fix links to /smart-contracts
lucas-tortora Sep 13, 2023
dca3dd5
more dead links
lucas-tortora Sep 13, 2023
eab908c
add redirects
lucas-tortora Sep 13, 2023
71a608e
fixes
lucas-tortora Sep 13, 2023
8b37d1c
feedback
lucas-tortora Sep 13, 2023
c0f3985
edit wasp and wasp cli
lucas-tortora Sep 13, 2023
7a8342f
fix frontmatter
lucas-tortora Sep 13, 2023
6dd0190
Apply suggestions from code review
lucas-tortora Sep 14, 2023
af936ff
Apply suggestions from code review
lucas-tortora Sep 14, 2023
e8a99c7
Addressed comments by luca-mose
lucas-tortora Sep 14, 2023
49ab27d
format
lucas-tortora Sep 14, 2023
9fced5d
correct spelling of inccounter contract
lucas-tortora Sep 14, 2023
467c222
Apply suggestions from code review
lucas-tortora Sep 20, 2023
b5df882
merge from main to resolve conflicts
lucas-tortora Sep 22, 2023
9da336b
add core conctracts to EVM as well
lucas-tortora Sep 22, 2023
e5a1bfe
format
lucas-tortora Sep 22, 2023
01bbc85
add explanations and how tos relevant to core contracts
lucas-tortora Sep 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 24 additions & 12 deletions articleRedirects.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,35 +414,35 @@ exports.articleRedirects = [
},
{
from: '/shimmer/learn/smart-contracts/smart-contracts-chains',
to: '/learn/smart-contracts/core_concepts/isc-architecture',
to: '/learn/smart-contracts/isc-architecture',
},
{
from: '/shimmer/learn/smart-contracts/smart-contracts-community-tutorials',
to: '/smart-contracts/overview',
to: '/learn/smart-contracts/introduction',
},
{
from: '/shimmer/learn/smart-contracts/smart-contracts-consensus',
to: '/learn/smart-contracts/core_concepts/smart-contracts',
to: '/learn/smart-contracts/introduction',
},
{
from: '/shimmer/learn/smart-contracts/smart-contracts-dapps',
to: '/smart-contracts/overview',
to: '/learn/smart-contracts/introduction',
},
{
from: '/shimmer/learn/smart-contracts/smart-contracts-introduction',
to: '/smart-contracts/overview',
to: '/learn/smart-contracts/introduction',
},
{
from: '/shimmer/learn/smart-contracts/smart-contracts-tangle',
to: '/smart-contracts/overview',
to: '/learn/smart-contracts/introduction',
},
{
from: '/shimmer/learn/smart-contracts/smart-contracts-validators',
to: '/smart-contracts/overview',
to: '/learn/smart-contracts/introduction',
},
{
from: '/shimmer/learn/smart-contracts/smart-contracts-VM-and-languages',
to: '/smart-contracts/overview',
to: '/learn/smart-contracts/introduction',
},
{
from: '/shimmer/learn/tangle',
Expand All @@ -460,25 +460,37 @@ exports.articleRedirects = [
from: '/shimmer/search',
to: '/search',
},
{
from: '/smart-contracts',
to: '/learn/smart-contracts/introduction',
},
{
from: '/shimmer/smart-contracts',
to: '/learn/smart-contracts/introduction',
},
{
from: '/next/smart-contracts',
to: '/learn/smart-contracts/introduction',
},
{
from: '/shimmer/smart-contracts/configuration',
to: '/wasp/configuration',
},
{
from: '/shimmer/smart-contracts/contribute',
to: '/smart-contracts/contribute',
to: '/learn/smart-contracts/introduction',
},
{
from: '/shimmer/smart-contracts/guide/example_projects/fair_roulette',
to: '/smart-contracts/guide/wasm_vm/example_projects/fair_roulette',
to: '/wasp-wasm/tutorials/fair_roulette',
},
{
from: '/shimmer/smart-contracts/metrics',
to: '/wasp/metrics',
},
{
from: '/shimmer/smart-contracts/overview',
to: '/smart-contracts/overview',
from: '/shimmer/learn/smart-contracts/introduction',
to: '/learn/smart-contracts/introduction',
},
{
from: '/shimmer/use/wallets/firefly/faq-and-troubleshooting',
Expand Down
29 changes: 25 additions & 4 deletions contentPlugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,31 @@ module.exports = async () => {
],
},
{
id: 'smart-contract-0-7-0',
path: path.resolve(__dirname, 'docs/build/wasp/0.7.0/docs'),
routeBasePath: 'smart-contracts',
sidebarPath: path.resolve(__dirname, 'docs/build/wasp/0.7.0/sidebars.js'),
id: 'wasp-cli-0-7-0',
path: path.resolve(__dirname, 'docs/build/wasp-cli/0.7.0/docs'),
routeBasePath: 'wasp-cli',
sidebarPath: path.resolve(
__dirname,
'docs/build/wasp-cli/0.7.0/sidebars.js',
),
},
{
id: 'wasp-evm-0-7-0',
path: path.resolve(__dirname, 'docs/build/wasp-evm/0.7.0/docs'),
routeBasePath: 'wasp-evm',
sidebarPath: path.resolve(
__dirname,
'docs/build/wasp-evm/0.7.0/sidebars.js',
),
},
{
id: 'wasp-wasm-0-7-0',
path: path.resolve(__dirname, 'docs/build/wasp-wasm/0.7.0/docs'),
routeBasePath: 'wasp-wasm',
sidebarPath: path.resolve(
__dirname,
'docs/build/wasp-wasm/0.7.0/sidebars.js',
),
},
{
id: 'identity-rs-0-5',
Expand Down
2 changes: 2 additions & 0 deletions docs/build/getting-started/networks-endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ layer 1.
<th>RPC URL</th>
<th>Chain ID</th>
<th>Faucet</th>
<th>Explorer</th>
</tr>
<tr>
<td>Testnet Tokens (no value)</td>
Expand All @@ -137,6 +138,7 @@ layer 1.
</td>
<td>1072</td>
<td><a href="https://evm-faucet.testnet.shimmer.network">https://evm-faucet.testnet.shimmer.network</a></td>
<td><a href="https://explorer.evm.testnet.shimmer.network">https://explorer.evm.testnet.shimmer.network</a></td>
</tr>
</tbody>
</table>
Expand Down
4 changes: 2 additions & 2 deletions docs/build/getting-started/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ module.exports = {
{
type: 'link',
label: 'WASP CLI',
href: '/wasp/wasp-cli',
href: '/wasp-cli/how-tos/wasp-cli',
},
{
label: 'Schema Tool',
type: 'link',
href: '/smart-contracts/guide/wasm_vm/schema',
href: '/wasp-wasm/how-tos/schema-tool/introduction',
},
{
label: 'Explorer',
Expand Down
4 changes: 2 additions & 2 deletions docs/build/getting-started/welcome.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ any object in a GDPR-compliant, cost-efficient, and privacy-enabling manner.

### Smart Contracts

The [IOTA Smart Contracts (ISC)](/smart-contracts/overview) bring scalable, flexible, and cost-effective smart
The [IOTA Smart Contracts (ISC)](/learn/smart-contracts/introduction) bring scalable, flexible, and cost-effective smart
contract functionality to the IOTA ecosystem. By anchoring multiple chains to the IOTA Tangle, ISC enables
higher throughput and lower fees than traditional single-chain solutions. Users have the freedom to create custom
chains with control over gas fees and privacy settings, and the platform is virtual machine-agnostic, supporting both
[Rust/Wasm](/smart-contracts/guide/wasm_vm/intro) and [Solidity/EVM](/smart-contracts/guide/evm/introduction)
[Rust/Wasm](/wasp-wasm/introduction) and [Solidity/EVM](/wasp-evm/introduction)
smart contracts.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ image: /img/logo/preview.png
The previous IOTA protocol, Chrysalis, was optimized for a single application: sending digital money from A to B.
The upcoming Stardust upgrade introduces computation and utility to the ledger:

- Making IOTA an **infrastructure and settlement layer** for [second-layer smart contract chains](/smart-contracts/overview) using [IOTA Smart Contracts (ISC)](#isc).
- Making IOTA an **infrastructure and settlement layer** for [second-layer smart contract chains](/learn/smart-contracts/introduction/) using [IOTA Smart Contracts (ISC)](#isc).
- Transforming IOTA into a **multi-asset ledger** with custom, user-defined tokens using the new [tokenization framework](#tokenization-framework).

## Tokenization Framework
Expand Down Expand Up @@ -54,7 +54,7 @@ ISC can be deployed as multiple Layer 2 (L2) chains, unlike many other projects

### Advantages

- [L1 is not congested with smart contracts](/learn/smart-contracts/core_concepts/smart-contracts#scalable-smart-contracts).
- [L1 is not congested with smart contracts](/learn/smart-contracts/introduction/#scalable-smart-contracts).
- Since L1 is not limited by the speed of the smart contract VM, transactions per second (TPS) increase significantly.
- No maximal extractable value (MEV). No front-running or sandwich attacks, resulting in a “fairer” DeFi environment. A set fee and randomization of transactions are included in blocks, making MEV impossible.
- Native randomness beacon (random number generator, or RNG). This is freely available to all dApps, removing the need for expensive, trusted third-party RNGs.
Expand Down
2 changes: 1 addition & 1 deletion docs/build/introduction-docs/stardust/docs/welcome.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ image: /img/logo/preview.png

# Welcome

Stardust protocol is the successor to IOTA 1.5, also known as [Chrysalis](/introduction/welcome), that transforms IOTA into a multi-asset ledger and enables the operation of [IOTA Smart Contracts](/smart-contracts/overview). This page outlines the new concepts
Stardust protocol is the successor to IOTA 1.5, also known as [Chrysalis](/introduction/welcome), that transforms IOTA into a multi-asset ledger and enables the operation of [IOTA Smart Contracts](/learn/smart-contracts/introduction/). This page outlines the new concepts
and differences compared to Chrysalis, furthermore gives an overview of different components of the IOTA technology stack.

Stardust debuts on [Shimmer](https://shimmer.network/), the new staging network for IOTA, before being fully supported on the IOTA Mainnet.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,32 @@ validators.'
image: /img/logo/WASP_logo_dark.png
keywords:

- Smart Contracts
- Chain
- Management
- Grafana
- Smart Contracts
- Chain
- Management
- Grafana

---

# Chain Management
# Manage a Chain

## Monitoring

You can view the chain state using the dashboard (`<URL>/wasp/dashboard` when using `node-docker-setup`).

## Managing Chain Configuration and Validators
## Manage Chain Configuration and Validators

You can manage the chain configuration and committee of validators by interacting with
the [Governance contract](/learn/smart-contracts/core_concepts/core_contracts/governance).
the [Governance contract](/wasp-wasm/reference/core-contracts/governance/).

The “Chain Owner” is the only one who can perform administrative tasks.

### Changing Chain Ownership
### Change Chain Ownership

To change the chain ownership, the current “Chain Owner” must call `delegateChainOwnership` specifying the `agentID` of
the next owner. The next owner must call `claimChainOwnership` to finalize the process.

### Changing Access Nodes
### Change Access Nodes

For new access nodes to join the network, they need to:

Expand All @@ -45,30 +45,29 @@ After this, new nodes should be able to sync the state and execute view queries

You can remove an access node by calling `changeAccessNodes`.

Alternatively, to add any node as an "access node", you can add "non-permissioned" access nodes, without the signature from the chain owner.
Alternatively, you can add "non-permissioned" access nodes without the signature from the chain owner to add any node as an "access node".
You can do this by using the following command:

```shell
wasp-cli chain access-nodes <add|remove> <pubkey (0x...)>
```

This node won't be "officially" recognized by the committee, but will still be able to sync the state and provide all regular functionality.
This node won't be "officially" recognized by the committee but will still be able to sync the state and provide all regular functionality.

### Changing the Set of Validators
### Change the Set of Validators

You can do this in different ways, depending on whom the
[governor address](/tips/tips/TIP-0018#alias-output) of the alias output of the
chain is.
You can do this in different ways, depending on who controls the [governor address](/tips/tips/TIP-0018#alias-output)
from the alias output of the chain.

- If the chain governor address is the chain committee, you can perform the rotation by calling
`rotateStateController` after adding the next state controller via `addAllowedStateControllerAddress`.
- If the chain governor address is a regular user wallet (that you control), you can issue the rotation transaction using wasp-cli:
- If the chain governor address is a regular user wallet that you control, you can issue the rotation transaction using wasp-cli:

```shell
wasp-cli chain rotate <new controller address>
```

or:
Or:

```shell
wasp-cli chain rotate-with-dkg --peers=<...>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description: Setting up a chain requirements, configuration parameters, validators and tests.
description: 'Setting up a chain: requirements, configuration parameters, validators, and tests.'
image: /img/logo/WASP_logo_dark.png
keywords:
- Smart Contracts
Expand All @@ -10,11 +10,11 @@ keywords:
- Tests
---

# Setting Up a Chain
# Set Up a Chain

:::note

It is possible to run a "committee" of a single Wasp node, and this is okay for testing purposes.
It is possible to run a "committee" of a single Wasp node, which is okay for testing purposes.

However, in normal operation, multiple Wasp nodes should be used.
:::
Expand All @@ -41,25 +41,27 @@ PubKey: 8oQ9xHWvfnShRxB22avvjbMyAumZ7EXKujuthqrzapNM
PeeringURL: 127.0.0.1:4000
```

PubKey and PeeringURL should be provided to other node operators.
They can use this info to trust your node and accept communications with it.
You should provide your `PubKey` and `PeeringURL` to other node operators.
They can use this info to trust and accept communications with your node.
That's done by invoking `wasp-cli peering trust <Name for the peer> <PubKey> <PeeringURL>`, e.g.:

```shell
wasp-cli peering trust another-node 8oQ9xHWvfnShRxB22avvjbMyAumZ7EXKujuthqrzapNM 127.0.0.1:4000
```

The list of trusted peers of your wasp node can be viewed with:
You can view the list of your wasp node's trusted peers by calling:

```shell
wasp-cli peering list-trusted
```

All the nodes in a committee must trust each other to run the chain.

## Starting The Chain
## Start the Chain

### Requesting Test Funds (only for testnet)
### Request Test Funds (only for Testnet)

You can request test funds to safely develop your application by calling:

```shell
wasp-cli request-funds
Expand All @@ -73,28 +75,27 @@ You can deploy your IOTA Smart Contracts chain by running:
wasp-cli chain deploy --peers=foo,bar,baz --chain=mychain --description="My chain" --block-keep-amount=10000
```

The names in `--peers=foo,bar,baz` correspond to the names of the trusted peers of the node.
The names in `--peers=foo,bar,baz` correspond to the names of the node's trusted peers.

The `--chain=mychain` flag sets up an alias for the chain. From now on all chain commands will be targeted to this
chain.
The `--chain=mychain` flag sets up an alias for the chain.
From now on, all chain commands will target this chain.

The `--quorum` flag indicates the minimum amount of nodes required to form a consensus. The recommended formula to
obtain this number `floor(N*2/3)+1` where `N` is the number of nodes in your committee.
The `--quorum` flag indicates the minimum number of nodes required to form a consensus.
The recommended formula to obtain this number is `floor(N*2/3)+1` where `N` is the number of nodes in your committee.

The `--block-keep-amount` parameter determines how many blocks are stored in the [`blocklog`](/learn/smart-contracts/core_concepts/core_contracts/blocklog) core contract.
The `--block-keep-amount` parameter determines how many blocks are stored in the [`blocklog`](/wasp-wasm/reference/core-contracts/blocklog) core contract.

After deployment, the chain must be activated by the node operators of all peers.

```shell
wasp-cli chain add <name> <chainID> # adds the chain to the wasp-cli config, can be skipped on the wasp-cli that initiated the deployment
wasp-cli chain activate --chain=<name>

```

## Testing If It Works
## Test If It Works

You can check that the chain was properly deployed in the Wasp node dashboard (`<URL>/wasp/dashboard` when using `node-docker-setup`).
Note that the chain was deployed with some [core contracts](/learn/smart-contracts/core_concepts/core_contracts/overview).
You can check that the chain was deployed correctly in the Wasp node dashboard (`<URL>/wasp/dashboard` when using `node-docker-setup`).
Note that the chain was deployed with some [core contracts](/wasp-wasm/reference/core-contracts/overview).

You should also have an EVM-JSONRPC server opened on:

Expand All @@ -116,7 +117,7 @@ wasp-cli chain deploy-contract wasmtime inccounter "inccounter SC" tools/cluster

The `inccounter_bg.wasm` file is a precompiled Wasm contract included in the Wasp repo as an example.

If you check the dashboard again, you should see that the `inccounter` contract is listed in the chain.
If you recheck the dashboard, you should see that the `inccounter` contract is listed in the chain.

### Interacting With a Smart Contract

Expand All @@ -140,7 +141,7 @@ counter: 0

:::note

The part after `|` is necessary because the return value is encoded, and you need to know the _schema_ in order to
The part after `|` is necessary because the return value is encoded, and you need to know the _schema_ to
decode it. **The schema definition is in its early stages and will likely change in the future.**

:::
Expand All @@ -151,7 +152,7 @@ You can now call the `increment` function by running:
wasp-cli chain post-request inccounter increment
```

After the request has been processed by the committee, you should get a new
After the committee has processed the request, you should get a new
counter value after calling `getCounter`:

```shell
Expand Down
Loading