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

[docs] links fixes and switcher fix #128

Merged
merged 1 commit into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const config = {
},
colorMode: {
defaultMode: "dark",
disableSwitch: false,
disableSwitch: true,
},
navbar: {
title: "=nil; Foundation",
Expand Down
2 changes: 1 addition & 1 deletion docs/nil/block-explorer/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The account screen contains the details of a particular smart contract.

:::info[Solidity code]

If an account is registered inside [**the Cometa service**](../../guides/cometa-and-debugging.mdx), this screen will also show its Solidity code.
If an account is registered inside [**the Cometa service**](../guides/cometa-and-debugging.mdx), this screen will also show its Solidity code.

:::

Expand Down
2 changes: 1 addition & 1 deletion docs/nil/cookbook/faucet-service/use-faucet-service.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Use the faucet service via Nil.js

[**Faucets**](../../getting-started/essentials/tokens.mdx#token-faucet-service) form a special service for 'topping up' addresses and existing smart contracts. Existing faucets can distribute the 'default' token used to pay for transaction execution as well as several pre-defined 'mock' tokens such as BTC or ETH.
[**Faucets**](../../getting-started/tokens.mdx#token-faucet-service) form a special service for 'topping up' addresses and existing smart contracts. Existing faucets can distribute the 'default' token used to pay for transaction execution as well as several pre-defined 'mock' tokens such as BTC or ETH.

:::info

Expand Down
2 changes: 1 addition & 1 deletion docs/nil/cookbook/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ These short recipes demonstrate how to use `Nil.js` to deploy and call a smart c

## Use the faucet service

These recipes demonstrate how to call [**the Faucet service**](../getting-started/essentials/tokens.mdx#token-faucet-service) via `Nil.js`.
These recipes demonstrate how to call [**the Faucet service**](../getting-started/tokens.mdx#token-faucet-service) via `Nil.js`.

<CookbookCardSection>
<CookbookCard tag={{
Expand Down
6 changes: 3 additions & 3 deletions docs/nil/guides/app-migration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@ In =nil;, the ERC20 standard is absent. It is replaced by a more intuitive syste

:::tip[Key differences]

In =nil;, there is no need to send tokens to a dedicated ERC20 contract to receive approval for minting/burning/transferring. Any smart contract holding a custom token can send this token directly to other smart contracts in [**an async or a sync call**](../getting-started/essentials/handling-async-execution.mdx).
In =nil;, there is no need to send tokens to a dedicated ERC20 contract to receive approval for minting/burning/transferring. Any smart contract holding a custom token can send this token directly to other smart contracts in [**an async or a sync call**](../getting-started/async-execution.mdx).

:::

After `NilTokenBase` is imported, the contract can mint and burn its own token whose ID is derived from the address of the contract. This approach provides encapsulation for all typical actions performed on token pairs (such as minting and burning liquidity tokens during the first mint).

:::info[Additional information]

[**Read this tutorial**](../getting-started/essentials/tokens.mdx) to learn more about minting, burning and transferring tokens.
[**Read this tutorial**](../getting-started/tokens.mdx) to learn more about minting, burning and transferring tokens.

:::

Expand Down Expand Up @@ -229,7 +229,7 @@ In =nil;, contracts can be deployed on shards with each shard acting as a separ

:::info[Additional information]

[**Read this tutorial**](../getting-started/essentials/handling-async-execution.mdx) to learn more about minting, burning and transferring tokens.
[**Read this tutorial**](../getting-started/async-execution.mdx) to learn more about minting, burning and transferring tokens.

:::

Expand Down
2 changes: 1 addition & 1 deletion docs/nil/migration-guides/december-0412-2024-release.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This release of =nil; fixes several issues with the =nil; CLI and adds quality-o

### =nil; CLI changes

* The =nil; CLI can use the `rpc_endpoint` from its config for working with [**the faucet service**](../getting-started/essentials/tokens.mdx#token-faucet-service) and the Cometa service if no separate endpoints are set for either of them
* The =nil; CLI can use the `rpc_endpoint` from its config for working with [**the faucet service**](../getting-started/tokens.mdx#token-faucet-service) and the Cometa service if no separate endpoints are set for either of them
* The `nil contract call-readonly` command now returns JSON-formatted output when objects are returned by a call
* The =nil; CLI can display debug logs and events emitted by smart contracts when using the `nil contract call-readonly` command
* The output of the `nil config show` command has been made more concise
Expand Down
2 changes: 1 addition & 1 deletion docs/nil/migration-guides/november-0611-2024-release.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This release of =nil; simplifies operations with the `TokenId` type by adding ne
* The =nil; CLI can set the Cometa RPC endpoint for use with the `nil cometa` command
* The =nil; CLI can top-up the balances of smart contracts without needing a smart account
* The previously mandatory `--network nil` flag has been removed for Ignition deployments and tasks in the =nil; Hardhat plugin
* The endpoints for the Cometa service and [**the Faucet service**](../getting-started/essentials/tokens.mdx#token-faucet-service) have been merged with the standard `http://api.devnet.nil.foundation/api/$USERNAME/$TOKEN` endpoint
* The endpoints for the Cometa service and [**the Faucet service**](../getting-started/tokens.mdx#token-faucet-service) have been merged with the standard `http://api.devnet.nil.foundation/api/$USERNAME/$TOKEN` endpoint

## Migration of smart contracts

Expand Down
2 changes: 1 addition & 1 deletion docs/nil/migration-guides/november-2011-2024-release.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ When deploying or calling smart contracts, the =nil; CLI can now correctly proce

* Set the endpoint of the faucet service in the =nil; CLI config

[**The faucet service**](../getting-started/essentials/tokens.mdx#token-faucet-service) is a tool for quickly 'topping up' contracts using either the default token or pre-set 'mock' tokens. To configure it via the =nil; CLI:
[**The faucet service**](../getting-started/tokens.mdx#token-faucet-service) is a tool for quickly 'topping up' contracts using either the default token or pre-set 'mock' tokens. To configure it via the =nil; CLI:

```bash
nil config set faucet_endpoint FAUCET_ENDPOINT
Expand Down
6 changes: 3 additions & 3 deletions docs/nil/migration-guides/october-1510-2024-release.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This release of =nil; adds support of the `onlyResponse` modifier, changes token

:::info

[**Read this tutorial**](../getting-started/essentials/tokens.mdx#token-faucet-service) to learn more about the token faucet service.
[**Read this tutorial**](../getting-started/tokens.mdx#token-faucet-service) to learn more about the token faucet service.

:::

Expand All @@ -28,7 +28,7 @@ This change simplifies the management of custom tokens as there is no longer a n

* Mark callback functions with the `onlyResponse` modifier

The `Nil.sol` library now includes [**the `onlyResponse` modifier**](../tools/sol-library/func-modifiers.mdx). After this modifier is applied to a function, said function can only be called by responses that arrive to the requests sent via `sendRequest()`. The modifier protects callback functions from being unfairly executed by malicious parties.
The `Nil.sol` library now includes the `onlyResponse` modifier. After this modifier is applied to a function, said function can only be called by responses that arrive to the requests sent via `sendRequest()`. The modifier protects callback functions from being unfairly executed by malicious parties.

## Migration of the =nil; CLI

Expand All @@ -38,7 +38,7 @@ No specific changes have to be made to the =nil; CLI commands.

The Nil.js client library now supports several useful 'wrappers' designed to simplify work with the faucet service.

[**Read this tutorial**](../getting-started/essentials/tokens.mdx#token-faucet-service) to learn more or access the [**references for Nil.js to learn more.**](../reference/client/index.mdx).
[**Read this tutorial**](../getting-started/tokens.mdx#token-faucet-service) to learn more or access the [**references for Nil.js to learn more.**](../reference/client/index.mdx).

## Migration of Hardhat scripts

Expand Down
5 changes: 2 additions & 3 deletions docs/nil/migration-guides/september-2024-release.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The latest release of =nil; introduces several changes to multi-token support an


* The `Minter` contract no longer exists and cannot be called from other smart contracts
* The `Nil.sol` extension library now exposes [**the `awaitCall()` function**](getting-started/essentials/handling-async-execution.mdx##retrieving-values) that allows for making an async call to a smart contract and then awaiting the result
* The `Nil.sol` extension library now exposes the `awaitCall()` function that allows for making an async call to a smart contract and then awaiting the result
* The JSON-RPC API now includes the `eth_estimateFee` method which can be used for gas estimations. Client tools (`Nil.js` and the =nil; CLI) will support this feature at a later date

## Migration of smart contracts
Expand All @@ -15,7 +15,7 @@ The latest release of =nil; introduces several changes to multi-token support an

All 'out of the box' smart accounts provided by =nil; can now mint tokens without having to refer to the `Minter` contract. As a result, the `Minter` contract has been discontinued. Any calls or transactions sent to this contract should be removed.

A more detailed overview of how to create tokens via smart accounts is provided in [**this tutorial**](getting-started/essentials/tokens.mdx).
A more detailed overview of how to create tokens via smart accounts is provided in [**this tutorial**](../getting-started/tokens.mdx).

* Use `NilTokenBase` to create custom tokens

Expand Down Expand Up @@ -112,7 +112,6 @@ await waitTillCompleted(CLIENT, SHARD_ID, HASH, {
);
```


## Migration of Hardhat scripts

No specific changes have to be made to existing Hardhat scripts.
10 changes: 5 additions & 5 deletions docs/nil/prerequisites.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ make

The =nil; client library is a TypeScript module that allows for interating with the cluster using JS classes and functions.

[**Get started with developing using `Nil.js`**](../niljs/getting-started.mdx).
[**Get started with developing using `Nil.js`**](niljs/getting-started.mdx).

[**The 'Reference' section**](reference/client/index.mdx) contains descriptions of all essential classes and functions.

## =nil; CLI

The =nil; CLI is an easy-to-use tool for interacting with the cluster from any shell: it supports all major operations and can be integrated into a CI/CD pipeline.

[**Get started with the =nil; CLI**](../nilcli/getting-started.mdx).
[**Get started with the =nil; CLI**](nilcli/getting-started.mdx).

[**The 'Reference' section**](reference/cli-reference/abi/index.mdx) contains a full list of commands that can be used via the =nil; CLI.

Expand All @@ -112,13 +112,13 @@ The [**`@nilfoundation/smart-contracts` NPM package**](https://www.npmjs.com/pac
</TabItem>
</Tabs>

[**Follow this explanation**](../core-concepts/shards-parallel-execution.mdx#async-execution) to learn more about the theory behind async execution, or [**complete this tutorial**](essentials/handling-async-execution.mdx) on handling async calls.
[**Follow this explanation**](core-concepts/shards-parallel-execution.mdx#async-execution) to learn more about the theory behind async execution.

## JSON-RPC API

=nil; exposes a JSON-RPC API that supports several methods from regular Ethereum as well as some methods that are unique to the cluster.

Apart from the usual means of interacting with a JSON-RPC API (e.g., by sending CURL requests), the documentation portal provides an [**interactive API reference**](../reference/client/index.mdx).
Apart from the usual means of interacting with a JSON-RPC API (e.g., by sending CURL requests), the documentation portal provides an [**interactive API reference**](reference/client/index.mdx).

To use it, follow the link above, select a method, input the API endpoint in the form and fill the method parameters. Click on '**Send Request**' to send the request.

Expand All @@ -138,5 +138,5 @@ Information in the block explorer may update with a slight delay compared to the

:::

[**Access the =nil; block explorer**](https://explore.nil.foundation/) and [**learn about its usage**](tools/block-explorer/usage.mdx).
[**Access the =nil; block explorer**](https://explore.nil.foundation/) and [**learn about its usage**](block-explorer/usage.mdx).

2 changes: 1 addition & 1 deletion docs/nil/smart-contracts/func-modifiers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The =nil; Solidity library provides several function modifiers that simplify the

If a function has the `onlyInternal` modifier, it can only be called by another contract regardless of where this contract is located. A function with the `onlyExternal` modifier behaves the opposite way: it must always be called via an external transaction (e.g., from a user).

The `onlyResponse` modifier limits makes it so a function can only be called as callback function when processing [**the response to `sendRequest()`**](../../getting-started/essentials/handling-async-execution.mdx).
The `onlyResponse` modifier limits makes it so a function can only be called as callback function when processing [**the response to `sendRequest()`**](../getting-started/async-execution.mdx).

:::info

Expand Down
6 changes: 3 additions & 3 deletions docs/nil/specification/principles.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ As implied by their name, execution shards process transactions.

Each shard is allocated with a subset of accounts from the global state. The shard is responsible for executing transactions made to and from these accounts. Consensus is handled by a committee of randomly selected validators.

[**Learn more about execution shards**](core-concepts/shards-parallel-execution.mdx#execution-shards).
[**Learn more about execution shards**](../core-concepts/shards-parallel-execution.mdx#execution-shards).

:::info[Validator rotation]

Expand All @@ -47,10 +47,10 @@ Instead of handling cross-shard communication via bridges (which are often insec

Each execution shard is tasked with surveying other execution shards and retrieving necessary transactions. A transaction is necessary for a shard if the shard holds the account that the transaction calls. Blocks within a shard are considered invalid unless they include all necessary transactions.

[**Learn more about cross-shard communication**](core-concepts/shards-parallel-execution.mdx#transaction-passing-checks) or read [**our primer**](getting-started/essentials/handling-async-execution.mdx) on async execution.
[**Learn more about cross-shard communication**](../core-concepts/shards-parallel-execution.mdx#transaction-passing-checks) or read [**our primer**](../getting-started/async-execution.mdx) on async execution.

## Contract placement

=nil; also allows participants to request for two or more accounts to be placed on the same shard.

This ensures that execution speeds remain high but may raise gas fees across the affected shard. [**Learn more about contract placement and its benefits**](specification/contract-co-location.mdx).
This ensures that execution speeds remain high but may raise gas fees across the affected shard. [**Learn more about contract placement and its benefits**](.//contract-co-location.mdx).