PackedUserOperation
*A https://github.com/ethereum/ercs/blob/master/ERCS/erc-4337.md#useroperation[user operation] is composed of the following elements:
sender(address): The account making the operationnonce(uint256): Anti-replay parameter (see “Semi-abstracted Nonce Support” )factory(address): account factory, only for new accountsfactoryData(bytes): data for account factory (only if account factory exists)callData(bytes): The data to pass to the sender during the main execution callcallGasLimit(uint256): The amount of gas to allocate the main execution callverificationGasLimit(uint256): The amount of gas to allocate for the verification steppreVerificationGas(uint256): Extra gas to pay the bundlermaxFeePerGas(uint256): Maximum fee per gas (similar to EIP-1559 max_fee_per_gas)maxPriorityFeePerGas(uint256): Maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas)paymaster(address): Address of paymaster contract, (or empty, if account pays for itself)paymasterVerificationGasLimit(uint256): The amount of gas to allocate for the paymaster validation codepaymasterPostOpGasLimit(uint256): The amount of gas to allocate for the paymaster post-operation codepaymasterData(bytes): Data for paymaster (only if paymaster exists)signature(bytes): Data passed into the account to verify authorization When passed to on-chain contracts, the following packed version is used.sender(address)nonce(uint256)initCode(bytes): concatenation of factory address and factoryData (or empty)callData(bytes)accountGasLimits(bytes32): concatenation of verificationGas (16 bytes) and callGas (16 bytes)preVerificationGas(uint256)gasFees(bytes32): concatenation of maxPriorityFeePerGas (16 bytes) and maxFeePerGas (16 bytes)paymasterAndData(bytes): concatenation of paymaster fields (or empty)signature(bytes)*
struct PackedUserOperation {
address sender;
uint256 nonce;
bytes initCode;
bytes callData;
bytes32 accountGasLimits;
uint256 preVerificationGas;
bytes32 gasFees;
bytes paymasterAndData;
bytes signature;
}