Skip to content

Add AppLayer Testnet Network#735

Merged
kvhnuke merged 2 commits intoenkryptcom:devop/package-updates-2-10from
itamarcps:add-applayer-testnet
Aug 4, 2025
Merged

Add AppLayer Testnet Network#735
kvhnuke merged 2 commits intoenkryptcom:devop/package-updates-2-10from
itamarcps:add-applayer-testnet

Conversation

@itamarcps
Copy link
Contributor

@itamarcps itamarcps commented Aug 1, 2025

Summary by CodeRabbit

  • New Features
    • Added support for the AppLayer Testnet network, including full network configuration and integration.
    • Users can now view and interact with the AppLayer Testnet within the network selection options.

@coderabbitai
Copy link

coderabbitai bot commented Aug 1, 2025

Walkthrough

A new Ethereum-compatible network, "AppLayer Testnet," was integrated into the codebase. This involved adding its identifier to the network enum, defining its configuration and endpoints, updating the network index to export it, and registering its Etherscan-compatible activity handler endpoint.

Changes

Cohort / File(s) Change Summary
Network Enum Update
packages/types/src/networks.ts
Added AppLayerTestnet to the NetworkNames enum.
Etherscan Endpoint Mapping
packages/extension/src/providers/ethereum/libs/activity-handlers/providers/etherscan/configs.ts
Added AppLayerTestnet endpoint URL to NetworkEndpoints.
Network Configuration
packages/extension/src/providers/ethereum/networks/applayer-testnet.ts
Introduced new network config for AppLayer Testnet, including metadata, RPC, explorer, icon, and activity handler.
Network Index Export
packages/extension/src/providers/ethereum/networks/index.ts
Imported and exported appLayerTestnet in the default export object.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Extension
    participant AppLayerTestnet RPC
    participant AppLayerTestnet Explorer API

    User->>Extension: Selects AppLayer Testnet
    Extension->>AppLayerTestnet RPC: Sends JSON-RPC requests (e.g., get balance)
    AppLayerTestnet RPC-->>Extension: Returns blockchain data
    Extension->>AppLayerTestnet Explorer API: Fetches activity/transactions
    AppLayerTestnet Explorer API-->>Extension: Returns activity data
    Extension-->>User: Displays network info and activity
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • Add Cytonic Testnet network #686: Both PRs add a new Ethereum-compatible testnet network by extending the same set of files and constructs—network enum, network configuration module, network index export, and Etherscan activity handler endpoints—with analogous changes for different testnets.

Suggested reviewers

  • kvhnuke
  • SemajaM8

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e3fdc76 and 415019d.

📒 Files selected for processing (4)
  • packages/extension/src/providers/ethereum/libs/activity-handlers/providers/etherscan/configs.ts (1 hunks)
  • packages/extension/src/providers/ethereum/networks/applayer-testnet.ts (1 hunks)
  • packages/extension/src/providers/ethereum/networks/index.ts (2 hunks)
  • packages/types/src/networks.ts (1 hunks)
🔇 Additional comments (7)
packages/types/src/networks.ts (1)

116-116: LGTM! Network identifier follows established pattern.

The addition of AppLayerTestnet to the enum is consistent with existing entries and properly placed at the end to avoid disrupting existing order.

Note: Consider adding a corresponding entry to the CoingeckoPlatform enum if price data tracking is needed for this testnet in the future.

packages/extension/src/providers/ethereum/networks/index.ts (2)

81-81: LGTM! Import follows established pattern.

The import statement for appLayerTestnet is consistent with other network imports in the file.


173-173: LGTM! Export integration is correct.

The network is properly added to the default export object, making it accessible alongside other networks.

packages/extension/src/providers/ethereum/libs/activity-handlers/providers/etherscan/configs.ts (1)

80-80: Verified Etherscan compatibility for AppLayerTestnet endpoint

Balance and transaction APIs on https://testnet-explorer.applayer.com/api/ return the expected Etherscan-style JSON:

• Balance endpoint
• Request: ?module=account&action=balance&address=0x…&tag=latest
• Response: { "message":"OK", "result":"0", "status":"1" }

• Transaction list endpoint
• Request: ?module=account&action=txlist&address=0x…&startblock=0&endblock=99999999&sort=asc
• Response: { "message":"OK", "result":[ …transactions… ], "status":"1" }

No further changes needed.

packages/extension/src/providers/ethereum/networks/applayer-testnet.ts (3)

1-6: LGTM! Imports and dependencies are correct.

All necessary imports are present and follow the established patterns for network configuration files.


22-24: LGTM! Network instantiation and export are correct.

The EvmNetwork instance is properly created with the defined options and exported as the default export.


7-20: Configuration Verified: AppLayer Testnet Parameters OK

All key network parameters have been validated and are correct:

  • Chain ID 0x1264a is unique in the codebase.
  • RPC endpoint at https://testnet-api.applayer.com returns 0x1264a as expected.
  • Icon asset applayer.webp exists at
    packages/extension/src/providers/ethereum/networks/icons/applayer.webp.

No further action required.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 using 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 generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this 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.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@kvhnuke kvhnuke changed the base branch from main to devop/package-updates-2-10 August 4, 2025 20:34
@kvhnuke kvhnuke merged commit 253c86e into enkryptcom:devop/package-updates-2-10 Aug 4, 2025
2 checks passed
This was referenced Aug 4, 2025
@coderabbitai coderabbitai bot mentioned this pull request Aug 18, 2025
@coderabbitai coderabbitai bot mentioned this pull request Sep 1, 2025
@coderabbitai coderabbitai bot mentioned this pull request Sep 22, 2025
@coderabbitai coderabbitai bot mentioned this pull request Nov 5, 2025
@coderabbitai coderabbitai bot mentioned this pull request Dec 18, 2025
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