A set of example dApps and apps using ethjs
.
git clone http://github.com/ethjs/examples
cd examples
Open any of the .html
files in Chrome
or Firefox
. Everything runs out of the box.
- Account dApp - code -- See your Ethereum accounts and balances
- Ballot dApp - code -- The Ballot.sol dApp from the Solidity Read the docs
- Blockchain Explorer - code Lookup blocks and transactions on the Etheruem mainnet, via Infura.io
- First Contract dApp - code - Set and Get from a SimpleStore contract
- Simple Auction dApp - code - try now -- A simple Ethereum auction from the Solidity examples
- Token Wallet - code - Send and receive EC20 standard tokens
- TicTacToe - code - try now -- A tic tac toe game, the winning player gets the reward!
This is a small set of dApps and apps using ethjs
. Each example is meant to demonstrate correct usage of ethjs
modules, namely, the ethjs
module.
Many of these examples use ethereumjs-testrpc
to simulate an Ethereum node running in the browser. This is meant to get you up and running with Ethereum, so configuration is kept to a minimum. Once you feel ready to go to an actual node or client, please use any one of the available nodes or clients listed below.
- TestRPC - An entire Ethereum node simulator written in Javascript
- ethjs - A simple JS utility library for Ethereum
Once your ready to go live on the Ethereum mainnet
or testnet
, simply add this script to make your dApp to make it MetaMask ready (note every example has this script commented off by default, simply uncomment it to enable support).
if (typeof window.web3 !== 'undefined' && typeof window.web3.currentProvider !== 'undefined') {
eth.setProvider(window.web3.currentProvider);
} else {
eth.setProvider(provider);
}
Please help better the ecosystem by submitting issues and pull requests to default. We need all the help we can get to build the absolute best linting standards and utilities. We follow the AirBNB linting standard and the unix philosophy.
Please see the Ethereum RPC specification hosted on their github:
https://github.com/ethereum/wiki/wiki/JSON-RPC
There is always a lot of work to do, and will have many rules to maintain. So please help out in any way that you can:
- Create, enhance, and debug ethjs rules (see our guide to "Working on rules").
- Improve documentation.
- Chime in on any open issue or pull request.
- Open new issues about your ideas for making
ethjs-schema
better, and pull requests to show us how your idea works. - Add new tests to absolutely anything.
- Spread the word.
Please consult our Code of Conduct docs before helping out.
We communicate via issues and pull requests.
This project is licensed under the MIT license, Copyright (c) 2016 Nick Dodson. For more information see LICENSE.md.
The MIT License
Copyright (c) 2016 Nick Dodson. nickdodson.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.