基于区块链的毕业设计Ether Empire – 以太帝国

本文提供基于区块链的毕业设计国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,基于区块链的毕业设计Ether Empire – 以太帝国 是一篇很好的国外资料

Ether Empire

Ether Empire is an Ethereum native territorial conquest game that combines smart contract functionality with tokenomics to provide yield farming, complex diplomacy and strategic gameplay.

Highlights

The Stack

  • Reactjs (Frontedn)
  • Web3js
  • SKALE (Layer 2 solution)
  • Truffle (Smart contract testing and deployment)

Completed

  • Basic frontend
  • Functional homepage
  • WorldState.sol World state smart contract

In Progress

  • Trading.sol In-game transactions
  • WalletConnect implementation

Installation

Pre-requisites

This app can be hosted locally using Node.js, Truffle and Ganache. The installation steps are as follows:

  1. Download and install Node.js https://nodejs.org/en/
  2. Install Truffle using npm (Node.js’ built-in package manager) npm install -g truffle
  3. Download and install Ganache https://www.trufflesuite.com/ganache
  4. Add Metamask extension to your browser of choice (Chrome, Brave, Edge, Firefox)

Hosting a local server

  1. Ensure that all npm packages are installed. navigate to [project folder]/, and run npm install

    navigate to [project folder]/client, and run npm install

  2. To host a local blockchain, Run Ganache -> Create a new workspace -> Server -> change port to 8545 -> Save workspace.

  3. Navigate to project folder in console and deploy the smart contracts with the commands: truffle migrate --reset

  4. To host the web app locally, navigate to [project folder]/client/, and run the following commands: npm run start

  5. The web app should now be available at http://localhost:8080/ on your browser.

Interacting with local server

To connect your simulated wallet on Ganache with the webapp, first run Ganache with the configured settings, then do the following:

  1. On Ganache, click on the key icon at the right end of the first address, and copy the private key.
  2. On Metamask, click on the colored circle at the top right corner -> Import Account -> Paste the private key
  3. With the new wallet added, change the network to Localhost 8545 (next to the colored circle).
  4. Host the web app locally (step 3 in the previous section) and navigate to the server on browser.
  5. Metamask will now prompt you to give access to the webapp, accept and your account will now be connected with the app.

以太帝国

以太帝国是一款以太坊eth本土征服游戏,它将智能合约功能与tokenomics相结合,提供高产耕作、复杂外交和战略游戏

亮点

堆栈已完成

  • Reactjs(Frontedn)
  • Web3js
  • SKALE(第2层解决方案)
  • Truffle(智能合约测试和部署)基本前端功能主页下载并安装Node.jshttps://nodejs.org/en/

正在进行

  • 使用npm(Node.js的内置包管理器)npm安装Truffle-g truffle
  • 下载并安装Ganachehttps://www.trufflesuite.com/ganache
  • 将Metamask扩展添加到您选择的浏览器(Chrome、Brave、Edge、Firefox)

可以使用Node.js、Truffle和Ganache在本地托管此应用程序。安装步骤如下:

  • 确保安装了所有npm软件包。导航到[project folder]/,然后运行npm install导航到[project folder]/client,然后运行npm install要托管本地区块链blockchain,请运行Ganache->创建新工作区->服务器->将端口更改为8545->保存工作区
  • 导航到控制台中的项目文件夹并使用以下命令部署智能合约:truffle migrate–reset

安装

托管本地服务器

与本地服务器交互

  • Reactjs(Frontedn)
  • Web3js
  • SKALE(第2层解决方案)
  • Truffle(智能合约测试和部署)基本前端功能主页下载并安装Node.jshttps://nodejs.org/en/
  • 使用npm(Node.js的内置包管理器)npm安装Truffle-g truffle
  • 下载并安装Ganachehttps://www.trufflesuite.com/ganache
  • 将Metamask扩展添加到您选择的浏览器(Chrome、Brave、Edge、Firefox)
  • 确保安装了所有npm软件包。导航到[project folder]/,然后运行npm install导航到[project folder]/client,然后运行npm install要托管本地区块链blockchain,请运行Ganache->创建新工作区->服务器->将端口更改为8545->保存工作区
  • 导航到控制台中的项目文件夹并使用以下命令部署智能合约:truffle migrate–reset
  • 本地托管web应用程序,导航到[project folder]/client/,然后运行以下命令:npm run start
  • web应用程序现在应该可以在http://localhost:8080/在浏览器上
  • 在Ganache上,单击第一个地址右端的密钥图标,然后复制私钥
  • 在Metamask上,单击右上角的彩色圆圈->导入帐户->粘贴私钥
  • 添加新钱包后,将网络更改为Localhost 8545(彩色圆圈旁边)
  • 在本地托管web应用程序(上一节中的步骤3)并在浏览器上导航到服务器
  • 元掩码现在将提示您授予对webapp的访问权限,接受,您的帐户现在将与应用程序连接

    托管本地服务器

    确保已安装所有npm软件包。导航到[project folder]/,运行npm install

    1. 本地托管web应用程序,导航到[project folder]/client/,然后运行以下命令:npm run start
    2. web应用程序现在应该可以在http://localhost:8080/在浏览器上
    3. 在Ganache上,单击第一个地址右端的密钥图标,然后复制私钥
    4. 在Metamask上,单击右上角的彩色圆圈->导入帐户->粘贴私钥

    与本地服务器交互

    1. 添加新钱包后,将网络更改为Localhost 8545(彩色圆圈旁边)
    2. 在本地托管web应用程序(上一节中的步骤3)并在浏览器上导航到服务器
    3. 元掩码现在将提示您授予对webapp的访问权限,接受,您的帐户现在将与应用程序连接
    4. web应用程序现在应该可以在http://localhost:8080/在浏览器上

    5. 要将你在Ganache上的模拟钱包与webapp连接,首先使用配置的设置运行Ganache,然后执行以下操作:

    Interacting with local server

    To connect your simulated wallet on Ganache with the webapp, first run Ganache with the configured settings, then do the following:

    1. On Ganache, click on the key icon at the right end of the first address, and copy the private key.
    2. On Metamask, click on the colored circle at the top right corner -> Import Account -> Paste the private key
    3. With the new wallet added, change the network to Localhost 8545 (next to the colored circle).
    4. Host the web app locally (step 3 in the previous section) and navigate to the server on browser.
    5. Metamask will now prompt you to give access to the webapp, accept and your account will now be connected with the app.
  • 部分转自网络,侵权联系删除区块链源码网

    www.interchains.cc

    https://www.interchains.cc/22266.html

    区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 ! QQ3039046426
    区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » 基于区块链的毕业设计Ether Empire – 以太帝国

    提供最优质的资源集合

    立即查看 了解详情