reworked to optionally use Hardhat in mock; chain id 31337; refactored TransactionJob management; execute() mostly commented out for minimalism

This commit is contained in:
Tim Olson
2023-10-26 16:56:08 -04:00
parent bd127b00ce
commit e05f0cc8dc
8 changed files with 80 additions and 53 deletions

View File

@@ -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)) {