@cryptorubic/web3 0.0.33 → 0.0.34
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/package.json
CHANGED
|
@@ -38,7 +38,6 @@ class BlockchainAdapterFactoryService {
|
|
|
38
38
|
const adapters = Object.entries(this.rpcList)
|
|
39
39
|
.map(([blockchain, rpcs]) => {
|
|
40
40
|
const adapter = this.createAdapter(blockchain, rpcs || []);
|
|
41
|
-
this.logger?.customLog('ADAPTER CREATED', adapter);
|
|
42
41
|
return [blockchain, adapter || null];
|
|
43
42
|
if (adapter) {
|
|
44
43
|
this.logger?.customLog(`Creating adapter for ${blockchain} blockchain`);
|
|
@@ -62,9 +61,7 @@ class BlockchainAdapterFactoryService {
|
|
|
62
61
|
createAdapter(blockchain, rpcs) {
|
|
63
62
|
if (rpcs.length > 0 && typeof rpcs[0] === 'string') {
|
|
64
63
|
const blockchainType = core_1.BlockchainsInfo.getChainType(blockchain);
|
|
65
|
-
this.logger?.customLog('CHAIN_TYPE', blockchainType);
|
|
66
64
|
if (blockchainType === core_1.CHAIN_TYPE.EVM) {
|
|
67
|
-
this.logger?.customLog('VIEM CONFIG', viem_blockchain_mapping_1.viemBlockchainMapping?.[blockchain]);
|
|
68
65
|
if (viem_blockchain_mapping_1.viemBlockchainMapping?.[blockchain]) {
|
|
69
66
|
return new evm_adapter_1.EvmAdapter({
|
|
70
67
|
blockchain: blockchain,
|
|
@@ -1037,4 +1037,21 @@ exports.viemConfig = {
|
|
|
1037
1037
|
}
|
|
1038
1038
|
}
|
|
1039
1039
|
}),
|
|
1040
|
+
GRAVITY: (0, viem_1.defineChain)({
|
|
1041
|
+
blockExplorers: { default: { apiUrl: 'https://gscan.xyz/', name: 'Gravity Explorer', url: 'https://gscan.xyz/' } },
|
|
1042
|
+
id: 1625,
|
|
1043
|
+
name: 'Gravity',
|
|
1044
|
+
nativeCurrency: { decimals: 18, name: 'Gravity', symbol: 'G' },
|
|
1045
|
+
rpcUrls: {
|
|
1046
|
+
default: {
|
|
1047
|
+
http: ['https://mainnet.gravity-rpc.com', 'https://rpc.gravity.xyz']
|
|
1048
|
+
}
|
|
1049
|
+
},
|
|
1050
|
+
testnet: false,
|
|
1051
|
+
contracts: {
|
|
1052
|
+
multicall3: {
|
|
1053
|
+
address: '0xcA11bde05977b3631167028862bE2a173976CA11'
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
})
|
|
1040
1057
|
};
|
|
@@ -69,6 +69,6 @@ exports.viemBlockchainMapping = {
|
|
|
69
69
|
[core_1.BLOCKCHAIN_NAME.XLAYER]: chain_configs_1.viemConfig[core_1.BLOCKCHAIN_NAME.XLAYER], // viem xLayer config without multicall address
|
|
70
70
|
[core_1.BLOCKCHAIN_NAME.BAHAMUT]: chain_configs_1.viemConfig[core_1.BLOCKCHAIN_NAME.BAHAMUT],
|
|
71
71
|
[core_1.BLOCKCHAIN_NAME.BITLAYER]: chain_configs_1.viemConfig[core_1.BLOCKCHAIN_NAME.BITLAYER],
|
|
72
|
-
[core_1.BLOCKCHAIN_NAME.GRAVITY]:
|
|
72
|
+
[core_1.BLOCKCHAIN_NAME.GRAVITY]: chain_configs_1.viemConfig[core_1.BLOCKCHAIN_NAME.GRAVITY],
|
|
73
73
|
[core_1.BLOCKCHAIN_NAME.SEI]: chains_1.sei
|
|
74
74
|
};
|