@@ -5,6 +5,7 @@ import Context from './Context' // eslint-disable-line
55import showTable from './Table'
66
77const RenderUnKnownTransactions = ( { tx, receipt, index, plugin, showTableHash, txDetails, modal, provider } ) => {
8+
89 const intl = useIntl ( )
910 const debug = ( event , tx ) => {
1011 event . stopPropagation ( )
@@ -22,9 +23,30 @@ const RenderUnKnownTransactions = ({ tx, receipt, index, plugin, showTableHash,
2223 plugin . event . trigger ( 'debuggingRequested' , [ tx . hash ] )
2324 }
2425 }
26+ let from = tx . from
27+ let to = tx . to
28+
29+ if ( tx . isUserOp ) {
30+ // Track event with signature: ExecutionFromModuleSuccess (index_topic_1 address module)
31+ // to get sender smart account address
32+ const fromAddrLog = receipt . logs . find ( e => e . topics [ 0 ] === "0x6895c13664aa4f67288b25d7a21d7aaa34916e355fb9b6fae0a139a9085becb8" )
33+ // Track event with signature: UserOperationSponsored (index_topic_1 bytes32 userOpHash, index_topic_2 address user, uint8 paymasterMode, address token, uint256 tokenAmountPaid, uint256 exchangeRate)
34+ // to get paymaster address
35+ const paymasterAddrLog = receipt . logs . find ( e => e . topics [ 0 ] === "0x7a270f29ae17e8e2304ff1245deb50c3b6206bca82928d904f3e284d35c5ffd2" )
36+ if ( fromAddrLog ) {
37+ from = fromAddrLog . address
38+ tx . bundler = tx . from
39+ }
40+ if ( paymasterAddrLog ) tx . paymaster = paymasterAddrLog . address
41+ if ( tx . to ) {
42+ tx . entrypoint = tx . to
43+ to = null // for deployment transaction
44+ }
45+ if ( tx . originTo ) {
46+ to = tx . originTo
47+ }
2548
26- const from = tx . from
27- const to = tx . to
49+ }
2850 const txType = 'unknown' + ( tx . isCall ? 'Call' : 'Tx' )
2951 const options = {
3052 from,
@@ -54,6 +76,10 @@ const RenderUnKnownTransactions = ({ tx, receipt, index, plugin, showTableHash,
5476 { showTableHash . includes ( tx . hash )
5577 ? showTable (
5678 {
79+ 'isUserOp' : tx . isUserOp ,
80+ 'bundler' : tx . bundler ,
81+ 'paymaster' : tx . paymaster ,
82+ 'entrypoint' : tx . entrypoint ,
5783 'hash' : tx . hash ,
5884 'status' : receipt ? receipt . status : null ,
5985 'isCall' : tx . isCall ,
0 commit comments