BVS Onboarding
This page describes how to create a BVS, and register it in SatLayer to an operator for it to be validated. You can participate even now You can experiment with this functionality on SatLayer's testnet now. SatLayer's testnet exists as a set of smart contracts on top of Babylon's own testnet.
The following guide will take you through the process of creating a BVS address, registering it in SatLayer, and registering an operator to validate it.
1) Generate an address via a wallet app such as Keplr.
2) Instantiate your address as a signer
const chainId = "bbn-test-5";
const endpoint = "https://babylon-testnet-rpc.nodes.guru";
import { GasPrice } from "@cosmjs/stargate";
import { SigningCosmWasmClient } from "@cosmjs/cosmwasm-stargate";
import { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing";
import { stringToPath } from "@cosmjs/crypto";
const gasPrice = GasPrice.fromString("0.002000ubbn");
// create signer object using mnemonic phrase you created in Keplr
const signer = await DirectSecp256k1HdWallet.fromMnemonic("[YOUR MNEMONIC PHRASE]", {
prefix: "bbn",
});
const client = await SigningCosmWasmClient.connectWithSigner(endpoint, signer, { gasPrice });
3) Register your service in the registry
const registry = "bbn1a9tleevqygn862ll2la49g637fjttfzzlttdrmmua35fadpuvnksuyud7a";
const executeMsg = {
register_as_service: {
metadata: {
name: "[YOUR SERVICE NAME]",
uri: "[YOUR SERVICE URI]"
}
}
};
await client.execute("[YOUR SERVICE ADDRESS]", registry, executeMsg, "auto");
4) Link your service to an operator to enable that operator to begin validating your service (the operator will need to link to your service as well).
const executeMsg = {
register_operator_to_service: {
operator: "[OPERATOR ADDRESS]"
}
}
await client.execute("[YOUR SERVICE ADDRESS]", registry, executeMsg, "auto");
5) Once your BVS is registered, you can reward registered operators and their stakers using the methodology described here.
Last updated
Was this helpful?