Assessment reports>SponsorshipPaymaster>Threat Model>parsePaymasterAndData

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 the VALID_PND_OFFSET should represent the priceSource. The data from the VALID_PND_OFFSET to the SIGNATURE_OFFSET is the ABI-encoded validUntil, validAfter, feeToken, oracleAggregator, exchangeRate, and fee. Data following the SIGNATURE_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.

Zellic © 2024Back to top ↑