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.
To install with Foundry:
forge install vectorized/dn404
To install with Hardhat:
npm install dn404
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"
Feel free to make a pull request.
Guidelines same as Solady's.
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.
Most contracts in DN404 are compatible with both upgradeable and non-upgradeable (i.e. regular) contracts.
Please call any required internal initialization methods accordingly.
This repository is inspired by various sources: