Crypto Composer on Polygon
- Mint NFTs storing music data
- Ensure originality and uniqueness by checking hash
- Play back the songs registered on blockchain
- Sign in with Ethereum provider
- Browe songs and see metadata (title, composer account)
- Play songs
- by selecting one from the list
- or accessing directly via link. e.g. https://crypto-composer.bangtoven.com/songs/0
- Buy CCT(CryptoComposerToken) to pay for minting new songs
- Write a new song and mint it as NFT
- (Access them on NFT marketplaces like OpenSea. e.g. Song #0 on Crypto Composer
Bootstraped with Truffle, and deployed on Polygon, Ropsten, and Rinkeby (deployed_address.txt)
- contracts
- CryptoComposer.sol - deployed. checks payment and call minter
- CryptoNFTMinter.sol - inherited by CryptoComposer. manages minting
- CryptoComposerToken.sol - ERC20 token to use CryptoComposer.
- CryptoComposerTokenVendor.sol - manages price and minting of CCT.
- migrations
- tests
React app built with next.js accessible at https://crypto-composer.bangtoven.com/
Referenced Reactronica to build DAWStepsEditor
- pages
- components
- hooks
- styles
- public
# install frontend dependencies, smart contract tooling, and solidity libraries
yarn install
# deploy smart contracts to local network
ganache-cli -p 8545 # or Ganache GUI
truffle migrate
You need these local contract addresses of CryptoComposerTokenVendor
and CryptoComposer
later to update frontend.
Deploy to public network: Create and fill
.secret
and.infura_api_key
files, then runtruffle migrate --network {NETWORK}
ganache-cli -p 8545 # or Ganache GUI
truffle test
Update contract addresses for 1337
network on hooks/useContract.js
with addresses from the previous step.
// hooks/useContract.js
...
export function useCryptoComposerContract() {
...
[1337, `{CryptoComposer_address}`],
...
export function useCCTVendorContract() {
...
[1337, `{CryptoComposerTokenVendor_address}`],
...
yarn build && yarn start
Set your local network id to 1337
and open https://crypto-composer.bangtoven.com/
jungho.eth
0xB8E1aCe6Aa298777552eda47B71857201D662134
Copyright © 2022, Jungho Bang. Released under the MIT License.