An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

# ProtoSound 🎵
[![Contracts tests](https://github.com/MCarlomagno/ProtoSound/actions/workflows/contracts.yml/badge.svg)](https://github.com/MCarlomagno/ProtoSound/actions/workflows/contracts.yml)
[![Client tests](https://github.com/MCarlomagno/ProtoSound/actions/workflows/client.yml/badge.svg)](https://github.com/MCarlomagno/ProtoSound/actions/workflows/client.yml)
[![Deployment](https://github.com/MCarlomagno/ProtoSound/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/MCarlomagno/ProtoSound/actions/workflows/pages/pages-build-deployment)
[![Netlify Status](https://api.netlify.com/api/v1/badges/31c7afd7-508d-441c-8d51-ae8d687c8ceb/deploy-status)](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?


Contracts

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.