Skip to content

Commit 3a4c638

Browse files
authored
fix: temporarily use any type for user op receipts (#443)
1 parent 196ef61 commit 3a4c638

File tree

1 file changed

+4
-34
lines changed

1 file changed

+4
-34
lines changed

src/server/routes/transaction/blockchain/getUserOpReceipt.ts

Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -23,40 +23,10 @@ const requestSchema = Type.Object({
2323

2424
// OUTPUT
2525
export const responseBodySchema = Type.Object({
26-
result: Type.Union([
27-
Type.Partial(
28-
Type.Object({
29-
userOpHash: Type.String(),
30-
sender: Type.String(),
31-
nonce: Type.String(),
32-
actualGasCost: Type.String(),
33-
actualGasUsed: Type.String(),
34-
success: Type.Boolean(),
35-
paymaster: Type.String(),
36-
logs: Type.Array(Type.Any()),
37-
receipt: Type.Partial(
38-
Type.Object({
39-
type: Type.String(),
40-
status: Type.String(),
41-
cumulativeGasUsed: Type.String(),
42-
logsBloom: Type.String(),
43-
logs: Type.Array(Type.Any()),
44-
transactionHash: Type.String(),
45-
from: Type.String(),
46-
to: Type.String(),
47-
contractAddress: Type.Union([Type.String(), Type.Null()]),
48-
gasUsed: Type.String(),
49-
effectiveGasPrice: Type.String(),
50-
blockHash: Type.String(),
51-
blockNumber: Type.String(),
52-
transactionIndex: Type.Number(),
53-
blobGasUsed: Type.String(),
54-
}),
55-
),
56-
}),
57-
),
58-
Type.Null(),
59-
]),
26+
// TODO: Use Type.Any() instead of strict typing.
27+
// UserOp receipts from different providers/chains may not have a consistent response,
28+
// so Engine would prefer to return _any_ result than fail due to strict typing errors.
29+
result: Type.Union([Type.Any(), Type.Null()]),
6030
});
6131

6232
responseBodySchema.example = {

0 commit comments

Comments
 (0)