Optimism is a layer 2 scaling solution powered by a technology called Optimistic rollups, which bundle large amounts of transaction data into digestible batches. Optimism is much cheaper to use than Ethereum, and it’s increasingly becoming popular along with other layer 2 solutions, such as Arbitrum.
The purpose of this guide is to help you connect your MetaMask Wallet to Optimism network via a custom RPC endpoint.
Briefly on Optimism?
Optimism is a Layer 2 Optimistic Rollup network designed to utilize the strong security guarantees of Ethereum while reducing its cost and latency. It offers a scalable solution to the Ethereum network, which helps increase the speed of transactions on Ethereum without jeopardizing decentralization and security.
Optimism uses rollups to process transactions in batches, which helps reduce gas fees and network congestion. Rollups can help users save up to 100 times the gas fee, compared to the Layer 1 protocol. Optimism rollups are optimistic because every transaction is assumed to be valid on Optimism’s Layer 2, and no computations are performed.
Optimism puts all transaction data on-chain and runs computation off-chain, increasing Ethereum’s transactions per second and decreasing transaction fees. It helps reduce the transaction fee and transaction time on the Ethereum blockchain.
Briefly on MetaMask
MetaMask on the other hand is a popular crypto wallet that can get you connected to different blockchains and decentralized platforms.
Using MetaMask to gain entry to various blockchain networks, provides you with quick transactions and lower fees through its decentralized applications (dapps) and its decentralized finance (DeFi) platform.
To manage your assets on Optimism you need a wallet to interact with the blockchain. Here are the steps to add optimism to MetaMask Chrome Extension.
Step 1. Install MetaMask Extension on Chrome
Click the [Add to Chrome] button & you should have your wallet installed.
Once you’ve installed MetaMask, it will appear as an extension and can be easily accessed through “Settings” on Google Chrome where you can pin the wallet extension for ease of access.
Step 2. Login to your MetaMask Wallet.
In order to log in, click on the MetaMask Chrome extension, enter your password, and click on [Unlock].
Step 3: Add Optimism network on MetaMask
The next step is to add Optimism network on MetaMask wallet after you're logged in. Open the MetaMask wallet on a new browser tab by simply clicking on the MetaMask logo on the top right extension area.
Click the three dots (...) in the top-right and select the “Expand view”.
By clicking on “Expand view” you will be able to interact with your MetaMask wallet interface on a larger screen.
In order to add a new chain network or switch between different blockchain networks, you will need to click on the network tab which by default will show "Ethereum Mainnet" on the top right-hand corner.
Click on Add Network in order to add Optimism network to MetaMask Wallet.
Now you should be able to provide all the required Optimism network details.
This includes the network name, New RPC URL, Chain ID, Currency Symbol, and block explorer URL. Simply copy and paste the required chain info from the information below.
Optimism mainnet chain info:
Network Name: Optimism New RPC URL: https://mainnet.optimism.io Chain ID: 10 Currency Symbol: ETH Block Explorer URL: https://optimistic.etherscan.io/
Optimism testnet chain info:
Network Name: Optimism Kovan Testnet New RPC URL: https://opt-kovan.g.alchemy.com/v2/your-api-key Chain ID: 69 Currency Symbol: ETH Block Explorer URL: *https://kovan-optimistic.etherscan.io/
After entering all the required details, simply select “Save”. You will be redirected to your wallet where you will see Optimism network added.