Glued Tools is a complete development toolkit for building smart contracts that interact with Glue Protocol. Whether you're creating a router, aggregator, yield strategy, lending protocol, or any DeFi application that works with glued assets, Glued Tools provides all the helper functions you need without requiring deep knowledge of Glue's internals.

Choose your version:

How to implement Glued Tools

Import to your project the Glue Expansions Pack

To implement the Expansions Pack you can go on Github or easily install via npm

npm install @glue-finance/expansions-pack

After importing Expansions Pack to your project, choose which version to import based on your needs:

// OPTION 1: Full ERC20 + ERC721 support
import {GluedTools} from "@glue-finance/expansions-pack/base/GluedTools.sol";

contract MyRouter is GluedTools {
    // Your code here - you now have access to all helper functions
}

// OPTION 2: ERC20-only (smaller bytecode, lower deployment cost)
import {GluedToolsERC20} from "@glue-finance/expansions-pack/base/GluedToolsERC20.sol";

contract MyYieldStrategy is GluedToolsERC20 {
    // Your code here - optimized for fungible tokens only
}

🎉 Congratulations! You've successfully implemented Glued Tools! Here are all the advantages you now have access to:

🆚 GluedTools vs GluedToolsERC20

Feature GluedTools GluedToolsERC20
ERC20 support
ERC721 support
ETH support
Batch transfers ✅ (with NFT support) ✅ (simpler API)
_handleExcess
fungible parameter Required Not needed

Use GluedTools when:

Use GluedToolsERC20 when: