Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
biblioteca
Advanced tools
![](https://raw.githubusercontent.com/FilosofiaCodigo/Biblioteca/master/img/header.png)
Maximize interoperability for your smart contracts with the integrations library for decentralized protocols.
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 | ❌ | ❌ | ❌ |
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!
npx hardhat test
npx hardhat coverage
npx hardhat docgen
private
variables to internal
for flexibilityOwnable
Many libraries are not audited. Use at your own risk! Also, PRs and upstream changes very welcome.
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.
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.
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.
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 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
{
}
}
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
{
}
}
FAQs
![](https://raw.githubusercontent.com/FilosofiaCodigo/Biblioteca/master/img/header.png)
The npm package biblioteca receives a total of 4 weekly downloads. As such, biblioteca popularity was classified as not popular.
We found that biblioteca demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.