This is a Hardhat project showcasing a proposed ERC-7847 “Social Media NFT.” It combines an ERC-721 contract with an auto-incremented createPost
function that emits PubEvent
for on-chain social posts.
Standard explained in ERC-7847: Social Media NFT.
- ERC-721 Compliant: Uses OpenZeppelin libraries.
- Auto-Incremented Token IDs: No need to specify token IDs.
- createPost Function: Mints a token and emits
PubEvent
with post data. - Testing: A Hardhat test suite verifies contract functionality.
-
Install:
npm install
-
Compile:
npx hardhat compile
-
Test:
npx hardhat test
-
Deploy: Edit
hardhat.config.js
and run:npx hardhat run scripts/deploy.js --network <networkName>
contracts/
SocialMediaNFT.sol # Main contract
test/
SocialMediaNFT.test.js # Test suite
scripts/
deploy.js # Example deployment script
hardhat.config.js
package.json
.gitignore
MIT