Skip to content

Commit b27eed8

Browse files
committed
add pointer to debug guide
1 parent 67dba48 commit b27eed8

File tree

1 file changed

+7
-1
lines changed
  • pages/entropy/generate-random-numbers

1 file changed

+7
-1
lines changed

pages/entropy/generate-random-numbers/evm.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@ contract YourContract is IEntropyConsumer {
151151
// @param provider The address of the provider that generated the random number. If your app uses multiple providers, you can use this argument to distinguish which one is calling the app back.
152152
// @param randomNumber The generated random number.
153153
// This method is called by the entropy contract when a random number is generated.
154+
// This method **must** be implemented on the same contract that requested the random number.
155+
// This method should **never** return an error -- if it returns an error, then the keeper will not be able to invoke the callback.
156+
// If you are having problems receiving the callback, the most likely cause is that the callback is erroring.
157+
// See the callback debugging guide here to identify the error https://docs.pyth.network/entropy/debug-callback-failures
154158
function entropyCallback(
155159
uint64 sequenceNumber,
156160
address provider,
@@ -170,7 +174,9 @@ contract YourContract is IEntropyConsumer {
170174

171175
When the final random number is ready to use, the entropyCallback function will be called by the Entropy contract. This will happen in a separate transaction submitted by the requested provider.
172176

173-
**The entropyCallback function should be implemented in the same contract that is requesting the random number.**
177+
<Callout type="warning" emoji="⚠️">
178+
The `entropyCallback` function should **never** return an error. If it returns an error, the keeper will not be able to invoke the callback.
179+
If you are having problems receiving the callback, please see [Debugging Callback Failures](/entropy/debug-callback-failures).
174180

175181
## Additional Resources
176182

0 commit comments

Comments
 (0)