elephant-nft-marketplace
v0.1.0
Published
Scaffold for a Solidity NFT marketplace project.
Downloads
168
Readme
NFT Marketplace
Solidity NFT marketplace project for Elephant-token NFT sales.
Contract
contracts/ElephantNFTMarketplace.sol lets the owner approve ERC-721 metadata collections, users list approved NFTs for Elephant token, and buyers purchase active listings.
Constructor arguments:
elephantToken_- ERC-20 token address used for marketplace paymentsdevAddress_- address receiving the 1% marketplace fee
Sale proceeds default to 99% for the seller and 1% for the dev address. The owner can update the dev fee with setDevFeeBps, capped at 10%. Each listing stores the fee active when it is created, so fee changes apply to future listings. Listed NFTs are held in marketplace escrow until they are bought or cancelled.
Readable metadata helpers:
getCollection(collection)- approval status, stored collection name, and collection metadata URIgetTokenMetadata(collection, tokenId)- stored collection name and ERC-721tokenURIgetListingDetails(listingId)- listing data plus collection name andtokenURI
Scripts
npm run compile- compile Solidity contracts with Waffle intobuild/npm test- compile contracts and run the Mocha test suitenpm run clean- remove Waffle build artifacts
Installed Tooling
- Ethereum Waffle
- Mocha and Chai test stack
- OpenZeppelin Contracts
- OpenZeppelin Contracts Upgradeable
