diff --git a/README.md b/README.md index 986a9c5..a5a62df 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,8 @@ - https://docs.opensea.io/docs/metadata-standards - https://docs.openzeppelin.com/contracts/3.x/erc1155#constructing_an_erc1155_token_contract -## Helpful notes - - `Mushroom` is a contract which hold the ERC1155 Non fungible tokens - - `mint()` is supposed to be called from the owner and this will transfer the tokens to another smart contract - - In comparison to `ownerOf()` in ERC721, ERC1155 has `balanceOf()` -## How to run? +## Commands - `yarn` : installation - `yarn compile` : compilation - `yarn test` : tests @@ -21,6 +17,27 @@ - `yarn verify:m` : verifying **Mushroom** on etherscan - `yarn verify:r` : verifying **MushroomReceiver** on etherscan +## How to deploy? + - Install using `yarn` + - Rename `.env.example` to `.env` and set the values of environment variables accordingly + - Set the `tokenURI` in **line 12** of `Mushroom.sol` + - Set the metadata in the `meta` directory + - Set the nfts in the `nfts` directory + - Run `yarn migrate` to deploy the contracts to rinkeby + - Run `yarn verify:m` to verify the contracts on etherscan + - Visit *https://testnets.opensea.io/* and enter the address of above deployed `Mushroom` contract + - **Enjoy with your NFTs!!!** + +## How to test? + - Install using `yarn` + - Run `truffle dev` + - Run `migrate --reset` + - run `test` + +## Notes for MushroomReceiver + - This contract is made to recieve ERC1155 tokens + - The admin of this contract can transfer tokens to anyone + ## Deployments - [Mushroom](https://rinkeby.etherscan.io/address/0xfA9d1298E22AFA3B5c46Db91424028857C10742A#readContract) - [MushroomReceiver](https://rinkeby.etherscan.io/address/0x76D82D278dc9AbA8b4Bb63Dc9b7De1Ad8C454098#contracts) diff --git a/meta/0000000000000000000000000000000000000000000000000000000000000000.json b/meta/0000000000000000000000000000000000000000000000000000000000000000.json index 655f6e5..1451c1e 100644 --- a/meta/0000000000000000000000000000000000000000000000000000000000000000.json +++ b/meta/0000000000000000000000000000000000000000000000000000000000000000.json @@ -1,5 +1,5 @@ { - "name": "The mushroom company", - "description": "This mushroom can create other mushrooms.", - "image": "https://raw.githubusercontent.com/akcgjc007/erc1155-Mushroom/main/nfts/0.png" + "name": "The Raccoon", + "description": "The raccoon, sometimes called the common raccoon to distinguish it from other species, is a medium-sized mammal native to North America. It is the largest of the procyonid family, having a body length of 40 to 70 cm, and a body weight of 5 to 26 kg.", + "image": "https://raw.githubusercontent.com/akcgjc007/erc1155-Mushroom/main/nfts/1.jpeg" } \ No newline at end of file diff --git a/meta/0000000000000000000000000000000000000000000000000000000000000001.json b/meta/0000000000000000000000000000000000000000000000000000000000000001.json new file mode 100644 index 0000000..c13ebbf --- /dev/null +++ b/meta/0000000000000000000000000000000000000000000000000000000000000001.json @@ -0,0 +1,5 @@ +{ + "name": "The Fox", + "description": "Foxes are small to medium-sized, omnivorous mammals belonging to several genera of the family Canidae. Foxes have a flattened skull, upright triangular ears, a pointed, slightly upturned snout, and a long bushy tail. Twelve species belong to the monophyletic `true foxes` group of genus Vulpes.", + "image": "https://raw.githubusercontent.com/akcgjc007/erc1155-Mushroom/main/nfts/0.jpeg" +} \ No newline at end of file diff --git a/meta/0000000000000000000000000000000000000000000000000000000000000002.json b/meta/0000000000000000000000000000000000000000000000000000000000000002.json new file mode 100644 index 0000000..d10f3fa --- /dev/null +++ b/meta/0000000000000000000000000000000000000000000000000000000000000002.json @@ -0,0 +1,5 @@ +{ + "name": "The Dino", + "description": "Dinosaurs are a diverse group of reptiles of the clade Dinosauria. They first appeared during the Triassic period, between 243 and 233.23 million years ago, although the exact origin and timing of the evolution of dinosaurs is the subject of active research.", + "image": "https://raw.githubusercontent.com/akcgjc007/erc1155-Mushroom/main/nfts/2.jpeg" +} \ No newline at end of file diff --git a/migrations/2_all.js b/migrations/2_all.js index b54e18f..90bf839 100644 --- a/migrations/2_all.js +++ b/migrations/2_all.js @@ -1,7 +1,5 @@ const Mushroom = artifacts.require("Mushroom"); -const MushroomReceiver = artifacts.require("MushroomReceiver"); module.exports = function (deployer) { deployer.deploy(Mushroom); - deployer.deploy(MushroomReceiver); }; diff --git a/migrations/3_send.js b/migrations/3_send.js index 2cabb33..485f3c3 100644 --- a/migrations/3_send.js +++ b/migrations/3_send.js @@ -1,16 +1,12 @@ const Mushroom = artifacts.require("Mushroom"); -const MushroomReceiver = artifacts.require("MushroomReceiver"); module.exports = async function (deployer) { let mush = await Mushroom.deployed(); - let mushR = await MushroomReceiver.deployed(); const account = (await web3.eth.getAccounts())[0]; - const amount = 100; - await mush.mint(mushR.address, amount); - await mushR.sendToWinners(mush.address, account, 0, (20).toString()); + const amount = 10; - // await mush - // .balanceOf(account, 0) - // .then((d) => console.log("My balance: ", d.toString())); + await mush.mint(account, amount); + await mush.mint(account, amount); + await mush.mint(account, amount); }; diff --git a/nfts/0.jpeg b/nfts/0.jpeg new file mode 100644 index 0000000..1b69142 Binary files /dev/null and b/nfts/0.jpeg differ diff --git a/nfts/0.png b/nfts/0.png deleted file mode 100644 index 7c91639..0000000 Binary files a/nfts/0.png and /dev/null differ diff --git a/nfts/1.jpeg b/nfts/1.jpeg new file mode 100644 index 0000000..d92103a Binary files /dev/null and b/nfts/1.jpeg differ diff --git a/nfts/2.jpeg b/nfts/2.jpeg new file mode 100644 index 0000000..33d8f6f Binary files /dev/null and b/nfts/2.jpeg differ