Payment & Streaming
This section covers the core payment and streaming functionality of the Papaya protocol.
Last updated
This section covers the core payment and streaming functionality of the Papaya protocol.
Executes a permit and then performs an action in a single transaction.
function permitAndCall(bytes permit, bytes action) external payablepermit (bytes): The permit data for token approval
action (bytes): The action to execute after the permit
This function allows users to approve tokens and execute an action in a single transaction. This is useful for gasless interactions where users sign permits off-chain.
// Execute permit and action in one transaction
await papayaContract.permitAndCall(permitData, actionData, {
value: ethers.utils.parseEther("0.1")
});Transfer: Emitted when tokens are transferred during streaming
WrongSignature: When permit signature is invalid
DeadlineExceeded: When permit has expired
Last updated