@sentio/sdk 2.0.0-rc.16 → 2.0.0-rc.18

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.
@@ -31,7 +31,7 @@ export function getProvider(networkish?: Networkish): Provider {
31
31
  [...Endpoints.INSTANCE.chainServer.keys()].join(' ')
32
32
  )
33
33
  }
34
- provider = new QueuedStaticJsonRpcProvider(address, network, Endpoints.INSTANCE.concurrency)
34
+ provider = new QueuedStaticJsonRpcProvider(address, Network.from(network), Endpoints.INSTANCE.concurrency)
35
35
  providers.set(network.chainId.toString(), provider)
36
36
  return provider
37
37
  }
@@ -70,13 +70,23 @@ export function getProvider(networkish?: Networkish): Provider {
70
70
 
71
71
  class QueuedStaticJsonRpcProvider extends JsonRpcProvider {
72
72
  executor: PQueue
73
+ network: Network
73
74
 
74
- constructor(url: string, network: Networkish, concurrency: number) {
75
- super(url, Network.from(network))
75
+ constructor(url: string, network: Network, concurrency: number) {
76
+ super(url, network)
77
+ this.network = network
76
78
  this.executor = new PQueue({ concurrency: concurrency })
77
79
  }
78
80
 
79
81
  send(method: string, params: Array<any>): Promise<any> {
80
82
  return this.executor.add(() => super.send(method, params))
81
83
  }
84
+ async _detectNetwork(): Promise<Network> {
85
+ return this.network
86
+ }
87
+ get _network(): Network {
88
+ return this.network
89
+ }
90
+ // disable batch eth call
91
+ _start(): void {}
82
92
  }