Skip to content

Commit

Permalink
feat: add gasLimit and value as OmniTransaction options (#90)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Goulding <[email protected]>
  • Loading branch information
ryandgoulding authored Dec 9, 2023
1 parent 095c96e commit 4f9dcc1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/utils-evm/src/signer/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,9 @@ export class OmniSignerEVM implements OmniSigner {
// from?: string,
// nonce?: BigNumberish,

// gasLimit?: BigNumberish,
// gasPrice?: BigNumberish,

// data?: BytesLike,
// value?: BigNumberish,
// chainId?: number

// type?: number;
Expand All @@ -67,8 +65,13 @@ export class OmniSignerEVM implements OmniSigner {
// maxFeePerGas?: BigNumberish;

return {
// mandatory
to: transaction.point.address,
data: transaction.data,

// optional
...(transaction.gasLimit && { gasLimit: transaction.gasLimit }),
...(transaction.value && { value: transaction.value }),
}
}
}
2 changes: 2 additions & 0 deletions packages/utils/src/transactions/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export interface OmniTransaction {
point: OmniPoint
data: string
description?: string
gasLimit?: string | bigint | number
value?: string | bigint | number
}

export interface OmniTransactionResponse<TReceipt extends OmniTransactionReceipt = OmniTransactionReceipt> {
Expand Down

0 comments on commit 4f9dcc1

Please sign in to comment.