Skip to content

Conversation

@jayantk
Copy link
Contributor

@jayantk jayantk commented May 12, 2025

Summary

Update the EntropyTester contract to support both the v1 and v2 request flows, as well as more configurable callback conditions.

Rationale

These changes will help us test entropy deployments more thoroughly.

How has this been tested?

  • Current tests cover my changes
  • Added new tests
  • Manually tested the code

@vercel
Copy link

vercel bot commented May 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-reference ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 9:52pm
component-library ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 9:52pm
entropy-debugger ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 9:52pm
entropy-explorer ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 9:52pm
insights ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 9:52pm
proposals ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 9:52pm
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 9:52pm

) public payable returns (uint64 sequenceNumber) {
requireGasUsageAboveLimit(callbackGasUsage);

IEntropy entropy = IEntropy(address(getEntropyWithDefault(_entropy)));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks a bit awkward. Maybe make getEntropyWithDefault just return the address?

* @notice Ensures the gas usage is above the minimum required limit
* @param gasUsage The gas usage to check
*/
function requireGasUsageAboveLimit(uint32 gasUsage) internal pure {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this? we are not storing callback results in this contract 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants