- Notifications
You must be signed in to change notification settings - Fork147
🃏🎮A NFT(ERC721) card game build on Ethereum, Truffle, Ganache and hosting on IPFS.
License
PortalNetwork/nifty-game
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Non-fungible token game
This project is a crypto card game that usesOpenZepplin.
The contract is compiled and deployed under the ERC-721 non-fungible token standard with truffle framework. After deploying onto the Ethereum blockchain, users will be able to play the game by interacting with the smart contract through DAPP’s front-end interface.
Acquiring game card:Users can acquire game cards using ETH. Every game card will have a game point on it, which will be used to determine the winner later in the game.
Players can aquire card using ether. Each card will have a random points on it, which will be used to deternmine the winner in the card game.
Once entered the game, players will need to choose a card to play for the round. Each round, the smart contract will randomly decide either card with larger or smaller point wins the round. At the same time, the smart contract will also randomly generate a number in order to compete with the player. Winner of the game will receive the price.
You can view the card battle history about all the games you played.
ERC-721 non-fungible token:ERC-721 is a free, open standard that describes how to build non-fungible or unique tokens on the Ethereum blockchain. While most tokens are fungible (every token is the same as every other token), ERC-721 tokens are all unique (with unique ID).
You can find contract detail undercontracts/ directory:
CryptoHerosGame.sol:The implementation of game execution and rule.CryptoHerosToken.sol:The implementation of game cards purchase and generation.
- React
- Redux
- Saga
- Web3(MetaMask)
- Sass
- Material-UI
- Truffle
- ganache
- NodeJS 8.0+ recommended.
- Windows, Linux or Mac OS X.
First install required dependencies:
You'll need local ethereum node, I recommendganache-cli. You can install it from npm.
npm install -g ganache-cliInstall truffle:
npm install -g truffleThen install contract dependencies:
npm installFirst make sure that local ethereum node is running. Execute:
ganache-cli --gasLimit 0xffffffffff -p 8545Now you can compile and deploy contracts:
truffle compile && truffle migrateRun contract tests:
truffle testWe already deployed contracts toRopsten network. You can play with them RIGHT NOW.
| Contract | Token address | Transaction hash |
|---|---|---|
| CryptoHerosGame | 0xb4FF27d8cD1C5b1e3D4BD8A8FFEBdA9BE9517a4b | 0x49bb8698e2951a0c7eb091038b500694cdf37c74ec51d6c98d91823dc9595b95 |
| CryptoHerosToken | 0xa82Bc392bF65d03A796E1666d27594fB31De4B93 | 0xf41868e6b59020965831aac218e1a521b283ab4975f10a44cf0908f6ce586ad7 |
SeeCARD.md for more information.
SeeCONTRIBUTING.md for how to help out.
SeeLICENSE for details.
About
🃏🎮A NFT(ERC721) card game build on Ethereum, Truffle, Ganache and hosting on IPFS.
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors7
Uh oh!
There was an error while loading.Please reload this page.



