diff --git a/README.md b/README.md index 5ef6165..ac578a8 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Add ethereum url, account's address and account's password to config file *(path ## Specify plugin configuration In [plugin configuration](#Plugin.config) there are already [playground](https://playground.devicehive.com) urls, however you can run [devicehive](https://github.com/devicehive/devicehive-docker) locally and write your own. -Add plugin topic and access token. Also add user and password for [devicehive admin panel](https://github.com/devicehive/devicehive-admin-panel). +Add plugin topic and access token. Also add user access token, which you can copy from playground. # Simple start @@ -38,6 +38,7 @@ Logger will notify you about results. You will see message `Transaction has been You can find plugin configuration in `./config.json` Plugin part of configuration you can find [here](https://github.com/devicehive/devicehive-plugin-core-node#configuration). +Also plugin authentication process and options are described [here](https://github.com/devicehive/devicehive-plugin-core-node/blob/master/README.md#plugin-authentication). **_PLUGIN_PROPS_** - plugin's properties. There are only filters at the moment. **_PLUGIN_PROPS.OVERRIDE_** - set it to true and plugin's filters will be updated according to config. @@ -62,7 +63,7 @@ Examples: ## Ethereum smart contract -You can find configuration in `./src/ethereum-node/config.json` +You can find configuration in `./ethereum-config.json` * **_CONTRACT_PATH_** - path to your smart contract,
* **_ETHEREUM_URL_** - url to ethereum node,
diff --git a/src/ethereum-node/config.json b/ethereum-config.json similarity index 100% rename from src/ethereum-node/config.json rename to ethereum-config.json diff --git a/index.js b/index.js index 455b638..59b232f 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ const { DeviceHivePlugin } = require(`devicehive-plugin-core`); const log = require('./src/utils/Logger'); const pluginConfig = require('./config/index'); -const ethereumConfig = require('./src/ethereum-node/config.json'); +const ethereumConfig = require('./ethereum-config.json'); const EthereumAccount = require('./src/ethereum-node/EthereumAccount'); const PluginContract = require('./src/ethereum-node/PluginContract'); const PluginEthereumService = require('./src/PluginEthereumService'); diff --git a/src/ethereum-node/GasLimiter.js b/src/ethereum-node/GasLimiter.js index 351600a..6d198ef 100644 --- a/src/ethereum-node/GasLimiter.js +++ b/src/ethereum-node/GasLimiter.js @@ -1,4 +1,4 @@ -const ethereumConfig = require ('./config.json'); +const ethereumConfig = require ('../../ethereum-config.json'); class GasLimiter { constructor(gasLimit, timePeriod) { diff --git a/src/utils/PluginEthereumUtils.js b/src/utils/PluginEthereumUtils.js index d9572b1..df3d5e2 100644 --- a/src/utils/PluginEthereumUtils.js +++ b/src/utils/PluginEthereumUtils.js @@ -1,4 +1,4 @@ -const config = require('../ethereum-node/config.json'); +const config = require('../../ethereum-config.json'); const Utils = require('./Utils'); class PluginEthereumUtils {