MCPcopy
hub / github.com/eth-infinitism/account-abstraction / getUserOpHash

Function getUserOpHash

test/UserOp.ts:142–149  ·  view source on GitHub ↗
(op: UserOperation, entryPoint: string, chainId: number)

Source from the content-addressed store, hash-verified

140}
141
142export function getUserOpHash (op: UserOperation, entryPoint: string, chainId: number): string {
143 const packed = encodeUserOp(op, true)
144 return keccak256(hexConcat([
145 '0x1901',
146 getDomainSeparator(entryPoint, chainId),
147 keccak256(packed)
148 ]))
149}
150
151export function updateUserOpForEip7702Hash (op: UserOperation, delegate: string): UserOperation {
152 if (!(op.isEip7702 ?? false)) {

Callers 7

checkUserOpHashFunction · 0.90
entrypoint.test.tsFile · 0.90
userEventResponseMethod · 0.90
getUserOpHashWithEip7702Function · 0.85
signUserOpFunction · 0.85

Calls 2

encodeUserOpFunction · 0.85
getDomainSeparatorFunction · 0.85

Tested by 1

checkUserOpHashFunction · 0.72