npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

biblioteca

v0.0.10

Published

![](https://raw.githubusercontent.com/FilosofiaCodigo/Biblioteca/master/img/header.png)

Downloads

49

Readme

workflow

Maximize interoperability for your smart contracts with the integrations library for decentralized protocols.

📜 Contracts

| Origin | Contract | Released | Unit Tests | Audit | |-----|----------|-----------|------------|-------| | | Uniswap V2 Fee Token | ✔ | ✔ | ❌ | | | Uniswap V2 AutoSwap Token | ✔ | ✔ | ❌ | | | Balancer V2 Fee Token | ✔ | ✔ | ❌ | | | Uniswap V3 Fee Token | ✔ | ✔ | ❌ | | | OpenZeppelin NFT Collection | ✔ | ❌ | ❌ | | | Azuki NFT Collection | ✔ | ❌ | ❌ | | | Aave Interface | ❌ | ❌ | ❌ | | | Sudoswap Interface | ❌ | ❌ | ❌ |

🤔 Why Biblioteca?

Our ultimate goal is to simplify access to information and bring people together through web3. That's why we are so passionate about building a library that connects people and protocols. We encourage you to experiment with the library yourself by launching the examples or to study the underliying prococols by exploring the Unit Tests. If you would like to contribute, PRs are welcome!

🛡️ Running Tests & Coverage

npx hardhat test
npx hardhat coverage

🗎 Generate Documentation

npx hardhat docgen

📝 Take note

  • This contracts are based on OpenZeppelin libraries but changed private variables to internal for flexibility
  • All contracts are Ownable
  • All percentage numbers are 2 digit decimals (e.g. 150 percent is 1.5%)

⚠️ Important!

Many libraries are not audited. Use at your own risk! Also, PRs and upstream changes very welcome.

🪙 ERC20 Tokens

Uniswap V2 Fee Token

ERC20 token that takes fees on P2P, buy and sell on Uniswap V2 and transfer them to a Vault.

// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

import "biblioteca/contracts/ERC20/UniswapV2FeeToken.sol";

contract MyUniswapV2FeeToken is UniswapV2FeeToken
{
    constructor() UniswapV2FeeToken(
        "My Token", "MTKN",                         // Name and Symbol
        1_000_000_000 ether,                        // 1 billion supply
        100, 200, 50,                               // Fees: 1% buy 2% sell 0.5% P2P
        msg.sender,                                 // Fee Receiver
        0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, // Router Address: Uniswap V2
        0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48) // Base Token Address: USDC
    {
    }
}

See full API documentation.

Uniswap V2 AutoSwap Token

ERC20 token that takes fees on P2P, buy and sell on Uniswap V2, converts them to Base Tokens and transfer them to a Vault.

// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

import "biblioteca/contracts/ERC20/UniswapV2AutoSwapToken.sol";

contract MyUniswapV2AutoSwapToken is UniswapV2AutoSwapToken
{
    constructor() UniswapV2AutoSwapToken(
        "My Token", "MTKN",                         // Name and Symbol
        1_000_000_000 ether,                        // 1 billion supply
        100, 200, 50,                               // Fees: 1% buy 2% sell 0.5% P2P
        msg.sender,                                 // AutoSwap Receiver
        0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, // Router Address: Uniswap V2
        0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48, // Base Token Address: USDC
        100)                                        // 1% in tokens before swap percent
    {
    }
}

See full API documentation.

Balancer V2 Fee Token

ERC20 token that takes fees on P2P, buy and sell on Balancer and transfer them to a Vault.

// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

import "biblioteca/contracts/ERC20/BalancerV2FeeToken.sol";

contract MyBalancerFeeToken is BalancerV2FeeToken
{
    constructor() BalancerV2FeeToken(
        "My Token", "MTKN",     // Name and Symbol
        1_000_000_000 ether,    // 1 billion supply
        100, 200, 50,           // Fees: 2% buy 1% sell 0.5% P2P
        msg.sender)             // Fee Receiver
    {
    }
}

See full API documentation.

Uniswap V3 Fee Token

ERC20 token that takes fees on P2P, and buy on Uniswap V3 and transfer them to a Vault.

// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

import "biblioteca/contracts/ERC20/UniswapV3FeeToken.sol";

contract MyUniswapV3FeeToken is UniswapV3FeeToken
{
    constructor() UniswapV3FeeToken(
        "My Token", "MTKN",                         // Name and Symbol
        1_000_000_000 ether,                        // 1 billion supply
        100, 200,                                   // Fees: 1% buy 2% P2P
        msg.sender,                                 // Vault Address
        0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2, // Base token: WETH
        1000)                                       // Initial rate: 1 WETH = 1000 tokens
    {
    }
}

See full API documentation.

🖼️ NFT Collections

OpenZeppelin NFT Collection

NFT collection with a mint price and max supply. Uses OpenZeppelin library wich is more adopted and save transfer gas fees compared to Azuki's ERC721a.

// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

import "biblioteca/contracts//ERC721/OpenZeppelinNFTCollection.sol";

contract MyOpenZeppelinNFTCollection is OpenZeppelinNFTCollection
{
    constructor() OpenZeppelinNFTCollection(
        "My NFT Collection", "MNFT",    // Name and Symbol
        "https://raw.githubusercontent.com/FilosofiaCodigo/nft-collection-api/master/metadata/",    // Base Metadata URI
        10_000,         // 10,000 max supply
        0.01 ether)     // 0.01 eth mint price
    {
    }
}

Azuki ERC721a NFT Collection

NFT collection with a mint price and max supply. Uses ERC721a library wich is more newer and save batch mint gas fees compared to OpenZeppelin's ERC721 implementation.

// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

import "biblioteca/contracts//ERC721/ERC721aCollection.sol";

contract MyERC721aCollection is ERC721aCollection
{
    constructor() ERC721aCollection(
        "My NFT Collection", "MNFT",    // Name and Symbol
        "https://raw.githubusercontent.com/FilosofiaCodigo/nft-collection-api/master/metadata/",    // Base Metadata URI
        10_000,         // 10,000 max supply
        0.01 ether)     // 0.01 eth mint price
    {
    }
}