Updated README plus initial state
This commit is contained in:
parent
d3d9710a02
commit
88fab2c42f
12
README.md
12
README.md
|
@ -3,6 +3,15 @@ Gas relayer mplementation for economic abstraction. This project consists of two
|
|||
- `gas-relayer`: nodejs service that listens to whisper on a symmetric key, with specific topics, and processes any transaction.
|
||||
- `test-dapp`: DApp created for testing purposes. It allows the easy creation of the messages expected by the service.
|
||||
|
||||
## Installation
|
||||
- Install the latest develop version of embark: `npm install -g https://github.com/embark-framework/embark.git@develop`
|
||||
- If running a development version of the gas relay
|
||||
```
|
||||
cd test-dapp
|
||||
chmod a+x setup_dev_env.sh
|
||||
embark blockchain
|
||||
```
|
||||
- Execute ./setup_dev_env.sh to create the test account
|
||||
|
||||
## Node
|
||||
|
||||
|
@ -14,6 +23,7 @@ Before executing this program, `config/config.json` must be setup and `npm insta
|
|||
- Symmetric key used to send the heartbeats that notify the tokens and prices accepted
|
||||
- Accepted tokens information
|
||||
- Contract configuration
|
||||
This program is configured with the default values for a embark installation run from 0
|
||||
|
||||
A `geth` node running whisper (via `-shh` option) is required. To execute the gas-relayer, you may use any of the following three methods.
|
||||
|
||||
|
@ -24,7 +34,7 @@ nodemon src/service.js
|
|||
```
|
||||
|
||||
## Test DApp
|
||||
To run the test dapp, use `embark run` and then browse `http://localhost:8000/relayer-test.html`.
|
||||
To run the test dapp, use `embark run` and then browse `http://localhost:8000/dapp.html`.
|
||||
|
||||
The gas relayer service needs to be running, and configured correctly to process the transactions. Things to take in account are: the account used in embark, and the contract addresses.
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
"port": 8545
|
||||
},
|
||||
"blockchain": {
|
||||
"account": "0x91b3c570ace45716010e162cbbc1b27cd1a10b65"
|
||||
"account": "0xb8d851486d1c953e31a44374aca11151d49b8bb3"
|
||||
},
|
||||
"whisper": {
|
||||
"symKey": "0xd0d905c1c62b810b787141430417caf2b3f54cffadb395b7bb39fdeb8f17266b",
|
||||
|
@ -36,9 +36,9 @@
|
|||
"currency": "USD"
|
||||
}
|
||||
},
|
||||
"0xD10e6dAe987Dcc0B3ADaA375C9f59690a4C97a27": {
|
||||
"name": "Status Network Token",
|
||||
"symbol": "SNT",
|
||||
"0x064f4044ed9f0aD71b0d9261dC60b05F534d0cf0": {
|
||||
"name": "Status Test Token",
|
||||
"symbol": "STT",
|
||||
"minAccepted":{
|
||||
"value": 1,
|
||||
"currency": "USD"
|
||||
|
@ -51,7 +51,7 @@
|
|||
"IdentityGasRelay": {
|
||||
"abiFile": "../abi/IdentityGasRelay.json",
|
||||
"isIdentity": true,
|
||||
"factoryAddress": "0x0391a4eeDA5e6e9eEF5B672E3494c19bcE9Bc976",
|
||||
"factoryAddress": "0xB0e275864E946449C18b08E392647AC0c79626Ed",
|
||||
"kernelVerification": "isKernel(bytes32)",
|
||||
"allowedFunctions": [
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const config = {
|
||||
"relayAccount": "0x91b3c570ace45716010e162cbbc1b27cd1a10b65",
|
||||
"relayAccount": "0xb8d851486d1c953e31a44374aca11151d49b8bb3",
|
||||
"relaySymKey": "0xd0d905c1c62b810b787141430417caf2b3f54cffadb395b7bb39fdeb8f17266b"
|
||||
};
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
geth account import test_pk --password config/development/password --datadir .embark/development/datadir/
|
||||
sleep 5s
|
||||
echo 'Waiting 5s before unlocking the account'
|
||||
geth --exec "personal.unlockAccount('0xb8d851486d1c953e31a44374aca11151d49b8bb3', 'dev_password', 0)" attach .embark/development/datadir/geth.ipc
|
||||
|
|
@ -0,0 +1 @@
|
|||
f942d5d524ec07158df4354402bfba8d928c99d0ab34d0799a6158d56156d986
|
Loading…
Reference in New Issue