https://github.com/mcarlomagno/protosound
🎵 ProtoSound is a web3 platform where musicians can upload their songs minting Soulbound Tokens + a collection of NFTs.
https://github.com/mcarlomagno/protosound
chainlink hackathon ipfs nft polygon soulbound web3
Last synced: about 1 month ago
JSON representation
🎵 ProtoSound is a web3 platform where musicians can upload their songs minting Soulbound Tokens + a collection of NFTs.
- Host: GitHub
- URL: https://github.com/mcarlomagno/protosound
- Owner: MCarlomagno
- Created: 2022-10-24T16:57:14.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-18T12:30:14.000Z (over 3 years ago)
- Last Synced: 2025-06-28T04:05:34.793Z (about 1 year ago)
- Topics: chainlink, hackathon, ipfs, nft, polygon, soulbound, web3
- Language: TypeScript
- Homepage: https://protosound.netlify.app/
- Size: 13.3 MB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ProtoSound 🎵
[](https://github.com/MCarlomagno/ProtoSound/actions/workflows/contracts.yml)
[](https://github.com/MCarlomagno/ProtoSound/actions/workflows/client.yml)
[](https://github.com/MCarlomagno/ProtoSound/actions/workflows/pages/pages-build-deployment)
[](https://app.netlify.com/sites/protosound/deploys)
**ProtoSound** is a web3 platform where musicians can upload their songs minting a *Soulbound Tokens (song + cover)* for their profile.
This action will also generate a collection of NFTs song covers generated by the artist that will be randomly assigned to the buyers when they purchase a song.
### Running this project
Install dependencies.
```shell
yarn install
```
Compile contracts
```shell
yarn hardhat compile
```
### Testing
Run local hardhat node
```shell
yarn hardhat node
```
Add your account private keys and token URIs opening `.env` or creating one
```shell
HARDHAT_ACCOUNT1='...'
HARDHAT_ACCOUNT2='...'
HARDHAT_ACCOUNT3='...'
# For running tests
AUDIO_URI='https://...'
IMAGE_URI1='https://...'
IMAGE_URI2='https://...'
IMAGE_URI3='https://...'
# For testing on Polygon Mumbai
MATIC_ACCOUNT1='...'
MATIC_ACCOUNT2='...'
MATIC_ACCOUNT3='...'
# defines the network to use during deployment
# 'matic' | 'hardhat'
NET='...'
```
Run tests, by default runs in local hardhat node
```shell
yarn hardhat test
```
Optionally you can run them in **Polygon Mumbai**
> :warning: It might take several minutes to run all the tests.
```shell
yarn hardhat test --network matic
```
### Deployment
Deploy contracts to default network (local hardhat)
```shell
yarn hardhat run scripts/deploy.ts
```
Or deploy to **Polygon Mumbai**
```shell
yarn hardhat run scripts/deploy.ts --network matic
```
### How it works?
The `ProtoSound` contract allows users to create songs setting a price and minting 3 types of tokens, an `AuthorSongCover` Soulbound token, an `AuthorSongAudio` Soulbound token, and a collection of `SongCover` NFT tokens.
When another user wants to buy and consume a song, after paying the price, one of the mentioned `SongCover` tokens are randomly selected from the collection and transferred to the buyer. Aquiring a new NFT token plus the song itself.