@@ -1295,6 +1295,40 @@ export class ContractEncoder {
1295
1295
) ;
1296
1296
}
1297
1297
1298
+ /**
1299
+ * **This method is asynchronous.**
1300
+ *
1301
+ * This method is similar to [[encodeTransaction]], except that instead of
1302
+ * encoding a function transaction, it encodes a creation transaction.
1303
+ *
1304
+ * Because this method does not perform overload resolution, it only returns
1305
+ * the resulting transaction options (including the encoded `data`), and does
1306
+ * not bother returning the ABI used (as this was user-supplied.)
1307
+ *
1308
+ * If the `allowOptions` flag is set in the `options` argument, the input may
1309
+ * contain an additional transaction options argument after the other
1310
+ * arguments. Any non-`data` options not specified in such a transaction
1311
+ * options argument will be simply omitted; it you want some options to have
1312
+ * defaults, it is up to the you to set these options as appropriate
1313
+ * afterwards.
1314
+ *
1315
+ * If the transaction options parameter has a `data` or a `to` option,
1316
+ * these option will be recognized but ignored.
1317
+ *
1318
+ * See [[encodeTransaction]] for documentation of the inputs.
1319
+ */
1320
+ public async encodeCreation (
1321
+ inputs : unknown [ ] ,
1322
+ options : Types . ResolveOptions = { }
1323
+ ) : Promise < Codec . Options > {
1324
+ const method = this . getConstructorMethod ( ) ;
1325
+ return await this . projectEncoder . encodeTxNoResolution (
1326
+ method ,
1327
+ inputs ,
1328
+ options
1329
+ ) ;
1330
+ }
1331
+
1298
1332
/**
1299
1333
* **This method is asynchronous.**
1300
1334
*
0 commit comments