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(docs): use infura rpc #179

Merged
merged 1 commit into from
Jun 23, 2023
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
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