Helps you create an NFT or a series of NFTs.
It stores your media file (image, video, ...) on IPFS (Web3 Storage) and deploys your NFT smart contract.
npm i
npx hardhat test
Copy the .env.example
file and rename it .env
. In this .env
file, you want to:
- Add one of your wallets' private key (MetaMask private key export). It's recommended to create a fresh address, then go grab a handful of Goerli ETH using this faucet
- Add your own endpoint URL (POKT, Infura, Alchemy, ...)
- Add your Web3.Storage API token
You don't need to add your own Etherscan API key because the contract is already verified, meaning the code will be available on Etherscan.
You can go ahead and run:
npx hardhat run scripts/deploy.ts --network goerli
It will store your files on Web3 Storage (IPFS + Filecoin), deploy your NFT contract, and mint your NFT.
You can view this NFT on Āto NFT viewer. Your contract should be already verified on Etherscan.
Get an IP license:
- Go to https://ato.network/license and create an IP license for your artwork.
- Add the license file name to the
makeLicense.ts
file.
In the metadata
folder:
- Replace
thistle-black-pixel.jpg
with your own media file - Replace
thistle-test-IP-license.pdf
with your own license file
Then in deploy.ts
, change the values of these variables:
///// Edit this part to config your NFT. /////
const mediaFileName = "thistle-black-pixel.jpg"; // replace with your own media file name
const author = "Julien";
const name = "Black thistle";
const symbol = "THISTLE";
const description =
"Black thistle was created using go-pixel-art (https://github.com/fairhive-labs/go-pixelart).";
const mint = 1; // number of editions
const royalties = 8; // %
In metadata/handleStorage.ts
, please make sure the machine-readable object (license_details
) within the metadata
object is in coherence with your IP license:
"license_details":[
{
"trait_type":"exclusivity",
"value":"true"
},
{
"trait_type":"privateUse",
"value":"true"
},
{
"trait_type":"displayOnMarketplaces",
"value":"true"
},
{
"trait_type":"displayOnEveryMedia",
"value":"true"
},
{
"trait_type":"rightToAdapt",
"value":"false"
},
{
"trait_type":"rightToAddALogo",
"value":"false"
},
{
"trait_type":"merchandisingRights",
"value":"true"
}]
Then you can deploy to Goerli:
npx hardhat run scripts/deploy.ts --network goerli
Or deploy to Polygon:
npx hardhat run scripts/deploy.ts --network polygon
Once you're done with the deployment, you can transfer the NFT.
- In
transfer.ts
, replace the contract address (line 5) - Paste the recipient address (line 13)
Then:
npx hardhat run scripts/transfer.ts --network goerli
If want to make modifications on Ato.sol, the NFT Solidity contract, you need to:
- Delete the
artifacts
, andcache
folders - Add your Etherscan API key to your
.env
file - Uncomment lines 26 and 27 in
deploy.ts
:
await hre.run("verify:verify", {
network: "goerli",
address: ato.address,
constructorArguments: [name, symbol, mint, uri, royalties],
});
To make your NFT redeemable, deploy AtoRedeemable.sol
instead of Ato.sol
. It's using the Redeemable NFT extension (EIP-Redeemable) also developed by Āto. It can be used if you want to enable people to redeem their NFT for physical objects, tickets, on-chain assets (DeFi), etc.
Please note the Redeemable NFT Extension has not been audited yet. Use at you own risks.
Thistle.sol
is a minimalist NFT contract used for tests.
To deploy one, just:
npx hardhat run scripts/deployThistle.ts --network goerli
You can contact us via Element, Twitter, Telegram, Discord, LinkedIn or email.