Skip to content

Commit

Permalink
Use SEPOLIA_RPC_URL instead of ACLHEMY_API_KEY
Browse files Browse the repository at this point in the history
  • Loading branch information
MattPereira committed May 17, 2024
1 parent 83a8f52 commit 25438dd
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 32 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Let's outline what this repo provides in more detail:

👀 Watch this video to quickly get started with the full stack development environment 👇

[![Getting Started Demo](https://github.com/Dev-Rel-as-a-Service/scaffold-balancer-v3/assets/73561520/ad988ac7-67a6-4dd4-8e12-18c2be2773ea)](https://www.loom.com/share/31cabf0568a845abadcbdbb0df416b20?sid=9b1176c7-5ee4-4feb-8b6e-c971721440a0)
[![Getting Started Demo](https://github.com/Dev-Rel-as-a-Service/scaffold-balancer-v3/assets/73561520/ad988ac7-67a6-4dd4-8e12-18c2be2773ea)](https://www.loom.com/share/31cabf0568a845abadcbdbb0df416b20?sid=9b1176c7-5ee4-4feb-8b6e-c971721440a0)

👀 Watch this video to get better acquainted with the smart contracts 👇

Expand Down Expand Up @@ -76,15 +76,15 @@ yarn install

#### 0.2.2 Set Environment Variables

Set a `DEPLOYER_PRIVATE_KEY`, referred to as 'DEPLOYER' throughout this README, `ALCHEMY_API_KEY`, and `ETHERSCAN_API_KEY` at the path `packagages/foundry/.env`
Set the following environment variables in a `packagages/foundry/.env` file

```
DEPLOYER_PRIVATE_KEY=0x...
ETHERSCAN_API_KEY=...
ALCHEMY_API_KEY=...
SEPOLIA_RPC_URL=...
```
- The `DEPLOYER_PRIVATE_KEY` needs to start with 0x and will be referred to as 'DEPLOYER' throughout this README
- The `ETHERSCAN_API_KEY` is used to conveniently verify contracts from the command line with `yarn verify`
- The `ALCHEMY_API_KEY` is used to power a bunch of rpc url aliases in the `foundry.toml`

The `DEPLOYER_PRIVATE_KEY` must start with `0x` and will be referred to as 'DEPLOYER' throughout this README. The `ETHERSCAN_API_KEY` is used to conveniently verify contracts from the command line with `yarn verify`

#### 0.2.3 Start Local Fork

Expand Down Expand Up @@ -401,7 +401,7 @@ This section will walk you through:
## 🏭 3.1: Creating the Custom Pool Factory
We will focus on creating the `CustomPoolFactoryExample.sol` contract. Let's focus on the constructor first.
We will focus on creating the `CustomPoolFactoryExample.sol` contract. Let's focus on the constructor first.
Listed here for easy reference, the constructor discussed can also be found [here](https://github.com/Dev-Rel-as-a-Service/scaffold-balancer-v3/blob/1bb9e662e1f94bba7f30b7ad2a50bcee17ad9232/packages/foundry/contracts/CustomPoolFactoryExample.sol#L22).
Expand Down Expand Up @@ -562,7 +562,7 @@ Cool, now we have these gotcha's understood with the script. We can move on to s

As seen in the beginning of this [README](#024-deploy-contracts), this repo comes with bash commands to deploy the discussed smart contracts on a local anvil fork of the Sepolia test network. For quick reference, here are the commands again:

> If you would like to change the network the local node is forking, [review this section.](https://github.com/Dev-Rel-as-a-Service/scaffold-balancer-v3/tree/dev#:~:text=0.3.4%20Changing%20The%20Frontend%20Network%20Connection)
> If you would like to change the network the local node is forking, [review this section.](https://github.com/Dev-Rel-as-a-Service/scaffold-balancer-v3/tree/dev#:~:text=0.3.4%20Changing%20The%20Frontend%20Network%20Connection)
To simulate deployment transactions on your local fork

Expand Down
2 changes: 1 addition & 1 deletion packages/foundry/.env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
DEPLOYER_PRIVATE_KEY=
ETHERSCAN_API_KEY=
ALCHEMY_API_KEY=
SEPOLIA_RPC_URL=
20 changes: 1 addition & 19 deletions packages/foundry/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,7 @@ fs_permissions = [{ access = "read-write", path = "./"}] # SE-2 default to allow
[rpc_endpoints]
default_network = "http://127.0.0.1:8545"
localhost = "http://127.0.0.1:8545"
mainnet = "https://eth-mainnet.alchemyapi.io/v2/${ALCHEMY_API_KEY}"
sepolia = "https://eth-sepolia.g.alchemy.com/v2/${ALCHEMY_API_KEY}"
arbitrum = "https://arb-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}"
arbitrumSepolia = "https://arb-sepolia.g.alchemy.com/v2/${ALCHEMY_API_KEY}"
optimism = "https://opt-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}"
optimismSepolia = "https://opt-sepolia.g.alchemy.com/v2/${ALCHEMY_API_KEY}"
polygon = "https://polygon-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}"
polygonMumbai = "https://polygon-mumbai.g.alchemy.com/v2/${ALCHEMY_API_KEY}"
gnosis = "https://rpc.gnosischain.com"
chiado = "https://rpc.chiadochain.net"
base = "https://mainnet.base.org"
baseGoerli = "https://goerli.base.org"
baseSepolia = "https://sepolia.base.org"
polygonZkEvm = "https://polygonzkevm-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}"
polygonZkEvmTestnet = "https://polygonzkevm-testnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}"
zkSyncTestnet = "https://testnet.era.zksync.dev"
zkSync = "https://mainnet.era.zksync.io"
scrollSepolia = "https://sepolia-rpc.scroll.io"
scroll = "https://rpc.scroll.io"
sepolia = "${SEPOLIA_RPC_URL}"


[etherscan]
Expand Down
2 changes: 1 addition & 1 deletion packages/foundry/script/DeployFactoryAndPool.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ contract DeployFactoryAndPool is ScaffoldETHDeploy, DeployPool {
);
}

// Deploy mock tokens. Remove this if using already deployed tokens and instead set the tokens above
// Deploy mock tokens. Remove this if using already deployed tokens
vm.startBroadcast(deployerPrivateKey);
(address mockToken1, address mockToken2) = deployMockTokens();
vm.stopBroadcast();
Expand Down
6 changes: 3 additions & 3 deletions packages/nextjs/contracts/deployedContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { GenericContractsDeclaration } from "~~/utils/scaffold-eth/contract";
const deployedContracts = {
31337: {
MockToken1: {
address: "0x63bD53efc26cdA2cA9d7101cDB26e8808bFE95a9",
address: "0xC7A49f9D6A7AcD951f604e7838C51B451b5244f2",
abi: [
{
type: "constructor",
Expand Down Expand Up @@ -360,7 +360,7 @@ const deployedContracts = {
},
},
MockToken2: {
address: "0x8400A3A4CFdF3dDC12Ba45bA3DAE3381D206EC5e",
address: "0x579bB3a775c831526D5E94EF9ccd6601F62790Bc",
abi: [
{
type: "constructor",
Expand Down Expand Up @@ -713,7 +713,7 @@ const deployedContracts = {
},
},
CustomPoolFactoryExample: {
address: "0xA253c3212628FE3E380a042Cc2Ac57c0bdebadd4",
address: "0x3626DEff4AFB3Acd8f217288cd33FBE3a337Ce0B",
abi: [
{
type: "constructor",
Expand Down

0 comments on commit 25438dd

Please sign in to comment.