@gearbox-protocol/devops
Advanced tools
Comparing version 1.6.1 to 1.6.2
@@ -0,1 +1,2 @@ | ||
import type { FilterByBlockHash } from "@ethersproject/abstract-provider"; | ||
import { providers as prov } from "ethers"; | ||
@@ -16,6 +17,8 @@ interface Logger { | ||
detectNetwork(): Promise<prov.Network>; | ||
getLogs(filter: prov.Filter | FilterByBlockHash | Promise<prov.Filter | FilterByBlockHash>): Promise<prov.Log[]>; | ||
perform(method: string, params: { | ||
[name: string]: any; | ||
}): Promise<any>; | ||
private withRotation; | ||
} | ||
export {}; |
@@ -56,6 +56,12 @@ "use strict"; | ||
} | ||
async getLogs(filter) { | ||
return this.withRotation(next => this.providers[next].getLogs(filter)); | ||
} | ||
async perform(method, params) { | ||
return this.withRotation(next => this.providers[next].perform(method, params)); | ||
} | ||
async withRotation(fn) { | ||
let next = this.i; | ||
return (0, p_retry_1.default)(async () => { | ||
const resp = this.providers[next].perform(method, params); | ||
const resp = await fn(next); | ||
this.i = next; | ||
@@ -62,0 +68,0 @@ return resp; |
{ | ||
"name": "@gearbox-protocol/devops", | ||
"version": "1.6.1", | ||
"version": "1.6.2", | ||
"description": "Gearbox Devops for SC development", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32839
775