Skip to content

Commit

Permalink
Better handling of from address when deploying
Browse files Browse the repository at this point in the history
  • Loading branch information
rileystephens28 committed Jul 31, 2024
1 parent dd70a9d commit 44db7a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/contract/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ export class ContractFactory<A extends Array<any> = Array<any>, I = BaseContract
const resolvedArgs = await resolveArgs(this.runner, fragment.inputs, args);

const data = concat([this.bytecode, this.interface.encodeDeploy(resolvedArgs)]);
return Object.assign({}, args.pop().from, { data });
const from = args.pop()?.from || undefined;
return Object.assign({}, from, { data });
}

/**
Expand Down

0 comments on commit 44db7a1

Please sign in to comment.