Skip to content

Commit

Permalink
Updated naming
Browse files Browse the repository at this point in the history
  • Loading branch information
KyrylR committed Nov 2, 2023
1 parent ef06788 commit c090119
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/deployer/Deployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ export class Deployer {

public async deploy<T, A = T, I = any>(
contract: Instance<A, I> | (T extends Truffle.Contract<I> ? T : never),
args: TypedArgs<A> | OverridesAndLibs = {},
argsOrParameters: TypedArgs<A> | OverridesAndLibs = {},
parameters: OverridesAndLibs = {},
): Promise<I> {
const adapter = this._resolveAdapter(contract);

const minimalContract = await adapter.fromInstance(contract, parameters);

let contractAddress: string;
if (args instanceof Array) {
contractAddress = await minimalContract.deploy(args, parameters);
} else if (args instanceof Object) {
contractAddress = await minimalContract.deploy([], args);
if (argsOrParameters instanceof Array) {
contractAddress = await minimalContract.deploy(argsOrParameters, parameters);
} else if (argsOrParameters instanceof Object) {
contractAddress = await minimalContract.deploy([], argsOrParameters);
} else {
contractAddress = await minimalContract.deploy([], {});
}
Expand Down

0 comments on commit c090119

Please sign in to comment.