Keithbm.base.eth pfp
Keithbm.base.eth

@keithbm

Four questions every Ritual callback should ask Every async answer (or non-answer) takes the same path. Handle all four or you get silent hangs. 1. Did it arrive in time? Record the ask. TTL is in Ritual blocks (~350 ms). If the window closes with nothing, show “timed out” and let the user retry. 2. Is it really from AsyncDelivery? First line of the callback: require(msg.sender == AsyncDelivery). Anything else → revert. Don’t even unpack the payload. 3. Did the job succeed? The tx can settle while the job fails. Check hasError before reading output. If true, mark failed and keep the error message. 4. Does the output parse?** Model replies are text. They won’t always match your format. If it doesn’t parse, mark “unexpected output.” Only store/show the result when every answer is yes. Rule of thumb: every “no” must end in a state the user can see. Timed out, rejected, failed = fine. A spinner that never stops is the bug.
0 reply
0 recast
2 reactions