@subql/contract-sdk
Advanced tools
Comparing version 0.1.1-27 to 0.1.1-28
{ | ||
"name": "@subql/contract-sdk", | ||
"version": "0.1.1-27", | ||
"version": "0.1.1-28", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
import { SdkOptions } from "./types"; | ||
import { Provider as AbstractProvider } from '@ethersproject/abstract-provider'; | ||
import { SQToken, Settings, Staking, IndexerRegistry, InflationController, QueryRegistry, ServiceAgreementRegistry } from "./typechain"; | ||
import { SQToken, Settings, Staking, IndexerRegistry, InflationController, QueryRegistry, ServiceAgreementRegistry, EraManager } from "./typechain"; | ||
import { Signer } from "ethers"; | ||
@@ -18,2 +18,3 @@ export declare class ContractSDK { | ||
private _serviceAgreementRegistry?; | ||
private _eraManager?; | ||
constructor(signerOrProvider: AbstractProvider | Signer, options?: SdkOptions | undefined); | ||
@@ -27,2 +28,3 @@ get settings(): Settings; | ||
get serviceAgreementRegistry(): ServiceAgreementRegistry; | ||
get eraManager(): EraManager; | ||
get isReady(): Promise<ContractSDK>; | ||
@@ -29,0 +31,0 @@ private initContract; |
10
sdk.js
@@ -58,2 +58,8 @@ "use strict"; | ||
} | ||
get eraManager() { | ||
if (!this._eraManager) { | ||
throw new Error(`_eraManager address not found`); | ||
} | ||
return this._eraManager; | ||
} | ||
get isReady() { | ||
@@ -70,3 +76,3 @@ return this._isReady; | ||
var _a, _b, _c, _d, _e; | ||
const [settings, sqToken, staking, indexerRegistry, queryRegistry, inflationController, serviceAgreementRegistry,] = await Promise.all([ | ||
const [settings, sqToken, staking, indexerRegistry, queryRegistry, inflationController, serviceAgreementRegistry, eraManager,] = await Promise.all([ | ||
this.initContract(typechain_1.Settings__factory, (_a = this._contractDeployments.Settings) === null || _a === void 0 ? void 0 : _a.address), | ||
@@ -79,2 +85,3 @@ this.initContract(typechain_1.SQToken__factory, (_b = this._contractDeployments.SQToken) === null || _b === void 0 ? void 0 : _b.address), | ||
this.initContract(typechain_1.ServiceAgreementRegistry__factory, this._contractDeployments.ServiceAgreementRegistry.address), | ||
this.initContract(typechain_1.EraManager__factory, this._contractDeployments.EraManager.address), | ||
]); | ||
@@ -88,4 +95,5 @@ this._settings = settings; | ||
this._serviceAgreementRegistry = serviceAgreementRegistry; | ||
this._eraManager = eraManager; | ||
} | ||
} | ||
exports.ContractSDK = ContractSDK; |
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
10369171
151450