Skip to content

Commit

Permalink
feat(encoder): sync runner with underlying ethers contract
Browse files Browse the repository at this point in the history
  • Loading branch information
Rubilmax committed May 17, 2024
1 parent 78422be commit 029c915
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/ExecutorEncoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,19 @@ export class ExecutorEncoder {

constructor(
public readonly address: string,
public readonly runner?: ContractRunner | null,
runner?: ContractRunner | null,
) {
this.executor = Executor__factory.connect(address, runner);
}

get runner() {
const { runner } = this.executor;

if (!runner) throw Error("runner not available");

return runner;
}

pushCall(target: string, value: BigNumberish, callData: BytesLike, context?: CallbackContext) {
this.calls.push(ExecutorEncoder.buildCall(target, value, callData, context));

Expand Down

0 comments on commit 029c915

Please sign in to comment.