Skip to content

Commit 81a6ef3

Browse files
devin-ai-integration[bot]Jayant Krishnamurthyjayantk
authored
docs: add handling callback failures section to entropy best practices (#548)
* docs: add handling callback failures section to entropy best practices Co-Authored-By: Jayant Krishnamurthy <jayant@dourolabs.xyz> * style: fix prettier formatting Co-Authored-By: Jayant Krishnamurthy <jayant@dourolabs.xyz> * Update best-practices.mdx * Update best-practices.mdx --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Jayant Krishnamurthy <jayant@dourolabs.xyz> Co-authored-by: Jayant Krishnamurthy <jayantkrishnamurthy@gmail.com>
1 parent 19fc875 commit 81a6ef3

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

pages/entropy/best-practices.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,21 @@ to submit the necessary transactions.
1515

1616
The gas limit for each chain is listed on the [contract addresses](./contract-addresses) page.
1717

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+
1833
## Generating random values within a specific range
1934

2035
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

Comments
 (0)