Description
Build a TypeScript service named PayoutService that exposes one authenticated API endpoint to create ERC20 payout requests. Each request must include an EVM recipient address and an amount, and must be stored in PostgreSQL.
A periodic worker should process pending requests, execute ERC20 transfers using a configured wallet and token contract, update each request with the transaction hash or failure reason, and retry failed transfers up to a configurable limit.
Description
Build a TypeScript service named PayoutService that exposes one authenticated API endpoint to create ERC20 payout requests. Each request must include an EVM recipient address and an amount, and must be stored in PostgreSQL.
A periodic worker should process pending requests, execute ERC20 transfers using a configured wallet and token contract, update each request with the transaction hash or failure reason, and retry failed transfers up to a configurable limit.