Skip to content

feat(entropy): Split out V2 interface into separate file. #2645

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 2, 2025

Conversation

jayantk
Copy link
Contributor

@jayantk jayantk commented May 1, 2025

Summary

Split out the V2 functionality into a separate file. The intention is that developers can interact exclusively with the IEntropyV2 interface. This interface hides internal methods for providers etc that users don't need to know about. Meanwhile, we retain the IEntropy interface (which has the old functions + provider functions + inherits the V2 functions) as the full interface the contract implements.

Rationale

These changes should make it easier for users to identify the functionality they need

How has this been tested?

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

@jayantk jayantk requested a review from a team as a code owner May 1, 2025 14:15
Copy link

vercel bot commented May 1, 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 1, 2025 2:23pm
component-library ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 1, 2025 2:23pm
entropy-debugger ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 1, 2025 2:23pm
insights ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 1, 2025 2:23pm
proposals ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 1, 2025 2:23pm
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 1, 2025 2:23pm

address provider
) external view returns (EntropyStructsV2.ProviderInfo memory info);

function getDefaultProvider() external view returns (address provider);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note that I moved this function over to IEntropyV2 as well since end users may want to call it

/// @return info The provider information including configuration, fees, and operational status
/// @dev This method returns detailed information about a provider's configuration and capabilities.
/// The returned ProviderInfo struct contains information such as the provider's fee structure and gas limits.
function getProviderInfoV2(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

method docs on this function and below are new

@@ -0,0 +1,305 @@
[
{
"anonymous": false,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

forgot to commit this ABI previously

@jayantk jayantk merged commit 578741c into main May 2, 2025
10 checks passed
@jayantk jayantk deleted the entropy_error15 branch May 2, 2025 04:33
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.

2 participants