From 07ef633d1193f9305ed9d00e44383fef7219984a Mon Sep 17 00:00:00 2001 From: emilyjlin95 <17280653+emilyJLin95@users.noreply.github.com> Date: Fri, 23 Jun 2023 16:21:15 -0400 Subject: [PATCH] docs(docs): use infura rpc --- .../deploy-smart-contract/foundry.md | 16 ++++++----- .../deploy-smart-contract/hardhat.md | 28 ++++++++++++++----- docs/developers/useful-info.md | 11 ++++++-- 3 files changed, 39 insertions(+), 16 deletions(-) diff --git a/docs/developers/quickstart/deploy-smart-contract/foundry.md b/docs/developers/quickstart/deploy-smart-contract/foundry.md index ffbf85ea8..9ebbd243c 100644 --- a/docs/developers/quickstart/deploy-smart-contract/foundry.md +++ b/docs/developers/quickstart/deploy-smart-contract/foundry.md @@ -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 @@ -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). - -::: diff --git a/docs/developers/quickstart/deploy-smart-contract/hardhat.md b/docs/developers/quickstart/deploy-smart-contract/hardhat.md index 5294be393..81241d1d1 100644 --- a/docs/developers/quickstart/deploy-smart-contract/hardhat.md +++ b/docs/developers/quickstart/deploy-smart-contract/hardhat.md @@ -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"); @@ -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). - -::: - diff --git a/docs/developers/useful-info.md b/docs/developers/useful-info.md index 5e0b73f27..a9bc92e4c 100644 --- a/docs/developers/useful-info.md +++ b/docs/developers/useful-info.md @@ -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