Function payInvoiceERC20Escrow
This function allows anyone to make an escrow payment. There is no due date to be passed upon creating the payment. The function automatically sets a due date of 0.
The payment can be released at a later time by calling the releaseEscrowPayment function.
_payee
The receiver of the principal amount.
_feeAddress
In case you want to charge an extra fee, this is the receiving address of the fee.
_amount
The fee amount in wei. Make sure to double-check the number of decimals of the baseAsset.
_feeAmount
The fee amount in wei. Make sure to double-check the number of decimals of the baseAsset.
_paymentReference
Reference of the related payment. Make sure to add salt to and hash the _paymentReference to increase privacy and prevent double references.
_shouldPayOutViaRequestNetwork
This is a uint8 parameter. Pass a value != 0 if you want the payout of the invoice routed through Request Network's ERC20FeeProxy contract.
The _amount
and _feeAmount
total are transferred to Compound Finance's Comet contract, to earn yield.
The payment details are stored in the paymentMapping.
Parameter _shouldPayOutViaRequestNetwork
is a uint8 to save on gas fees (compared to a bool). You can pass a value of 0 if you don't want the payment to be routed through Request Network.
Interact with the payInvoiceERC20 function:
Last updated