TaifoonTAIFOON
TaifoonTAIFOON
TAIFOON-ECO — SMART CONTRACT LIBRARY
06TAIFOON SDK

Taifoon SDK
Contract Library

TL;DR
taifoon-sdk is a production-ready Solidity library for building cross-chain applications on Taifoon's proof layer. Includes ProofVerifier, UniMessenger, oracle contracts, and DeFi primitives. Proof verification from ~45k gas. MIT-licensed.
Drop into any Solidity project to access purpose-built contracts for cross-chain bridges, lending collateral, DEX primitives, and oracle feeds. Each contract integrates directly with the V5 Proof API and is deployable on any of the 41 supported chains.
Key Benefits
Plug-and-Play
Drop-in contracts for common cross-chain patterns
Gas Optimized
Verification from ~45k gas
Open Source
MIT license, fork-friendly
01 — Installation
npm install @taifoon/eco # or yarn add @taifoon/eco
GitHub Repository
github.com/taifoon/taifoon-sdk
02 — Contract Categories
MESSAGING
Cross-Chain Messaging
Send and verify messages between chains
ORACLES
Oracle Contracts
Gas prices, finality, TWAP feeds
DEFI
DeFi Primitives
Swaps, lending, yield aggregation
SECURITY
Security Utilities
ProofGuard, ChainRegistry, FeeManager
03 — ProofVerifier.sol

Core verification contract for validating V5 proofs on-chain.

// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; interface IProofVerifier { struct V5Proof { uint256 chainId; uint256 blockNumber; bytes32 blockHash; bytes32 rootHash; bytes32[] peaks; bytes32[] siblings; } function verifyBlockProof( uint256 chainId, uint256 blockNumber, bytes32 blockHash, bytes calldata proofData ) external view returns (bool); function verifyTransactionProof( uint256 chainId, uint256 blockNumber, bytes32 txHash, bytes calldata proofData ) external view returns (bool); function getLatestVerifiedBlock(uint256 chainId) external view returns (uint256); }
Deployment Addresses
Currently deployed on devnet only. Mainnet deployment addresses will be published here on launch.
Usage Example
import "@taifoon/eco/ProofVerifier.sol"; contract CrossChainBridge { IProofVerifier public verifier; constructor(address _verifier) { verifier = IProofVerifier(_verifier); } function deposit( uint256 sourceChainId, uint256 blockNumber, bytes32 blockHash, bytes calldata proof, address recipient, uint256 amount ) external { // Verify the block proof require( verifier.verifyBlockProof( sourceChainId, blockNumber, blockHash, proof ), "Invalid block proof" ); // Extract and verify transaction data from the block // (implementation depends on your use case) // Process deposit _mint(recipient, amount); } }
04 — Gas Costs
Function
Gas Cost
verifyBlockProof
from ~45,000 gas
verifyTransactionProof
from ~52,000 gas
Estimated gas usage; actual costs vary by chain, calldata size, and execution context.