This repository contains example smart contracts for minting collections and tokens in the Unique Schema V2 using Solidity.
With Foundry
forge install UniqueNetwork/unique-contracts
When working with Hardhat projects, you'll need to copy the entire contracts directory and manually install @unique-nft/solidity-interfaces
. This process is going to be refined shortly.
UniqueV2CollectionMinter.sol
: provides functionality to create collections in the Unique Schema V2.UniqueV2TokenMinter.sol
: provides functionality to create tokens in the Unique Schema V2.
Minter.sol
: Demonstrates how to create a gasless experience for minting collections and NFTs.POAP.sol
: Demonstrates how to create a POAP contract. Tokens minting sponsored by the POAP contract itself. Every account can mint only one NFT and cannot transfer it.
- Install packages and compile contracts
yarn
npx hardhat compile
-
Create
.env
file from.env.example
-
Set at least two private keys with
OPL
balance toTEST_ACCOUNTS_ETH
env. You can getOPL
tokens for free https://t.me/unique2faucet_opal_bot -
Run tests
yarn test