Add Cytonic Testnet network#686
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (3)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughA new Ethereum-compatible network configuration for the Cytonic Testnet was introduced, including its endpoint mapping, network options, and integration into the existing network registry. The changes extend the network enum, add the network's configuration, and update the list of available networks. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Extension
participant CytonicTestnet
participant EtherscanAPI
User->>Extension: Selects Cytonic Testnet
Extension->>CytonicTestnet: Loads network configuration
Extension->>EtherscanAPI: Uses CytonicTestnet endpoint for activity queries
EtherscanAPI-->>Extension: Returns activity data
Extension-->>User: Displays Cytonic Testnet activity
Possibly related PRs
Suggested reviewers
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
packages/extension/src/providers/ethereum/networks/index.ts (1)
74-74: Group import with other testnet networks
Consider movingimport cytonicTestnetNode from './cytonic-testnet';alongside existing*Testnetimports (e.g.,sepoliaNode,rootstockTestnetNode) to maintain logical grouping and improve readability in this large import list.packages/extension/src/providers/ethereum/networks/cytonic-testnet.ts (1)
7-20: Validate EvmNetworkOptions configuration
ThenetOptionsobject covers all required fields forEvmNetwork. For enhanced features, consider adding optional fields:
coingeckoPlatform/coingeckoIDto enable price lookups for CCCbuyLinkif token purchase support is needed in the UI
These would improve user experience but are not strictly required.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 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/cytonic-testnet.ts(1 hunks)packages/extension/src/providers/ethereum/networks/index.ts(2 hunks)packages/types/src/networks.ts(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
packages/extension/src/providers/ethereum/networks/cytonic-testnet.ts (2)
packages/extension/src/providers/ethereum/types/evm-network.ts (2)
EvmNetworkOptions(25-56)EvmNetwork(58-293)packages/extension/src/providers/ethereum/libs/activity-handlers/index.ts (1)
EtherscanActivity(10-10)
🔇 Additional comments (5)
packages/types/src/networks.ts (1)
109-109: New enum member for Cytonic Testnet
EntryCytonicTestnet = "CytonicTestnet"correctly adds the new network identifier to theNetworkNamesenum, ensuring type-safety and consistency across the codebase.packages/extension/src/providers/ethereum/libs/activity-handlers/providers/etherscan/configs.ts (1)
74-74: Verify API endpoint correctness for Cytonic Testnet
The new mapping[NetworkNames.CytonicTestnet]points tohttps://explorer-api.evm.testnet.cytonic.com/api/. Ensure this base URL and trailing/api/segment align with howEtherscanActivityconstructs its request paths (to avoid duplicated/apisegments or missing endpoints).packages/extension/src/providers/ethereum/networks/index.ts (1)
158-159: Register Cytonic Testnet in networks export
AddingcytonicTestnet: cytonicTestnetNodeensures the new network is available in the default export. The key matches the import and theNetworkNamesenum.packages/extension/src/providers/ethereum/networks/cytonic-testnet.ts (2)
1-6: Verify icon import and dependencies
The icon import./icons/cytonic.webpand aliases (@/libs/activity-state/wrap-activity-handler,../libs/activity-handlers) must resolve correctly. Please confirm thatcytonic.webpexists undernetworks/icons/with the expected dimensions/format and that these imports build without errors.
22-24: Instantiate and export Cytonic Testnet network
The patternconst cytonicTestnet = new EvmNetwork(netOptions); export default cytonicTestnet;matches existing network modules and correctly makes the new network available.
c5e82a7
into
enkryptcom:devop/packeupdates-0512
Summary by CodeRabbit