LogoLogo
HomeBlogApp
nBTC Docs
nBTC Docs
  • Integrating nBTC via IBC
  • Integrating nBTC on EVM
Powered by GitBook
On this page
  • Contract Addresses
  • Interchain Deposits
  • Withdrawing to Bitcoin
Edit on GitHub

Integrating nBTC on EVM

Nomic supports bridging Bitcoin to EVM-based chains.

Contract Addresses

Nomic's decentralized custody bridging contract can be found at the following contract addresses:

Network
Bridge Contract Address

Ethereum Mainnet

Ethereum Sepolia

Ethereum Holešky

Berachain bArtio

nBTC on EVM-based chains is issued as an ERC-20 token at the following contract addresses:

Network
Token Contract Address

Ethereum Mainnet

Ethereum Sepolia

Ethereum Holešky

Berachain bArtio

Additional network contract addresses will be listed on here in the future, as well as documentation for creating your own customizable deployments in any EVM environment.

Interchain Deposits

Interchain Deposits allow the generation of Bitcoin addresses which commit to a destination on an EVM-based chain, automatically forwarding any received funds as nBTC to a contract on that chain.

The EVM destination may be either:

  • an Ethereum address to receive the nBTC;

  • a contract call to be executed with the received nBTC.

Withdrawing to Bitcoin

Bitcoin may be withdrawn to a Bitcoin address directly via contract calls on EVM-based chains.

First, approve must be called on the token contract (see above table):

web3.eth.abi.encodeFunctionCall({
    name: 'approve',
    type: 'function',
    inputs: [
    {
        type: 'address',
        name: 'spender'
    },
    {
        type: 'uint256',
        name: 'amount'
    }
    ]
}, [tokenContractAddress, usatAmount]);

Next, initiate the withdrawal to a Bitcoin address with a call to the bridge contract:

import { buildDestination } from 'nomic-bitcoin'

let destination = buildDestination({
    bitcoinAddress: 'tb1...'
})

web3.eth.abi.encodeFunctionCall({
    name: 'sendToNomic',
    type: 'function',
    inputs: [
    {
        type: 'address',
        name: '_tokenContract'
    },
    {
        type: 'string',
        name: '_destination'
    },
    {
        type: 'uint256',
        name: '_amount'
    }
    ]
}, [tokenContractAddress, destination, usatAmount]);

Last updated 4 months ago

Interchain Deposits require communication with . The set of relayers used by your front-end should be selected with care.

See for more information on generating and displaying Bitcoin deposit addresses.

nomic-bitcoin-js
0xef0adb7bb6a97b037412946e4cb25d17836f6faa
0x794bdA49337C667ED03265618821b944Ed11bcED
0x936366c13b43Ab6eC8f70A69038E9187fED0Cd1e
0xea55b1E6df415b96C194146abCcE85e6f811CAb7
0x26a5eba128b5523bb7380f6a42c6c236cd9bdc12
0xA229EaE06B1F8137461A9D309478da3C8d910E53
0x54360db096a2cb43b411f89a584da69a7bac0663
0x45a1947cb7315ce9c569b011a6dee4f67813bb75
Bitcoin relayers