From 4f9dcc18412adc80df70b8164b7dcb1c2a02073e Mon Sep 17 00:00:00 2001 From: Ryan Goulding Date: Sat, 9 Dec 2023 15:55:41 -0800 Subject: [PATCH] feat: add gasLimit and value as OmniTransaction options (#90) Signed-off-by: Ryan Goulding --- packages/utils-evm/src/signer/sdk.ts | 7 +++++-- packages/utils/src/transactions/types.ts | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/utils-evm/src/signer/sdk.ts b/packages/utils-evm/src/signer/sdk.ts index 444e0771b..48faf8a49 100644 --- a/packages/utils-evm/src/signer/sdk.ts +++ b/packages/utils-evm/src/signer/sdk.ts @@ -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; @@ -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 }), } } } diff --git a/packages/utils/src/transactions/types.ts b/packages/utils/src/transactions/types.ts index a89ad5ae7..6b1ed7a11 100644 --- a/packages/utils/src/transactions/types.ts +++ b/packages/utils/src/transactions/types.ts @@ -5,6 +5,8 @@ export interface OmniTransaction { point: OmniPoint data: string description?: string + gasLimit?: string | bigint | number + value?: string | bigint | number } export interface OmniTransactionResponse {