Wagent V1
The Wagent contract is fully open-source, unupgradeable, and trustless, allowing anyone to use it with confidence. It acts as a proxy between the payer and the merchant, handling payments in a secure and decentralized manner. The contract offers two primary functions: pay
and pay_stream
.
Before interacting with the contract, ensure that the sender (or payment creator) has set sufficient allowance for the contract address. This allows the contract to transfer the necessary tokens to complete the payment.
pay
The pay
function facilitates direct, one-time payments and is structured as follows:
pay_stream
The pay_stream
function supports streaming payments over a specified duration and is written as:
Last updated