• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PortalNetwork/nifty-game:

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

PortalNetwork/nifty-game

开源软件地址:

https://github.com/PortalNetwork/nifty-game

开源编程语言:

JavaScript 76.5%

开源软件介绍:

Non-fungible token game

This project is a crypto card game that uses OpenZepplin.

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.

Roles

Card Collection

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.

Card Collection

Card Battle

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.

Card Battle

Dashboard

You can view the card battle history about all the games you played.

Game History

ERC-721 Token

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).

Reference

Contracts

You can find contract detail under contracts/ directory:

Technical stack

Frontend

  • React
  • Redux
  • Saga
  • Web3(MetaMask)

UI

  • Sass
  • Material-UI

Smart contract/Solidity

  • Truffle

Test environment/Private chain

  • ganache

Requirements

  • NodeJS 8.0+ recommended.
  • Windows, Linux or Mac OS X.

How To Install Dependencies

First install required dependencies:

You'll need local ethereum node, I recommend ganache-cli. You can install it from npm.

npm install -g ganache-cli

Install truffle:

npm install -g truffle

Then install contract dependencies:

npm install

How To Test

First make sure that local ethereum node is running. Execute:

ganache-cli --gasLimit 0xffffffffff -p 8545

Now you can compile and deploy contracts:

truffle compile && truffle migrate

Run contract tests:

truffle test

Playground

We already deployed contracts to Ropsten network. You can play with them RIGHT NOW.

Contract Token address Transaction hash
CryptoHerosGame 0xb4FF27d8cD1C5b1e3D4BD8A8FFEBdA9BE9517a4b 0x49bb8698e2951a0c7eb091038b500694cdf37c74ec51d6c98d91823dc9595b95
CryptoHerosToken 0xa82Bc392bF65d03A796E1666d27594fB31De4B93 0xf41868e6b59020965831aac218e1a521b283ab4975f10a44cf0908f6ce586ad7

Card List

See CARD.md for more information.

Contributing

See CONTRIBUTING.md for how to help out.

Licence

See LICENSE for details.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
ipfs-inactive/kubernetes-ipfs: [ARCHIVED] kubernetes-ipfs发布时间:2022-06-22
下一篇:
ipfs-shipyard/ipfs-share-files: Share files via IPFS发布时间:2022-06-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap