#solidity #staking #ethereum #tangle

tnt-core-bindings

Rust bindings for TNT Core Solidity contracts (Tangle staking protocol)

30 releases (8 breaking)

new 0.10.6 Mar 27, 2026
0.10.4 Feb 24, 2026
0.5.0 Dec 31, 2025

#8 in #tangle

Download history 5/week @ 2025-12-04 5/week @ 2025-12-11 11/week @ 2026-01-08 62/week @ 2026-01-15 98/week @ 2026-01-29 215/week @ 2026-02-05 346/week @ 2026-02-12 165/week @ 2026-02-19 317/week @ 2026-02-26 168/week @ 2026-03-05 59/week @ 2026-03-12 290/week @ 2026-03-19

892 downloads per month

MIT/Apache

9.5MB
187K SLoC

tnt-core-bindings

Rust bindings for TNT Core Solidity contracts, generated using Alloy.

Installation

[dependencies]
tnt-core-bindings = "0.1"

Usage

use alloy::providers::ProviderBuilder;
use tnt_core_bindings::{ITangle, IMultiAssetDelegation};

#[tokio::main]
async fn main() -> eyre::Result<()> {
    let provider = ProviderBuilder::new()
        .on_builtin("https://rpc.tangle.tools")
        .await?;

    // Interact with the Tangle contract
    let tangle = ITangle::new(tangle_address, &provider);
    let blueprint = tangle.getBlueprint(0.into()).call().await?;
    println!("Blueprint owner: {:?}", blueprint.owner);

    // Interact with MultiAssetDelegation interface (facet ABI)
    let mad = IMultiAssetDelegation::new(mad_address, &provider);
    let operator = mad.operators(operator_address).call().await?;
    println!("Operator stake: {:?}", operator.stake);

    Ok(())
}

Available Bindings

Contract Description
ITangle Main Tangle protocol interface (blueprints, services, jobs)
ITangleFull Full Tangle surface (includes slashing + admin)
ITangleBlueprints Blueprint registration and management
ITangleServices Service lifecycle management
ITangleJobs Job submission and results
ITangleOperators Operator registration and status
ITangleSlashing Slashing mechanism
ITangleRewards Reward distribution
IMultiAssetDelegation Multi-asset staking and delegation (facet ABI)
MultiAssetDelegation Router/diamond management ABI
IBlueprintServiceManager Blueprint service manager interface
IOperatorStatusRegistry Operator status tracking

Raw ABIs

JSON ABIs are available for downstream tooling:

use tnt_core_bindings::abi;

// Access raw ABI JSON strings
let tangle_abi = abi::ITANGLE;
let tangle_full_abi = abi::ITANGLE_FULL;
let mad_abi = abi::IMULTI_ASSET_DELEGATION;

Version Tracking

Each release is tied to a specific TNT Core commit:

use tnt_core_bindings::TNT_CORE_VERSION;

println!("Built from commit: {}", TNT_CORE_VERSION);

Regenerating Bindings

To regenerate bindings from the Solidity source:

cargo xtask gen-bindings

This requires Foundry to be installed.

License

Licensed under either of:

at your option.

Contributing

Contributions are welcome! Please see the main repository for contribution guidelines.

Dependencies

~54MB
~1M SLoC