Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit b115d52

Browse files
committed
Add encodeCreation method also to ContractInstanceEncoder
1 parent 2a087d6 commit b115d52

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

packages/encoder/lib/encoders.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1597,4 +1597,17 @@ export class ContractInstanceEncoder {
15971597
encoded.tx.to = this.toAddress;
15981598
return encoded;
15991599
}
1600+
1601+
/**
1602+
* **This method is asynchronous.**
1603+
*
1604+
* This method functions identically to [[ContractEncoder.encodeCreation]].
1605+
* The particular contract instance is ignored, only its class is used.
1606+
*/
1607+
public async encodeCreation(
1608+
inputs: unknown[],
1609+
options: Types.ResolveOptions = {}
1610+
): Promise<Codec.Options> {
1611+
return await this.contractEncoder.encodeCreation(inputs, options);
1612+
}
16001613
}

0 commit comments

Comments
 (0)