From eb4116a23e386e5c06452f2d2848c45858c1ec38 Mon Sep 17 00:00:00 2001 From: Torrey Atcitty Date: Wed, 27 Nov 2024 12:49:57 -0700 Subject: [PATCH] Temp testing add of optional contract Address to sleuth constructor. --- cli/sleuth.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cli/sleuth.ts b/cli/sleuth.ts index d3c4eff..a742e66 100644 --- a/cli/sleuth.ts +++ b/cli/sleuth.ts @@ -7,7 +7,8 @@ import { parse } from '../parser/pkg/parser'; interface Opts { network?: string, - version?: number + version?: number, + contractAddr?: string }; const defaultOpts = { @@ -90,7 +91,7 @@ export class Sleuth { this.provider = provider; this.network = opts.network ?? defaultOpts.network; this.version = opts.version ?? defaultOpts.version; - this.sleuthAddr = getContractAddress({ from: sleuthDeployer, nonce: this.version - 1 }); + this.sleuthAddr = opts.contractAddr ?? getContractAddress({ from: sleuthDeployer, nonce: this.version - 1 }); this.sources = []; this.coder = new AbiCoder(); }