From b96bf067cf7a1ffb6bcc1196cb5b270eed572b02 Mon Sep 17 00:00:00 2001 From: emizzle Date: Fri, 21 Jun 2019 17:43:35 +1000 Subject: [PATCH] Update to connect to rinkeby in contracts config --- .eslintignore | 3 ++- README.md | 58 ++++++++++++++++++++++---------------------- config/blockchain.js | 7 ++---- config/contracts.js | 25 ++++++++++++++++--- 4 files changed, 55 insertions(+), 38 deletions(-) diff --git a/.eslintignore b/.eslintignore index 86d2944..d9d25c0 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1 +1,2 @@ -/src/embarkArtifacts/* \ No newline at end of file +/src/embarkArtifacts/* +embark/packages \ No newline at end of file diff --git a/README.md b/README.md index 91e3dab..1630818 100644 --- a/README.md +++ b/README.md @@ -4,34 +4,6 @@ The Embark Plasma Demo is a DApp built using Embark and the [`Embark-Plasma`](ht > **PLEASE NOTE** > This is completely alpha software and should not be used in a production environment. -## Vue.js project setup -``` -yarn install -``` - -### Compiles and hot-reloads for development -``` -yarn run serve -``` - -### Compiles and minifies for production -``` -yarn run build -``` - -### Run your tests -``` -yarn run test -``` - -### Lints and fixes files -``` -yarn run lint -``` - -### Customize configuration -See [Configuration Reference](https://cli.vuejs.org/config/). - ## Embark-Plasma Demo Setup This is an example client side wallet built in Vue.js which allows you to make interactions with the OMG network from the browser. @@ -61,4 +33,32 @@ From here, you can perform 3 actions: 3. Exit the funds back to Rootchain: Fill in an address that has funds in the OMG Network and click on OK, your exit period will start. Do note that the exit period will be varied based on the configuration of each `elixir-omg` deployment. After the certain amount of time has passed, you will be able to process the exit and receive your funds back. -NOTE: the current wallet does not offer a way to call `processExit()` yet. \ No newline at end of file +NOTE: the current wallet does not offer a way to call `processExit()` yet. + +## Vue.js project setup +``` +yarn install +``` + +### Compiles and hot-reloads for development +``` +yarn run serve +``` + +### Compiles and minifies for production +``` +yarn run build +``` + +### Run your tests +``` +yarn run test +``` + +### Lints and fixes files +``` +yarn run lint +``` + +### Customize configuration +See [Configuration Reference](https://cli.vuejs.org/config/). \ No newline at end of file diff --git a/config/blockchain.js b/config/blockchain.js index dc3c6dd..5ec3b24 100644 --- a/config/blockchain.js +++ b/config/blockchain.js @@ -6,12 +6,12 @@ module.exports = { rpcPort: 8545, // HTTP-RPC server listening port (default: 8545) rpcCorsDomain: { // Domains from which to accept cross origin requests (browser enforced). This can also be a comma separated list auto: true, // When "auto" is true, Embark will automatically set the cors to the address of the webserver - additionalCors: ["http://localhost:3001"] // Additional CORS domains to add to the list. If "auto" is false, only those will be added + additionalCors: ["http://localhost:8080"] // Additional CORS domains to add to the list. If "auto" is false, only those will be added }, wsRPC: true, // Enable the WS-RPC server wsOrigins: { // Same thing as "rpcCorsDomain", but for WS origins auto: true, - additionalCors: ["http://localhost:3001"] + additionalCors: ["http://localhost:8080"] }, wsHost: "localhost", // WS-RPC server listening interface (default: "localhost") wsPort: 8546, // WS-RPC server listening port (default: 8546) @@ -154,9 +154,6 @@ module.exports = { // merges with the settings in default // used with "embark run testnet" and/or "embark blockchain testnet" rinkeby: { - networkType: "rinkeby", - syncMode: "light", - networkId: 4, accounts: [ { nodeAccounts: true, diff --git a/config/contracts.js b/config/contracts.js index bd1bb44..ebc7995 100644 --- a/config/contracts.js +++ b/config/contracts.js @@ -53,7 +53,7 @@ module.exports = { contracts: { PlasmaCore: { - address: "0x44de0ec539b8c4a4b530c78620fe8320167f2f74", + address: "0x740ecec4c0ee99c285945de8b44e9f5bfb71eea7", abiDefinition: require("@omisego/omg-js-rootchain/src/contracts/RootChain.json").abi } } @@ -75,12 +75,31 @@ module.exports = { }, rinkeby: { + deployment: { + host: "rinkeby.infura.io/v3/INFURA_API_KEY", + port: false, + type: "rpc", + protocol: "https", + accounts: [ + { + mnemonic: "MNEMONIC_HERE", + addressIndex: "0", // Optional. The index to start getting the address + numAddresses: "2", // Optional. The number of addresses to get + hdpath: "m/44'/60'/0'/0/", // Optional. HD derivation path + balance: "100 ether" + } + ] + }, contracts: { PlasmaCore: { - address: "0x44de0ec539b8c4a4b530c78620fe8320167f2f74", + address: "0x740ecec4c0ee99c285945de8b44e9f5bfb71eea7", abiDefinition: require("@omisego/omg-js-rootchain/src/contracts/RootChain.json").abi } - } + }, + dappConnection: [ + "$WEB3", // uses pre existing web3 object if available (e.g in Mist) + "https://rinkeby.infura.io/v3/INFURA_API_KEY" + ] }, // merges with the settings in default