-
Notifications
You must be signed in to change notification settings - Fork 252
feat: add Shark Network (88118) #813
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
base: main
Are you sure you want to change the base?
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,25 @@ | ||
| import icon from './icons/shark.webp'; | ||
| import { EvmNetwork, EvmNetworkOptions } from '../types/evm-network'; | ||
| import NFTHandler from '@/libs/nft-handlers/goldrush'; | ||
| import wrapActivityHandler from '@/libs/activity-state/wrap-activity-handler'; | ||
| import { EtherscanActivity } from '../libs/activity-handlers'; | ||
|
|
||
| const sharkOptions: EvmNetworkOptions = { | ||
| name: 'shark', | ||
| name_long: 'Shark Network', | ||
| homePage: 'https://swapshark.net', | ||
| blockExplorerTX: 'https://sharkscan.app/tx/[[txHash]]', | ||
| blockExplorerAddr: 'https://sharkscan.app/address/[[address]]', | ||
| chainID: '0x15836', | ||
| isTestNetwork: false, | ||
| currencyName: 'SHARK', | ||
| currencyNameLong: 'Shark', | ||
| node: 'https://rpc.rpcshark.com', | ||
| icon, | ||
| NFTHandler, | ||
|
Comment on lines
+17
to
+19
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. 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "Repository files around relevant paths:"
git ls-files | rg 'packages/extension/src/(providers/ethereum/networks/shark|libs/nft-handlers/goldrush|.*nft.*|.*network.*)' | sed -n '1,200p'
echo
echo "shark.ts excerpt:"
cat -n packages/extension/src/providers/ethereum/networks/shark.ts 2>/dev/null || true
echo
echo "goldrush.ts excerpt outline + network handling:"
if [ -f packages/extension/src/libs/nft-handlers/goldrush.ts ]; then
ast-grep outline packages/extension/src/libs/nft-handlers/goldrush.ts --view expanded | sed -n '1,220p' || true
echo "--- relevant sections ---"
rg -n "supported|network|Goldrush|NFTHandler|chain|rpc" packages/extension/src/libs/nft-handlers/goldrush.ts -C 3
fi
echo
echo "Search for NFT usage/shark references:"
rg -n "NFTHandler|goldrush|shark|rpcshark|GOLD" packages/extension/src -C 2Repository: enkryptcom/enKrypt Length of output: 47081 Do not wire Goldrush NFT support until Shark is supported by Goldrush.
🤖 Prompt for AI Agents |
||
| activityHandler: wrapActivityHandler(EtherscanActivity), | ||
|
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. 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "Repo files for shark.ts and activity handlers:"
fd -a 'shark\.ts|activity-handlers|etherscan' packages/extension/src | sed 's#^\./##' | head -200
echo
echo "shark.ts:"
cat -n packages/extension/src/providers/ethereum/networks/shark.ts
echo
echo "Activity handler files:"
fd -a 'index\.ts|types\.ts|networks.*\.ts' packages/extension/src/providers/ethereum/libs/activity-handlers | sed 's#^\./##'
echo
echo "Search for NetworkEndpoints/EtherscanActivity/SharkActivity activity usages:"
rg -n "NetworkEndpoints|EtherscanActivity|SharkScan|Shark|activityHandler|network\.name" packages/extension/src/providers/ethereum -SRepository: enkryptcom/enKrypt Length of output: 27717 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "etherscan configs:"
cat -n packages/extension/src/providers/ethereum/libs/activity-handlers/providers/etherscan/configs.ts | sed -n '1,90p'
echo
echo "etherscan activity handler:"
cat -n packages/extension/src/providers/ethereum/libs/activity-handlers/providers/etherscan/index.ts | sed -n '1,120p'
echo
echo "etherscan types:"
cat -n packages/extension/src/providers/ethereum/libs/activity-handlers/providers/etherscan/types.ts | sed -n '1,220p'
echo
echo "All network name occurrences mentioning shark:"
rg -n "\"shark\"|'shark'|name:\s*['\"]shark" packages/extension/src/providers/ethereum/networks packages/extension/src -S
echo
echo "Programmatic check for 'shark' in Etherscan endpoints:"
python3 - <<'PY'
from pathlib import Path
import re
paths = [
Path('packages/extension/src/providers/ethereum/networks/shark.ts'),
Path('packages/extension/src/providers/ethereum/libs/activity-handlers/providers/etherscan/configs.ts'),
]
for path in paths:
text = path.read_text()
print(path, 'has shark literal:', bool(re.search(r"['\"]shark['\"]|shark:", text, re.I)))
print(text[:2000])
PYRepository: enkryptcom/enKrypt Length of output: 13189 Register a Shark activity endpoint.
🤖 Prompt for AI Agents |
||
| }; | ||
|
|
||
| const shark = new EvmNetwork(sharkOptions); | ||
|
|
||
| export default shark; | ||
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.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
Repository: enkryptcom/enKrypt
Length of output: 10780
🏁 Script executed:
Repository: enkryptcom/enKrypt
Length of output: 41405
🌐 Web query:
raw.githubusercontent.com enkryptcom enKrypt main packages/types/src/networks.ts NetworkNames.Shark💡 Result:
In the Enkrypt wallet codebase, NetworkNames.Shark refers to the SharkyFi network [1][2]. The file
packages/types/src/networks.tsin theenkryptcom/enKryptrepository contains theNetworkNamesenum, which defines the supported blockchain networks within the wallet's architecture [1]. SharkyFi is a protocol built on the Solana blockchain, and within the Enkrypt ecosystem, it is categorized among the supported chains [2].Citations:
🌐 Web query:
site:enkryptcom/enKrypt packages/types/src/networks.ts NetworkNames.Shark💡 Result:
I checked
packages/types/src/networks.tsinenkryptcom/enKrypt. The file exists, but it does not containNetworkNames.Sharkor anySharktext. [1][2]🏁 Script executed:
Repository: enkryptcom/enKrypt
Length of output: 29809
🏁 Script executed:
Repository: enkryptcom/enKrypt
Length of output: 9449
Complete Shark’s shared network integrations before merging.
shark.tsuses its ownname: 'shark', butNetworkNameshas noSharkentry and the shared Ethereum activity config lacks a matching endpoint. This also breaks NFT lookups: the attached Goldrush handler only supports enumerated Ethereum networks and will throw on non-mapped network names, includingShark. Add the shared enum/config entries or replace the handlers with Shark-specific implementations.📍 Affects 1 file
packages/extension/src/providers/ethereum/networks/shark.ts#L7-L8(this comment)packages/extension/src/providers/ethereum/networks/shark.ts#L17-L19packages/extension/src/providers/ethereum/networks/shark.ts#L20-L20🤖 Prompt for AI Agents