Skip to content

Commit

Permalink
fix links
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrien committed Jan 13, 2024
1 parent 74b3332 commit e1ca1f5
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 20 deletions.
18 changes: 9 additions & 9 deletions docs/build/hello-world-dapp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Before we start, here's what you'll need:
You'll need a funded Massa wallet and your secret key before you deploy your smart contract to the Massa blockchain.

:::info
Not sure how to create and fund a Massa wallet? Check our guide [here](/docs/build/wallet/intro).
Not sure how to create and fund a Massa wallet? Check our guide [here](./wallet/intro).
:::

### Setting up Your Project
Expand Down Expand Up @@ -124,7 +124,7 @@ Here we are importing the necessary functions from the Massa AssemblyScript SDK.

:::info
If you are familiar with Solidity smart contracts, you will soon notice that some object provided by Massa AssemblyScript SDK are very similar to the ones provided by the Solidity SDK. For example, the `Context` object is very similar to the `msg` object in Solidity. It exposes methods such as `Context.transferredCoins()` which would translate to `msg.value` in Solidity. `Context.caller()` would return the address of the function caller like `msg.sender` in solidity. Similarly, the `generateEvent` function is very similar to the `emit` function in Solidity, etc.
You can learn more about the Massa AssemblyScript SDK [here](docs/build/smart-contract/as-sdk.md).
You can learn more about the Massa AssemblyScript SDK [here](./smart-contract/as-sdk.md).
:::

