Adding content to tutorial

This commit is contained in:
Richard Ramos 2018-07-10 11:35:06 -04:00
parent 2d929cfce6
commit 0194956152
2 changed files with 16 additions and 22 deletions

View File

@ -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"
}
}
}
};

View File

@ -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: