当前位置: 首页 > 软件库 > 大数据 > 数据查询 >

create-eth-app

Create Ethereum-powered apps with one command
授权协议 MIT License
开发语言 Java
所属分类 大数据、 数据查询
软件类型 开源软件
地区 不详
投 递 者 闾丘康安
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Create Eth App

Create Ethereum-powered apps with one command.

Create Eth App works on macOS, Windows, and Linux.
If something doesn’t work, please file an issue.
If you have questions or need help, please ask in our Discord community.

Quick Overview

yarn create eth-app my-eth-app
cd my-eth-app
yarn react-app:start

If you've previously installed create-eth-app globally via yarn global add create-eth-app, we recommend youuninstall the package using yarn global remove create-eth-app and use the yarn create eth-app shorthand to ensure that you use the last version.

Then open http://localhost:3000/ to see your app.
When you’re ready to deploy to production, create a minified bundle with yarn run react-app:build.

Creating an App

You’ll need to have Node 8.16.0 or Node 10.16.0 or later version on your local development machine (but it’s not required on the server). You can use nvm (macOS/Linux) or nvm-windows to switch Node versions between different projects.

You'll also need Yarn on your local development machine. This is because Create Eth App relies on YarnWorkspaces, a feature not supported by Npm.

To create a new app, you may use the following method:

yarn create eth-app my-eth-app

yarn create <starter-kit-package> is available in Yarn 0.25+

It will create a directory called my-eth-app inside the current folder.

Inside that directory, if you didn't use a custom framework or template, you will get the initial project structure:

my-eth-app
├── README.md
├── node_modules
├── package.json
├── .gitignore
└── packages
    ├── contracts
    │   ├── README.json
    │   ├── package.json
    │   └── src
    │       ├── abis
    │       │   ├── erc20.json
    │       │   └── ownable.json
    │       ├── addresses.js
    │       └── index.js
    ├── react-app
    │   ├── README.md
    │   ├── package.json
    │   ├── node_modules
    │   ├── public
    │   │   ├── favicon.ico
    │   │   ├── index.html
    │   │   └── manifest.json
    │   └── src
    │       ├── App.css
    │       ├── App.js
    │       ├── App.test.js
    │       ├── ethereumLogo.svg
    │       ├── index.css
    │       ├── index.js
    │       ├── serviceWorker.js
    │       └── setupTests.js
    └── subgraph
        ├── README.md
        ├── abis
        │   └── erc20.json
        ├── package.json
        ├── schema.graphql
        ├── src
        │   └── mappings
        │       ├── tokens.ts
        │       └── transfers.ts
        └── subgraph.yaml

Once the installation is done, you can open your project folder:

cd my-eth-app

Frameworks

Create Eth App supports multiple frontend frameworks. See the folders under templates for a complete list of the available options.

You can pass the name of the framework as the value for the --framework command-line argument. Create Eth App defaults to React if no framework is provided manually.

yarn create eth-app my-eth-app --framework vue

Templates

Create Eth App comes with a host of decentralized finance templates pre-filled with contract ABIs, addresses and subgraphs. Go to the templates folder, select any framework from the list and see what templates are available.

You can pass the name of the template as the value for the --template command-line argument.

yarn create eth-app my-eth-app --template compound

Philosophy

  • Minimalistic by design: You are one command away from creating a new Ethereum-powered React app. No intermediary installs, scripts or shims.

  • End-to-End: Create Eth App provides you everything that you need to build and maintain an Ethereum-powered React appat scale, by bringing Yarn Workspaces, Create React App and The Graph under one roof

  • Aimed at Experience Architects: As Kames CG argues in Ethereum Growth's Problem, the Ethereum ecosystem is ina much greater need for top-notch product creators, not smart contract developers. Create Eth App doesnot enable a smart contract development environment, expecting you to import your own ABIs or build on top ofan established protocol like Maker, Compound or Sablier

  • Not Reinventing The Wheel: Under the hood, you use Create React App, one of the most popular and battle-tested frontend developmentenvironments.

What’s Included?

Your environment will have everything you need to build a modern Ethereum-powered single-page React app:

  • Smooth project management via Yarn Workspaces
  • Everything included with Create ReactApp: React, JSX, ES6, TypeScriptand Flow syntax support
  • Template subgraph that indexes the events emitted by anERC-20 contract
  • Minimalist structure for managing the smart contract ABIs and addresses
  • Hassle-free updates for the above tools with a single dependency

Popular Alternatives

Create Eth App is a great fit for:

  • Learning how to write Ethereum-powered apps in a comfortable and feature-rich development environment.
  • Starting new Ethereum-powered single-page React applications without wasting time on copy-pasting boilerplates
  • Creating examples with React for your Ethereum-related libraries and components.

But Ethereum is a large ecosystem. Here are a few common cases where you might want to try something else:

For alternatives to React in particular, read the official Create React Appdocumentation.

Credits

This project exists thanks to all the people who contributed:

Acknowledgements

We are grateful to the authors of existing related projects from which we drew inspiration:

And also the Vue.js community for the CLI we used to generate our templates:

License

Create Eth App is open source software licensed as MIT.

  • 一、创建 安装 npm install -g create-react-app create-react-app my-app cd my-app npm start 环境变量问题 npm init react-app my-app; 其他方式 yarn create react-app my-app 二、运行 启动 启动开发 npm start or yarn start 启动测试 npm te

  • 我们先create-react-app 创建一个项目 然后写一个合约 lottery.sol 我们来安装一下合约的编译器 npm install solc@0.4.25 --save 然后来编译合约 compile.js let fs = require('fs') let solc = require('solc') //1.读取合约 let lotteryIn

  • 目录 main.c ethapp.h ethapp.c The Ethtool sample application shows an implementation of an ethtool-like API and provides a console environment that allows its use to query and change Ethernet card param

 相关资料
  • 包含以太坊区块链相关的方法 示例: var eth = web3.eth;

  • eth-crypto Cryptographic javascript-functions for ethereum and tutorials on how to use them together with web3js and solidity. Tutorials Creating keys and use them for ethereum transactions In this tu

  • 简介 RT-Thread 为了方便用户开发网络应用,引入了网络设备框架,同时 RT-Thread 还提供了数量丰富的网络组件包,方便用户快速开发自己的网络应用。 本文将基于正点原子 stm32f407-atk-explorer 开发板主要介绍如何使用 RT-Thread Studio 来添加以太网驱动和 lwIP 协议栈。 ETH 设备驱动的开发可总结为如下: 新建 RT-Thread 完整版项目

  • Deprecated Note that this repo is archived and been eclipsed by https://github.com/vulcanize/go-codec-dageth go-ipld-eth go-ipld-eth is the set of Ethereum elements as a part of the IPLD merkle-forest

  • IPFS in Ethereum Smart Contracts This is a simple blog application that is a proof of concept of connecting Ethereum's smart contracts to JSON database stored on IPFS. The communication is based on Or

  • 永久注册中心是负责顶级域名.eth的分配和更新的智能合约。目前使用旧版的维克里拍卖的方式进行域名分配和注册。新版注册中心旨在简化这一过程,同时为未来的改进提供一个稳定的平台,这里的稳定指的是使API的变化最小化。(LBB译注:ENS团队已经在2019年5月4日部署了新版永久注册中心) 永久注册中心的计划部署日期是2019年5月4日。这里只是提供初步的文档,目的是为一些开发者提供一个起点,这些开发者