Last updated
Last updated
Inherits: IERC20PaymentClientBase_v1, Module_v1
Author: Inverter Network
Enables modules within the Inverter Network to create and manage payment orders that can be processed by authorized payment processors, ensuring efficient and secure transactions.
Utilizes {SafeERC20} for token operations and integrates with {IPaymentProcessor_v1} to handle token payments. This abstract contract must be extended by modules that manage {ERC20} payment orders, supporting complex payment scenarios.
The list of oustanding orders.
Emptied whenever orders are collected.
The current cumulative amount of tokens outstanding.
The number of payment processor flags used by this payment client.
The payment processor flags used by this payment client.
Storage gap for future upgrades.
See {IERC165-supportsInterface}.
Modifier to guarantee the recipient is valid.
Modifier to guarantee the amount is valid.
Modifier to guarantee the payment order is valid.
Initializes the staking contract.
Parameters
Adds a new {PaymentOrder} to the list of outstanding orders.
Parameters
Adds a set of new {PaymentOrder}s to the list of outstanding orders.
Parameters
Sets the flags for the PaymentOrders.
Parameters
Returns the list of outstanding payment orders.
Returns
Returns the total outstanding token payment amount.
Parameters
Returns
Collects outstanding payment orders.
Marks the orders as completed for the client.
Returns
Notifies the PaymentClient, that tokens have been paid out accordingly.
Payment Client will reduce the total amount of tokens it will stock up by the given amount.
Parameters
Returns the flags used when creating payment orders in this client.
Returns
Returns the number of flags this client uses for PaymentOrders.
Returns
Ensures the recipient is valid.
Parameters
Ensures the amount is valid.
Parameters
Ensures the token is valid.
Parameters
Ensures the payment order is valid.
Parameters
Ensures amount
of payment tokens exist in address(this). In case the token being paid out is the FundingManager token, it will trigger a callback to the FundingManager to transfer the tokens to
Ensures amount
of token allowance for payment processor(s).
Returns whether address who
is an authorized payment processor.
Returns the payment configuration from a list of supplied flag values. Can be overriden to add additional validation steps.