Skip to content

Commit

Permalink
docs(docs): use infura rpc (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
emilyJLin95 committed Jun 23, 2023
1 parent 0acf98d commit 350ad26
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 16 deletions.
16 changes: 9 additions & 7 deletions docs/developers/quickstart/deploy-smart-contract/foundry.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,15 @@ Running `forge init` sets you up with a sample contract, test, and script for `C

## Deploy the smart contract

To deploy a smart contract, run:
To deploy a smart contract, we highly recommend using an Infura endpoint, as the public endpoint may experience rate limiting. You can find out how to [get an API key here](https://support.linea.build/hc/en-us/articles/15752713253147). Then, you can run the following command.

Using Infura:

```bash
forge create --rpc-url https://linea-goerli.infura.io/v3/YOUR-INFURA-API-KEY src/Counter.sol:Counter --private-key YOUR_PRIVATE_KEY
```

Using the public endpoint:

```bash
forge create --rpc-url https://rpc.goerli.linea.build/ src/Counter.sol:Counter --private-key YOUR_PRIVATE_KEY
Expand All @@ -59,9 +67,3 @@ Transaction hash: 0x967e1290b285e67b3d74940ee19925416734c345f58bd1ec64dcea134647
```

Next, you can optionally [verify your contract on the network](../verify-smart-contract/foundry.md).

:::note

You may encounter rate limiting if you are connecting via the public endpoint. If your dapp needs full Infura node access, open a support ticket [here](https://support.infura.io/hc/en-us/articles/15116941373979).

:::
28 changes: 21 additions & 7 deletions docs/developers/quickstart/deploy-smart-contract/hardhat.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,27 @@ To deploy to Linea, we'll need to add the network to our `hardhat.config.js`. To
```
npm i -D dotenv
```
1. Add Linea to your `hardhat.config.js` file:
1. Add Linea to your `hardhat.config.js` file. We highly recommend using the Infura endpoint, as the public endpoint may experience rate limiting. You can find how to [get an API key here](https://support.linea.build/hc/en-us/articles/15752713253147).

Using Infura:

```javascript
require("@nomicfoundation/hardhat-toolbox");
require("dotenv").config();
const { PRIVATE_KEY } = process.env;
module.exports = {
solidity: "0.8.17",
networks: {
linea: {
url: `https://linea-goerli.infura.io/v3/YOUR-INFURA-API-KEY`,
accounts: [PRIVATE_KEY],
},
},
};
```
Using the public endpoint:
```javascript
require("@nomicfoundation/hardhat-toolbox");
Expand All @@ -204,10 +224,4 @@ To deploy to Linea, we'll need to add the network to our `hardhat.config.js`. To
Next, you can optionally [verify your contract on the network](../verify-smart-contract/hardhat.md).
:::note

You may encounter rate limiting if you are connecting via the public endpoint. If your dapp needs full Infura node access, open a support ticket [here](https://support.infura.io/hc/en-us/articles/15116941373979).

:::

<!--markdown-link-check-enable -->
11 changes: 9 additions & 2 deletions docs/developers/useful-info.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,15 @@ If you want to drip Goerli ETH directly to Linea, you can use the [Infura Linea

## Faucets

If you want to drip Goerli ETH directly to Linea, find the [Infura Linea faucet here](https://infura.io/faucet/linea).
If you want to drip Goerli ETH directly to Linea, you can use the following faucets:

1. [Infura Linea faucet](https://infura.io/faucet/linea)
1. [Covalent Linea faucet](https://www.covalenthq.com/faucet/)
1. [FAUCETME faucet](https://linea.faucetme.pro/)
1. [Tatarot faucet](https://faucet.tatarot.ai/)

If you want to drip other tokens, you can find the [multi-token Linea faucet here](https://faucet.goerli.linea.build/), which lists the different tokens you can add to your wallet on the Goerli and Linea Goerli testnet.

You can find instructions on how to use the Linea faucet [here](../use-linea/fund.md).
You can find instructions on how to use the multi-token Linea faucet [here](../use-linea/fund.md).

Alternatively

1 comment on commit 350ad26

@vercel
Copy link

@vercel vercel bot commented on 350ad26 Jun 23, 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.