Vectorized / dn404

Implementation of a co-joined ERC20 and ERC721 pair.
MIT License
476 stars 158 forks source link

DN404 πŸ₯œ

NPM CI

DN404 is an implementation of a co-joined ERC20 and ERC721 pair.

To learn more about these dual nature token pairs, you can read the full ERC-7631 spec.

Installation

To install with Foundry:

forge install vectorized/dn404

To install with Hardhat:

npm install dn404

Contracts

The Solidity smart contracts are located in the src directory.

src
β”œβ”€ DN404 β€” "ERC20 contract for DN404"
β”œβ”€ DN404Mirror β€” "ERC721 contract for DN404"
β”œβ”€ DN420 β€” "Single-contract ERC20 ERC1155 chimera"
└─ example
   β”œβ”€ SimpleDN404 β€” "Simple DN404 example as ERC20"
   └─ NFTMintDN404 β€” "Simple DN404 example as ERC721"

Contributing

Feel free to make a pull request.

Guidelines same as Solady's.

Safety

This is experimental software and is provided on an "as is" and "as available" basis.

We do not give any warranties and will not be liable for any loss incurred through any use of this codebase.

While DN404 has been heavily tested, there may be parts that exhibit unexpected emergent behavior when used with other code, or break in future Solidity versions.

Please always include your own thorough tests when using DN404 to make sure it works correctly with your code.

Upgradability

Most contracts in DN404 are compatible with both upgradeable and non-upgradeable (i.e. regular) contracts.

Please call any required internal initialization methods accordingly.

Acknowledgments

This repository is inspired by various sources: