Function: parsePaymasterAndData(byte[] paymasterAndData)
This function is used to parse the paymasterAndData
field of the UserOperation
struct.
Inputs
paymasterAndData
Control: Fully controlled by the user.
Constraints: It must be data in a valid format, where the data from the
VALID_PND_OFFSET
-1 to theVALID_PND_OFFSET
should represent thepriceSource
. The data from theVALID_PND_OFFSET
to theSIGNATURE_OFFSET
is the ABI-encodedvalidUntil
,validAfter
,feeToken
,oracleAggregator
,exchangeRate
, andfee
. Data following theSIGNATURE_OFFSET
position is a valid signature.Impact: This is the structural data to be parsed.
Branches and code coverage (including function calls)
Intended branches
Succeeds with parsing data properly.
Negative behavior
Invalid
paymasterAndData
causes revert.