-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Webhook Updates + On-Chain Tx Status Add (#314)
* added new column onChainTxStatus based on receipt status. Solved webhook multisend using locks * updates example * updated UserOp Tx Receipt update to use prisma Transactions too * updated userOp tx rceipt check. Updated getTxById to not use locking when not needed * updated load test to ignore TLS/SSL when using https for testing * updated SDK to latest to get MetaTransaction Updates * updated return type for raw query in Transactions tbl * webhooks updates for multi-serer setup. UserOp Status data added * moved sendWebhookForQueueIds post update statement
- Loading branch information
Showing
19 changed files
with
384 additions
and
251 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { Static } from "@sinclair/typebox"; | ||
import { PrismaTransaction } from "../../schema/prisma"; | ||
import { transactionResponseSchema } from "../../server/schemas/transaction"; | ||
import { prisma } from "../client"; | ||
import { cleanTxs } from "./cleanTxs"; | ||
interface GetTxByIdsParams { | ||
queueIds: string[]; | ||
pgtx?: PrismaTransaction; | ||
} | ||
|
||
export const getTxByIds = async ({ | ||
queueIds, | ||
}: GetTxByIdsParams): Promise< | ||
Static<typeof transactionResponseSchema>[] | null | ||
> => { | ||
const tx = await prisma.transactions.findMany({ | ||
where: { | ||
id: { | ||
in: queueIds, | ||
}, | ||
}, | ||
}); | ||
|
||
if (!tx || tx.length === 0) { | ||
return null; | ||
} | ||
|
||
const cleanedTx = cleanTxs(tx); | ||
return cleanedTx; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
src/prisma/migrations/20231123064817_added_onchain_status_flag_to_tx/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- AlterTable | ||
ALTER TABLE "transactions" ADD COLUMN "onChainTxStatus" INTEGER; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.