This guide walks you through deploying a smart contract on the Babylon blockchain. The example contract we'll deploy is a storage contract that allows saving data with Bitcoin timestamps and verifying Bitcoin finalization status.
Before starting, ensure you have installed:
First, clone the repository containing the Babylon smart contract code. The repository includes submodules for Babylon core and contract dependencies.
Clone and update the submodules:
git submodule update --init --recursive
This command initializes and fetches all necessary submodule code: babyon
binary and storage_contract
. It might take a few minutes to complete as close to 1GB of data will be downloaded.
The Babylond CLI is your primary tool for interacting with the Babylon blockchain.
Verify your Rust installation first:
cargo --version
# Expected output similar to:
cargo 1.84.1 (66221abde 2024-11-19)
Build and install the CLI:
cd babylon
make install
Verify the installation:
babylond version
# Should output a version hash similar to:
main-112821536b0ada40aa29e34b53206f56c61bf631