toMap method

  1. @override
Map<String, dynamic> toMap()
override

Converts the user operation to a map.

Returns a Map representing the user operation.

Implementation

@override
Map<String, dynamic> toMap() {
  return <String, dynamic>{
    'sender': sender.hexEip55,
    'nonce': '0x${nonce.toRadixString(16)}',
    'initCode': initCode,
    'callData': callData,
    'callGasLimit': '0x${callGasLimit.toRadixString(16)}',
    'verificationGasLimit': '0x${verificationGasLimit.toRadixString(16)}',
    'preVerificationGas': '0x${preVerificationGas.toRadixString(16)}',
    'maxFeePerGas': '0x${maxFeePerGas.toRadixString(16)}',
    'maxPriorityFeePerGas': '0x${maxPriorityFeePerGas.toRadixString(16)}',
    'signature': signature,
    'paymasterAndData': paymasterAndData,
  };
}