Deploying smart contracts to L2
For this section, let’s deploy a smart contract to the Arbitrum blockchain. But you’ll deploy it to an Arbitrum testnet blockchain. At the time of this writing, there are two Arbitrum testnet blockchains. They are the Arbitrum Goerli blockchain and the Arbitrum Sepolia blockchain.
You’ll still need to use the same tool that you’ve used in previous chapters, which is the Ape Framework. Follow these steps:
- Let’s install the framework:
$ python3 -m venv .venv $ source .venv/bin/activate (.venv) $ pip install eth-ape'[recommended-plugins]'==0.7.23
- This time, you add extra plugins because you use Arbitrum and Infura, which is the provider for connecting to the Arbitrum Sepolia testnet blockchain:
(.venv) $ pip install ape-infura ape-arbitrum
- Then, you initialize the project directory:
(.venv) $ mkdir arbitrum (.venv) $ cd arbitrum (.venv) $ ape init
You can fill in ArbitrumContract
as the name...