Adding images to fourth part of the tutorial

This commit is contained in:
Richard Ramos 2018-07-13 12:41:04 -04:00 committed by GitHub
parent 7cd35d67e1
commit 9fd4392916
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -1,7 +1,8 @@
## Selling our tokens
A functionality a token marketplace requires is the ability to list and sell your tokens and also be able to buy them. ERC721 and tokens in general require an approval to be able to transfer them. And since we're going to use a different contract to act as an escrow for our buys/sell, we need to allow the user to approve this contract as a temporary owner of our tokens to sell.
[IMAGE_HERE]
![Selling Ships](https://raw.githubusercontent.com/status-im/status-dapp-workshop-mexico/tutorial-series/tutorial/images/sellingShip.png)
This approval process will be controlled via the toggle above our spaceships section, and this functionality shall be code on `app/js/components/shipList.js`.
@ -78,7 +79,8 @@ componentDidMount(){
}
```
[IMAGE_HERE]
![Toggle Button](https://raw.githubusercontent.com/status-im/status-dapp-workshop-mexico/tutorial-series/tutorial/images/toggle.png)
Finally, to sell our tokens, we need to edit the file `app/js/components/ship.js` to import our `SpaceshipMarketplace` contract and add the implementation of the `sellShip` method.
@ -156,7 +158,7 @@ _loadMarketPlace = async () => {
Notice that we include new attributes in our list: the owner, and the saleId which is used in the next step, and also, `this.state.marketPlaceShips` is used to store the list of spaceships in the marketplace
[IMAGE_HERE]
![Marketplace](https://raw.githubusercontent.com/status-im/status-dapp-workshop-mexico/tutorial-series/tutorial/images/marketplace.png)
## Buying tokens from the marketplace
This functionality is very similar to buying the tokens from the store.
@ -203,4 +205,4 @@ Congrats! you have implemented all the features of this tutorial! However, there
## Conclusion
As you can see, interacting with Ethereum and IPFS is easy using Embark, and lets you build truly decentralized applications fast! Are you interested in learning more or contributing to this framework? Visit http://embark.status.im or chat with us on [Gitter](https://embark.status.im/chat/)
As you can see, interacting with Ethereum and IPFS is easy using Embark, and lets you build truly decentralized applications fast! Are you interested in learning more or contributing to this framework? Visit http://embark.status.im or chat with us on [Gitter](https://embark.status.im/chat/)