@aurigami/sdk 1.9.5 → 1.9.7

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.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.9.5",
2
+ "version": "1.9.7",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -5,6 +5,7 @@ import {
5
5
  AuriLens,
6
6
  Comptroller,
7
7
  IERC20,
8
+ AuriOracle,
8
9
  PULP,
9
10
  ReferralDirectory,
10
11
  } from '@aurigami/contracts/typechain';
@@ -23,6 +24,7 @@ export class AuriEnv extends BlockchainEntityRead {
23
24
  private _auriInternalLens: AuriInternalLens | null = null;
24
25
  private _auriAirdrop: AuriAirdrop | null = null;
25
26
  private _referralDirectory: ReferralDirectory | null = null;
27
+ private _oracle: AuriOracle | null = null;
26
28
 
27
29
  public getContract<CType extends Contract>(address: string, abi: any) {
28
30
  return new Contract(address, abi, this._networkConnection.provider) as CType;
@@ -112,4 +114,14 @@ export class AuriEnv extends BlockchainEntityRead {
112
114
  }
113
115
  return this._referralDirectory;
114
116
  }
117
+
118
+ get oracle(): AuriOracle {
119
+ if (!this._oracle) {
120
+ this._oracle = this.getContract<AuriOracle>(
121
+ networkAddresses.misc.oracle,
122
+ abis.AuriOracleABI.abi
123
+ );
124
+ }
125
+ return this._oracle;
126
+ }
115
127
  }