Bitcoin Precompiles

Overview

A blockchain precompile refers to a set of special, predefined functions built into the blockchain client software. These precompiles are available to blockchain developers via smart contract calls and can be used for a variety of use cases.

The common use case for these features in an EVM execution clients is to perform complex cryptographic operations such as hashing, digital signature verification, and mathematical operations.

On Sova we have created our own set of "Bitcoin precompiles". These precompiles have the ability to interact with the Bitcoin network via and rpc connection to a full Bitcoin node. Every node connected to the Sova Network is responsible for running a full Bitcoin node for the purpose of validating the chain and also broadcasting Bitcoin transactions if necessary.

Technical Details

Essentially a precompile is a "pre-deployed" contract on the Sova blockchain and at the genesis of the chain, the precompile is apart of every validator. Each Bitcoin precompile address on Sova accepts a bytes payload.

Name
Address
Data (bytes)
Description

sendrawtransaction

0x999

Signed raw transaction data

Sends a raw Bitcoin transaction

decoderawtransaction

0x998

Signed raw transaction data

Decode a raw Bitcoin transaction

convertaddress

0x997

EVM address

Converts a Sova address to corresponding BTC address

Smart Contracts

When writing smart contracts for the Sova Network you can import SovaNetwork/contracts as a dependency in your smart contract:

import {SovaBitcoin} from "@sova-network/src/lib/SovaBitcoin.sol";

Last updated