reworked to optionally use Hardhat in mock; chain id 31337; refactored TransactionJob management; execute() mostly commented out for minimalism
This commit is contained in:
4
vault.js
4
vault.js
@@ -2,7 +2,7 @@ import {ethers} from "ethers";
|
||||
import {getAbi} from "./abi.js";
|
||||
import {getProvider, getSigner} from "./blockchain.js";
|
||||
import {vaults} from './cache.js';
|
||||
import {chainInfo, VAULT_INIT_CODE_HASH} from "./misc.js";
|
||||
import {chainInfo, VAULT_INIT_CODE_HASH} from "./chain.js";
|
||||
|
||||
// Vault
|
||||
// address owner
|
||||
@@ -50,6 +50,8 @@ export async function loginAddress(socket, chainId, address) {
|
||||
|
||||
|
||||
export async function ensureVault(socket, chainId, owner, num) {
|
||||
if( !(chainId in chainInfo) )
|
||||
return
|
||||
console.log('ensureVault', chainId, owner, num)
|
||||
const address = vaultAddress(chainId, owner, num)
|
||||
if (!await vaults.contains(chainId,address)) {
|
||||
|
||||
Reference in New Issue
Block a user