Skip to content

merdan-9/Foundry-NFT-Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project corresponds to the tutorial Creating an NFT with solmate and foundry from the Foundry Book and includes the implementation of a basic Opensea compatible NFT using the foundry framework to test and deploy your contract. Furthermore it offers an implementation using both Solmate's gas optimised ERC721 library as well as Open Zeppelin's ERC721 library.

Run tests:

forge test

Compare gas costs between OpenZeppelin and Solmate library

forge test --gas-report

Gas report

Solmate

Deployment Cost Deployment Size
1163822 6564
Function Name min avg median max # calls
MINT_PRICE 250 250 250 250 4
balanceOf 705 705 705 705 2
currentTokenId 2308 2308 2308 2308 1
mintTo 383 49291 69393 72739 11
ownerOf 600 600 600 600 1
withdrawPayments 2606 18529 18529 34453 2

Openzeppelin

Deployment Cost Deployment Size
Function Name min avg median max # calls
MINT_PRICE 250 250 250 250 4
balanceOf 705 705 705 705 2
currentTokenId 2308 2308 2308 2308 1
mintTo 383 49640 69726 73293 11
ownerOf 602 602 602 602 1
withdrawPayments 2606 18529 18529 34453 2

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published