@b3dotfun/sdk 0.0.82-alpha.3 → 0.0.82-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/anyspend/utils/chain.d.ts +38 -0
- package/dist/cjs/anyspend/utils/chain.js +22 -1
- package/dist/cjs/anyspend/utils/token.d.ts +3 -0
- package/dist/cjs/anyspend/utils/token.js +17 -1
- package/dist/esm/anyspend/utils/chain.d.ts +38 -0
- package/dist/esm/anyspend/utils/chain.js +22 -1
- package/dist/esm/anyspend/utils/token.d.ts +3 -0
- package/dist/esm/anyspend/utils/token.js +15 -1
- package/dist/types/anyspend/utils/chain.d.ts +38 -0
- package/dist/types/anyspend/utils/token.d.ts +3 -0
- package/package.json +1 -1
- package/src/anyspend/utils/chain.ts +31 -1
- package/src/anyspend/utils/token.ts +17 -1
|
@@ -1,6 +1,44 @@
|
|
|
1
1
|
import { components } from "../../anyspend/types/api";
|
|
2
2
|
import { Account, Chain, PublicClient, Transport, WalletClient } from "viem";
|
|
3
3
|
import { ChainType, IBaseChain, IEVMChain, ISolanaChain } from "../types/chain";
|
|
4
|
+
export declare const hyperEVM: {
|
|
5
|
+
blockExplorers: {
|
|
6
|
+
readonly default: {
|
|
7
|
+
readonly name: "HyperEVM Explorer";
|
|
8
|
+
readonly url: "https://hyperevmscan.io/";
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
blockTime?: number | undefined | undefined;
|
|
12
|
+
contracts?: {
|
|
13
|
+
[x: string]: import("viem").ChainContract | {
|
|
14
|
+
[sourceId: number]: import("viem").ChainContract | undefined;
|
|
15
|
+
} | undefined;
|
|
16
|
+
ensRegistry?: import("viem").ChainContract | undefined;
|
|
17
|
+
ensUniversalResolver?: import("viem").ChainContract | undefined;
|
|
18
|
+
multicall3?: import("viem").ChainContract | undefined;
|
|
19
|
+
erc6492Verifier?: import("viem").ChainContract | undefined;
|
|
20
|
+
} | undefined;
|
|
21
|
+
ensTlds?: readonly string[] | undefined;
|
|
22
|
+
id: 999;
|
|
23
|
+
name: "HyperEVM";
|
|
24
|
+
nativeCurrency: {
|
|
25
|
+
readonly name: "HyperEVM";
|
|
26
|
+
readonly symbol: "HYPE";
|
|
27
|
+
readonly decimals: 18;
|
|
28
|
+
};
|
|
29
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
30
|
+
rpcUrls: {
|
|
31
|
+
readonly default: {
|
|
32
|
+
readonly http: readonly ["https://rpc.hyperliquid.xyz/evm"];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
sourceId?: number | undefined | undefined;
|
|
36
|
+
testnet?: boolean | undefined | undefined;
|
|
37
|
+
custom?: Record<string, unknown> | undefined;
|
|
38
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
39
|
+
formatters?: undefined;
|
|
40
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
41
|
+
};
|
|
4
42
|
export declare const EVM_MAINNET: Record<number, IEVMChain>;
|
|
5
43
|
export declare const EVM_TESTNET: Record<number, IEVMChain>;
|
|
6
44
|
export declare const SOLANA_MAINNET: ISolanaChain;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ALL_CHAINS = exports.SOLANA_CHAINS = exports.EVM_CHAINS = exports.SOLANA_MAINNET = exports.EVM_TESTNET = exports.EVM_MAINNET = void 0;
|
|
6
|
+
exports.ALL_CHAINS = exports.SOLANA_CHAINS = exports.EVM_CHAINS = exports.SOLANA_MAINNET = exports.EVM_TESTNET = exports.EVM_MAINNET = exports.hyperEVM = void 0;
|
|
7
7
|
exports.getSolanaChains = getSolanaChains;
|
|
8
8
|
exports.getAllEvmChains = getAllEvmChains;
|
|
9
9
|
exports.getChainType = getChainType;
|
|
@@ -31,6 +31,13 @@ const token_1 = require("./token");
|
|
|
31
31
|
function getCustomEvmChain(chain, rpcUrl) {
|
|
32
32
|
return (0, viem_1.defineChain)({ ...chain, rpcUrls: { default: { http: [rpcUrl] } } });
|
|
33
33
|
}
|
|
34
|
+
exports.hyperEVM = (0, viem_1.defineChain)({
|
|
35
|
+
id: token_1.HYPEREVM_CHAIN_ID,
|
|
36
|
+
name: "HyperEVM",
|
|
37
|
+
nativeCurrency: { name: "HyperEVM", symbol: "HYPE", decimals: 18 },
|
|
38
|
+
rpcUrls: { default: { http: ["https://rpc.hyperliquid.xyz/evm"] } },
|
|
39
|
+
blockExplorers: { default: { name: "HyperEVM Explorer", url: "https://hyperevmscan.io/" } },
|
|
40
|
+
});
|
|
34
41
|
// export const b4testnet = defineChain({
|
|
35
42
|
// id: 19934,
|
|
36
43
|
// name: "B4 Testnet",
|
|
@@ -174,6 +181,20 @@ exports.EVM_MAINNET = {
|
|
|
174
181
|
coingeckoName: "abstract",
|
|
175
182
|
wethAddress: "0x3439153eb7af838ad19d56e1571fbd09333c2809",
|
|
176
183
|
},
|
|
184
|
+
[exports.hyperEVM.id]: {
|
|
185
|
+
id: exports.hyperEVM.id,
|
|
186
|
+
name: exports.hyperEVM.name,
|
|
187
|
+
logoUrl: "https://s2.coinmarketcap.com/static/img/coins/64x64/32196.png",
|
|
188
|
+
type: chain_1.ChainType.EVM,
|
|
189
|
+
nativeRequired: (0, viem_1.parseEther)("0.01"),
|
|
190
|
+
canDepositNative: true,
|
|
191
|
+
defaultToken: (0, token_1.getHyperEVMNativeToken)(),
|
|
192
|
+
nativeToken: (0, token_1.getHyperEVMNativeToken)(),
|
|
193
|
+
viem: exports.hyperEVM,
|
|
194
|
+
pollingInterval: 1000, // 1 second for Hyperliquid
|
|
195
|
+
coingeckoName: "hyperevm",
|
|
196
|
+
wethAddress: "0x5555555555555555555555555555555555555555",
|
|
197
|
+
},
|
|
177
198
|
};
|
|
178
199
|
exports.EVM_TESTNET = {
|
|
179
200
|
// [sepolia.id]: {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { components } from "../../anyspend/types/api";
|
|
2
|
+
export declare const HYPERLIQUID_CHAIN_ID = 1337;
|
|
3
|
+
export declare const HYPEREVM_CHAIN_ID = 999;
|
|
2
4
|
export declare function isNativeToken(address: string): boolean;
|
|
3
5
|
export declare function getSolanaToken(): components["schemas"]["Token"];
|
|
4
6
|
export declare function getEthToken(chainId: number): components["schemas"]["Token"];
|
|
5
7
|
export declare function getPolToken(): components["schemas"]["Token"];
|
|
6
8
|
export declare function getBnbToken(): components["schemas"]["Token"];
|
|
7
9
|
export declare function getAvaxToken(): components["schemas"]["Token"];
|
|
10
|
+
export declare function getHyperEVMNativeToken(): components["schemas"]["Token"];
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HYPEREVM_CHAIN_ID = exports.HYPERLIQUID_CHAIN_ID = void 0;
|
|
3
4
|
exports.isNativeToken = isNativeToken;
|
|
4
5
|
exports.getSolanaToken = getSolanaToken;
|
|
5
6
|
exports.getEthToken = getEthToken;
|
|
6
7
|
exports.getPolToken = getPolToken;
|
|
7
8
|
exports.getBnbToken = getBnbToken;
|
|
8
9
|
exports.getAvaxToken = getAvaxToken;
|
|
9
|
-
|
|
10
|
+
exports.getHyperEVMNativeToken = getHyperEVMNativeToken;
|
|
10
11
|
const constants_1 = require("../../anyspend/constants");
|
|
12
|
+
const chains_1 = require("viem/chains");
|
|
13
|
+
exports.HYPERLIQUID_CHAIN_ID = 1337;
|
|
14
|
+
exports.HYPEREVM_CHAIN_ID = 999;
|
|
11
15
|
function isNativeToken(address) {
|
|
12
16
|
return address.toLowerCase() === constants_1.RELAY_ETH_ADDRESS || address.toLowerCase() === constants_1.RELAY_SOL_ADDRESS;
|
|
13
17
|
}
|
|
@@ -71,3 +75,15 @@ function getAvaxToken() {
|
|
|
71
75
|
},
|
|
72
76
|
};
|
|
73
77
|
}
|
|
78
|
+
function getHyperEVMNativeToken() {
|
|
79
|
+
return {
|
|
80
|
+
chainId: exports.HYPEREVM_CHAIN_ID,
|
|
81
|
+
address: constants_1.RELAY_ETH_ADDRESS,
|
|
82
|
+
symbol: "HYPE",
|
|
83
|
+
name: "HYPE",
|
|
84
|
+
decimals: 18,
|
|
85
|
+
metadata: {
|
|
86
|
+
logoURI: "https://s2.coinmarketcap.com/static/img/coins/64x64/32196.png",
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
}
|
|
@@ -1,6 +1,44 @@
|
|
|
1
1
|
import { components } from "../../anyspend/types/api";
|
|
2
2
|
import { Account, Chain, PublicClient, Transport, WalletClient } from "viem";
|
|
3
3
|
import { ChainType, IBaseChain, IEVMChain, ISolanaChain } from "../types/chain";
|
|
4
|
+
export declare const hyperEVM: {
|
|
5
|
+
blockExplorers: {
|
|
6
|
+
readonly default: {
|
|
7
|
+
readonly name: "HyperEVM Explorer";
|
|
8
|
+
readonly url: "https://hyperevmscan.io/";
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
blockTime?: number | undefined | undefined;
|
|
12
|
+
contracts?: {
|
|
13
|
+
[x: string]: import("viem").ChainContract | {
|
|
14
|
+
[sourceId: number]: import("viem").ChainContract | undefined;
|
|
15
|
+
} | undefined;
|
|
16
|
+
ensRegistry?: import("viem").ChainContract | undefined;
|
|
17
|
+
ensUniversalResolver?: import("viem").ChainContract | undefined;
|
|
18
|
+
multicall3?: import("viem").ChainContract | undefined;
|
|
19
|
+
erc6492Verifier?: import("viem").ChainContract | undefined;
|
|
20
|
+
} | undefined;
|
|
21
|
+
ensTlds?: readonly string[] | undefined;
|
|
22
|
+
id: 999;
|
|
23
|
+
name: "HyperEVM";
|
|
24
|
+
nativeCurrency: {
|
|
25
|
+
readonly name: "HyperEVM";
|
|
26
|
+
readonly symbol: "HYPE";
|
|
27
|
+
readonly decimals: 18;
|
|
28
|
+
};
|
|
29
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
30
|
+
rpcUrls: {
|
|
31
|
+
readonly default: {
|
|
32
|
+
readonly http: readonly ["https://rpc.hyperliquid.xyz/evm"];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
sourceId?: number | undefined | undefined;
|
|
36
|
+
testnet?: boolean | undefined | undefined;
|
|
37
|
+
custom?: Record<string, unknown> | undefined;
|
|
38
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
39
|
+
formatters?: undefined;
|
|
40
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
41
|
+
};
|
|
4
42
|
export declare const EVM_MAINNET: Record<number, IEVMChain>;
|
|
5
43
|
export declare const EVM_TESTNET: Record<number, IEVMChain>;
|
|
6
44
|
export declare const SOLANA_MAINNET: ISolanaChain;
|
|
@@ -3,10 +3,17 @@ import invariant from "invariant";
|
|
|
3
3
|
import { createPublicClient, createWalletClient, defineChain, http, parseEther, } from "viem";
|
|
4
4
|
import { abstract, arbitrum, avalanche, b3, base, bsc, mainnet, optimism, polygon } from "viem/chains";
|
|
5
5
|
import { ChainType } from "../types/chain.js";
|
|
6
|
-
import { getAvaxToken, getBnbToken, getEthToken, getPolToken, getSolanaToken } from "./token.js";
|
|
6
|
+
import { getAvaxToken, getBnbToken, getEthToken, getHyperEVMNativeToken, getPolToken, getSolanaToken, HYPEREVM_CHAIN_ID, } from "./token.js";
|
|
7
7
|
function getCustomEvmChain(chain, rpcUrl) {
|
|
8
8
|
return defineChain({ ...chain, rpcUrls: { default: { http: [rpcUrl] } } });
|
|
9
9
|
}
|
|
10
|
+
export const hyperEVM = defineChain({
|
|
11
|
+
id: HYPEREVM_CHAIN_ID,
|
|
12
|
+
name: "HyperEVM",
|
|
13
|
+
nativeCurrency: { name: "HyperEVM", symbol: "HYPE", decimals: 18 },
|
|
14
|
+
rpcUrls: { default: { http: ["https://rpc.hyperliquid.xyz/evm"] } },
|
|
15
|
+
blockExplorers: { default: { name: "HyperEVM Explorer", url: "https://hyperevmscan.io/" } },
|
|
16
|
+
});
|
|
10
17
|
// export const b4testnet = defineChain({
|
|
11
18
|
// id: 19934,
|
|
12
19
|
// name: "B4 Testnet",
|
|
@@ -150,6 +157,20 @@ export const EVM_MAINNET = {
|
|
|
150
157
|
coingeckoName: "abstract",
|
|
151
158
|
wethAddress: "0x3439153eb7af838ad19d56e1571fbd09333c2809",
|
|
152
159
|
},
|
|
160
|
+
[hyperEVM.id]: {
|
|
161
|
+
id: hyperEVM.id,
|
|
162
|
+
name: hyperEVM.name,
|
|
163
|
+
logoUrl: "https://s2.coinmarketcap.com/static/img/coins/64x64/32196.png",
|
|
164
|
+
type: ChainType.EVM,
|
|
165
|
+
nativeRequired: parseEther("0.01"),
|
|
166
|
+
canDepositNative: true,
|
|
167
|
+
defaultToken: getHyperEVMNativeToken(),
|
|
168
|
+
nativeToken: getHyperEVMNativeToken(),
|
|
169
|
+
viem: hyperEVM,
|
|
170
|
+
pollingInterval: 1000, // 1 second for Hyperliquid
|
|
171
|
+
coingeckoName: "hyperevm",
|
|
172
|
+
wethAddress: "0x5555555555555555555555555555555555555555",
|
|
173
|
+
},
|
|
153
174
|
};
|
|
154
175
|
export const EVM_TESTNET = {
|
|
155
176
|
// [sepolia.id]: {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { components } from "../../anyspend/types/api";
|
|
2
|
+
export declare const HYPERLIQUID_CHAIN_ID = 1337;
|
|
3
|
+
export declare const HYPEREVM_CHAIN_ID = 999;
|
|
2
4
|
export declare function isNativeToken(address: string): boolean;
|
|
3
5
|
export declare function getSolanaToken(): components["schemas"]["Token"];
|
|
4
6
|
export declare function getEthToken(chainId: number): components["schemas"]["Token"];
|
|
5
7
|
export declare function getPolToken(): components["schemas"]["Token"];
|
|
6
8
|
export declare function getBnbToken(): components["schemas"]["Token"];
|
|
7
9
|
export declare function getAvaxToken(): components["schemas"]["Token"];
|
|
10
|
+
export declare function getHyperEVMNativeToken(): components["schemas"]["Token"];
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { avalanche, bsc, polygon } from "viem/chains";
|
|
2
1
|
import { RELAY_ETH_ADDRESS, RELAY_SOL_ADDRESS, RELAY_SOLANA_MAINNET_CHAIN_ID } from "../../anyspend/constants/index.js";
|
|
2
|
+
import { avalanche, bsc, polygon } from "viem/chains";
|
|
3
|
+
export const HYPERLIQUID_CHAIN_ID = 1337;
|
|
4
|
+
export const HYPEREVM_CHAIN_ID = 999;
|
|
3
5
|
export function isNativeToken(address) {
|
|
4
6
|
return address.toLowerCase() === RELAY_ETH_ADDRESS || address.toLowerCase() === RELAY_SOL_ADDRESS;
|
|
5
7
|
}
|
|
@@ -63,3 +65,15 @@ export function getAvaxToken() {
|
|
|
63
65
|
},
|
|
64
66
|
};
|
|
65
67
|
}
|
|
68
|
+
export function getHyperEVMNativeToken() {
|
|
69
|
+
return {
|
|
70
|
+
chainId: HYPEREVM_CHAIN_ID,
|
|
71
|
+
address: RELAY_ETH_ADDRESS,
|
|
72
|
+
symbol: "HYPE",
|
|
73
|
+
name: "HYPE",
|
|
74
|
+
decimals: 18,
|
|
75
|
+
metadata: {
|
|
76
|
+
logoURI: "https://s2.coinmarketcap.com/static/img/coins/64x64/32196.png",
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
}
|
|
@@ -1,6 +1,44 @@
|
|
|
1
1
|
import { components } from "@b3dotfun/sdk/anyspend/types/api";
|
|
2
2
|
import { Account, Chain, PublicClient, Transport, WalletClient } from "viem";
|
|
3
3
|
import { ChainType, IBaseChain, IEVMChain, ISolanaChain } from "../types/chain";
|
|
4
|
+
export declare const hyperEVM: {
|
|
5
|
+
blockExplorers: {
|
|
6
|
+
readonly default: {
|
|
7
|
+
readonly name: "HyperEVM Explorer";
|
|
8
|
+
readonly url: "https://hyperevmscan.io/";
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
blockTime?: number | undefined | undefined;
|
|
12
|
+
contracts?: {
|
|
13
|
+
[x: string]: import("viem").ChainContract | {
|
|
14
|
+
[sourceId: number]: import("viem").ChainContract | undefined;
|
|
15
|
+
} | undefined;
|
|
16
|
+
ensRegistry?: import("viem").ChainContract | undefined;
|
|
17
|
+
ensUniversalResolver?: import("viem").ChainContract | undefined;
|
|
18
|
+
multicall3?: import("viem").ChainContract | undefined;
|
|
19
|
+
erc6492Verifier?: import("viem").ChainContract | undefined;
|
|
20
|
+
} | undefined;
|
|
21
|
+
ensTlds?: readonly string[] | undefined;
|
|
22
|
+
id: 999;
|
|
23
|
+
name: "HyperEVM";
|
|
24
|
+
nativeCurrency: {
|
|
25
|
+
readonly name: "HyperEVM";
|
|
26
|
+
readonly symbol: "HYPE";
|
|
27
|
+
readonly decimals: 18;
|
|
28
|
+
};
|
|
29
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
30
|
+
rpcUrls: {
|
|
31
|
+
readonly default: {
|
|
32
|
+
readonly http: readonly ["https://rpc.hyperliquid.xyz/evm"];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
sourceId?: number | undefined | undefined;
|
|
36
|
+
testnet?: boolean | undefined | undefined;
|
|
37
|
+
custom?: Record<string, unknown> | undefined;
|
|
38
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
39
|
+
formatters?: undefined;
|
|
40
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
41
|
+
};
|
|
4
42
|
export declare const EVM_MAINNET: Record<number, IEVMChain>;
|
|
5
43
|
export declare const EVM_TESTNET: Record<number, IEVMChain>;
|
|
6
44
|
export declare const SOLANA_MAINNET: ISolanaChain;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { components } from "@b3dotfun/sdk/anyspend/types/api";
|
|
2
|
+
export declare const HYPERLIQUID_CHAIN_ID = 1337;
|
|
3
|
+
export declare const HYPEREVM_CHAIN_ID = 999;
|
|
2
4
|
export declare function isNativeToken(address: string): boolean;
|
|
3
5
|
export declare function getSolanaToken(): components["schemas"]["Token"];
|
|
4
6
|
export declare function getEthToken(chainId: number): components["schemas"]["Token"];
|
|
5
7
|
export declare function getPolToken(): components["schemas"]["Token"];
|
|
6
8
|
export declare function getBnbToken(): components["schemas"]["Token"];
|
|
7
9
|
export declare function getAvaxToken(): components["schemas"]["Token"];
|
|
10
|
+
export declare function getHyperEVMNativeToken(): components["schemas"]["Token"];
|
package/package.json
CHANGED
|
@@ -15,12 +15,28 @@ import {
|
|
|
15
15
|
} from "viem";
|
|
16
16
|
import { abstract, arbitrum, avalanche, b3, base, bsc, mainnet, optimism, polygon } from "viem/chains";
|
|
17
17
|
import { ChainType, IBaseChain, IEVMChain, ISolanaChain } from "../types/chain";
|
|
18
|
-
import {
|
|
18
|
+
import {
|
|
19
|
+
getAvaxToken,
|
|
20
|
+
getBnbToken,
|
|
21
|
+
getEthToken,
|
|
22
|
+
getHyperEVMNativeToken,
|
|
23
|
+
getPolToken,
|
|
24
|
+
getSolanaToken,
|
|
25
|
+
HYPEREVM_CHAIN_ID,
|
|
26
|
+
} from "./token";
|
|
19
27
|
|
|
20
28
|
function getCustomEvmChain(chain: Chain, rpcUrl: string): Chain {
|
|
21
29
|
return defineChain({ ...chain, rpcUrls: { default: { http: [rpcUrl] } } });
|
|
22
30
|
}
|
|
23
31
|
|
|
32
|
+
export const hyperEVM = defineChain({
|
|
33
|
+
id: HYPEREVM_CHAIN_ID,
|
|
34
|
+
name: "HyperEVM",
|
|
35
|
+
nativeCurrency: { name: "HyperEVM", symbol: "HYPE", decimals: 18 },
|
|
36
|
+
rpcUrls: { default: { http: ["https://rpc.hyperliquid.xyz/evm"] } },
|
|
37
|
+
blockExplorers: { default: { name: "HyperEVM Explorer", url: "https://hyperevmscan.io/" } },
|
|
38
|
+
});
|
|
39
|
+
|
|
24
40
|
// export const b4testnet = defineChain({
|
|
25
41
|
// id: 19934,
|
|
26
42
|
// name: "B4 Testnet",
|
|
@@ -189,6 +205,20 @@ export const EVM_MAINNET: Record<number, IEVMChain> = {
|
|
|
189
205
|
coingeckoName: "abstract",
|
|
190
206
|
wethAddress: "0x3439153eb7af838ad19d56e1571fbd09333c2809",
|
|
191
207
|
},
|
|
208
|
+
[hyperEVM.id]: {
|
|
209
|
+
id: hyperEVM.id,
|
|
210
|
+
name: hyperEVM.name,
|
|
211
|
+
logoUrl: "https://s2.coinmarketcap.com/static/img/coins/64x64/32196.png",
|
|
212
|
+
type: ChainType.EVM,
|
|
213
|
+
nativeRequired: parseEther("0.01"),
|
|
214
|
+
canDepositNative: true,
|
|
215
|
+
defaultToken: getHyperEVMNativeToken(),
|
|
216
|
+
nativeToken: getHyperEVMNativeToken(),
|
|
217
|
+
viem: hyperEVM,
|
|
218
|
+
pollingInterval: 1000, // 1 second for Hyperliquid
|
|
219
|
+
coingeckoName: "hyperevm",
|
|
220
|
+
wethAddress: "0x5555555555555555555555555555555555555555",
|
|
221
|
+
},
|
|
192
222
|
};
|
|
193
223
|
|
|
194
224
|
export const EVM_TESTNET: Record<number, IEVMChain> = {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { avalanche, bsc, polygon } from "viem/chains";
|
|
2
1
|
import { RELAY_ETH_ADDRESS, RELAY_SOL_ADDRESS, RELAY_SOLANA_MAINNET_CHAIN_ID } from "@b3dotfun/sdk/anyspend/constants";
|
|
3
2
|
import { components } from "@b3dotfun/sdk/anyspend/types/api";
|
|
3
|
+
import { avalanche, bsc, polygon } from "viem/chains";
|
|
4
|
+
|
|
5
|
+
export const HYPERLIQUID_CHAIN_ID = 1337;
|
|
6
|
+
export const HYPEREVM_CHAIN_ID = 999;
|
|
4
7
|
|
|
5
8
|
export function isNativeToken(address: string): boolean {
|
|
6
9
|
return address.toLowerCase() === RELAY_ETH_ADDRESS || address.toLowerCase() === RELAY_SOL_ADDRESS;
|
|
@@ -70,3 +73,16 @@ export function getAvaxToken(): components["schemas"]["Token"] {
|
|
|
70
73
|
},
|
|
71
74
|
};
|
|
72
75
|
}
|
|
76
|
+
|
|
77
|
+
export function getHyperEVMNativeToken(): components["schemas"]["Token"] {
|
|
78
|
+
return {
|
|
79
|
+
chainId: HYPEREVM_CHAIN_ID,
|
|
80
|
+
address: RELAY_ETH_ADDRESS,
|
|
81
|
+
symbol: "HYPE",
|
|
82
|
+
name: "HYPE",
|
|
83
|
+
decimals: 18,
|
|
84
|
+
metadata: {
|
|
85
|
+
logoURI: "https://s2.coinmarketcap.com/static/img/coins/64x64/32196.png",
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
}
|