@railgun-community/shared-models 5.1.15 → 5.1.16
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polling-json-rpc-provider.js","sourceRoot":"","sources":["../../src/utils/polling-json-rpc-provider.ts"],"names":[],"mappings":";;;AAAA,mCAA6E;AAE7E;;;GAGG;AACH,MAAa,sBAAuB,SAAQ,wBAAe;IACzD,YAAY,GAAW,EAAE,OAAgB,EAAE,eAAe,GAAG,KAAK;QAChE,MAAM,OAAO,GAA8B;YACzC,OAAO,EAAE,IAAI;YACb,aAAa,EAAE,OAAO;SACvB,CAAC;QACF,IAAI,eAAe,EAAE;YACnB,OAAO,CAAC,aAAa,GAAG,CAAC,CAAC;SAC3B;QACD,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC;CACF;
|
|
1
|
+
{"version":3,"file":"polling-json-rpc-provider.js","sourceRoot":"","sources":["../../src/utils/polling-json-rpc-provider.ts"],"names":[],"mappings":";;;AAAA,mCAA6E;AAE7E;;;GAGG;AACH,MAAa,sBAAuB,SAAQ,wBAAe;IACzD,YAAY,GAAW,EAAE,OAAgB,EAAE,eAAe,GAAG,KAAK;QAChE,MAAM,OAAO,GAA8B;YACzC,OAAO,EAAE,IAAI;YACb,aAAa,EAAE,OAAO;SACvB,CAAC;QACF,IAAI,eAAe,EAAE;YACnB,OAAO,CAAC,aAAa,GAAG,CAAC,CAAC;SAC3B;QACD,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAC7B,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;IAC/B,CAAC;CACF;AAZD,wDAYC","sourcesContent":["import { JsonRpcProvider, JsonRpcApiProviderOptions, Network } from 'ethers';\n\n/**\n * Uses a setting in JsonRpcProvider to poll for events,\n * rather than using sparsely-implemented eth_filter events.\n */\nexport class PollingJsonRpcProvider extends JsonRpcProvider {\n constructor(url: string, network: Network, disableBatching = false) {\n const options: JsonRpcApiProviderOptions = {\n polling: true,\n staticNetwork: network,\n };\n if (disableBatching) {\n options.batchMaxCount = 1;\n }\n super(url, network, options);\n this.pollingInterval = 30000;\n }\n}\n"]}
|