OneTimePayments

Payments on the GoodDollar wallet are done via payment links.

G$s are held in an escrow and the recipient can retrieve the funds if he has the key. While the money is in escrow the sender can choose to cancel the payment and retrieve the funds. Based on Celo's payments contract.

Events

PaymentDeposit

Emitted when payment was performed. Occurs only during the token contract call.

event PaymentDeposit(address indexed from, address paymentId, uint256 amount);

To deposit a payment to a one time payment address call perform the further:

GoodDollar.transferAndCall(value, data);

The above will trigger OneTimePayments onTokenTransfer callback, which will trigger the PaymentDeposit.

PaymentCancel

Emitted when payment was cancelled.

event PaymentCancel(address indexed from, address paymentId, uint256 amount);

PaymentWithdraw

Emitted when payment was withdrawn.

event PaymentWithdraw(
    address indexed from,
    address indexed to,
    address indexed paymentId,
    uint256 amount
);

withdraw

Withdrawal function.

function withdraw(address paymentId, bytes memory signature) public;

cancel

Payments cancel function.

Allows only creator of payment to cancel.

function cancel(address paymentId) public;

Last updated