This commit is contained in:
aozhiwei 2023-06-13 20:23:33 +08:00
parent d4ec5667f1
commit 771bb9e434
2 changed files with 30 additions and 3 deletions

View File

@ -6,7 +6,6 @@ const event = require('j7/event');
const sync = require("j7/sync"); const sync = require("j7/sync");
const log = require("j7/log"); const log = require("j7/log");
const metaFactory = require('./metadata/factory'); const metaFactory = require('./metadata/factory');
const C = require("./C");
class BlockChain { class BlockChain {
@ -42,7 +41,6 @@ class BlockChain {
this.netId this.netId
)); ));
} }
event.emitEvent(C.BC_INITIALIZED_EVENT);
} }
getNetId() { getNetId() {
@ -102,4 +100,4 @@ class BlockChain {
} }
module.exports = new BlockChain(); module.exports = BlockChain;

View File

@ -0,0 +1,29 @@
const utils = require('j7/utils');
const BaseService = require('./baseservice');
const metaFactory = require('../metadata/factory');
const netIdHash = {};
function getBc(netId) {
return utils.hasKey(netIdHash, netId) ? netIdHash[netId] : null;
}
class BlockChain extends BaseService {
#bc = null;
async init(netId) {
this.#bc = getBc(netId);
}
getNftAddress(tokenType) {
}
async soliditySha3Sign() {
}
}
module.exports = BlockChain;