Skip to content

feat: dynamically fetch entropy gas limits from blockchain #763

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Description

This PR updates the Entropy contract addresses documentation page to dynamically fetch gas limits from the blockchain instead of displaying static values. The implementation follows the same pattern as the existing EntropyFeeTable component, using the getProviderInfoV2 method on the Entropy contract to retrieve real-time gas limit data.

Type of Change

  • Page update/improvement
  • Other: Add dynamic blockchain data fetching functionality

Areas Affected

  • pages/entropy/contract-addresses.mdx - Updated to use new dynamic gas limit component
  • components/EntropyGasLimitTable.tsx - New component for fetching gas limits from blockchain
  • components/EntropyDeploymentTable.tsx - Removed static gas limit column
  • abis/IEntropyV2.json - Added ABI file for blockchain queries

Key Changes

  1. New Dynamic Component: Created EntropyGasLimitTable that:

    • Fetches gas limits using getProviderInfoV2 contract method
    • Displays loading states while querying the blockchain
    • Follows the same async pattern as EntropyFeeTable
  2. Updated Page Structure: Modified contract addresses page to:

    • Show contract addresses and reveal delays in original table
    • Display dynamic gas limits in separate dedicated sections
    • Filter deployments to only query networks with RPC endpoints
  3. Removed Static Data: Eliminated static gas limit column from deployment table since values are now fetched dynamically

Critical Review Areas

⚠️ High Priority for Review:

  1. ABI Compatibility: Verify IEntropyV2.json is the correct/latest version compatible with deployed contracts
  2. RPC Reliability: Test that all network RPC endpoints work reliably in production environment
  3. Error Handling: Review if error handling is adequate for production use (currently minimal)
  4. Network Filtering: Ensure filtering logic correctly identifies deployments with RPC endpoints
  5. UI/UX Impact: Verify the table restructuring aligns with intended design goals

Checklist

  • I ran pre-commit run --all-files to check for linting errors
  • I have reviewed my changes for clarity and accuracy
  • All links are valid and working
  • Code examples (if any) are complete and functional
  • Content follows the established style guide
  • Changes are properly formatted in Markdown
  • Preview renders correctly in development environment

Testing

  • ✅ Tested locally on localhost:3000/entropy/contract-addresses
  • ✅ Verified dynamic gas limits load correctly for available networks
  • ✅ Confirmed loading states display properly during blockchain queries
  • ✅ Linting passes with no errors related to the changes

Screenshots

Contract Addresses Page - Dynamic Gas Limits

The screenshot shows the updated contract addresses page with dynamic gas limit tables for both mainnet and testnet networks, displaying real values fetched from the blockchain.

Related Issues

Addresses request from Jayant (jayant@dourolabs.xyz) to update entropy documentation to fetch gas limits dynamically from blockchain instead of using static values.

Additional Notes

  • Implementation follows the exact same pattern as EntropyFeeTable for consistency
  • Gas limits are extracted from the defaultGasLimit field of the ProviderInfo struct returned by getProviderInfoV2
  • Some networks may show "Loading..." longer than others due to RPC response times
  • The change separates static contract information from dynamic blockchain data for better organization

Contributor Information

- Add EntropyGasLimitTable component to fetch gas limits using getProviderInfoV2
- Update contract addresses page to display dynamic gas limits
- Remove static gas limit column from EntropyDeploymentTable
- Add IEntropyV2.json ABI for blockchain queries
- Follow same pattern as EntropyFeeTable for async data fetching

Co-Authored-By: Jayant <jayant@dourolabs.xyz>
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link

vercel bot commented Jul 23, 2025

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

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 23, 2025 9:08pm
documentation ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 23, 2025 9:08pm

- Fix pre-commit CI failure by applying prettier formatting
- Reformat promise chain and simplify ternary operator

Co-Authored-By: Jayant <jayant@dourolabs.xyz>
devin-ai-integration bot and others added 3 commits July 23, 2025 21:02
- Remove abis/IEntropyV2.json file as requested
- Delete separate EntropyGasLimitTable component
- Integrate gas limit column back into EntropyDeploymentTable
- Update contract-addresses.mdx to use unified table approach
- Currently showing static gas limits, dynamic fetching to be implemented next

Co-Authored-By: Jayant <jayant@dourolabs.xyz>
- Add inline ABI for getProviderInfoV2 method to avoid abis folder dependency
- Integrate dynamic gas limit fetching directly into EntropyDeploymentTable
- Maintain fallback to static values when blockchain queries fail
- Show 'Loading...' state while fetching dynamic values from contracts
- Successfully combines contract addresses and gas limits in single table

Co-Authored-By: Jayant <jayant@dourolabs.xyz>
- Fix formatting issues identified by pre-commit prettier hook
- Ensure code style consistency across the repository

Co-Authored-By: Jayant <jayant@dourolabs.xyz>
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.

0 participants