https://github.com/mcgingras/standard-audio-contracts
Contracts, test cases, and deploy scripts for Standard Audio MXTape project.
https://github.com/mcgingras/standard-audio-contracts
ethereum ethersjs hardhat music nft solidity typechain typescript
Last synced: 3 months ago
JSON representation
Contracts, test cases, and deploy scripts for Standard Audio MXTape project.
- Host: GitHub
- URL: https://github.com/mcgingras/standard-audio-contracts
- Owner: mcgingras
- Created: 2021-02-10T03:41:49.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-11-26T05:12:30.000Z (over 4 years ago)
- Last Synced: 2024-04-14T10:46:53.586Z (about 2 years ago)
- Topics: ethereum, ethersjs, hardhat, music, nft, solidity, typechain, typescript
- Language: TypeScript
- Homepage:
- Size: 8.55 MB
- Stars: 5
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MXTape Contracts
Repo containing the contracts, deployments, and test cases for the smart contracts of the MXTapes project.
[Read More](https://docs.google.com/document/d/1dLMGF05rfyAeyf8dHteo8na3bnuXJT_EBJ5eLTB7e-4/edit)
### Stack
- [Hardhat](https://hardhat.org/)
- [Ethers](https://docs.ethers.io/v5/)
- [Hardhat Hackathon Boilerplate](https://github.com/nomiclabs/hardhat-hackathon-boilerplate)
- [Hardhat Deploy](https://github.com/wighawag/hardhat-deploy)
- [TypeChain](https://github.com/dethcrypto/TypeChain)
- Helps to have Metamask installed.
### Quick Start
New instructions coming soon.
#### _new instructions_
any of these commands (fairly self explainatory)
```
npm compile
npm deploy
npm test
```
#### _old instructions_
start up a hardhat test node
```
npm install
npx hardhat node
```
new terminal tab to deploy the contract
```
npx hardhat compile
npx hardhat run scripts/deploy.js --network localhost
```
### Overview of this Repo
#### Contracts
##### Mixtape
The main mixtape contract. Mints mixtapes, which in turn mints SubtapeFactories.
Contains royalty information.
##### SubtapeFactory
The base contract for what a subtape factory looks like. Called a "factory" because it can mint N number of subtapes.
Possibly confusing term though.
##### SubtapeFactoryCreator
Mixtape inherits the SubtapeFactoryCreator contract, which provides structure for how to create new SubtapeFactories.
#### Deploy
Deploy scripts.
#### Test
Test cases.
### Local Testing
deploys the contracts and launches test node on 8545
```bash
npx hardhat node
```
### Things that I keep forgetting
When you call `_mint` you pass the tokenId, so as long as tokenId and the index within the array are the same, there really isn't any problem or need for functions in enumerable like `getIdAtIndex`...
we should be fine.
figure out how this royalty stuff works
make subtapes sellable?
make subtapes easily transferable
make subtapes inherit metdata
'''bash
npx hardhat console --network localhost
const mixtape = await ethers.getContractFactory("Mixtape");
const contract = await mixtape.attach("0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0");
// Now you can call functions of the contract
await contract.doTheThing();
'''