Deploy the Blobstream contract
The deploy is a helper command that allows deploying the Blobstream smart contract to a new EVM chain:
blobstream deploy --help
Deploys the Blobstream contract and initializes it using the provided Celestia chain
Usage:
blobstream deploy <flags> [flags]
blobstream deploy [command]
Available Commands:
keys Blobstream keys managerblobstream deploy --help
Deploys the Blobstream contract and initializes it using the provided Celestia chain
Usage:
blobstream deploy <flags> [flags]
blobstream deploy [command]
Available Commands:
keys Blobstream keys managerHow to run
Install the Blobstream binary
Make sure to have the Blobstream binary installed. Check the Blobstream binary page for more details.
Add keys
In order to deploy a Blobstream smart contract, you will need a funded EVM address and its private key. The keys command will help you set up this key:
blobstream deploy keys --helpblobstream deploy keys --helpTo import your EVM private key, there is the import subcommand to assist you with that:
blobstream deploy keys evm import --helpblobstream deploy keys evm import --helpThis subcommand allows you to either import a raw ECDSA private key provided as plaintext, or import it from a file. The files are JSON keystore files encrypted using a passphrase like in this example.
After adding the key, you can check that it's added via running:
blobstream deploy keys evm listblobstream deploy keys evm listFor more information about the keys command, check the keys documentation.
Deploy the contract
Now, we can deploy the Blobstream contract to a new EVM chain:
blobstream deploy \
--evm.chain-id 4 \
--evm.contract-address 0x27a1F8CE94187E4b043f4D57548EF2348Ed556c7 \
--core.grpc.host localhost \
--core.grpc.port 9090 \
--starting-nonce latest \
--evm.rpc http://localhost:8545blobstream deploy \
--evm.chain-id 4 \
--evm.contract-address 0x27a1F8CE94187E4b043f4D57548EF2348Ed556c7 \
--core.grpc.host localhost \
--core.grpc.port 9090 \
--starting-nonce latest \
--evm.rpc http://localhost:8545The latest can be replaced by the following:
latest: to deploy the Blobstream contract starting from the latest validator set.earliest: to deploy the Blobstream contract starting from genesis.nonce: you can provide a custom nonce on where you want Blobstream to start. If the provided nonce is not aValsetattestation, then the one before it will be used to deploy the Blobstream smart contract.
And, now you will see the Blobstream smart contract address in the logs along with the transaction hash.