https://github.com/konstantinzolotarev/lo3_demo_scripts
https://github.com/konstantinzolotarev/lo3_demo_scripts
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/konstantinzolotarev/lo3_demo_scripts
- Owner: konstantinzolotarev
- License: mit
- Created: 2017-01-16T17:58:32.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-16T21:41:18.000Z (over 8 years ago)
- Last Synced: 2025-01-02T02:26:14.509Z (5 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lo3_demo_scripts
## Steps to use
First of all you will need to configure nodesIn folder `config/default.js` are list of rpc urls for nodes and accounts for nodes
You could create `config.local.js` for your local testing. It has same format as `config/default.js`
And will override it.## Step 1 - deployment
First of all you will have to deploy contract to nodes:```bash
$ node deploy.js
```It will return address of newly deployed contract
```bash
==========================
B68AA61BAD943572AEC47DA52E2C3D0935FDE8F5
==========================
```You will use this address later in other scripts
## Step 2 - set value
Will set amount of `100` for address `ED6CBC023EF8DF313E3B7CF7E9A5B702CCC95B22`
```bash
$ node node2.js ED6CBC023EF8DF313E3B7CF7E9A5B702CCC95B22 100
```Will return notification:
```bash
==========================
Set for address: ED6CBC023EF8DF313E3B7CF7E9A5B702CCC95B22 value: 100
==========================
```## Step 3 - load from another node
After that you will be able to load value from another node using script
```bash
$ node node1_load.js ED6CBC023EF8DF313E3B7CF7E9A5B702CCC95B22
```And it should return same info that prev script
```bash
==========================
Set for address: ED6CBC023EF8DF313E3B7CF7E9A5B702CCC95B22 value: 100
==========================
```