This commit is contained in:
aozhiwei 2023-07-12 11:50:27 +08:00
parent ee6f566747
commit f347a11669
2 changed files with 8 additions and 4 deletions

View File

@ -99,10 +99,10 @@ async function init() {
'Web3Sign'
);
// registerMetaClass(resDir + 'item@item.json',
// 'id',
// 'Item'
// );
registerMetaClass(resDir + 'item@item.json',
'id',
'Item'
);
load();
{
traverseMetaList('BlockChainDb', (dbConf, idx) => {

View File

@ -34,6 +34,10 @@ class BlockChain extends BaseService {
return this.#bc.getUserAddress();
}
isValidAddress(address) {
return this.#bc.isValidAddress(address);
}
async soliditySha3Sign(...args) {
const signStr = await this.#bc.web3.utils.soliditySha3(...args);
let signature = await this.#bc.web3.eth.sign(signStr, this.getUserAddress());