Skip to content

Commit

Permalink
feat!: replace ethers transaction request with custom implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasmoeller committed Dec 27, 2023
1 parent b8bc1ef commit 0fee419
Showing 1 changed file with 28 additions and 5 deletions.
33 changes: 28 additions & 5 deletions src/api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { TransactionRequest } from '@ethersproject/providers'
import {
BridgeDefinition,
Chain,
Expand All @@ -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<string, any>
ccipReadEnabled?: boolean
}

export const Orders = ['RECOMMENDED', 'FASTEST', 'CHEAPEST', 'SAFEST'] as const
export type Order = (typeof Orders)[number]

Expand Down Expand Up @@ -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
Expand All @@ -364,7 +387,7 @@ export interface FullStatusData extends StatusData {
lifiExplorerLink: string
fromAddress: string
toAddress: string
metadata: TransferMetadata
// metadata: TransferMetadata
bridgeExplorerLink?: string
}

Expand Down

0 comments on commit 0fee419

Please sign in to comment.