This commit is contained in:
aozhiwei 2024-06-11 11:01:27 +08:00
parent 042a1daf83
commit 199dcf02eb
4 changed files with 8 additions and 29 deletions

View File

@ -1,3 +1,3 @@
#!/bin/bash
node ../../web3sign/app.js -n1 -i1
node ../../web3webhooks/app.js -n1 -i1

View File

@ -1,16 +0,0 @@
const assert = require('assert');
const utils = require('j7/utils');
const bcutils = require('j7/bcutils');
const bchelper = require('common/bchelper');
const basewrap = require('./basewrap');
const factory = require('./factory');
class Item extends basewrap.BaseWrap {
getNftType() {
return bchelper.getItemMetaNftType(this);
}
}
module.exports = Item;

View File

@ -1,8 +1,8 @@
const utils = require('j7/utils');
const basewrap = require('./basewrap');
class Web3Service extends basewrap.BaseWrap {
class Web3WebHooks extends basewrap.BaseWrap {
}
module.exports = Web3Service;
module.exports = Web3WebHools;

View File

@ -94,21 +94,16 @@ async function init() {
'',
'BcEventDb'
);
registerMetaClass(configDir + 'web3sign.cluster.json',
registerMetaClass(configDir + 'web3webhooks.cluster.json',
'',
'Web3Sign'
);
registerMetaClass(resDir + 'item@item.json',
'id',
'Item'
'Web3WebHooks'
);
load();
{
traverseMetaList('BcEventDb', (dbConf, idx) => {
app.registerDb('BcEventDb' + idx, dbConf);
});
traverseMetaList('Web3Sign', (item, idx) => {
traverseMetaList('Web3WebHooks', (item, idx) => {
if (item['instance_id'] == app.getInstanceId()) {
web3ServiceConf = item;
item['nets'].forEach((netId) => {
@ -163,7 +158,7 @@ function getWeb3Conf(netId) {
return null;
}
function getWeb3SignConf() {
function getWeb3WebHooksConf() {
return web3ServiceConf;
}
@ -198,7 +193,7 @@ exports.traverseMetaList = traverseMetaList;
exports.callMetaStatic = callMetaStatic;
exports.getWeb3Conf = getWeb3Conf;
exports.getWeb3SignConf = getWeb3SignConf;
exports.getWeb3WebHooksConf = getWeb3WebHooksConf;
exports.getContractsConf = getContractsConf;
exports.getNetList = getNetList;
exports.getNetDir = getNetDir;