3

Connect wallet to testnet

For the purposes of our demo, we are going to complete all operations on Testnet. Mainnet is real. You are transacting with real currencies etc. On Testnet is a sandbox environment and duplicate of Mainnet. As the name suggests, it provides developers with a sandbox environment to test code.

4

Fund Wallet

Since it’s a testnet, funds are free. However, since we are simulating a real environment, actions on-chain will still require gas. That is why we need to fund in. Take your Sepolia public address and put it into Google Web3 Faucet

5

Grab private key

Walkthrough on where to grab your private keys

6

Create env file in Foundry project

It’s good practice to keep sensitive info such as private keys hidden in env files.

PRIVATE_KEY=<YOUR_PRIVATE_KEY>
7

Wallet Private Key

Your private keys are used to sign transactions on the blockchain. When we are deploying a contract on-chain, we are the ones signing off on this action.

8

RPC Node

RPC nodes act as the bridge between your code and the actual blockchain. We can get a free one right here.

PRIVATE_KEY=<YOUR_PRIVATE_KEY>
RPC_URL=https://ethereum-sepolia-rpc.publicnode.com

Now lets run source .env to update your load your env file into your project

source .env