Deploying a smart contract to the Sepolia testnet
We learned how to deploy a smart contract to the Goerli testnet in the last section. It should now be easy for us to deploy to the Sepolia testnet. Instead of filling in the configuration for the Goerli testnet, we just need to replace infuraEndPoint
in truffle-config.js
with the endpoint for Sepolia from Infura:
Figure 13.15 – Sepolia network endpoint
The code to replace infuraEndPoint
in truffle-config.js
is as follows:
const infuraEndPoint = 'https://sepolia.infura.io/v3/adb0dd5eb27a422cb47db30c75395370';
Also, update the chain ID for Sepolia to 11155111
as shown in the following screenshot:
Figure 13.16 – Sepolia configurations in truffle-config.js
For more dev
resources for Sepolia, we can check the following site: https://sepolia.dev.
Let’s deploy again, via the Truffle for VS Code extension or using the following command:
truffle...