Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
7a1bb12f
Commit
7a1bb12f
authored
Mar 06, 2024
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support raw format of v0.7 user ops
parent
e817d438
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
.env.sepolia
configs/envs/.env.sepolia
+1
-0
userOps.ts
types/api/userOps.ts
+2
-0
UserOpRaw.tsx
ui/userOp/UserOpRaw.tsx
+5
-2
No files found.
configs/envs/.env.sepolia
View file @
7a1bb12f
...
@@ -55,6 +55,7 @@ NEXT_PUBLIC_ADMIN_SERVICE_API_HOST=https://admin-rs.services.blockscout.com
...
@@ -55,6 +55,7 @@ NEXT_PUBLIC_ADMIN_SERVICE_API_HOST=https://admin-rs.services.blockscout.com
NEXT_PUBLIC_WEB3_WALLETS=['token_pocket','metamask']
NEXT_PUBLIC_WEB3_WALLETS=['token_pocket','metamask']
NEXT_PUBLIC_VIEWS_CONTRACT_SOLIDITYSCAN_ENABLED=true
NEXT_PUBLIC_VIEWS_CONTRACT_SOLIDITYSCAN_ENABLED=true
NEXT_PUBLIC_HAS_BEACON_CHAIN=true
NEXT_PUBLIC_HAS_BEACON_CHAIN=true
NEXT_PUBLIC_HAS_USER_OPS=true
#meta
#meta
NEXT_PUBLIC_OG_IMAGE_URL=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/og-images/sepolia-testnet.png
NEXT_PUBLIC_OG_IMAGE_URL=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/og-images/sepolia-testnet.png
types/api/userOps.ts
View file @
7a1bb12f
...
@@ -49,8 +49,10 @@ export type UserOp = {
...
@@ -49,8 +49,10 @@ export type UserOp = {
user_logs_start_index
:
number
;
user_logs_start_index
:
number
;
user_logs_count
:
number
;
user_logs_count
:
number
;
raw
:
{
raw
:
{
account_gas_limits
?:
string
;
call_data
:
string
;
call_data
:
string
;
call_gas_limit
:
string
;
call_gas_limit
:
string
;
gas_fees
?:
string
;
init_code
:
string
;
init_code
:
string
;
max_fee_per_gas
:
string
;
max_fee_per_gas
:
string
;
max_priority_fee_per_gas
:
string
;
max_priority_fee_per_gas
:
string
;
...
...
ui/userOp/UserOpRaw.tsx
View file @
7a1bb12f
...
@@ -7,7 +7,7 @@ import RawDataSnippet from 'ui/shared/RawDataSnippet';
...
@@ -7,7 +7,7 @@ import RawDataSnippet from 'ui/shared/RawDataSnippet';
// order is taken from the ERC-4337 standard
// order is taken from the ERC-4337 standard
// eslint-disable-next-line max-len
// eslint-disable-next-line max-len
const
KEYS_ORDER
:
Array
<
keyof
UserOp
[
'
raw
'
]
>
=
[
'
sender
'
,
'
nonce
'
,
'
init_code
'
,
'
call_data
'
,
'
call_gas_limit
'
,
'
verification_gas_limit
'
,
'
pre_verification_ga
s
'
,
'
max_fee_per_gas
'
,
'
max_priority_fee_per_gas
'
,
'
paymaster_and_data
'
,
'
signature
'
];
const
KEYS_ORDER
:
Array
<
keyof
UserOp
[
'
raw
'
]
>
=
[
'
sender
'
,
'
nonce
'
,
'
init_code
'
,
'
call_data
'
,
'
account_gas_limits
'
,
'
call_gas_limit
'
,
'
verification_gas_limit
'
,
'
pre_verification_gas
'
,
'
gas_fee
s
'
,
'
max_fee_per_gas
'
,
'
max_priority_fee_per_gas
'
,
'
paymaster_and_data
'
,
'
signature
'
];
interface
Props
{
interface
Props
{
rawData
?:
UserOp
[
'
raw
'
];
rawData
?:
UserOp
[
'
raw
'
];
...
@@ -20,7 +20,10 @@ const UserOpRaw = ({ rawData, isLoading }: Props) => {
...
@@ -20,7 +20,10 @@ const UserOpRaw = ({ rawData, isLoading }: Props) => {
}
}
const
text
=
JSON
.
stringify
(
KEYS_ORDER
.
reduce
((
res
:
UserOp
[
'
raw
'
],
key
:
keyof
UserOp
[
'
raw
'
])
=>
{
const
text
=
JSON
.
stringify
(
KEYS_ORDER
.
reduce
((
res
:
UserOp
[
'
raw
'
],
key
:
keyof
UserOp
[
'
raw
'
])
=>
{
res
[
key
]
=
rawData
[
key
];
const
value
=
rawData
[
key
];
if
(
value
!==
undefined
)
{
res
[
key
]
=
value
;
}
return
res
;
return
res
;
},
{}
as
UserOp
[
'
raw
'
]),
undefined
,
4
);
},
{}
as
UserOp
[
'
raw
'
]),
undefined
,
4
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment