Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andreafspeziale/pokemon-erc721-app
🐯 Display owned ERC721 Pokemon cards based on Metamask account
https://github.com/andreafspeziale/pokemon-erc721-app
Last synced: 4 days ago
JSON representation
🐯 Display owned ERC721 Pokemon cards based on Metamask account
- Host: GitHub
- URL: https://github.com/andreafspeziale/pokemon-erc721-app
- Owner: andreafspeziale
- Created: 2018-09-23T12:42:04.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T13:24:42.000Z (almost 2 years ago)
- Last Synced: 2024-04-29T23:18:12.877Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 2.04 MB
- Stars: 4
- Watchers: 3
- Forks: 3
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pokemon ERC-721 App
> ERC-721 is the Ethereum standard for non-fungible tokens.## Full working sample
This project is composed by two components:
- **Truffle project** - [repository](https://github.com/andreafspeziale/pokemon-ERC721)
- **App**The *Truffle project* contains the smart contracts and all the tools for the contracts deployment and testing.
> Before continuing you should clone and follow th Truffle project README.
> You should have a directory structure like follows:
> *`working_dir/pokemon-ERC721`*
> *`working_dir/pokemon-ERC721-app`*The *App project* contains a simple server to retrive the `Pokemon tokenURI` information and a HTML page to display and transfer the tokens and so the related Pokemons.
To quickly run the whole project
- clone and follow the readme of the Truffle project
- install [Metamask](https://metamask.io/) on your browser
- connect Metamask to your local Ethereum node launched during the Truffle project setup, it should be exposed on `http://127.0.0.1:7545`
- import into Metamask (using the private keys) the local Ethereum node accounts, the most important account is the `eth.accounts[1]` (it is the receiver of all tokens)
- clone this repository
- `$ npm i`
- `$ cd config && cp config.js.sample config.js`
- use the following as `config.js`:
```
module.exports = {
truffleBuildPath: '../pokemon-ERC721/build/contracts/Pokemon.json',
networkId: 47,
}
```
- `$ npm run server:start`
- open your browser, unlock Metamask and select the previously imported eth.accounts[1]
- go to http://localhost:3000
- thats all, you should see all the Pokemon tokens that eth.accounts[1] you previously imported owns![browser dapp sample](appscreen.png)
## System used
> System used during the development of the project
- node v10.9.0
- npm 6.2.0## Install
> Install project dependenciesCommand: *`$ npm i`*
## Run the server
> Run the projectCommand: *`$ npm run server:start`*
## Config
The **config folder** contains a config file where you can specified the path of the `ERC721 Pokemon token build folder` and the `NetworkId` where it has been deployed.