@@ -23,40 +23,10 @@ const requestSchema = Type.Object({
23
23
24
24
// OUTPUT
25
25
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 ( ) ] ) ,
60
30
} ) ;
61
31
62
32
responseBodySchema . example = {
0 commit comments