KV Store App
This is an example app powered by forge and forge-sdk, it's purpose is very simple, accept KVPair
transactions and store them in AccountState.data.
Files
forge.toml
, configuration for forge-core and the app
server.js
, Create an forge-app server, and process KVPair
transaction verify
and update
requests from forge
client.js
, Send KVPair
transaction to the app
kv.proto
, protobuf definition for the KVStore app
Getting Started
0. get forge installed [required]
https://github.com/ArcBlock/forge/releases
1. update Makefile
to use your forge binary
FORGE_BIN_PATH=/YOUR_FORGE_RELEASE_DIR/forge/bin/forge
2. start forge and forge-app
forge-app is managed by forge process manager
make init # install dependency
make run # start forge app
tail -f logs/app.log
3. send requests to forge
This script will create wallet and send KvTx
to forge-app, you can run it multiple times to see the AccountState.data
changes.
DEBUG=@arcblock/* node client.js