✍️ Providers & Signers
The frontend has three different providers that provide different levels of access to different chains:
localProvider: local HardHat accounts, used to read from your contracts (
.envfile points you at testnet or mainnet). We use
ethers.providers.StaticJsonRpcProviderwhen instantiating providers from RPCs where we are confident that the chainId won't change to save on network calls :)
These providers can be found in
A Signer in ethers is an abstraction of an Ethereum Account, which can be used to sign messages and transactions and send signed transactions to the Ethereum Network to execute state changing operations.
Scaffold-eth now uses signers for user operations, either using
injectedProvider.getSigner(), or using a Burner Signer created and stored in localStorage (all handled by the
Scaffold-eth supports connecting with Coinbase Wallet and signing transactions with it.
See it in action here: