@defillama/sdk 5.0.76 → 5.0.77
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.
|
@@ -106,6 +106,12 @@ class LlamaProvider extends ethers_1.FallbackProvider {
|
|
|
106
106
|
runners.splice(1, 0, primaryRunner);
|
|
107
107
|
}
|
|
108
108
|
runners = runners.slice(0, attempts);
|
|
109
|
+
if (this.chainName === 'rsk' && method === 'getLogs') {
|
|
110
|
+
const hostString = (0, env_1.getEnvValue)('RSK_ARCHIVAL_RPC');
|
|
111
|
+
if (!hostString)
|
|
112
|
+
throw new Error('RSK public nodes dont support getLogs. need to set RSK_ARCHIVAL_RPC');
|
|
113
|
+
runners = hostString.split(',').map(host => ({ url: host }));
|
|
114
|
+
}
|
|
109
115
|
for (const runner of runners) {
|
|
110
116
|
try {
|
|
111
117
|
const result = await httpRPC[method](runner.url, params);
|
|
@@ -149,7 +155,8 @@ function createProvider(name, rpcString, chainId = 400069, archivalRPCList = [])
|
|
|
149
155
|
function getProviderObject(url, chain) {
|
|
150
156
|
const jsonRpcApiProviderOptions = { staticNetwork: true, batchMaxCount: 1, };
|
|
151
157
|
if (url.startsWith('wss://')) {
|
|
152
|
-
return
|
|
158
|
+
return null; // websocket provider is not supported
|
|
159
|
+
// return new WebSocketProvider(url, networkish, jsonRpcApiProviderOptions)
|
|
153
160
|
}
|
|
154
161
|
return new ethers_1.JsonRpcProvider(url, networkish, jsonRpcApiProviderOptions);
|
|
155
162
|
}
|