From 01949561528f33a4626ade475b1a1e1e9e8c4d03 Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Tue, 10 Jul 2018 11:35:06 -0400 Subject: [PATCH] Adding content to tutorial --- config/contracts.js | 22 ---------------------- tutorial/2-minting-tokens.md | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/config/contracts.js b/config/contracts.js index 47ee138..9545466 100644 --- a/config/contracts.js +++ b/config/contracts.js @@ -45,27 +45,5 @@ module.exports = { "args": ["$SpaceshipToken"] } } - }, - - testnet: { - deployment:{ - "accounts": [ - { - "privateKey": "..............." - }, - ], - host: "ropsten.infura.io/...............", - port: false, - protocol: 'https', // <=== must be specified for infura, can also be http, or ws - type: "rpc" - }, - contracts: { - "SpaceshipToken": { - address: "0x79Dc5C2B0b607702f977265595eF33efe68974A6" - }, - "SpaceshipMarketplace": { - address: "0xD6B7b28F61BCbE8f044095029FCD3745bea68F4d" - } - } } }; diff --git a/tutorial/2-minting-tokens.md b/tutorial/2-minting-tokens.md index e69de29..dcf33bd 100644 --- a/tutorial/2-minting-tokens.md +++ b/tutorial/2-minting-tokens.md @@ -0,0 +1,16 @@ +## DApp overview +The DApp will be running in http://localhost:8000 . This URL will present a simple site called CryptoSpaceShips, with a form to create the tokens (In this case each token representing a unique spaceship with its own attributes), also, it lists all the tokens you own, that you can buy from the store, and can buy/sell in the market. + +[IMAGE_HERE] + +## Minting tokens +Each spaceship in this dapp is an ERC721 token, and as such, they have their own characteristics. Since they represent an spaceship (which could be used in a game), the attributes they will have are: lasers, shields, and energy, as well as an image. + + The contract we will use to represent the spaceships is `SpaceshipToken` and it is located in the file: `contracts\SpaceshipToken.sol`. + + > Embark will attempt to deploy all the contracts it finds in the `contracts` folder and their dependencies. For this project, we already pre-configured the contracts we will and will not deploy. You can read more about this in the [documentation](https://embark.status.im/docs/contracts.html#Specify-contract-file). + + For minting the tokens we will use a combination of IPFS to store the image and attributes, and the function `mint(bytes _metadataHash, uint8 _energy, uint8 _lasers, uint8 _shield, uint _price) public onlyOwner`. + + Let's edit the file `app/js/components/addToken.js` which contains the form to add tokens: +