- **The constructor function**
Expand All @@ -146,19 +146,19 @@ Storage.set("greeting", "Hello, World!");
This line sets the greeting message in the contract storage. The `Storage.set()` function takes two parameters: the key and the value. The key is a string that will be used to retrieve the value from the storage. The value can be of any type. In this example, we are using a string.
:::info
In Massa, if you want some data to be persistent on the blockchain, you need to store it in the contract storage. If you are familiar with web development, you can think of the storage as the database of your application. The contract storage is a key-value store that can be used to store simple objects such as our "Hello, World!" string, or more complex objects such as serializable object arrays. Then the data can be retrieved from the storage using methods such has `Storage.get()` or `Storage.has()` provided by the SDK. You can learn more about how to handle the storage with Massa AS-SDK [here](docs/build/smart-contract/as-sdk.md#storage).
In Massa, if you want some data to be persistent on the blockchain, you need to store it in the contract storage. If you are familiar with web development, you can think of the storage as the database of your application. The contract storage is a key-value store that can be used to store simple objects such as our "Hello, World!" string, or more complex objects such as serializable object arrays. Then the data can be retrieved from the storage using methods such has `Storage.get()` or `Storage.has()` provided by the SDK. You can learn more about how to handle the storage with Massa AS-SDK [here](./smart-contract/as-sdk.md#storage).
:::
:::info
In Massa, when writing to the persistent storage a.k.a the ledger, you need to pay for the storage space you will be using. The more data you store, the more you will have to pay. Similarly when you free-up some space from the ledger, you recover the amount of coins you paid to allocate the space. The price of storage is a fixed amount of Massa coins for each byte of data (0.001 MAS per byte). You can learn more about storage cost in Massa smart contracts [here](docs/learn/storage-costs.mdx).
In Massa, when writing to the persistent storage a.k.a the ledger, you need to pay for the storage space you will be using. The more data you store, the more you will have to pay. Similarly when you free-up some space from the ledger, you recover the amount of coins you paid to allocate the space. The price of storage is a fixed amount of Massa coins for each byte of data (0.001 MAS per byte). You can learn more about storage cost in Massa smart contracts [here](../learn/storage-costs.mdx).
:::
- **Emitting an event**
```tsx
generateEvent(`Greeting has been set`);
```
Here, we are emitting an event to notify that the greeting message has been set. Events are a great way to notify the front ends of a dApp that something has happened. They are similar to events in Solidity. You can learn more about events [here](docs/build/smart-contract/as-sdk.md#utilities).
Here, we are emitting an event to notify that the greeting message has been set. Events are a great way to notify the front ends of a dApp that something has happened. They are similar to events in Solidity. You can learn more about events [here](./smart-contract/as-sdk.md#utilities).
Now that we have written our smart contract, let's deploy it to the blockchain.
Expand All @@ -177,7 +177,7 @@ This command compiles your `main.ts` contract into a `main.wasm` file generated
#### Step 3: Deploy the Smart Contract
Now that your smart contract is compiled and ready, let's deploy it to the Massa blockchain.
You first need some funds in your wallet that you can request from the [faucet](/docs/build/networks-faucets/public-networks).
You first need some funds in your wallet that you can request from the [faucet](./networks-faucets/public-networks).
You can then run the following command in your project directory:
```bash
Expand Down Expand Up @@ -359,7 +359,7 @@ We are using the `DefaultProviderUrls.BUILDNET` constant as our provider URL. Th
The boolean is a flag that indicates whether or not we want to provide an wallet account to sign transactions. Here it is set to false because we are not going to sign any transactions. Finally, we are setting the client object to the `web3client` state variable using the `setWeb3client` function, so that the web3 client is available to the rest of our application.
:::info
The buildnet is a test network that is used to test smart contracts before deploying them to the mainnet. It is similar to the Ethereum Sepolia network. You can learn more about Massa networks [here](/docs/build/networks-faucets/public-networks).
The buildnet is a test network that is used to test smart contracts before deploying them to the mainnet. It is similar to the Ethereum Sepolia network. You can learn more about Massa networks [here](./networks-faucets/public-networks).
:::
Expand Down Expand Up @@ -415,5 +415,5 @@ Congratulations on writing and testing your first dApp using the Massa blockchai
There's always more to learn. To continue exploring and expanding your knowledge, you can:
- Review more detailed guides on [smart contract development](/docs/build/smart-contract/intro).
- Check out more [complex examples](/docs/tutorial/home) of dApps built on Massa.
- Review more detailed guides on [smart contract development](./smart-contract/intro).
- Check out more [complex examples](../tutorial/home) of dApps built on Massa.
2 changes: 1 addition & 1 deletion docs/massaStation/hello-world-plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ any language, be more web2 or web3-oriented, and can be as simple or complex as
we are going to build the simplest of the programs; a "Hello, World!" *Massa Station* plugin.

:::info
If you don't know what are Massa Station and Massa Station Plugins, you can read this quick introduction [here](/docs/massaStation/home.mdx).
If you don't know what are Massa Station and Massa Station Plugins, you can read this quick introduction [here](./home.mdx).
:::

## What are we going to do?
Expand Down
1 change: 1 addition & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const config = {
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: "https://github.com/massalabs/docu-dev/tree/main/",
editLocalizedFiles: true,
showLastUpdateAuthor: true,
showLastUpdateTime: true,
remarkPlugins: [math, remarkGridTables],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Before we start, here's what you'll need:
You'll need a funded Massa wallet and your secret key before you deploy your smart contract to the Massa blockchain.

:::info
Not sure how to create and fund a Massa wallet? Check our guide [here](/docs/build/wallet/intro).
Not sure how to create and fund a Massa wallet? Check our guide [here](./wallet/intro).
:::

### Setting up Your Project
Expand Down Expand Up @@ -124,7 +124,7 @@ Here we are importing the necessary functions from the Massa AssemblyScript SDK.

:::info
If you are familiar with Solidity smart contracts, you will soon notice that some object provided by Massa AssemblyScript SDK are very similar to the ones provided by the Solidity SDK. For example, the `Context` object is very similar to the `msg` object in Solidity. It exposes methods such as `Context.transferredCoins()` which would translate to `msg.value` in Solidity. `Context.caller()` would return the address of the function caller like `msg.sender` in solidity. Similarly, the `generateEvent` function is very similar to the `emit` function in Solidity, etc.
You can learn more about the Massa AssemblyScript SDK [here](docs/build/smart-contract/as-sdk.md).
You can learn more about the Massa AssemblyScript SDK [here](./smart-contract/as-sdk.md).
:::

- **The constructor function**
Expand All @@ -146,19 +146,19 @@ Storage.set("greeting", "Hello, World!");
This line sets the greeting message in the contract storage. The `Storage.set()` function takes two parameters: the key and the value. The key is a string that will be used to retrieve the value from the storage. The value can be of any type. In this example, we are using a string.
:::info
In Massa, if you want some data to be persistent on the blockchain, you need to store it in the contract storage. If you are familiar with web development, you can think of the storage as the database of your application. The contract storage is a key-value store that can be used to store simple objects such as our "Hello, World!" string, or more complex objects such as serializable object arrays. Then the data can be retrieved from the storage using methods such has `Storage.get()` or `Storage.has()` provided by the SDK. You can learn more about how to handle the storage with Massa AS-SDK [here](docs/build/smart-contract/as-sdk.md#storage).
In Massa, if you want some data to be persistent on the blockchain, you need to store it in the contract storage. If you are familiar with web development, you can think of the storage as the database of your application. The contract storage is a key-value store that can be used to store simple objects such as our "Hello, World!" string, or more complex objects such as serializable object arrays. Then the data can be retrieved from the storage using methods such has `Storage.get()` or `Storage.has()` provided by the SDK. You can learn more about how to handle the storage with Massa AS-SDK [here](./smart-contract/as-sdk.md#storage).
:::
:::info
In Massa, when writing to the persistent storage a.k.a the ledger, you need to pay for the storage space you will be using. The more data you store, the more you will have to pay. Similarly when you free-up some space from the ledger, you recover the amount of coins you paid to allocate the space. The price of storage is a fixed amount of Massa coins for each byte of data (0.001 MAS per byte). You can learn more about storage cost in Massa smart contracts [here](docs/learn/storage-costs.mdx).
In Massa, when writing to the persistent storage a.k.a the ledger, you need to pay for the storage space you will be using. The more data you store, the more you will have to pay. Similarly when you free-up some space from the ledger, you recover the amount of coins you paid to allocate the space. The price of storage is a fixed amount of Massa coins for each byte of data (0.001 MAS per byte). You can learn more about storage cost in Massa smart contracts [here](../learn/storage-costs.mdx).
:::
- **Emitting an event**
```tsx
generateEvent(`Greeting has been set`);
```
Here, we are emitting an event to notify that the greeting message has been set. Events are a great way to notify the front ends of a dApp that something has happened. They are similar to events in Solidity. You can learn more about events [here](docs/build/smart-contract/as-sdk.md#utilities).
Here, we are emitting an event to notify that the greeting message has been set. Events are a great way to notify the front ends of a dApp that something has happened. They are similar to events in Solidity. You can learn more about events [here](./smart-contract/as-sdk.md#utilities).
Now that we have written our smart contract, let's deploy it to the blockchain.
Expand All @@ -177,7 +177,7 @@ This command compiles your `main.ts` contract into a `main.wasm` file generated
#### Step 3: Deploy the Smart Contract
Now that your smart contract is compiled and ready, let's deploy it to the Massa blockchain.
You first need some funds in your wallet that you can request from the [faucet](/docs/build/networks-faucets/public-networks).
You first need some funds in your wallet that you can request from the [faucet](./networks-faucets/public-networks).
You can then run the following command in your project directory:
```bash
Expand Down Expand Up @@ -359,7 +359,7 @@ We are using the `DefaultProviderUrls.BUILDNET` constant as our provider URL. Th
The boolean is a flag that indicates whether or not we want to provide an wallet account to sign transactions. Here it is set to false because we are not going to sign any transactions. Finally, we are setting the client object to the `web3client` state variable using the `setWeb3client` function, so that the web3 client is available to the rest of our application.
:::info
The buildnet is a test network that is used to test smart contracts before deploying them to the mainnet. It is similar to the Ethereum Sepolia network. You can learn more about Massa networks [here](/docs/build/networks-faucets/public-networks).
The buildnet is a test network that is used to test smart contracts before deploying them to the mainnet. It is similar to the Ethereum Sepolia network. You can learn more about Massa networks [here](./networks-faucets/public-networks).
:::
Expand Down Expand Up @@ -415,5 +415,5 @@ Congratulations on writing and testing your first dApp using the Massa blockchai
There's always more to learn. To continue exploring and expanding your knowledge, you can:
- Review more detailed guides on [smart contract development](/docs/build/smart-contract/intro).
- Check out more [complex examples](/docs/tutorial/home) of dApps built on Massa.
- Review more detailed guides on [smart contract development](./smart-contract/intro).
- Check out more [complex examples](../tutorial/home) of dApps built on Massa.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ any language, be more web2 or web3-oriented, and can be as simple or complex as
we are going to build the simplest of the programs; a "Hello, World!" *Massa Station* plugin.

:::info
If you don't know what are Massa Station and Massa Station Plugins, you can read this quick introduction [here](/docs/massaStation/home.mdx).
If you don't know what are Massa Station and Massa Station Plugins, you can read this quick introduction [here](./home.mdx).
:::

## What are we going to do?
Expand Down

0 comments on commit e1ca1f5

Please sign in to comment.