RPS Router

The RPSRouter is a contract designed to bridge user interactions between the native protocol contract and the RPS raffle contract. Customized for each integrated protocol, the ABI provided below serves merely as an illustrative example.

function execute(
    bytes calldata data // call data for the target protocol,
    uint256 tradeAmount  // raffle tickets are generated based on this value
) external payable {}

Calls a function within the RPS raffle contract to automatically generate tickets for the sender, based on the Ether volume transferred. Additionally, it invokes the integrated protocol using the supplied calldata and carries out custom validations.

Last updated