@mento-protocol/mento-sdk 3.0.0-rc.1 → 3.1.0-beta.0
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/cache/routes.js +225 -1
- package/dist/cache/tokens.d.ts +1 -0
- package/dist/cache/tokens.js +31 -1
- package/dist/core/abis/reserve.d.ts +1 -0
- package/dist/core/abis/reserve.js +9 -1
- package/dist/core/constants/addresses.d.ts +5 -0
- package/dist/core/constants/addresses.js +29 -5
- package/dist/core/constants/chainId.d.ts +3 -1
- package/dist/core/constants/chainId.js +2 -0
- package/dist/esm/cache/routes.js +225 -1
- package/dist/esm/cache/tokens.js +31 -1
- package/dist/esm/core/abis/reserve.js +8 -0
- package/dist/esm/core/constants/addresses.js +28 -5
- package/dist/esm/core/constants/chainId.js +2 -0
- package/dist/esm/services/pools/poolDiscovery.js +4 -4
- package/dist/esm/services/swap/SwapService.js +13 -0
- package/dist/esm/services/tokens/tokenService.js +63 -11
- package/dist/esm/services/trading/TradingLimitsService.js +5 -2
- package/dist/esm/utils/chainConfig.js +49 -0
- package/dist/services/pools/poolDiscovery.js +3 -3
- package/dist/services/swap/SwapService.d.ts +7 -0
- package/dist/services/swap/SwapService.js +13 -0
- package/dist/services/tokens/tokenService.d.ts +17 -2
- package/dist/services/tokens/tokenService.js +61 -9
- package/dist/services/trading/TradingLimitsService.js +4 -1
- package/dist/utils/chainConfig.js +49 -0
- package/package.json +1 -1
|
@@ -27,6 +27,47 @@ const celoSepolia = (0, viem_1.defineChain)({
|
|
|
27
27
|
},
|
|
28
28
|
testnet: true,
|
|
29
29
|
});
|
|
30
|
+
const monadTestnet = (0, viem_1.defineChain)({
|
|
31
|
+
id: 10143,
|
|
32
|
+
name: 'Monad Testnet',
|
|
33
|
+
nativeCurrency: {
|
|
34
|
+
decimals: 18,
|
|
35
|
+
name: 'MON',
|
|
36
|
+
symbol: 'MON',
|
|
37
|
+
},
|
|
38
|
+
rpcUrls: {
|
|
39
|
+
default: {
|
|
40
|
+
http: ['https://testnet-rpc.monad.xyz'],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
blockExplorers: {
|
|
44
|
+
default: {
|
|
45
|
+
name: 'Monad Explorer',
|
|
46
|
+
url: 'https://testnet.monadexplorer.com',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
testnet: true,
|
|
50
|
+
});
|
|
51
|
+
const monad = (0, viem_1.defineChain)({
|
|
52
|
+
id: 143,
|
|
53
|
+
name: 'Monad',
|
|
54
|
+
nativeCurrency: {
|
|
55
|
+
decimals: 18,
|
|
56
|
+
name: 'MON',
|
|
57
|
+
symbol: 'MON',
|
|
58
|
+
},
|
|
59
|
+
rpcUrls: {
|
|
60
|
+
default: {
|
|
61
|
+
http: ['https://rpc.monad.xyz'],
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
blockExplorers: {
|
|
65
|
+
default: {
|
|
66
|
+
name: 'Monad Explorer',
|
|
67
|
+
url: 'https://monadvision.com',
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
});
|
|
30
71
|
/**
|
|
31
72
|
* Get the default RPC URL for a given chain ID
|
|
32
73
|
* @param chainId - The chain ID
|
|
@@ -39,6 +80,10 @@ function getDefaultRpcUrl(chainId) {
|
|
|
39
80
|
return 'https://forno.celo.org';
|
|
40
81
|
case chainId_1.ChainId.CELO_SEPOLIA:
|
|
41
82
|
return 'https://forno.celo-sepolia.celo-testnet.org';
|
|
83
|
+
case chainId_1.ChainId.MONAD_TESTNET:
|
|
84
|
+
return 'https://testnet-rpc.monad.xyz';
|
|
85
|
+
case chainId_1.ChainId.MONAD:
|
|
86
|
+
return 'https://rpc.monad.xyz';
|
|
42
87
|
default:
|
|
43
88
|
throw new Error(`Unsupported chain ID: ${chainId}`);
|
|
44
89
|
}
|
|
@@ -55,6 +100,10 @@ function getChainConfig(chainId) {
|
|
|
55
100
|
return chains_1.celo;
|
|
56
101
|
case chainId_1.ChainId.CELO_SEPOLIA:
|
|
57
102
|
return celoSepolia;
|
|
103
|
+
case chainId_1.ChainId.MONAD_TESTNET:
|
|
104
|
+
return monadTestnet;
|
|
105
|
+
case chainId_1.ChainId.MONAD:
|
|
106
|
+
return monad;
|
|
58
107
|
default:
|
|
59
108
|
throw new Error(`Unsupported chain ID: ${chainId}`);
|
|
60
109
|
}
|