You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/entropy/best-practices.mdx
+15Lines changed: 15 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,21 @@ to submit the necessary transactions.
15
15
16
16
The gas limit for each chain is listed on the [contract addresses](./contract-addresses) page.
17
17
18
+
## Handling callback failures
19
+
20
+
While the default entropy provider is highly reliable, in rare cases a callback might not be received. This typically happens when there's an issue with your contract's callback implementation rather than with the provider itself. The most common causes are:
21
+
22
+
1. The callback function is using more gas than the allowed limit
23
+
2. The callback function contains logic that throws an error
24
+
25
+
If you're not receiving a callback, you can manually invoke it to identify the specific issue. This allows you to:
26
+
27
+
- See if the transaction fails and why
28
+
- Check the gas usage against the chain's callback gas limit
29
+
- Debug your callback implementation
30
+
31
+
For detailed instructions on how to manually invoke and debug callbacks, refer to the [Debug Callback Failures](./debug-callback-failures) guide.
32
+
18
33
## Generating random values within a specific range
19
34
20
35
You can map the random number provided by Entropy into a smaller range using the solidity [modulo operator](https://docs.soliditylang.org/en/latest/types.html#modulo).
0 commit comments