1
This commit is contained in:
parent
1f037fc318
commit
3a6fda7138
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"listen_port": 7661
|
"listen_port": 7671
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
read -p '> ' cmd
|
read -p '> ' cmd
|
||||||
curl "http://127.0.0.1:8331/webapp/index.php?c=GM&a=execCmd&cmd=${cmd}" |jq .
|
curl -G -d "cmd=${cmd}" "http://127.0.0.1:8331/webapp/index.php?c=GM&a=execCmd" |jq .
|
||||||
echo ""
|
echo ""
|
||||||
done
|
done
|
||||||
|
@ -2,7 +2,7 @@ const app = require('j7/app');
|
|||||||
const event = require('j7/event');
|
const event = require('j7/event');
|
||||||
const config = require('j7/config');
|
const config = require('j7/config');
|
||||||
|
|
||||||
event.addListener(event.APP_INITIALIZED_EVENT, () => {
|
event.addListener(event.APP_INITIALIZED_EVENT, async () => {
|
||||||
require('./metadata/factory').init();
|
require('./metadata/factory').init();
|
||||||
await require('./blockchain').init();
|
await require('./blockchain').init();
|
||||||
require('./middlewares/factory').init();
|
require('./middlewares/factory').init();
|
||||||
|
@ -200,6 +200,10 @@ async function balance(session, params) {
|
|||||||
console.log('balance', await bc.getBalance(paymentTokenAddress));
|
console.log('balance', await bc.getBalance(paymentTokenAddress));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function getPastEvents(session, params) {
|
||||||
|
const eventName = params[0];
|
||||||
|
}
|
||||||
|
|
||||||
async function execCmd(session) {
|
async function execCmd(session) {
|
||||||
const cmdLine = session.request('cmd').split('.');
|
const cmdLine = session.request('cmd').split('.');
|
||||||
const cmd = cmdLine[0];
|
const cmd = cmdLine[0];
|
||||||
@ -216,6 +220,7 @@ function init() {
|
|||||||
cmdHash['login'] = login;
|
cmdHash['login'] = login;
|
||||||
cmdHash['buyBox'] = buyBox;
|
cmdHash['buyBox'] = buyBox;
|
||||||
cmdHash['balance'] = balance;
|
cmdHash['balance'] = balance;
|
||||||
|
cmdHash['getPastEvents'] = getPastEvents;
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.init = init;
|
exports.init = init;
|
||||||
|
@ -9,6 +9,10 @@ class Session {
|
|||||||
this.nowTime = utils.getUtcTime();
|
this.nowTime = utils.getUtcTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
destory() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
getNowTime() {
|
getNowTime() {
|
||||||
return this.nowTime;
|
return this.nowTime;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user