From 5d528b3138b97badcd20417c5d49c24f8681898d Mon Sep 17 00:00:00 2001 From: kvhnuke <10602065+kvhnuke@users.noreply.github.com> Date: Tue, 23 Jul 2024 12:52:26 -0700 Subject: [PATCH] devop: added degen --- .../src/providers/common/libs/new-features.ts | 1 + .../providers/etherscan/configs.ts | 1 + .../libs/assets-handlers/assetinfo-mew.ts | 4 +++ .../libs/assets-handlers/token-lists.ts | 1 + .../assets-handlers/types/tokenbalance-mew.ts | 1 + .../src/providers/ethereum/networks/degen.ts | 27 ++++++++++++++++++ .../ethereum/networks/icons/degen.png | Bin 0 -> 3774 bytes .../src/providers/ethereum/networks/index.ts | 2 ++ packages/types/src/networks.ts | 1 + 9 files changed, 38 insertions(+) create mode 100644 packages/extension/src/providers/ethereum/networks/degen.ts create mode 100644 packages/extension/src/providers/ethereum/networks/icons/degen.png diff --git a/packages/extension/src/providers/common/libs/new-features.ts b/packages/extension/src/providers/common/libs/new-features.ts index 23ccbb44c..10b4f9347 100644 --- a/packages/extension/src/providers/common/libs/new-features.ts +++ b/packages/extension/src/providers/common/libs/new-features.ts @@ -4,6 +4,7 @@ const newNetworks = [ NetworkNames.Telos, NetworkNames.Blast, NetworkNames.Sanko, + NetworkNames.Degen, ]; const newSwaps: NetworkNames[] = []; diff --git a/packages/extension/src/providers/ethereum/libs/activity-handlers/providers/etherscan/configs.ts b/packages/extension/src/providers/ethereum/libs/activity-handlers/providers/etherscan/configs.ts index d4236a785..d9250952a 100644 --- a/packages/extension/src/providers/ethereum/libs/activity-handlers/providers/etherscan/configs.ts +++ b/packages/extension/src/providers/ethereum/libs/activity-handlers/providers/etherscan/configs.ts @@ -56,6 +56,7 @@ const NetworkEndpoints: Record = { [NetworkNames.Rollux]: "https://explorer.rollux.com/", [NetworkNames.Blast]: "https://blastscan.io/", [NetworkNames.Sanko]: "https://explorer.sanko.xyz/", + [NetworkNames.Degen]: "https://explorer.degen.tips/", }; export { NetworkEndpoints }; diff --git a/packages/extension/src/providers/ethereum/libs/assets-handlers/assetinfo-mew.ts b/packages/extension/src/providers/ethereum/libs/assets-handlers/assetinfo-mew.ts index 813dd69f1..f84545f31 100644 --- a/packages/extension/src/providers/ethereum/libs/assets-handlers/assetinfo-mew.ts +++ b/packages/extension/src/providers/ethereum/libs/assets-handlers/assetinfo-mew.ts @@ -131,6 +131,10 @@ const supportedNetworks: Record = { tbName: "sanko", cgPlatform: CoingeckoPlatform.Sanko, }, + [NetworkNames.Degen]: { + tbName: "degen", + cgPlatform: CoingeckoPlatform.Degen, + }, }; const getTokens = ( diff --git a/packages/extension/src/providers/ethereum/libs/assets-handlers/token-lists.ts b/packages/extension/src/providers/ethereum/libs/assets-handlers/token-lists.ts index d991ec416..48243f0e3 100644 --- a/packages/extension/src/providers/ethereum/libs/assets-handlers/token-lists.ts +++ b/packages/extension/src/providers/ethereum/libs/assets-handlers/token-lists.ts @@ -29,6 +29,7 @@ const TokenList: Record = { [NetworkNames.Telos]: `https://tokens.coingecko.com/${CoingeckoPlatform.Telos}/all.json`, [NetworkNames.Blast]: `https://tokens.coingecko.com/${CoingeckoPlatform.Blast}/all.json`, [NetworkNames.Sanko]: `https://tokens.coingecko.com/${CoingeckoPlatform.Sanko}/all.json`, + [NetworkNames.Degen]: `https://tokens.coingecko.com/${CoingeckoPlatform.Degen}/all.json`, }; const getKnownNetworkTokens = async ( diff --git a/packages/extension/src/providers/ethereum/libs/assets-handlers/types/tokenbalance-mew.ts b/packages/extension/src/providers/ethereum/libs/assets-handlers/types/tokenbalance-mew.ts index 531be116e..89093b4b4 100644 --- a/packages/extension/src/providers/ethereum/libs/assets-handlers/types/tokenbalance-mew.ts +++ b/packages/extension/src/providers/ethereum/libs/assets-handlers/types/tokenbalance-mew.ts @@ -51,4 +51,5 @@ export type SupportedNetworkNames = | NetworkNames.Telos | NetworkNames.Rollux | NetworkNames.Sanko + | NetworkNames.Degen | NetworkNames.Blast; diff --git a/packages/extension/src/providers/ethereum/networks/degen.ts b/packages/extension/src/providers/ethereum/networks/degen.ts new file mode 100644 index 000000000..ed7dfded7 --- /dev/null +++ b/packages/extension/src/providers/ethereum/networks/degen.ts @@ -0,0 +1,27 @@ +import { CoingeckoPlatform, NetworkNames } from "@enkryptcom/types"; +import { EvmNetwork, EvmNetworkOptions } from "../types/evm-network"; +import assetsInfoHandler from "@/providers/ethereum/libs/assets-handlers/assetinfo-mew"; +import { EtherscanActivity } from "../libs/activity-handlers"; +import wrapActivityHandler from "@/libs/activity-state/wrap-activity-handler"; + +const ethOptions: EvmNetworkOptions = { + name: NetworkNames.Degen, + name_long: "Degen", + homePage: "https://www.degen.tips/", + blockExplorerTX: "https://explorer.degen.tips/tx/[[txHash]]", + blockExplorerAddr: "https://explorer.degen.tips/address/[[address]]", + chainID: "0x27bc86aa", + isTestNetwork: false, + currencyName: "DEGEN", + currencyNameLong: "DEGEN", + node: "https://rpc.degen.tips", + icon: require("./icons/degen.png"), + coingeckoID: "degen-base", + coingeckoPlatform: CoingeckoPlatform.Degen, + assetsInfoHandler, + activityHandler: wrapActivityHandler(EtherscanActivity), +}; + +const eth = new EvmNetwork(ethOptions); + +export default eth; diff --git a/packages/extension/src/providers/ethereum/networks/icons/degen.png b/packages/extension/src/providers/ethereum/networks/icons/degen.png new file mode 100644 index 0000000000000000000000000000000000000000..5c4863f66cb4e10dd68a687070343ed2cc2e9e21 GIT binary patch literal 3774 zcmV;v4ngsWP) zO>Y~=8OQ(6h?K(6bST^6fePwX4MYL#HZtI(Xn-Qpsh1*AfL;p6v2|~(%_p$*2~0U3 zK#rBvhZd0H_R#cDDaadI3ozT*K;%N;I*53n?T|60$Rd~f^gu32i=;&E&hC=Z{w|UT z?#yWCKl41#yb=x|^C~L=V2n$KB7`^z7*Pf(1SkN&T>iNmB4_||4CDah2&5T?@qqe7 zQUJO02}-*3FSrJIT>!hxtE}_`35*frEr2ImwPv>yjNixqlC01GOQ6B`$qX%f!0aJ%G)c!^1T zav?!WUKgevx>^A9Dvt#Wyalj|?ydBu5TJp0rH{mHH=BvB6u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m?oOpY$@9eubut+o&V0PT4uHPHDwVlVtLk%05RL`3Tv(mlT5LzI5f4}dvwIyWX za%sly=%7`K`VKPLG#*w4T)J5h-LxUp0MA~$);F`?_uASWtP7FoW4=f(+$p%5U|;~l zLn9a-s`)XQY#O=zWBj!J#Iuc}^_Bg6=qQE;Mp5%;K`*ovOREi`{egZwA3EyjhES;pny8=i-;0iR1fe7XSxJp0ZEeF-bi+Bg~lSeP~z!I-p@hL24MOBePT?b{1m z2Sw^cQ|2yHANOHE(}||+q+v?{QwhrHL~r|%f%`C^l>|+cm-Ac4_EE7@3DQbL6TS%C zqptEbyJ<-|E7%u-d&sPOK;mK1z6hL0cI5+-PYd@&;2?yg?8*lmI4-^-g0mnj$xi#w zLRivCe&v^wb`USu5gZ&ko80LXM+E=?H{L6$M05on-BH}b0x@SbhQBLSx|WrhA|1yTj<_V#T*eY zF^Lbmv9&j&X9Q4Bd6$xLiHKfd#+a97A%e!tpFoHu9Z0%0fFp~Z6hJ-mDk}kC42CgY zCy1y++2tw~{+SRWSpZhN4B=$Z^8#qbyvkz%Aj&0Uj0g&dPEuJEQ2^<_FOOXf4{*yY@Of`egFUf07*qoM6N<$f-LCrk^lez literal 0 HcmV?d00001 diff --git a/packages/extension/src/providers/ethereum/networks/index.ts b/packages/extension/src/providers/ethereum/networks/index.ts index c8665852b..6e12116a4 100644 --- a/packages/extension/src/providers/ethereum/networks/index.ts +++ b/packages/extension/src/providers/ethereum/networks/index.ts @@ -41,6 +41,7 @@ import cagaAnkara from "./cagaAnkara"; import telosNode from "./tlos"; import blastNode from "./blast"; import sankoNode from "./dmt"; +import degenNode from "./degen"; export default { sepolia: sepoliaNode, @@ -95,4 +96,5 @@ export default { telos: telosNode, blast: blastNode, sanko: sankoNode, + degen: degenNode, }; diff --git a/packages/types/src/networks.ts b/packages/types/src/networks.ts index b8d4596dc..48bd18ea7 100644 --- a/packages/types/src/networks.ts +++ b/packages/types/src/networks.ts @@ -76,6 +76,7 @@ export enum NetworkNames { Blast = "blast", Sanko = "sanko", Degen = "degen", + Ham = "ham", } export enum CoingeckoPlatform {