Skip to content

Commit

Permalink
Extend getContract function with additional arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
DimaStebaev committed Feb 5, 2024
1 parent 224c8ec commit c1f8771
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions typescript/base/src/instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ export abstract class Instance<ContractType> {
args?: unknown[]
): Promise<ContractAddress>;

async getContract (name: ContractName) {
async getContract (name: ContractName, args?: unknown[]) {
return this.adapter.createContract(
await this.getContractAddress(name),
await this.getContractAddress(
name,
args
),
await this.getContractAbi(name)
);
}
Expand Down

0 comments on commit c1f8771

Please sign in to comment.