Skip to content

Commit

Permalink
Proofreading (#315)
Browse files Browse the repository at this point in the history
* proofreading for "Set up your wallet"

* Proofreading - fund.md

* Proofreading - how-to-bridge-eth.md

* Proofreading - foundry.md

* Proofreading - hardhat.mdx

* Proofreading - remix.md

* Proofreading - thirdweb.md

* Proofreading - truffle.mdx

* Proofreading - foundry.md (verify)

* Proofreading - hardhat.md (verify)

* Proofreading - truffle.md (verify)
  • Loading branch information
jlwllmr authored Oct 4, 2023
1 parent 18fa138 commit cc723d3
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Here's a video walkthrough:

## Prerequisites

Before you begin, Ensure you've:
Before you begin, ensure you've:

1. [Set up your wallet](../../../use-mainnet/set-up-your-wallet.mdx)
1. [Funded your wallet with Linea ETH](../../../use-mainnet/fund.md#get-test-eth-on-linea)
Expand Down Expand Up @@ -53,7 +53,7 @@ These instructions use API keys and private keys inline. We highly recommend hid
<Tabs className="my-tabs">
<TabItem value="Infura" label="Infura" default>

To use Infura, you'll need to [get an API key](https://support.infura.io/hc/en-us/articles/15116941373979-Connecting-to-the-Linea-network)
To use Infura, you'll need to [get an API key](https://support.infura.io/hc/en-us/articles/15116941373979-Connecting-to-the-Linea-network).

On testnet:

Expand Down Expand Up @@ -113,7 +113,7 @@ Then, run:
source .env
```

Finally, we can modify the `foundry.toml` file to conveniently store the various rpc endpoints we might be working with. Add this section:
Finally, we can modify the `foundry.toml` file to conveniently store the various RPC endpoints we might be working with. Add this section:

```bash
[rpc_endpoints]
Expand Down
12 changes: 6 additions & 6 deletions docs/build-on-linea/quickstart/deploy-smart-contract/hardhat.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ In the menu that appears, select `Create an empty hardhat.config.js` and press *

Hardhat recommends using their plugin, `@nomicfoundation/hardhat-toolbox`, which can be downloaded by entering `Y` during the project creation process.

You should now have a sample project from Hardhat the deploys and test a `Lock` contract that locks funds for a set amount of time.
You should now have a sample project from Hardhat, the deploys, and test a `Lock` contract that locks funds for a set amount of time.

:::note

Expand All @@ -56,29 +56,29 @@ The default script in `scripts/deploy.js` locks 0.001 ETH in the contract upon d

The sample project already includes the deployment script. To deploy on Linea, you'll just need to make a few modifications.

You can use [Truffle Dashboard](#truffle-dashboard) to deploy directly with your MetaMask wallet or deploy with the Hardhat CLI by [adding Linea to your `hardhat.config.js`](#hardhatconfigjs).
You can use [Truffle Dashboard](#truffle-dashboard) to deploy directly with your MetaMask wallet or deploy with the Hardhat CLI by [adding Linea to your `hardhat.config.js`](#use-hardhatconfigjs).

### Use Truffle Dashboard

[Truffle Dashboard](https://trufflesuite.com/docs/truffle/how-to/use-the-truffle-dashboard/) allows you to forgo saving your private keys locally, instead connecting to your MetaMask wallet for deployments. To deploy with Truffle Dashboard using the [Hardhat plugin](https://github.com/trufflesuite/truffle/tree/develop/packages/dashboard-hardhat-plugin#truffledashboard-hardhat-plugin):

1. [Install Truffle using the recommended installation procedure](https://trufflesuite.com/docs/truffle/how-to/install/)
1. Run
1. Run:

```
npm install --save-dev @truffle/dashboard-hardhat-plugin
```
1. Import the plugin into `hardhat.config.js`
1. Import the plugin into `hardhat.config.js`, with:

```javascript
import "@truffle/dashboard-hardhat-plugin";
```
or
or:
```javascript
require("@truffle/dashboard-hardhat-plugin");
```
1. Run `truffle dashboard` in your terminal, which will open a window on port `24012`.
1. Navigate to `localhost:24012` in your browser. Please ensure that Dashboard is connected to the Linea testnet or mainnet by connecting your MetaMask wallet to Linea. For reference, the Linea testnet network ID is `59140`.
1. Navigate to `localhost:24012` in your browser. Please ensure that your Truffle Dashboard is connected to the Linea testnet or mainnet by connecting your MetaMask wallet to Linea. For reference, the Linea testnet network ID is `59140`.
<img
src={
require("@site/static/img/docs/build-on-linea/quickstart/deploy-smart-contract/dashboard_network.png")
Expand Down
6 changes: 3 additions & 3 deletions docs/build-on-linea/quickstart/deploy-smart-contract/remix.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The default project includes a code sample with a configured smart contract.

## Compile a Remix contract

To compile this sample contract, navigate to the "Solidity compiler" icon, and click on "Compile contract"!
To compile this sample contract, navigate to the "Solidity compiler" icon, and click on "Compile contract".

<img
src={
Expand All @@ -47,7 +47,7 @@ If you deploy using the injected provider, Remix can auto-detect the network you

:::caution

The public endpoints are rate limited and not meant for production systems. To use Infura, you'll need to [get an API key](https://support.infura.io/hc/en-us/articles/15116941373979-Connecting-to-the-Linea-network). Then, you can [manually add a network to your MetaMask wallet](https://support.metamask.io/hc/en-us/articles/360043227612-How-to-add-a-custom-network-RPC#h_01G63GGJ83DGDRCS2ZWXM37CV5) with the mainnet information found [here](../../../use-mainnet/info-contracts.md#network-information)
The public endpoints are rate limited and not meant for production systems. To use Infura, you'll need to [get an API key](https://support.infura.io/hc/en-us/articles/15116941373979-Connecting-to-the-Linea-network). You can then [manually add a network to your MetaMask wallet](https://support.metamask.io/hc/en-us/articles/360043227612-How-to-add-a-custom-network-RPC#h_01G63GGJ83DGDRCS2ZWXM37CV5) with the mainnet information found [here](../../../use-mainnet/info-contracts.md#network-information).

:::

Expand All @@ -64,7 +64,7 @@ Switch to the Linea Mainnet network in your MetaMask wallet, and select "Injecte

:::caution

The public endpoints are rate limited and not meant for production systems. To use Infura, you'll need to [get an API key](https://support.infura.io/hc/en-us/articles/15116941373979-Connecting-to-the-Linea-network). Then, you can [manually add a network to your MetaMask wallet](https://support.metamask.io/hc/en-us/articles/360043227612-How-to-add-a-custom-network-RPC#h_01G63GGJ83DGDRCS2ZWXM37CV5) with the testnet information found [here](../../../use-mainnet/info-contracts.md#network-information)
The public endpoints are rate limited and not meant for production systems. To use Infura, you'll need to [get an API key](https://support.infura.io/hc/en-us/articles/15116941373979-Connecting-to-the-Linea-network). You can then [manually add a network to your MetaMask wallet](https://support.metamask.io/hc/en-us/articles/360043227612-How-to-add-a-custom-network-RPC#h_01G63GGJ83DGDRCS2ZWXM37CV5) with the testnet information found [here](../../../use-mainnet/info-contracts.md#network-information).

:::

Expand Down
24 changes: 12 additions & 12 deletions docs/build-on-linea/quickstart/deploy-smart-contract/thirdweb.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: thirdweb
---

thirdweb is a complete web3 development framework that provides everything you need to connect your apps and games to decentralized networks
thirdweb is a complete web3 development framework that provides everything you need to connect your apps and games to decentralized networks.

## Create a smart contract

Expand All @@ -23,7 +23,7 @@ To create a new smart contract using thirdweb [CLI](https://portal.thirdweb.com/
3. Once created, navigate to your project’s directory and open in your preferred code editor.
4. If you open the `contracts` folder, you will find your smart contract; this is your smart contract written in Solidity.

The following is code for an ERC721Base contract without specified extensions. It implements all of the logic inside the [ERC721Base.sol](https://github.com/thirdweb-dev/contracts/blob/main/contracts/base/ERC721Base.sol) contract; which implements the [ERC721A](https://github.com/thirdweb-dev/contracts/blob/main/contracts/eip/ERC721A.sol) standard.
The following is code for an `ERC721Base` contract without specified extensions. It implements all of the logic inside the [ERC721Base.sol](https://github.com/thirdweb-dev/contracts/blob/main/contracts/base/ERC721Base.sol) contract; which implements the [ERC721A](https://github.com/thirdweb-dev/contracts/blob/main/contracts/eip/ERC721A.sol) standard.

```bash
// SPDX-License-Identifier: MIT
Expand All @@ -41,13 +41,13 @@ To create a new smart contract using thirdweb [CLI](https://portal.thirdweb.com/
}
```

This contract inherits the functionality of ERC721Base through the following steps:
This contract inherits the functionality of `ERC721Base` through the following steps:

- Importing the ERC721Base contract
- Inheriting the contract by declaring that our contract is an ERC721Base contract
- Importing the `ERC721Base` contract
- Inheriting the contract by declaring that our contract is an `ERC721Base` contract
- Implementing any required methods, such as the constructor.

5. After modifying your contract with your desired custom logic, you may deploy it to [LineaTestnet](https://thirdweb.com/linea-testnet) using [Deploy](https://portal.thirdweb.com/deploy).
5. After modifying your contract with your desired custom logic, you may deploy it to the [Linea testnet](https://thirdweb.com/linea-testnet) using [`deploy`](https://portal.thirdweb.com/deploy).

---

Expand All @@ -64,9 +64,9 @@ Alternatively, you can deploy a prebuilt contract for NFTs, tokens, or marketpla
## Deploy a smart contract

Deploy allows you to deploy a smart contract to any EVM compatible network without configuring RPC URLs, exposing your private keys, writing scripts, and other additional setup such as verifying your contract.
Deploy allows you to deploy a smart contract to any EVM-compatible network without configuring RPC URLs, exposing your private keys, writing scripts, and other additional setup such as verifying your contract.

1. To deploy your smart contract using deploy, navigate to the root directory of your project and execute the following command:
1. To deploy your smart contract using `deploy`, navigate to the root directory of your project and execute the following command:

```bash
npx thirdweb deploy
Expand All @@ -78,15 +78,15 @@ Deploy allows you to deploy a smart contract to any EVM compatible network witho
- Providing the option to select which contract(s) you wish to deploy.
- Uploading your contract source code (ABI) to IPFS.

2. When it is completed, it will open a dashboard interface to finish filling out the parameters.
2. When this process is completed, a dashboard interface will open, where you will need to finish filling out the parameters:
- `_name`: contract name
- `_symbol`: symbol or "ticker"
- `_royaltyRecipient`: wallet address to receive royalties from secondary sales
- `_royaltyBps`: basis points (bps) that will be given to the royalty recipient for each secondary sale, e.g. 500 = 5%
3. Select [LineaTestnet](https://thirdweb.com/linea-testnet) as the network
4. Manage additional settings on your contract’s dashboard as needed such as uploading NFTs, configuring permissions, and more.
3. Select [Linea testnet](https://thirdweb.com/linea-testnet) as the network
4. Manage additional settings on your contract’s dashboard as needed, such as uploading NFTs, configuring permissions, and more.

> For additional information on Deploy, please reference [thirdweb’s documentation](https://portal.thirdweb.com/deploy).
> For additional information on `deploy`, please reference [thirdweb’s documentation](https://portal.thirdweb.com/deploy).
If you have any further questions or encounter any issues during the process, please [reach out to thirdweb support](https://support.thirdweb.com).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ You can check if it compiles by running `truffle compile` from the root folder.

## Write the migration script

To tell Truffle how, and in what order we want to deploy our smart contracts, we need to write a migration script.
To tell Truffle how we want to deploy our smart contracts, and in what order, we need to write a migration script.

Create `1_deploy_token.js` in the `migrations` directory, and add the following code:

Expand Down Expand Up @@ -117,7 +117,7 @@ Truffle allows you to deploy through the [Truffle Dashboard](#truffle-dashboard)

### truffle-config.js

You can deploy with Truffle using the command line, by specifying the Linea in `truffle-config.js`. To do so, you need to:
You can deploy with Truffle using the command line, by specifying Linea testnet in `truffle-config.js`. To do so, you need to:

1. Create a `.env` file in the root folder with your wallet's mnemonic. This is your [secret recovery phrase](https://support.metamask.io/hc/en-us/articles/360015290032-How-to-reveal-your-Secret-Recovery-Phrase).

Expand Down
10 changes: 5 additions & 5 deletions docs/build-on-linea/quickstart/verify-smart-contract/foundry.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ title: Foundry
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

To verify your Foundry contracts, you can use Foundry's [verify-contract](https://book.getfoundry.sh/reference/forge/forge-verify-contract) to verify contracts on Lineascan.
To verify your Foundry contracts, you can use Foundry's [`verify-contract`](https://book.getfoundry.sh/reference/forge/forge-verify-contract) to verify contracts on Lineascan.

You'll need to get a Lineascan (Linea instance of Etherscan) API key by creating an account at [https://lineascan.build/myapikey](https://lineascan.build/myapikey).

## Verify your smart contract

:::note

These instructions verify using Etherscan, which currently does not support Yul. If you would like to verify using Blockscout, please use the API URLs referenced [here](../../../use-mainnet/info-contracts.md#block-explorers).
These instructions verify using the Linea instance of Etherscan, which currently does not support Yul. If you would like to verify using Blockscout, please use the API URLs referenced [here](../../../use-mainnet/info-contracts.md#block-explorers).

:::

Expand Down Expand Up @@ -60,7 +60,7 @@ Contract successfully verified

### Verify a contract upon creation

If you want to verify a contract that has already been deployed, you can use the following commands:
If you want to verify a contract as it is being deployed for the first time, you can use the following commands:

<Tabs>
<TabItem value="Mainnet" label="Mainnet" default>
Expand All @@ -84,7 +84,7 @@ You can check that it was verified correctly by navigating to the [testnet block

## Using `.env` and `foundry.toml` to store etherscan information

If you don't want to paste your keys inline and have multiple etherscan API keys to manage, you can use `.env` and `foundry.toml` to set up custom configurations.
If you don't want to paste your keys inline and have multiple Etherscan API keys to manage, you can use `.env` and `foundry.toml` to set up custom configurations.

Assuming you followed the instructions to create a `.env` file [here](../deploy-smart-contract/foundry.md#using-env-to-store-private-keys), add your Lineascan API key to the file:

Expand All @@ -98,7 +98,7 @@ Then, run:
source .env
```

Finally, modify `foundry.toml` to include the etherscan configurations:
Finally, modify `foundry.toml` to include the Etherscan configurations:

```bash
[etherscan]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ If you aren't already using `@nomicfoundation/hardhat-toolbox`, you can use `@no

## Add your Lineascan API Key

We'll be using a `.env` file to store our sensitive information. You can find instructions on how to do so [here](../deploy-smart-contract/hardhat.mdx#use-hardhatconfigjs).
We'll be using a `.env` file to store our sensitive information. You can find instructions on how to set up the file [here](../deploy-smart-contract/hardhat.mdx#use-hardhatconfigjs).

Next, you'll need to get a Lineascan (Linea instance of Etherscan) key by creating an account at [https://lineascan.build/myapikey](https://lineascan.build/myapikey). Grab your key, and add it to the `.env` file:

Expand All @@ -36,7 +36,7 @@ const { PRIVATE_KEY, LINEASCAN_API_KEY } = process.env;

:::note

These instructions verify using Etherscan, which currently does not support Yul. If you would like to verify using Blockscout, please use the API URLs referenced [here](../../../use-mainnet/info-contracts.md#block-explorers).
These instructions verify using the Linea instance of Etherscan, which currently does not support Yul. If you would like to verify using Blockscout, please use the API URLs referenced [here](../../../use-mainnet/info-contracts.md#block-explorers).

:::

Expand Down Expand Up @@ -100,7 +100,7 @@ etherscan: {

:::note

The Etherscan apiKey and network name for your custom chain must match the network name under `networks` in your `hardhat.config.js`.
The Etherscan `apiKey` and network name for your custom chain must match the network name under `networks` in your `hardhat.config.js`.

:::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ These steps assume you stored your secret keys in a `.env` file, which you can r

:::note

These instructions verify using Etherscan, which currently does not support Yul. If you would like to verify using Blockscout, please use the API URLs referenced [here](../../../use-mainnet/info-contracts.md#block-explorers).
These instructions verify using the Linea instance of Etherscan, which currently does not support Yul. If you would like to verify using Blockscout, please use the API URLs referenced [here](../../../use-mainnet/info-contracts.md#block-explorers).

:::

Expand Down Expand Up @@ -158,6 +158,6 @@ Verifying contracts on sourcify
</TabItem>
</Tabs>

You can check that it was verified correctly by navigating to the [block explorer](https://lineascan.build/) and pasting in the deployed contract address.
You can check that it was verified correctly by navigating to the block explorer ([mainnet](https://lineascan.build/) or [testnet](https://goerli.lineascan.build/)) and pasting in the deployed contract address.

![verified contract](./../../../../static/img/docs/build-on-linea/quickstart/verify-smart-contract/lineascan_verification.png)

1 comment on commit cc723d3

@vercel
Copy link

@vercel vercel bot commented on cc723d3 Oct 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.