@sodax/sdk 1.0.0-rc.4 → 1.0.0-rc.5
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/index.cjs +10 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +11 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CHAIN_IDS, ICON_MAINNET_CHAIN_ID, spokeChainConfig, SUI_MAINNET_CHAIN_ID, STELLAR_MAINNET_CHAIN_ID, SOLANA_MAINNET_CHAIN_ID, ETHEREUM_MAINNET_CHAIN_ID, LIGHTLINK_MAINNET_CHAIN_ID, HYPEREVM_MAINNET_CHAIN_ID, POLYGON_MAINNET_CHAIN_ID, BSC_MAINNET_CHAIN_ID, OPTIMISM_MAINNET_CHAIN_ID, BASE_MAINNET_CHAIN_ID, ARBITRUM_MAINNET_CHAIN_ID, AVALANCHE_MAINNET_CHAIN_ID, SONIC_MAINNET_CHAIN_ID, defaultSodaxConfig, hubChainConfig, getIntentRelayChainId, getMoneyMarketConfig, getSolverConfig, ChainIdToIntentRelayChainId } from '@sodax/types';
|
|
1
|
+
import { CHAIN_IDS, ICON_MAINNET_CHAIN_ID, spokeChainConfig, SUI_MAINNET_CHAIN_ID, STELLAR_MAINNET_CHAIN_ID, SOLANA_MAINNET_CHAIN_ID, ETHEREUM_MAINNET_CHAIN_ID, LIGHTLINK_MAINNET_CHAIN_ID, HYPEREVM_MAINNET_CHAIN_ID, POLYGON_MAINNET_CHAIN_ID, BSC_MAINNET_CHAIN_ID, OPTIMISM_MAINNET_CHAIN_ID, BASE_MAINNET_CHAIN_ID, ARBITRUM_MAINNET_CHAIN_ID, AVALANCHE_MAINNET_CHAIN_ID, SONIC_MAINNET_CHAIN_ID, defaultSodaxConfig, CONFIG_VERSION, hubChainConfig, getIntentRelayChainId, getMoneyMarketConfig, getSolverConfig, ChainIdToIntentRelayChainId } from '@sodax/types';
|
|
2
2
|
export * from '@sodax/types';
|
|
3
3
|
import { getAbiItem, defineChain, encodeAbiParameters, parseAbiParameters, fromHex, toHex, encodeFunctionData, erc20Abi as erc20Abi$1, encodePacked, parseEventLogs, keccak256, createPublicClient, http, decodeAbiParameters, isAddress } from 'viem';
|
|
4
4
|
import { mainnet, lightlinkPhoenix, polygon, bsc, optimism, base, arbitrum, avalanche, sonic } from 'viem/chains';
|
|
@@ -6867,9 +6867,16 @@ var ConfigService = class {
|
|
|
6867
6867
|
}
|
|
6868
6868
|
async initialize() {
|
|
6869
6869
|
try {
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6870
|
+
const response = await this.backendApiService.getAllConfig();
|
|
6871
|
+
if (!response.version || response.version < CONFIG_VERSION) {
|
|
6872
|
+
console.warn(
|
|
6873
|
+
`Dynamic config version is less than the current version, resorting to the default one. Current version: ${CONFIG_VERSION}, response version: ${response.version}`
|
|
6874
|
+
);
|
|
6875
|
+
} else {
|
|
6876
|
+
this.sodaxConfig = response;
|
|
6877
|
+
this.loadSodaxConfigDataStructures(this.sodaxConfig);
|
|
6878
|
+
this.initialized = true;
|
|
6879
|
+
}
|
|
6873
6880
|
return {
|
|
6874
6881
|
ok: true,
|
|
6875
6882
|
value: void 0
|