-
Notifications
You must be signed in to change notification settings - Fork 237
Add HEMI Network #688
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
Add HEMI Network #688
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| import { EvmNetwork, EvmNetworkOptions } from "../types/evm-network"; | ||
|
|
||
| const netOptions: EvmNetworkOptions = { | ||
| name: NetworkNames.Hemi, | ||
| name_long: 'Hemi', | ||
| homePage: 'https://hemi.xyz/', | ||
| blockExplorerTX: 'https://explorer.hemi.xyz/tx/[[txHash]]', | ||
| blockExplorerAddr: 'https://explorer.hemi.xyz/address/[[address]]', | ||
| chainID: '0xa867', | ||
| isTestNetwork: false, | ||
| currencyName: 'ETH', | ||
| currencyNameLong: 'Ethereum', | ||
| node: 'wss://rpc.hemi.network/wsrpc', | ||
| icon, | ||
|
|
||
| activityHandler: wrapActivityHandler(EtherscanActivity), | ||
| }; | ||
|
|
||
| const net = new EvmNetwork(netOptions); | ||
|
|
||
| export default net; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -72,6 +72,7 @@ import abstractNode from './abstract'; | |
| import inkNode from './inkonchain'; | ||
| import taraxa from './taraxa'; | ||
| import coti from './coti'; | ||
| import hemi from './hemi'; | ||
| import cytonicTestnetNode from './cytonic-testnet'; | ||
| import unitZero from './unitzero'; | ||
| import unitZeroTestnet from './unitzero-testnet'; | ||
|
|
@@ -159,6 +160,8 @@ export default { | |
| unichain: unichainNode, | ||
| abstract: abstractNode, | ||
| ink: inkNode, | ||
| coti: coti | ||
| hemi: hemiNode | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainFix the missing comma in the default export object. There's a syntax error due to a missing comma after the previous property. ink: inkNode,
coti: coti,
+ hemi: hemi🏁 Script executed: #!/bin/bash
# Description: Verify that the imported module name matches the export name
# Check the import statement
echo "Import statement:"
grep -n "import hemi" packages/extension/src/providers/ethereum/networks/index.ts
# Check the export statement
echo -e "\nExport statement:"
grep -n "hemi: " packages/extension/src/providers/ethereum/networks/index.tsLength of output: 309 Mismatch in import/export names for The export object is referencing • Option 1 (follow the existing -import hemi from './hemi';
+import hemiNode from './hemi';• Option 2 (keep the default import name): - hemi: hemiNode
+ hemi: hemiAlso, if you’re adding more properties after coti: coti,
+ hemi: hemiNode,
🧰 Tools🪛 Biome (1.9.4)[error] 159-159: expected Remove hemi (parse) |
||
| coti: coti, | ||
| cytonicTestnet: cytonicTestnetNode, | ||
| derive: deriveNode, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Add missing import statements.
Several variables used in this file are not imported:
NetworkNames(used on line 4)icon(used on line 14)wrapActivityHandlerandEtherscanActivity(used on line 16)import { EvmNetwork, EvmNetworkOptions } from "../types/evm-network"; +import { NetworkNames } from "@enkryptcom/types"; +import { wrapActivityHandler } from "../libs/activity-handlers"; +import { EtherscanActivity } from "../libs/activity-handlers"; +import icon from "@/providers/icons/hemi.svg";🏁 Script executed:
Length of output: 551
🏁 Script executed:
Length of output: 1148
🏁 Script executed:
Length of output: 19205
🏁 Script executed:
Length of output: 39004
Add missing imports and icon asset
The following identifiers are used but not imported in
packages/extension/src/providers/ethereum/networks/hemi.ts:NetworkNamesiconwrapActivityHandlerEtherscanActivityUpdate the top of the file accordingly:
import { EvmNetwork, EvmNetworkOptions } from "../types/evm-network"; +import { NetworkNames } from "@enkryptcom/types"; +import icon from "./icons/hemi.webp"; +import wrapActivityHandler from "@/libs/activity-state/wrap-activity-handler"; +import { EtherscanActivity } from "../libs/activity-handlers";• Ensure the icon asset exists at
packages/extension/src/providers/ethereum/networks/icons/hemi.webp