From 0fee4198d163d9b2f5cb7399878f30770994ba1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20M=C3=B6ller?= Date: Wed, 27 Dec 2023 10:33:52 +0100 Subject: [PATCH] feat!: replace ethers transaction request with custom implementation --- src/api.ts | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/src/api.ts b/src/api.ts index b39f2f35..f19699b4 100644 --- a/src/api.ts +++ b/src/api.ts @@ -1,4 +1,3 @@ -import { TransactionRequest } from '@ethersproject/providers' import { BridgeDefinition, Chain, @@ -11,6 +10,30 @@ import { } from '.' import { ToolError } from './apiErrors' +export type BigIntish = string + +export type TransactionRequest = { + to?: string + from?: string + nonce?: BigIntish + + gasLimit?: BigIntish + gasPrice?: BigIntish + + data?: string + value?: BigIntish + chainId?: number + + type?: number + accessList?: { address: string; storageKeys: string[] }[] + + maxPriorityFeePerGas?: BigIntish + maxFeePerGas?: BigIntish + + customData?: Record + ccipReadEnabled?: boolean +} + export const Orders = ['RECOMMENDED', 'FASTEST', 'CHEAPEST', 'SAFEST'] as const export type Order = (typeof Orders)[number] @@ -353,9 +376,9 @@ export interface StatusData extends BaseStatusData { } export type StatusResponse = FullStatusData | StatusData -interface TransferMetadata { - integrator: string -} +// interface TransferMetadata { +// integrator: string +// } export interface FullStatusData extends StatusData { transactionId: string @@ -364,7 +387,7 @@ export interface FullStatusData extends StatusData { lifiExplorerLink: string fromAddress: string toAddress: string - metadata: TransferMetadata + // metadata: TransferMetadata bridgeExplorerLink?: string }