ProductPromotion
Logo

Rust

made by https://0x3d.site

GitHub - interlay/interbtc: interBTC: Bitcoin Anywhere
interBTC: Bitcoin Anywhere. Contribute to interlay/interbtc development by creating an account on GitHub.
Visit Site

GitHub - interlay/interbtc: interBTC: Bitcoin Anywhere

GitHub - interlay/interbtc: interBTC: Bitcoin Anywhere

Table of Contents

About the Project

The interBTC project is a modular and programmable layer to bring Bitcoin to the multi-chain ecosystem. It includes:

Built with

The interBTC project is built with:

Structure

Runtime

The Substrate runtime configuration is in the parachain folder.

  • Interlay: The Interlay runtime configuration.
  • Kintsugi: The Kintsugi canary network runtime configuration.
  • Common: Common runtime configuration for Interlay and Kintsugi.

Test networks are build from the mainnet runtimes and have no dedicated runtimes.

Crates

The chain makes use of various custom pallets that are found in the crates folder.

  • annuity: Block rewards for stake-to-vote and vaults.
  • bitcoin: Library for Bitcoin type, parsing and verification functions.
  • btc-relay: Stateful SPV client for Bitcoin. Stores Bitcoin main chain, tracks forks, verifies Merkle proofs and validates specific transaction formats.
  • clients-info: Stores current and future interbtc-client software releases.
  • collator-selection: Decentralized sequencers (collators) for the chain.
  • currency Handles currencies (e.g. DOT/KSM/IBTC).
  • democracy: Optimistic governance fork of pallet-democracy.
  • dex-general: Uniswap v2-style AMM implementation.
  • dex-stable: Curve v1-style AMM implementation.
  • dex-swap-router: Swap router for the AMMs.
  • escrow: Rust implementation of Curve's Voting Escrow contract.
  • farming: Farming module for AMM liquidity mining.
  • fee: Participant reward calculation and distribution.
  • issue: Handles issuing of interBTC for BTC on Bitcoin.
  • loans: Compound v2-style money market implementation.
  • multi-transaction-payment: Pay assets other than the native one for transaction fees.
  • nomination: Interface for vault nomination.
  • oracle: Trusted providers use this to set exchange rates and Bitcoin fee estimates.
  • redeem: Handles redeeming of interBTC for BTC on Bitcoin.
  • replace: Handles replacing vaults.
  • reward: Scalable reward distribution.
  • security: Handles status and error changes.
  • staking: Core logic for vault nomination and slashing.
  • supply: Token minting and inflation.
  • tx-pause: Handles pausing of transactions.
  • vault-registry: Handles registration, collateral and liquidation of vaults.

Getting started

Prerequisites

curl https://sh.rustup.rs -sSf | sh

Please also install the following dependencies:

  • cmake
  • clang (>=10.0.0)
  • clang-dev
  • libc6-dev
  • libssl-dev

Installation

Building requires a specific rust toolchain and nightly compiler version. The requirements are specified in the ./rust-toolchain.toml override file.

Running rustup show from the root directory of this repo should be enough to set up the toolchain and you can inspect the output to verify that it matches the version specified in the override file.

To build, run:

cargo build

For more detailed development instructions see here.

Testing

cargo test --features runtime-benchmarks

To run with coverage, using cargo-cov:

cargo install cargo-cov

# clean up previous coverage result
cargo cov clean

# test the code
cargo cov test

# open the coverage report
cargo cov report --open

Running

To run a local development node, use the dev chain spec.

cargo run --release --bin interbtc-parachain -- --dev

To connect with a local relay-chain follow these instructions.

Development node

Running a development can be achieved without compiling the node with docker and instant-seal. Replace the release version with one of the available tags:

docker run --network=host interlayhq/interbtc:RELEASE_TAG --dev --instant-seal
#  Example
docker run --network=host interlayhq/interbtc:1.25.0-rc5 --dev --instant-seal

Test Coverage

Test coverage reports available under docs/testcoverage.html

Javascript / Typescript

Either use the polkadot.js API or checkout interbtc-api for a TypeScript SDK.

Contributing

If you would like to contribute, please file an issue on GitHub or reach out to us.

License

interBTC is licensed under the terms of the Apache License (Version 2.0). See LICENSE

Contact

Linktree: Linktree

Website: interlay.io

Twitter: @interlayHQ

Discord: Discord

Telegram: Telegram

Acknowledgements

This project is supported by a Web3 Foundation grant and the Substrate Builders Program.

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory