@@ -22,6 +22,7 @@ export interface Overrides {
2222 nonce ?: BigNumberish | Promise < BigNumberish > ;
2323 type ?: number ;
2424 accessList ?: AccessListish ;
25+ customData ?: Record < string , any > ;
2526} ;
2627
2728export interface PayableOverrides extends Overrides {
@@ -55,6 +56,8 @@ export interface PopulatedTransaction {
5556
5657 maxFeePerGas ?: BigNumber ;
5758 maxPriorityFeePerGas ?: BigNumber ;
59+
60+ customData ?: Record < string , any > ;
5861} ;
5962
6063export type EventFilter = {
@@ -106,7 +109,8 @@ export interface ContractTransaction extends TransactionResponse {
106109const allowedTransactionKeys : { [ key : string ] : boolean } = {
107110 chainId : true , data : true , from : true , gasLimit : true , gasPrice :true , nonce : true , to : true , value : true ,
108111 type : true , accessList : true ,
109- maxFeePerGas : true , maxPriorityFeePerGas : true
112+ maxFeePerGas : true , maxPriorityFeePerGas : true ,
113+ customData : true
110114}
111115
112116async function resolveName ( resolver : Signer | Provider , nameOrPromise : string | Promise < string > ) : Promise < string > {
@@ -257,6 +261,10 @@ async function populateTransaction(contract: Contract, fragment: FunctionFragmen
257261 tx . value = roValue ;
258262 }
259263
264+ if ( ro . customData ) {
265+ tx . customData = shallowCopy ( ro . customData ) ;
266+ }
267+
260268 // Remove the overrides
261269 delete overrides . nonce ;
262270 delete overrides . gasLimit ;
@@ -270,6 +278,8 @@ async function populateTransaction(contract: Contract, fragment: FunctionFragmen
270278 delete overrides . maxFeePerGas ;
271279 delete overrides . maxPriorityFeePerGas ;
272280
281+ delete overrides . customData ;
282+
273283 // Make sure there are no stray overrides, which may indicate a
274284 // typo or using an unsupported key.
275285 const leftovers = Object . keys ( overrides ) . filter ( ( key ) => ( ( < any > overrides ) [ key ] != null ) ) ;
0 commit comments