aozhiwei 2fb6b8f513 1
2023-06-14 11:12:12 +08:00

37 lines
670 B
JavaScript

const utils = require('j7/utils');
const BaseService = require('./baseservice');
const metaFactory = require('../metadata/factory');
const bcClass = require('../blockchain');
const netIdHash = {};
function getBc(netId) {
return utils.hasKey(netIdHash, netId) ? netIdHash[netId] : null;
}
class BlockChain extends BaseService {
#bc = null;
static async staticInit() {
metaFactory.getNetList().forEach((netId) => {
console.log(netId);
});
}
async init(netId) {
this.#bc = getBc(netId);
}
getNftAddress(tokenType) {
return this.#bc.getNftAddress(tokenType);
}
async soliditySha3Sign() {
}
}
module.exports = BlockChain;