UserOperationReceipt.fromRpc
Converts an UserOperationReceipt.Rpc to an UserOperationReceipt.UserOperationReceipt.
Imports
Named
import { UserOperationReceipt } from 'ox/erc4337'Examples
import { UserOperationReceipt } from 'ox/erc4337'
const userOperationReceipt = UserOperationReceipt.fromRpc({
actualGasCost: '0x1',
actualGasUsed: '0x2',
entryPoint: '0x0000000071727de22e5e9d8baf0edac6f37da032',
logs: [],
nonce: '0x1',
receipt: { ... },
sender: '0xE911628bF8428C23f179a07b081325cAe376DE1f',
success: true,
userOpHash: '0x5ab163e9b2f30549274c7c567ca0696edf9ef1aa476d9784d22974468fdb24d8',
})Definition
function fromRpc(
rpc: Rpc,
): UserOperationReceiptSource: src/erc4337/UserOperationReceipt.ts
Parameters
rpc
- Type:
Rpc
The RPC user operation receipt to convert.
rpc.executionGasUsed
- Type:
0x${string}
Execution gas used.
rpc.gasUsed
- Type:
0x${string}
Total execution and state gas used.
rpc.logs
- Type:
readonly Pick[]
Logs emitted by this frame.
rpc.stateGasUsed
- Type:
0x${string}
Final state gas used.
rpc.status
- Type:
RpcStatus
Zero for failure, one for success, or two for a skipped frame.
Return Type
An instantiated UserOperationReceipt.UserOperationReceipt.

