-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
98 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,141 @@ | ||
# 🏗 Scaffold-ETH 2 | ||
<div style="text-align: center;"> | ||
<img src="packages/nextjs/public/logo.png" alt="Alt text" style="max-width: 100%; height: auto;"> | ||
</div> | ||
|
||
<h4 align="center"> | ||
<a href="https://docs.scaffoldeth.io">Documentation</a> | | ||
<a href="https://scaffoldeth.io">Website</a> | ||
</h4> | ||
<!-- <h4 align="center"> | ||
<a href="Link to slides">Slides</a> | | ||
<a href="Link to demo">Demo</a> | ||
</h4> --> | ||
|
||
🧪 An open-source, up-to-date toolkit for building decentralized applications (dapps) on the Ethereum blockchain. It's designed to make it easier for developers to create and deploy smart contracts and build user interfaces that interact with those contracts. | ||
# About | ||
|
||
⚙️ Built using NextJS, RainbowKit, Foundry, Wagmi, Viem, and Typescript. | ||
<h4 align="center">Project started on <a href="https://www.aleph.crecimiento.build/es-aleph-hackathon" alt="Aleph Hackathon Website">Aleph Hackathon</a> !</h4> | ||
|
||
- ✅ **Contract Hot Reload**: Your frontend auto-adapts to your smart contract as you edit it. | ||
- 🪝 **[Custom hooks](https://docs.scaffoldeth.io/hooks/)**: Collection of React hooks wrapper around [wagmi](https://wagmi.sh/) to simplify interactions with smart contracts with typescript autocompletion. | ||
- 🧱 [**Components**](https://docs.scaffoldeth.io/components/): Collection of common web3 components to quickly build your frontend. | ||
- 🔥 **Burner Wallet & Local Faucet**: Quickly test your application with a burner wallet and local faucet. | ||
- 🔐 **Integration with Wallet Providers**: Connect to different wallet providers and interact with the Ethereum network. | ||
🧪 This NFT Marketplace dApp is designed to facilitate art tokenization for artists, big and small. | ||
|
||
![Debug Contracts tab](https://github.com/scaffold-eth/scaffold-eth-2/assets/55535804/b237af0c-5027-4849-a5c1-2e31495cccb1) | ||
⚙️ Built using NextJS, RainbowKit, Hardhat, Wagmi, Viem, and Typescript, | ||
|
||
## Requirements | ||
🔗 To be deployed on Polygon and Avalanche | ||
|
||
Before you begin, you need to install the following tools: | ||
## Deployed artifacts | ||
|
||
- [Node (>= v18.17)](https://nodejs.org/en/download/) | ||
- Yarn ([v1](https://classic.yarnpkg.com/en/docs/install/) or [v2+](https://yarnpkg.com/getting-started/install)) | ||
- [Git](https://git-scm.com/downloads) | ||
### Frontend | ||
|
||
[https://technai-marketplace.vercel.app/](https://technai-marketplace.vercel.app/) | ||
|
||
### Contracts on Polygon Amoy | ||
|
||
- Mock USDC: [https://amoy.polygonscan.com/address/0x80292e202a59957ae482b8c1821d51a234f5b0b6](https://amoy.polygonscan.com/address/0x80292e202a59957ae482b8c1821d51a234f5b0b6) | ||
- Mock NFT: [https://amoy.polygonscan.com/address/0x312504ef3562d2b06b52f8b657fe60171ff94410](https://amoy.polygonscan.com/address/0x312504ef3562d2b06b52f8b657fe60171ff94410) | ||
- Marketplace: [https://amoy.polygonscan.com/address/0xe2b5359ef857dcd2cf3274962895967cb447888e](https://amoy.polygonscan.com/address/0xe2b5359ef857dcd2cf3274962895967cb447888e) | ||
|
||
## Quickstart | ||
|
||
To get started with Scaffold-ETH 2, follow the steps below: | ||
To get started follow the steps below: | ||
|
||
1. Install dependencies if it was skipped in CLI: | ||
1. Open a terminal and run this commands to clone this repo and install dependencies: | ||
|
||
``` | ||
cd my-dapp-example | ||
git clone https://github.com/luloxi/technai-marketplace.git | ||
cd technai-marketplace | ||
yarn install | ||
``` | ||
|
||
2. Run a local network in the first terminal: | ||
2. After everything is installed, run this command to start a local blockchain network: | ||
|
||
``` | ||
yarn chain | ||
``` | ||
|
||
This command starts a local Ethereum network using Foundry. The network runs on your local machine and can be used for testing and development. You can customize the network configuration in `packages/foundry/foundry.toml`. | ||
This command starts a local Ethereum network using Hardhat. The network runs on your local machine and can be used for testing and development. You can customize the network configuration in `packages/hardhat/hardhat.config.ts`. | ||
|
||
3. On a second terminal, deploy the test contract: | ||
3. Open a second terminal, navigate to `eleveNeleven` and run this command to deploy the test contract: | ||
|
||
``` | ||
yarn deploy | ||
``` | ||
|
||
This command deploys a test smart contract to the local network. The contract is located in `packages/foundry/contracts` and can be modified to suit your needs. The `yarn deploy` command uses the deploy script located in `packages/foundry/script` to deploy the contract to the network. You can also customize the deploy script. | ||
This command deploys a test smart contract to the local network. The contract is located in `packages/hardhat/contracts` and can be modified to suit your needs. The `yarn deploy` command uses the deploy script located in `packages/hardhat/deploy` to deploy the contract to the network. You can also customize the deploy script. | ||
|
||
4. On a third terminal, start your NextJS app: | ||
4. Open a third terminal, and run this command to start your NextJS app: | ||
|
||
``` | ||
yarn start | ||
``` | ||
|
||
Visit your app on: `http://localhost:3000`. You can interact with your smart contract using the `Debug Contracts` page. You can tweak the app config in `packages/nextjs/scaffold.config.ts`. | ||
Visit your app on: `http://localhost:3000`. You can interact with your smart contract using the `Debug Contracts` page. | ||
|
||
# Features | ||
|
||
🎨 **Simple Mint**: Simple Mint is the way for artist to upload their art without needing to pay for minting or transactions, enabling collectors to pay for the first mint of a collection. By leveraging Simple Mint we aim to make artists access tokenizing their art without friction. | ||
|
||
The first minter of a collection, who pays for cost of the deployment of the NFT contract, gets a share of the royalties of all the NFTs minted in that collection. This creates a market for art investors being eager to first mint a piece of art they like. | ||
|
||
The cost of the deployment consists in the gas cost of the deployment transaction, and a custom optional USDC commision set by the artist that gets distributed 90% for the artist and 10% for the marketplace, | ||
|
||
✅ **Royalties**: When buying and selling art through our market, artists have an option to set a royalty amount between 0.01% and 50%. This royalty is paid to the artist every time the NFT is sold, creating a passive income stream for artists. | ||
|
||
In the case of Simple Mint, the first minter of a collection gets a share of the royalties of all the NFTs minted in that collection. | ||
|
||
🌐 **Cross-Chain NFTs**: As liquidity fluctuates between blockchains and marketplaces, we want to allow artists and collectors to easily bridge their NFTs between blockchains, and thus access other marketplaces. We aim to offer this functionality for NFTs minted on our marketplace by leveraging the Chainlink CCIP (Cross-Chain Interoperability Protocol) or the Avalanche Teleporter token transfer function. | ||
|
||
🎶 **Music NFTs**: We add music to NFTs metadata and integrate with frontend, so that artists can tokenize their music and collectors can enjoy it. | ||
|
||
🔄 **Remixing Feature**: We aim to add remixing feature for NFTs, where the creator receives 30% of the royalties of the remix. | ||
|
||
🤝 **Social Features**: We aim to add social features to TECHNAI, like creating profiles, notifications, messaging, following artists, liking NFTs, and commenting on NFTs. | ||
|
||
# Roles within the platform | ||
|
||
- Small artists | ||
- Medium/Big artists | ||
- NFT collectors (collect for the art) | ||
- NFT investors/traders (collect and trade for the $) | ||
- Free users | ||
- Marketplace owner (one address, could be a DAO too) | ||
|
||
# Roadmap | ||
|
||
## Phase 1 (Marketplace) | ||
|
||
- ✅ **Page for interacting with the marketplace** buy function (Reference: [Simple Marketplace w/ Royalties)](https://app.buidlguidl.com/build/UxFNxy5XIMzz9mHKUxy5)) | ||
- ✅ **Payment in native gas token** | ||
- Add integration to marketplace for displaying auction info and interactions | ||
|
||
Run smart contract test with `yarn foundry:test` | ||
## Phase 2 (Simple Mint) | ||
|
||
- Edit your smart contract `YourContract.sol` in `packages/foundry/contracts` | ||
- Edit your frontend homepage at `packages/nextjs/app/page.tsx`. For guidance on [routing](https://nextjs.org/docs/app/building-your-application/routing/defining-routes) and configuring [pages/layouts](https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts) checkout the Next.js documentation. | ||
- Edit your deployment scripts in `packages/foundry/script` | ||
- ✅ **Add music to NFTs metadata** and **integrate with frontend** (Reference: [OpenSea metadata-standards](https://docs.opensea.io/docs/metadata-standards)) | ||
- ✅ **Create a contract for SimpleMint and SimpleMintNFT** | ||
- ✅ **Page for minting** that takes inputs for the metadata of the NFT (Reference: [scaffold-class](https://github.com/luloxi/scaffold-class)) | ||
- **Simple minting feature** for artists to upload their metadata to IPFS and sign a EIP 712 message, and then wait for an investor (first minter) to pay for the contract creation transaction. (Reference: [grants.buidlguidl.com](https://github.com/BuidlGuidl/grants.buidlguidl.com)) | ||
- **Determine which Royalty standard to implement**, and start implementing it (References: [ERC-2981](https://eips.ethereum.org/EIPS/eip-2981) | [ERC-4910](https://eips.ethereum.org/EIPS/eip-4910) | [ERC-721C compared to ERC-2981 and ERC-4910](https://blog.xp.network/the-battle-for-nft-royalties-meet-the-erc-2981-erc-4920-and-erc-721c-b71d6ba28acf) | ||
- **First minter gets a share of the royalties** of all the NFTs minted in that collection | ||
|
||
## Phase 3 (Music player + Batch buying + Filecoin) | ||
|
||
## Documentation | ||
- **Music player as a PWA** that allows controlling the music from the notifications center on mobile devices (Reference: [React Player](https://www.npmjs.com/package/react-player)) | ||
- **Batch buying NFTs**, to reduce gas fees and the amount of transactions a user needs to make | ||
- **Upload the NFT Metadata to Filecoin** instead of IPFS, and use it with a EIP-712 signature for Simple Mint. (Reference: [Viem recoverTypedDataAddress](https://viem.sh/docs/utilities/recoverTypedDataAddress)) | ||
|
||
Visit our [docs](https://docs.scaffoldeth.io) to learn how to start building with Scaffold-ETH 2. | ||
## Phase 4 (More NFT types + Cross-chain) | ||
|
||
To know more about its features, check out our [website](https://scaffoldeth.io). | ||
- **Integrate GraphQL to index NFTs** and save RPC calls | ||
- **Artist NFT (limited edition)**: Holders of artists NFTs get access to backstage, events, a free drink on live events, etc) | ||
- **Mixed pay** that allows paying in USDC or native gas token for the same amount of USD, and/or maybe crosschain payments with USDC CCTP or Chainlink CCIP (integrate Chainlink Price Feeds with AggregatorV3Interface) (Reference: [Easy2Pay](https://github.com/luloxi/Easy2Pay)) | ||
- **Support for ERC1155** in the marketplace | ||
- **Functionality to move NFTs between blockchains** with Chainlink CCIP/Avalanche Teleporter (Reference: [Chainlink CCIP Cross-chain Tokens](https://docs.chain.link/ccip/tutorials/cross-chain-tokens)) | [Avalanche Teleporter](https://docs.avax.network/cross-chain/teleporter/deep-dive) | ||
- **Token gated content**: Holders of song NFTs get access to special content for holders | ||
|
||
## Contributing to Scaffold-ETH 2 | ||
Reference for expanding marketplace functionalities: [Artion Contracts](https://github.com/Fantom-foundation/Artion-Contracts) | ||
|
||
We welcome contributions to Scaffold-ETH 2! | ||
## Phase 5 (Social features + Notifications + Free users tipping) | ||
|
||
Please see [CONTRIBUTING.MD](https://github.com/scaffold-eth/scaffold-eth-2/blob/main/CONTRIBUTING.md) for more information and guidelines for contributing to Scaffold-ETH 2. | ||
- **Remixing feature for NFTs**, where the creator receives 30% of the royalties of the remix | ||
- Introduce **web2 social features** like creating profiles, following artists, liking NFTs, and commenting on NFTs | ||
- **Notification system** for increasing engagement (customizable and ideally with email or mobile notifications) | ||
- **Tip for artists**: Enable or require tipping with tokens, and if you don’t have $ to pay, you can watch an ad as payment. | ||
- **Periodically airdrop dividends** in USDC for creators (and first minters if appliable) | ||
- **Feature for creating collections** of NFTs and displaying them in a gallery | ||
- Ability to make your own group/community | ||
- **Profile creation with web2.5 login** (Twitter, Instagram, Google, etc). Linked wallet could be with account abstraction or creating a wallet from scratch, TBD | ||
- **Direct Messaging system** for artists and collectors |