alleslabs / celatone-frontend

Celatone frontend
https://celat.one
GNU General Public License v3.0
27 stars 18 forks source link

[CFE-610]: Feature - evm contract assets #1116

Closed Poafs1 closed 2 months ago

Poafs1 commented 2 months ago

Summary by CodeRabbit

linear[bot] commented 2 months ago

CFE-610 EVM Contract Details - Display Holding Assets

vercel[bot] commented 2 months ago

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

Name Status Preview Comments Updated (UTC)
celatone-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 28, 2024 9:08am
6 Skipped Deployments | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **celatone-frontend-main** | ⬜️ Ignored ([Inspect](https://vercel.com/alleslabs/celatone-frontend-main/82gN8NhqNA5F696U42y3t8wSZxTn)) | [Visit Preview](https://celatone-frontend-main-git-feature-cfe-610-evm-1bcd70-alleslabs.vercel.app) | | Aug 28, 2024 9:08am | | **initia-celatone-frontend** | ⬜️ Ignored ([Inspect](https://vercel.com/alleslabs/initia-celatone-frontend/3GRNc5DV87YCKMPhKGC8WxBv9DoP)) | [Visit Preview](https://initia-celatone-frontend-git-feature-cfe-610-e-8f2918-alleslabs.vercel.app) | | Aug 28, 2024 9:08am | | **neutron-celatone-frontend** | ⬜️ Ignored ([Inspect](https://vercel.com/alleslabs/neutron-celatone-frontend/9KzoTJU8RE2uLFskLoKuCnMUpyVG)) | [Visit Preview](https://neutron-celatone-frontend-git-feature-cfe-610-15eaf9-alleslabs.vercel.app) | | Aug 28, 2024 9:08am | | **osmosis-celatone-frontend** | ⬜️ Ignored ([Inspect](https://vercel.com/alleslabs/osmosis-celatone-frontend/3TbBvYaeF7SR74pTrWRRF2qpFNBC)) | [Visit Preview](https://osmosis-celatone-frontend-git-feature-cfe-610-6ca582-alleslabs.vercel.app) | | Aug 28, 2024 9:08am | | **sei-celatone-frontend** | ⬜️ Ignored ([Inspect](https://vercel.com/alleslabs/sei-celatone-frontend/8LKb8bv85RTTk5TC9FUsUpRH6s9M)) | [Visit Preview](https://sei-celatone-frontend-git-feature-cfe-610-evm-7e5b35-alleslabs.vercel.app) | | Aug 28, 2024 9:08am | | **terra-celatone-frontend** | ⬜️ Ignored ([Inspect](https://vercel.com/alleslabs/terra-celatone-frontend/DsZ3JRvz9oeCPLS7KCqx9Rk5SvuJ)) | [Visit Preview](https://terra-celatone-frontend-git-feature-cfe-610-ev-e7d740-alleslabs.vercel.app) | | Aug 28, 2024 9:08am |
coderabbitai[bot] commented 2 months ago

[!IMPORTANT]

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The recent changes primarily focus on enhancing the application's support for Ethereum Virtual Machine (EVM) functionality. This includes the introduction of new components for displaying EVM contract details, updates to configuration types, and the addition of hooks for interacting with EVM parameters and contract information. Additionally, several utility functions and validation schemas have been introduced or modified to accommodate these enhancements, contributing to a more robust framework for managing EVM-related data.

Changes

Files Change Summary
CHANGELOG.md Added entry for improvements, including a new minievm branch and references to pull requests for existing functionality updates.
package.json Updated @alleslabs/shared dependency version from 1.0.0-dev2 to 1.0.0-dev3.
src/config/chain/devChainConfigs.ts, src/lib/app-provider/contexts/default.ts Introduced new evm configuration option with enabled set to false in both files, enhancing control over EVM settings.
src/lib/app-provider/env.ts Added new entries to CELATONE_QUERY_KEYS enum: EVM_PARAMS_LCD, EVM_CODES_BY_ADDRESS, EVM_CONTRACT_INFO_SEQUENCER.
src/lib/app-provider/hooks/useConfig.ts Introduced new hook useEvmConfig for managing EVM-related configurations.
src/lib/app-provider/hooks/useConvertHexAddress.ts Modified type imports and return types for address conversion functions to improve type safety with new address types.
src/lib/app-provider/hooks/useGas.ts Added checks for fees.fee_tokens to improve error handling.
src/lib/components/json/TextReadOnly.tsx Introduced new TextReadOnly component for displaying text in a read-only format using Ace Editor.
src/lib/layout/network-menu/NetworkMenuBody.tsx, src/lib/layout/network-menu/hooks/useNetworkSelector.ts, src/lib/layout/network-menu/index.tsx Added support for filteredDevnetChains in the network menu components to handle development networks.
src/lib/pages/custom-network/types.ts Updated to include new evm property in network configuration types, allowing for EVM integration.
src/lib/pages/evm-contract-details/components/*.tsx Introduced components for displaying EVM contract details, including bytecode, overview, and top-level contract information.
src/lib/pages/evm-contract-details/index.tsx Introduced main component for displaying EVM contract details, managing routing and data fetching using hooks.
src/lib/services/evm/*.ts Introduced hooks and functions for interacting with EVM parameters and contract information, enhancing data fetching capabilities.
src/lib/services/types/evm/*.ts Added Zod schemas for validating EVM-related data structures, improving type safety.
src/lib/styles/globals.css, src/lib/styles/theme/components/button.ts Added new CSS rules and styling updates for components, enhancing visual presentation.
src/lib/utils/address.ts, src/lib/utils/validate.ts Modified utility functions to handle Ethereum-style public keys and introduced is0x function for address validation.
src/pages/[network]/evm-contracts/[contractAddress]/[tab].tsx, src/pages/[network]/evm-contracts/[contractAddress]/index.tsx Introduced new pages for displaying EVM contract details, facilitating easier integration into the application.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant App
    participant EvmContractDetails
    participant EvmService

    User->>App: Requests EVM contract details
    App->>EvmContractDetails: Fetch contract details
    EvmContractDetails->>EvmService: Get contract info
    EvmService-->>EvmContractDetails: Return contract data
    EvmContractDetails-->>App: Send contract details
    App-->>User: Display contract details

🐰 In the land of code so bright,
Changes hop with pure delight.
EVM contracts now take the stage,
With details clear on every page.
A sprinkle of style, a dash of flair,
Our app's new look is beyond compare! 🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit .` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai generate interesting stats about this repository and render them as a table.` - `@coderabbitai show all the console.log statements in this repository.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (invoked as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. Additionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Configuration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.