Required checks
1
Authorize the caller
Only accept callbacks from the configured coordinator address.
2
Look up request state
Load the record for
requestId and reject unknown requests.3
Prevent duplicate settlement
Reject callbacks for requests you have already settled.
4
Settle outcome deterministically
Derive the result, persist state, and avoid unnecessary external calls.
Minimal guard pattern
What to avoid
- callbacks that make unrelated external calls before marking state
- large amounts of branching that increase revert risk
- deriving user-visible state before verifying the request exists
- relying on frontend state instead of contract state during settlement
Verification checklist
- The deployed coordinator address matches the network you are using.
- Unknown request IDs revert.
- Duplicate settlement reverts.
- The callback succeeds reliably within the gas supplied by the delivery transaction.
Related pages
Coordinator reference
Look up the request function,
requestFee() call, and callback interface.Integration pattern
Start from a complete example that already applies these checks.
Quickstart
Use the hosted-coordinator setup flow before you harden your callback.