Assessment reports>Token Paymaster>Threat Models>_postOp

Function: _postOp(PostOpMode mode, bytes calldata context, uint256 actualGasCost)

This function executes the Paymaster's payment conditions.

Inputs

  • mode

    • Control: Not controlled by user.

    • Constraints: Must be one of these: opSucceeded, opReverted, or postOpReverted.

    • Impact: Used to determine the state of the operation.

  • context

    • Control: Not controlled by user.

    • Constraints: N/A.

    • Impact: This contains the payment conditions signed by the Paymaster.

  • actualGasCost

    • Control: Not controlled by user.

    • Constraints: N/A.

    • Impact: This is the amount to be paid back to the Entrypoint.

Branches and code coverage (including function calls)

Intended branches

  • Succeeds with mode opSucceeded or opReverted.

  • Succeeds with mode postOpReverted.

  • Oracle aggregator's exchange rate is used.

  • UserOp's exchange rate is used.

Negative behavior

  • Failed transferFrom() leads to event being emitted.

Zellic © 2024Back to top ↑