diff --git a/test/embark-test/.gitignore b/examples/embark-dapp/.gitignore
similarity index 100%
rename from test/embark-test/.gitignore
rename to examples/embark-dapp/.gitignore
diff --git a/test/embark-test/LICENSE b/examples/embark-dapp/LICENSE
similarity index 100%
rename from test/embark-test/LICENSE
rename to examples/embark-dapp/LICENSE
diff --git a/examples/embark-dapp/README.md b/examples/embark-dapp/README.md
new file mode 100644
index 0000000..014433e
--- /dev/null
+++ b/examples/embark-dapp/README.md
@@ -0,0 +1,34 @@
+phoenix - react example
+===
+Simple application using a react observable component to receive a stream of emitted events. This app will deploy a test contract to **Ganache**.
+
+## Requirements
+- `ganache-cli`
+- `yarn` or `npm` installed.
+
+## Install
+In the parent folder, link the package with `yarn` or `npm`
+```
+yarn link
+```
+Then in the current folder link `phoenix`, and install the packages
+```
+yarn link phoenix
+yarn
+```
+
+## Usage
+In a terminal execute
+```
+ganache-cli
+```
+
+In a different session, execute
+```
+yarn run start
+```
+
+Browse the DApp in [http://localhost:3000](http://localhost:3000)
+
+
+*Note*: this is a simple example application that does not include error handling for the web3 connection. Be sure `ganache-cli` is running in `localhost:8545` before browsing the dapp.
\ No newline at end of file
diff --git a/test/embark-test/app/app.js b/examples/embark-dapp/app/App.js
similarity index 62%
rename from test/embark-test/app/app.js
rename to examples/embark-dapp/app/App.js
index 6c89e1b..8a034e9 100644
--- a/test/embark-test/app/app.js
+++ b/examples/embark-dapp/app/App.js
@@ -1,29 +1,13 @@
/* global web3 */
import React from 'react';
-import ReactDOM from 'react-dom';
import EmbarkJS from 'Embark/EmbarkJS';
-import Ranking from '../embarkArtifacts/contracts/Ranking';
-
import Phoenix from 'phoenix';
-import withObservables from '@nozbe/with-observables'
-
-const { scan, map } = require('rxjs/operators');
-import { of } from 'rxjs';
+import Ranking from '../embarkArtifacts/contracts/Ranking';
+import { scan, map } from 'rxjs/operators';
+import RankItem from './RankItem';
const phoenix = new Phoenix(web3.currentProvider);
-const RankItem = ({items, onUpvote, onDownvote}) => {
- return items.map((item, i) =>
- {i+1} - {item.addr}
- Upvotes: {item.upvotes} - Downvotes: {item.downvotes}
- Upvote | Downvote
-
);
-};
-
-
-const enhance = withObservables(['items'], ({ items }) => ({items: items || of({ /* default empty object */ })}));
-const EnhancedRankItem = enhance(RankItem)
-
const observables = {};
class App extends React.Component {
@@ -32,7 +16,6 @@ class App extends React.Component {
}
componentDidMount(){
- //(async () => {
EmbarkJS.onReady(async (err) => {
if(err){
console.error(err);
@@ -63,7 +46,6 @@ class App extends React.Component {
this.setState({ready: true});
});
- //})();
}
upvote = address => () => {
@@ -77,9 +59,8 @@ class App extends React.Component {
render() {
const {ready} = this.state;
if(!ready) return Loading... ;
- return ;
+ return ;
}
}
-ReactDOM.render( , document.getElementById('content'));
-
+export default App;
diff --git a/examples/embark-dapp/app/RankItem.js b/examples/embark-dapp/app/RankItem.js
new file mode 100644
index 0000000..f041c5a
--- /dev/null
+++ b/examples/embark-dapp/app/RankItem.js
@@ -0,0 +1,19 @@
+import React from "react";
+import { observe } from "phoenix/react";
+
+const RankItem = ({ items, onUpvote, onDownvote }) => {
+ if (!items) return null;
+
+ return items.map((item, i) => (
+
+ {i + 1} - {item.addr}
+
+ Upvotes: {item.upvotes} - Downvotes: {item.downvotes}
+
+ Upvote |{" "}
+ Downvote
+
+ ));
+};
+
+export default observe(RankItem);
diff --git a/test/embark-test/app/index.html b/examples/embark-dapp/app/index.html
similarity index 100%
rename from test/embark-test/app/index.html
rename to examples/embark-dapp/app/index.html
diff --git a/examples/embark-dapp/app/index.js b/examples/embark-dapp/app/index.js
new file mode 100644
index 0000000..2b4e92c
--- /dev/null
+++ b/examples/embark-dapp/app/index.js
@@ -0,0 +1,5 @@
+import React from 'react';
+import ReactDOM from 'react-dom';
+import App from './App';
+
+ReactDOM.render( , document.getElementById('content'));
diff --git a/test/embark-test/config/blockchain.js b/examples/embark-dapp/config/blockchain.js
similarity index 100%
rename from test/embark-test/config/blockchain.js
rename to examples/embark-dapp/config/blockchain.js
diff --git a/test/embark-test/config/communication.js b/examples/embark-dapp/config/communication.js
similarity index 100%
rename from test/embark-test/config/communication.js
rename to examples/embark-dapp/config/communication.js
diff --git a/test/embark-test/config/contracts.js b/examples/embark-dapp/config/contracts.js
similarity index 100%
rename from test/embark-test/config/contracts.js
rename to examples/embark-dapp/config/contracts.js
diff --git a/test/embark-test/config/development/password b/examples/embark-dapp/config/development/password
similarity index 100%
rename from test/embark-test/config/development/password
rename to examples/embark-dapp/config/development/password
diff --git a/test/embark-test/config/namesystem.js b/examples/embark-dapp/config/namesystem.js
similarity index 100%
rename from test/embark-test/config/namesystem.js
rename to examples/embark-dapp/config/namesystem.js
diff --git a/test/embark-test/config/pipeline.js b/examples/embark-dapp/config/pipeline.js
similarity index 100%
rename from test/embark-test/config/pipeline.js
rename to examples/embark-dapp/config/pipeline.js
diff --git a/test/embark-test/config/privatenet/genesis-parity.json b/examples/embark-dapp/config/privatenet/genesis-parity.json
similarity index 100%
rename from test/embark-test/config/privatenet/genesis-parity.json
rename to examples/embark-dapp/config/privatenet/genesis-parity.json
diff --git a/test/embark-test/config/privatenet/genesis.json b/examples/embark-dapp/config/privatenet/genesis.json
similarity index 100%
rename from test/embark-test/config/privatenet/genesis.json
rename to examples/embark-dapp/config/privatenet/genesis.json
diff --git a/test/embark-test/config/privatenet/password b/examples/embark-dapp/config/privatenet/password
similarity index 100%
rename from test/embark-test/config/privatenet/password
rename to examples/embark-dapp/config/privatenet/password
diff --git a/test/embark-test/config/storage.js b/examples/embark-dapp/config/storage.js
similarity index 100%
rename from test/embark-test/config/storage.js
rename to examples/embark-dapp/config/storage.js
diff --git a/test/embark-test/config/testnet/password b/examples/embark-dapp/config/testnet/password
similarity index 100%
rename from test/embark-test/config/testnet/password
rename to examples/embark-dapp/config/testnet/password
diff --git a/test/embark-test/config/webserver.js b/examples/embark-dapp/config/webserver.js
similarity index 100%
rename from test/embark-test/config/webserver.js
rename to examples/embark-dapp/config/webserver.js
diff --git a/test/embark-test/contracts/.gitkeep b/examples/embark-dapp/contracts/.gitkeep
similarity index 100%
rename from test/embark-test/contracts/.gitkeep
rename to examples/embark-dapp/contracts/.gitkeep
diff --git a/test/embark-test/contracts/ranking.sol b/examples/embark-dapp/contracts/ranking.sol
similarity index 100%
rename from test/embark-test/contracts/ranking.sol
rename to examples/embark-dapp/contracts/ranking.sol
diff --git a/test/embark-test/embark.json b/examples/embark-dapp/embark.json
similarity index 92%
rename from test/embark-test/embark.json
rename to examples/embark-dapp/embark.json
index 5a5c7ad..1639d6c 100644
--- a/test/embark-test/embark.json
+++ b/examples/embark-dapp/embark.json
@@ -1,7 +1,7 @@
{
"contracts": ["contracts/**"],
"app": {
- "app.js": ["app/app.js"],
+ "app.js": ["app/index.js"],
"index.html": "app/index.html"
},
"buildDir": "dist/",
diff --git a/test/embark-test/package.json b/examples/embark-dapp/package.json
similarity index 86%
rename from test/embark-test/package.json
rename to examples/embark-dapp/package.json
index 8689421..55cdcb1 100644
--- a/test/embark-test/package.json
+++ b/examples/embark-dapp/package.json
@@ -1,5 +1,5 @@
{
- "name": "embark-test",
+ "name": "embark-dapp",
"version": "0.0.1",
"description": "",
"scripts": {
@@ -10,8 +10,8 @@
"license": "MIT",
"devDependencies": {},
"dependencies": {
- "@nozbe/with-observables": "^1.0.5",
"embark": "^4.1.0",
+ "phoenix": "../..",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"rxjs": "^6.5.2",
diff --git a/test/embark-test/test/contract_spec.js b/examples/embark-dapp/test/contract_spec.js
similarity index 100%
rename from test/embark-test/test/contract_spec.js
rename to examples/embark-dapp/test/contract_spec.js
diff --git a/test/embark-test/yarn.lock b/examples/embark-dapp/yarn.lock
similarity index 98%
rename from test/embark-test/yarn.lock
rename to examples/embark-dapp/yarn.lock
index 546042a..20417c0 100644
--- a/test/embark-test/yarn.lock
+++ b/examples/embark-dapp/yarn.lock
@@ -805,14 +805,6 @@
lodash "^4.17.13"
to-fast-properties "^2.0.0"
-"@nozbe/with-observables@^1.0.5":
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/@nozbe/with-observables/-/with-observables-1.0.5.tgz#12be0b8a4b22845f4413de94ff330d4b0de2802a"
- integrity sha512-1thn5tRlZiC2ys8OVyJDe/9XBbUMKWlALtfv0eX4Pcom5/dsY9OYWBXc1braGdFWcVnBjDlLamDGITDljLkqtw==
- dependencies:
- hoist-non-react-statics "^3.3.0"
- rxjs "^6.4.0"
-
"@sindresorhus/is@^0.14.0":
version "0.14.0"
resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea"
@@ -976,6 +968,13 @@
"@webassemblyjs/wast-parser" "1.8.5"
"@xtuc/long" "4.2.2"
+"@wry/equality@^0.1.2":
+ version "0.1.9"
+ resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.1.9.tgz#b13e18b7a8053c6858aa6c85b54911fb31e3a909"
+ integrity sha512-mB6ceGjpMGz1ZTza8HYnrPGos2mC6So4NhS1PtZ8s4Qt0K7fBiIGhpSxUbQmhwcSWE3no+bYxmI2OL6KuXYmoQ==
+ dependencies:
+ tslib "^1.9.3"
+
"@xtuc/ieee754@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790"
@@ -1153,6 +1152,26 @@ anymatch@^2.0.0:
micromatch "^3.1.4"
normalize-path "^2.1.1"
+apollo-link@^1.2.3:
+ version "1.2.12"
+ resolved "https://registry.yarnpkg.com/apollo-link/-/apollo-link-1.2.12.tgz#014b514fba95f1945c38ad4c216f31bcfee68429"
+ integrity sha512-fsgIAXPKThyMVEMWQsUN22AoQI+J/pVXcjRGAShtk97h7D8O+SPskFinCGEkxPeQpE83uKaqafB2IyWdjN+J3Q==
+ dependencies:
+ apollo-utilities "^1.3.0"
+ ts-invariant "^0.4.0"
+ tslib "^1.9.3"
+ zen-observable-ts "^0.8.19"
+
+apollo-utilities@^1.0.1, apollo-utilities@^1.3.0:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.3.2.tgz#8cbdcf8b012f664cd6cb5767f6130f5aed9115c9"
+ integrity sha512-JWNHj8XChz7S4OZghV6yc9FNnzEXj285QYp/nLNh943iObycI5GTDO3NGR9Dth12LRrSFMeDOConPfPln+WGfg==
+ dependencies:
+ "@wry/equality" "^0.1.2"
+ fast-json-stable-stringify "^2.0.0"
+ ts-invariant "^0.4.0"
+ tslib "^1.9.3"
+
aproba@^1.0.3, aproba@^1.1.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
@@ -1402,9 +1421,9 @@ base-x@3.0.4:
safe-buffer "^5.0.1"
base-x@^3.0.2:
- version "3.0.6"
- resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.6.tgz#de047ec95f5f7b99ae63d830a2a894c96538b2cd"
- integrity sha512-4PaF8u2+AlViJxRVjurkLTxpp7CaFRD/jo5rPT9ONnKxyhQ8f59yzamEvq7EkriG56yn5On4ONyaG75HLqr46w==
+ version "3.0.7"
+ resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.7.tgz#1c5a7fafe8f66b4114063e8da102799d4e7c408f"
+ integrity sha512-zAKJGuQPihXW22fkrfOclUUZXM2g92z5GzlSMHxhO6r6Qj+Nm0ccaGNBzDZojzwOMkpjAv4J0fOv1U4go+a4iw==
dependencies:
safe-buffer "^5.0.1"
@@ -2509,12 +2528,12 @@ currently-unhandled@^0.4.1:
dependencies:
array-find-index "^1.0.1"
-cyclist@~0.2.2:
- version "0.2.2"
- resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640"
- integrity sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=
+cyclist@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9"
+ integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=
-d@1:
+d@1, d@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a"
integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==
@@ -2730,6 +2749,11 @@ depd@~1.1.1, depd@~1.1.2:
resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=
+deprecated-decorator@^0.1.6:
+ version "0.1.6"
+ resolved "https://registry.yarnpkg.com/deprecated-decorator/-/deprecated-decorator-0.1.6.tgz#00966317b7a12fe92f3cc831f7583af329b86c37"
+ integrity sha1-AJZjF7ehL+kvPMgx91g68ym4bDc=
+
des.js@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc"
@@ -2881,9 +2905,9 @@ ejs@2.6.1:
integrity sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==
electron-to-chromium@^1.3.247:
- version "1.3.250"
- resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.250.tgz#1f383c16aeb75e7bddbd6a0491237eca81b2cb1f"
- integrity sha512-2OAU91iUw83QvzuWJPfT+FMj+O+DC1EyTx1QBFcc9WZzOQSfZEAWINpdLWElxkgfiqTvQRDOKg0DkMZd9QoNug==
+ version "1.3.252"
+ resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.252.tgz#5b6261965b564a0f4df0f1c86246487897017f52"
+ integrity sha512-NWJ5TztDnjExFISZHFwpoJjMbLUifsNBnx7u2JI0gCw6SbKyQYYWWtBHasO/jPtHym69F4EZuTpRNGN11MT/jg==
elliptic@6.3.3:
version "6.3.3"
@@ -2896,9 +2920,9 @@ elliptic@6.3.3:
inherits "^2.0.1"
elliptic@^6.0.0, elliptic@^6.4.0, elliptic@^6.4.1:
- version "6.5.0"
- resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.0.tgz#2b8ed4c891b7de3200e14412a5b8248c7af505ca"
- integrity sha512-eFOJTMyCYb7xtE/caJ6JJu+bhi67WCYNbkGSknu20pmM8Ke/bqOfdnZWxyoGN26JgfxTbXrsCkEw4KheCT/KGg==
+ version "6.5.1"
+ resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.1.tgz#c380f5f909bf1b9b4428d028cd18d3b0efd6b52b"
+ integrity sha512-xvJINNLbTeWQjrl6X+7eQCrIy/YPv5XCpKW6kB5mKvtnGILoLDcySuwomfdzt0BMdLNVnuRNTuzKNHj0bva1Cg==
dependencies:
bn.js "^4.4.0"
brorand "^1.0.1"
@@ -3700,16 +3724,20 @@ error-ex@^1.2.0, error-ex@^1.3.1:
is-arrayish "^0.2.1"
es-abstract@^1.13.0, es-abstract@^1.5.1:
- version "1.13.0"
- resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9"
- integrity sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==
+ version "1.14.1"
+ resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.14.1.tgz#6e8d84b445ec9c610781e74a6d52cc31aac5b4ca"
+ integrity sha512-cp/Tb1oA/rh2X7vqeSOvM+TSo3UkJLX70eNihgVEvnzwAgikjkTFr/QVgRCaxjm0knCNQzNoxxxcw2zO2LJdZA==
dependencies:
es-to-primitive "^1.2.0"
function-bind "^1.1.1"
has "^1.0.3"
+ has-symbols "^1.0.0"
is-callable "^1.1.4"
is-regex "^1.0.4"
- object-keys "^1.0.12"
+ object-inspect "^1.6.0"
+ object-keys "^1.1.1"
+ string.prototype.trimleft "^2.0.0"
+ string.prototype.trimright "^2.0.0"
es-to-primitive@^1.2.0:
version "1.2.0"
@@ -3720,7 +3748,7 @@ es-to-primitive@^1.2.0:
is-date-object "^1.0.1"
is-symbol "^1.0.2"
-es5-ext@^0.10.35, es5-ext@^0.10.50, es5-ext@~0.10.14:
+es5-ext@^0.10.35, es5-ext@^0.10.50, es5-ext@^0.10.51:
version "0.10.51"
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.51.tgz#ed2d7d9d48a12df86e0299287e93a09ff478842f"
integrity sha512-oRpWzM2WcLHVKpnrcyB7OW8j/s67Ba04JCm0WnNv3RiABSvs7mrQlutB8DBv793gKcp0XENR8Il8WxGTlZ73gQ==
@@ -3744,12 +3772,12 @@ es6-promise@^4.1.1:
integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==
es6-symbol@^3.1.1, es6-symbol@~3.1.1:
- version "3.1.1"
- resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77"
- integrity sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.2.tgz#859fdd34f32e905ff06d752e7171ddd4444a7ed1"
+ integrity sha512-/ZypxQsArlv+KHpGvng52/Iz8by3EQPxhmbuz8yFG89N/caTFBSbcXONDw0aMjy827gQg26XAjP4uXFvnfINmQ==
dependencies:
- d "1"
- es5-ext "~0.10.14"
+ d "^1.0.1"
+ es5-ext "^0.10.51"
escape-html@~1.0.3:
version "1.0.3"
@@ -4669,7 +4697,7 @@ fstream@^1.0.0, fstream@^1.0.12, fstream@^1.0.8:
mkdirp ">=0.5 0"
rimraf "2"
-function-bind@^1.1.1:
+function-bind@^1.0.2, function-bind@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
@@ -4908,6 +4936,29 @@ graceful-fs@*, graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.15, gr
resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725"
integrity sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=
+graphql-tag@^2.10.1:
+ version "2.10.1"
+ resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.10.1.tgz#10aa41f1cd8fae5373eaf11f1f67260a3cad5e02"
+ integrity sha512-jApXqWBzNXQ8jYa/HLkZJaVw9jgwNqZkywa2zfFn16Iv1Zb7ELNHkJaXHR7Quvd5SIGsy6Ny7SUKATgnu05uEg==
+
+graphql-tools@^4.0.5:
+ version "4.0.5"
+ resolved "https://registry.yarnpkg.com/graphql-tools/-/graphql-tools-4.0.5.tgz#d2b41ee0a330bfef833e5cdae7e1f0b0d86b1754"
+ integrity sha512-kQCh3IZsMqquDx7zfIGWBau42xe46gmqabwYkpPlCLIjcEY1XK+auP7iGRD9/205BPyoQdY8hT96MPpgERdC9Q==
+ dependencies:
+ apollo-link "^1.2.3"
+ apollo-utilities "^1.0.1"
+ deprecated-decorator "^0.1.6"
+ iterall "^1.1.3"
+ uuid "^3.1.0"
+
+graphql@^14.0.2, graphql@^14.4.2:
+ version "14.5.4"
+ resolved "https://registry.yarnpkg.com/graphql/-/graphql-14.5.4.tgz#b33fe957854e90c10d4c07c7d26b6c8e9f159a13"
+ integrity sha512-dPLvHoxy5m9FrkqWczPPRnH0X80CyvRE6e7Fa5AWEqEAzg9LpxHvKh24po/482E6VWHigOkAmb4xCp6P9yT9gw==
+ dependencies:
+ iterall "^1.2.2"
+
growl@1.10.5:
version "1.10.5"
resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e"
@@ -4925,9 +4976,9 @@ handlebars@4.0.14:
uglify-js "^3.1.4"
handlebars@^4.0.1:
- version "4.1.2"
- resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.1.2.tgz#b6b37c1ced0306b221e094fc7aca3ec23b131b67"
- integrity sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.2.0.tgz#57ce8d2175b9bbb3d8b3cf3e4217b1aec8ddcb2e"
+ integrity sha512-Kb4xn5Qh1cxAKvQnzNWZ512DhABzyFNmsaJf3OAkWNa4NkaqWcNI8Tao8Tasi0/F4JD9oyG0YxuFyvyR57d+Gw==
dependencies:
neo-async "^2.6.0"
optimist "^0.6.1"
@@ -5156,13 +5207,6 @@ hmac-drbg@^1.0.0:
minimalistic-assert "^1.0.0"
minimalistic-crypto-utils "^1.0.1"
-hoist-non-react-statics@^3.3.0:
- version "3.3.0"
- resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz#b09178f0122184fb95acf525daaecb4d8f45958b"
- integrity sha512-0XsbTXxgiaCDYDIWFcwkmerZPSwywfUqYmwT4jzewKTQSWoE6FCMoUVOeBJWK3E/CrWbxRG3m5GzY4lnIwGRBA==
- dependencies:
- react-is "^16.7.0"
-
hosted-git-info@2.7.1:
version "2.7.1"
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047"
@@ -5815,6 +5859,11 @@ isurl@^1.0.0-alpha5:
has-to-string-tag-x "^1.2.0"
is-object "^1.0.1"
+iterall@^1.1.3, iterall@^1.2.2:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.2.2.tgz#92d70deb8028e0c39ff3164fdbf4d8b088130cd7"
+ integrity sha512-yynBb1g+RFUPY64fTrFv7nsjRrENBQJaX2UL+2Szc9REFrSNm1rpSXHGzhmAy7a9uv3vlvgBlXnf9RqmPH1/DA==
+
js-base64@^2.1.8:
version "2.5.1"
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.5.1.tgz#1efa39ef2c5f7980bb1784ade4a8af2de3291121"
@@ -6264,6 +6313,11 @@ logform@^2.1.1:
ms "^2.1.1"
triple-beam "^1.3.0"
+lokijs@^1.5.6:
+ version "1.5.7"
+ resolved "https://registry.yarnpkg.com/lokijs/-/lokijs-1.5.7.tgz#3bbeb5c2dbffebd78d035bac82c7c4e6055870f0"
+ integrity sha512-2SqUV6JH4f15Z5/7LVsyadSUwHhZppxhujgy/VhVqiRYMGt5oaocb7fV/3JGjHJ6rTuEIajnpTLGRz9cJW/c3g==
+
looper@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/looper/-/looper-3.0.0.tgz#2efa54c3b1cbaba9b94aee2e5914b0be57fbb749"
@@ -7181,7 +7235,12 @@ object-copy@^0.1.0:
define-property "^0.2.5"
kind-of "^3.0.3"
-object-keys@^1.0.11, object-keys@^1.0.12:
+object-inspect@^1.6.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.6.0.tgz#c70b6cbf72f274aab4c34c0c82f5167bf82cf15b"
+ integrity sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==
+
+object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e"
integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==
@@ -7442,11 +7501,11 @@ pako@~1.0.5:
integrity sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==
parallel-transform@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.1.0.tgz#d410f065b05da23081fcd10f28854c29bda33b06"
- integrity sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.2.0.tgz#9049ca37d6cb2182c3b1d2c720be94d14a5814fc"
+ integrity sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==
dependencies:
- cyclist "~0.2.2"
+ cyclist "^1.0.1"
inherits "^2.0.3"
readable-stream "^2.1.5"
@@ -7625,6 +7684,20 @@ performance-now@^2.1.0:
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
+phoenix@../..:
+ version "1.0.0"
+ dependencies:
+ fast-deep-equal "^2.0.1"
+ lokijs "^1.5.6"
+ rxjs "^6.5.2"
+ web3-eth "^1.2.1"
+ optionalDependencies:
+ graphql "^14.4.2"
+ graphql-tag "^2.10.1"
+ graphql-tools "^4.0.5"
+ react "^16.9.0"
+ reactive-graphql "^3.0.2"
+
pify@^2.0.0, pify@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
@@ -7869,9 +7942,9 @@ pseudomap@^1.0.2:
integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM=
psl@^1.1.24:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/psl/-/psl-1.3.0.tgz#e1ebf6a3b5564fa8376f3da2275da76d875ca1bd"
- integrity sha512-avHdspHO+9rQTLbv1RO+MPYeP/SzsCoxofjVnHanETfQhTJrmB0HlDoW+EiN/R+C0BZ+gERab9NY0lPN2TxNag==
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/psl/-/psl-1.3.1.tgz#d5aa3873a35ec450bc7db9012ad5a7246f6fc8bd"
+ integrity sha512-2KLd5fKOdAfShtY2d/8XDWVRnmp3zp40Qt6ge2zBPFARLXOGUf2fHD5eg+TV/5oxBtQKVhjUaKFsAaE4HnwfSA==
public-encrypt@^4.0.0:
version "4.0.3"
@@ -8082,7 +8155,7 @@ react-dom@^16.9.0:
prop-types "^15.6.2"
scheduler "^0.15.0"
-react-is@^16.7.0, react-is@^16.8.1:
+react-is@^16.8.1:
version "16.9.0"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.9.0.tgz#21ca9561399aad0ff1a7701c01683e8ca981edcb"
integrity sha512-tJBzzzIgnnRfEm046qRcURvwQnZVXmuCbscxUO5RWrGTXpon2d4c8mI0D8WE6ydVIm29JiLB6+RslkIvym9Rjw==
@@ -8096,6 +8169,13 @@ react@^16.9.0:
object-assign "^4.1.1"
prop-types "^15.6.2"
+reactive-graphql@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/reactive-graphql/-/reactive-graphql-3.0.2.tgz#f8c3a344eedf5a4bdc0789237026dfe514d08e84"
+ integrity sha512-3Wl6XHhSdF8CoTlDigh1LkHrDNM+KPynYgEX3JSOUnrg5Vv/zKh+dAmxFMNABiglYwLxZLmuhvWfq/1q21VKTQ==
+ dependencies:
+ graphql "^14.0.2"
+
read-pkg-up@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02"
@@ -8573,9 +8653,9 @@ rustbn.js@~0.2.0:
integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA==
rxjs-compat@^6.5.2:
- version "6.5.2"
- resolved "https://registry.yarnpkg.com/rxjs-compat/-/rxjs-compat-6.5.2.tgz#e469070adf6260bdad195e9d4a39f444ae28b458"
- integrity sha512-TRMkTp4FgSxE2HtGvxmgRukh3JqdFM7ejAj1Ti/VdodbPGfWvZR5+KdLKRV9jVDFyu2SknM8RD+PR54KGnoLjg==
+ version "6.5.3"
+ resolved "https://registry.yarnpkg.com/rxjs-compat/-/rxjs-compat-6.5.3.tgz#18440949b2678bf87a78a754009676b2c49183dc"
+ integrity sha512-BIJX2yovz3TBpjJoAZyls2QYuU6ZiCaZ+U96SmxQpuSP/qDUfiXPKOVLbThBB2WZijNHkdTTJXKRwvv5Y48H7g==
rxjs@6.4.0:
version "6.4.0"
@@ -8584,10 +8664,10 @@ rxjs@6.4.0:
dependencies:
tslib "^1.9.0"
-rxjs@^6.4.0, rxjs@^6.5.2:
- version "6.5.2"
- resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.2.tgz#2e35ce815cd46d84d02a209fb4e5921e051dbec7"
- integrity sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==
+rxjs@^6.5.2:
+ version "6.5.3"
+ resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.3.tgz#510e26317f4db91a7eb1de77d9dd9ba0a4899a3a"
+ integrity sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==
dependencies:
tslib "^1.9.0"
@@ -8838,9 +8918,9 @@ sentence-case@^2.1.0:
upper-case-first "^1.1.2"
serialize-javascript@^1.7.0:
- version "1.9.0"
- resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.9.0.tgz#5b77019d7c3b85fe91b33ae424c53dcbfb6618bd"
- integrity sha512-UkGlcYMtw4d9w7YfCtJFgdRTps8N4L0A48R+SmcGL57ki1+yHwJXnalk5bjgrw+ljv6SfzjzPjhohod2qllg/Q==
+ version "1.9.1"
+ resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.9.1.tgz#cfc200aef77b600c47da9bb8149c943e798c2fdb"
+ integrity sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A==
serve-static@1.13.2:
version "1.13.2"
@@ -9379,6 +9459,22 @@ string.prototype.trim@^1.1.2:
es-abstract "^1.13.0"
function-bind "^1.1.1"
+string.prototype.trimleft@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.0.0.tgz#68b6aa8e162c6a80e76e3a8a0c2e747186e271ff"
+ integrity sha1-aLaqjhYsaoDnbjqKDC50cYbicf8=
+ dependencies:
+ define-properties "^1.1.2"
+ function-bind "^1.0.2"
+
+string.prototype.trimright@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.0.0.tgz#ab4a56d802a01fbe7293e11e84f24dc8164661dd"
+ integrity sha1-q0pW2AKgH75yk+EehPJNyBZGYd0=
+ dependencies:
+ define-properties "^1.1.2"
+ function-bind "^1.0.2"
+
string_decoder@^1.0.0, string_decoder@^1.1.1:
version "1.3.0"
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e"
@@ -9815,7 +9911,14 @@ triple-beam@^1.2.0, triple-beam@^1.3.0:
dependencies:
glob "^7.1.2"
-tslib@^1.9.0:
+ts-invariant@^0.4.0:
+ version "0.4.4"
+ resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.4.4.tgz#97a523518688f93aafad01b0e80eb803eb2abd86"
+ integrity sha512-uEtWkFM/sdZvRNNDL3Ehu4WVpwaulhwQszV8mrtcdeE8nN00BV9mAmQ88RkrBhFgl9gMgvjJLAQcZbnPXI9mlA==
+ dependencies:
+ tslib "^1.9.3"
+
+tslib@^1.9.0, tslib@^1.9.3:
version "1.10.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==
@@ -10643,7 +10746,7 @@ web3-eth@1.0.0-beta.36:
web3-net "1.0.0-beta.36"
web3-utils "1.0.0-beta.36"
-web3-eth@1.2.1:
+web3-eth@1.2.1, web3-eth@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.1.tgz#b9989e2557c73a9e8ffdc107c6dafbe72c79c1b0"
integrity sha512-/2xly4Yry5FW1i+uygPjhfvgUP/MS/Dk+PDqmzp5M88tS86A+j8BzKc23GrlA8sgGs0645cpZK/999LpEF5UdA==
@@ -11340,3 +11443,16 @@ yauzl@^2.4.2:
dependencies:
buffer-crc32 "~0.2.3"
fd-slicer "~1.1.0"
+
+zen-observable-ts@^0.8.19:
+ version "0.8.19"
+ resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-0.8.19.tgz#c094cd20e83ddb02a11144a6e2a89706946b5694"
+ integrity sha512-u1a2rpE13G+jSzrg3aiCqXU5tN2kw41b+cBZGmnc+30YimdkKiDj9bTowcB41eL77/17RF/h+393AuVgShyheQ==
+ dependencies:
+ tslib "^1.9.3"
+ zen-observable "^0.8.0"
+
+zen-observable@^0.8.0:
+ version "0.8.14"
+ resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.14.tgz#d33058359d335bc0db1f0af66158b32872af3bf7"
+ integrity sha512-kQz39uonEjEESwh+qCi83kcC3rZJGh4mrZW7xjkSQYXkq//JZHTtKo+6yuVloTgMtzsIWOJrjIrKvk/dqm0L5g==
diff --git a/examples/react-redux/README.md b/examples/react-redux/README.md
new file mode 100644
index 0000000..a694d11
--- /dev/null
+++ b/examples/react-redux/README.md
@@ -0,0 +1,34 @@
+phoenix - react and redux example
+===
+Simple application that dispatches a redux action whenever an event is emitted. This app will deploy a test contract to **Ganache**.
+
+## Requirements
+- `ganache-cli`
+- `yarn` or `npm` installed.
+
+## Install
+In the parent folder, link the package with `yarn` or `npm`
+```
+yarn link
+```
+Then in the current folder link `phoenix`, and install the packages
+```
+yarn link phoenix
+yarn
+```
+
+## Usage
+In a terminal execute
+```
+ganache-cli
+```
+
+In a different session, execute
+```
+yarn run start
+```
+
+Browse the DApp in [http://localhost:3000](http://localhost:3000)
+
+
+*Note*: this is a simple example application that does not include error handling for the web3 connection. Be sure `ganache-cli` is running in `localhost:8545` before browsing the dapp.
\ No newline at end of file
diff --git a/test/embark-test/.npmrc b/test/embark-test/.npmrc
deleted file mode 100644
index e69de29..0000000
diff --git a/test/embark-test/CHANGELOG.md b/test/embark-test/CHANGELOG.md
deleted file mode 100644
index 7eeebe7..0000000
--- a/test/embark-test/CHANGELOG.md
+++ /dev/null
@@ -1,117 +0,0 @@
-# Change Log
-
-All notable changes to this project will be documented in this file.
-See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
-
-# [4.1.0](https://github.com/embark-framework/embark/compare/v4.1.0-beta.6...v4.1.0) (2019-08-12)
-
-**Note:** Version bump only for package embark-dapp-template-boilerplate
-
-
-
-
-
-# [4.1.0-beta.6](https://github.com/embark-framework/embark/compare/v4.1.0-beta.5...v4.1.0-beta.6) (2019-08-09)
-
-
-### Features
-
-* **@embark/pipeline:** add minimalContractSize to remove bytecode ([b0cccae](https://github.com/embark-framework/embark/commit/b0cccae))
-* **@embark/pipeline:** enable choosing which fields to filter out ([b5c81bd](https://github.com/embark-framework/embark/commit/b5c81bd))
-
-
-
-
-
-# [4.1.0-beta.5](https://github.com/embark-framework/embark/compare/v4.1.0-beta.4...v4.1.0-beta.5) (2019-07-10)
-
-**Note:** Version bump only for package embark-dapp-template-boilerplate
-
-
-
-
-
-# [4.1.0-beta.4](https://github.com/embark-framework/embark/compare/v4.1.0-beta.3...v4.1.0-beta.4) (2019-06-27)
-
-
-### Bug Fixes
-
-* **@embark/dapps:** old link updated to the latest documentation at website ([09d7428](https://github.com/embark-framework/embark/commit/09d7428))
-* **templates:** fix templates because tests don't like empty files ([908aa3b](https://github.com/embark-framework/embark/commit/908aa3b))
-
-
-
-
-
-# [4.1.0-beta.3](https://github.com/embark-framework/embark/compare/v4.1.0-beta.2...v4.1.0-beta.3) (2019-06-07)
-
-**Note:** Version bump only for package embark-dapp-template-boilerplate
-
-
-
-
-
-# [4.1.0-beta.2](https://github.com/embark-framework/embark/compare/v4.1.0-beta.1...v4.1.0-beta.2) (2019-05-22)
-
-**Note:** Version bump only for package embark-dapp-template-boilerplate
-
-
-
-
-
-# [4.1.0-beta.1](https://github.com/embark-framework/embark/compare/v4.1.0-beta.0...v4.1.0-beta.1) (2019-05-15)
-
-**Note:** Version bump only for package embark-dapp-template-boilerplate
-
-
-
-
-
-# [4.1.0-beta.0](https://github.com/embark-framework/embark/compare/v4.0.0...v4.1.0-beta.0) (2019-04-17)
-
-**Note:** Version bump only for package embark-dapp-template-boilerplate
-
-
-
-
-
-## [4.0.2](https://github.com/embark-framework/embark/compare/v4.0.1...v4.0.2) (2019-04-11)
-
-**Note:** Version bump only for package embark-dapp-template-boilerplate
-
-
-
-
-
-## [4.0.1](https://github.com/embark-framework/embark/compare/v4.0.0...v4.0.1) (2019-03-26)
-
-**Note:** Version bump only for package embark-dapp-template-boilerplate
-
-
-
-
-
-# [4.0.0](https://github.com/embark-framework/embark/compare/v4.0.0-beta.2...v4.0.0) (2019-03-18)
-
-**Note:** Version bump only for package embark-dapp-template-boilerplate
-
-
-
-
-
-# [4.0.0-beta.2](https://github.com/embark-framework/embark/compare/v4.0.0-beta.1...v4.0.0-beta.2) (2019-03-18)
-
-**Note:** Version bump only for package embark-dapp-template-boilerplate
-
-
-
-
-
-# [4.0.0-beta.1](https://github.com/embark-framework/embark/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2019-03-18)
-
-
-### Features
-
-* add repository.directory field to package.json ([a9c5e1a](https://github.com/embark-framework/embark/commit/a9c5e1a))
-* **@embark/pipeline:** Add `enabled` property to pipeline config ([5ea4807](https://github.com/embark-framework/embark/commit/5ea4807))
-* normalize README and package.json bugs, homepage, description ([5418f16](https://github.com/embark-framework/embark/commit/5418f16))