The command "mkdir blast" will create a directory named "blast" within your current working directory. The second command will alter your current working directory to the newly created "blast" directory.
mkdir blast && cd blast
Clone Blast-IO Deployment Repository
The Blast deployment repository contains the necessary Docker Compose Configurations. We will obtain the Deployment repository while within our "blast" directory.
The commands "git clone git@github.com:blast-io/deployment.git" or
"git clone https://github.com/blast-io/deployment.git" will download the repository.
The command "cd deployment" will change your current working directory to the deployment directory.
# Download Deployment Repository using SSH
git clone git@github.com:blast-io/deployment.git
cd deployment
# If you receive errors running "git clone git@github.com:blast-io/deployment.git"
# You can download it this way instead
git clone https://github.com/blast-io/deployment.git
cd deployment
Create .env file
sudo nano .env
Paste the following into your newly created .env file.
# NETWORK should be mainnet or sepolia
NETWORK={YOUR_NETWORK} # Set to either mainnet or sepolia
GETH_DATA_DIR=blast-get-data # The path where you want to store blockchain data
L1_RPC_URL={YOUR_RPC_ENDPOINT_URL} # L1 node RPC endpoint URL
L1_RPC_KIND={YOUR_RPC_KIND} # Type of RPC provider (alcehmy, infura, any, etc)
OP_NODE_L1_BEACON={YOUR_L1_BEACON_API} # Your L1 Beacon api endpoint
Start Docker Containers
docker compose up -d
This pulls the latest version of the pre-built Docker images and starts the necessary containers.
Query Blast Node
curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' http://localhost:8545
# The response should resemble the following:
{"jsonrpc":"2.0","id":1,"result":"0xcab5ab"}