@gearbox-protocol/sdk 3.0.0-vfour.291 → 3.0.0-vfour.293
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/dist/cjs/sdk/GearboxSDK.js +1 -1
- package/dist/cjs/sdk/constants/address-provider.js +3 -0
- package/dist/esm/sdk/GearboxSDK.js +2 -2
- package/dist/esm/sdk/constants/address-provider.js +2 -0
- package/dist/types/sdk/constants/address-provider.d.ts +1 -0
- package/dist/types/sdk/market/oracle/PriceOracleBaseContract.d.ts +1 -1
- package/dist/types/sdk/market/oracle/PriceOracleV300Contract.d.ts +1 -1
- package/package.json +1 -1
|
@@ -98,7 +98,7 @@ class GearboxSDK {
|
|
|
98
98
|
chainId = await attachClient.getChainId();
|
|
99
99
|
}
|
|
100
100
|
if (!addressProvider) {
|
|
101
|
-
addressProvider = import_constants.
|
|
101
|
+
addressProvider = import_constants.ADDRESS_PROVIDER_V310;
|
|
102
102
|
}
|
|
103
103
|
const provider = new import_chain.Provider({
|
|
104
104
|
...options,
|
|
@@ -19,6 +19,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
var address_provider_exports = {};
|
|
20
20
|
__export(address_provider_exports, {
|
|
21
21
|
ADDRESS_PROVIDER: () => ADDRESS_PROVIDER,
|
|
22
|
+
ADDRESS_PROVIDER_V310: () => ADDRESS_PROVIDER_V310,
|
|
22
23
|
AP_ACCOUNT_FACTORY: () => AP_ACCOUNT_FACTORY,
|
|
23
24
|
AP_ACL: () => AP_ACL,
|
|
24
25
|
AP_ADAPTER_COMPRESSOR: () => AP_ADAPTER_COMPRESSOR,
|
|
@@ -95,9 +96,11 @@ const ADDRESS_PROVIDER = {
|
|
|
95
96
|
Base: import_addresses.NOT_DEPLOYED,
|
|
96
97
|
Sonic: "0x4b27b296273B72d7c7bfee1ACE93DC081467C41B"
|
|
97
98
|
};
|
|
99
|
+
const ADDRESS_PROVIDER_V310 = "0xBaB2014Dd88223E168bA06911c06df638311a097";
|
|
98
100
|
// Annotate the CommonJS export names for ESM import in node:
|
|
99
101
|
0 && (module.exports = {
|
|
100
102
|
ADDRESS_PROVIDER,
|
|
103
|
+
ADDRESS_PROVIDER_V310,
|
|
101
104
|
AP_ACCOUNT_FACTORY,
|
|
102
105
|
AP_ACL,
|
|
103
106
|
AP_ADAPTER_COMPRESSOR,
|
|
@@ -2,7 +2,7 @@ import { createPublicClient, parseEventLogs } from "viem";
|
|
|
2
2
|
import { TokensMeta } from "./base/index.js";
|
|
3
3
|
import { createTransport, Provider } from "./chain/index.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
5
|
+
ADDRESS_PROVIDER_V310,
|
|
6
6
|
AP_BOT_LIST,
|
|
7
7
|
AP_GEAR_STAKING,
|
|
8
8
|
AP_GEAR_TOKEN,
|
|
@@ -85,7 +85,7 @@ class GearboxSDK {
|
|
|
85
85
|
chainId = await attachClient.getChainId();
|
|
86
86
|
}
|
|
87
87
|
if (!addressProvider) {
|
|
88
|
-
addressProvider =
|
|
88
|
+
addressProvider = ADDRESS_PROVIDER_V310;
|
|
89
89
|
}
|
|
90
90
|
const provider = new Provider({
|
|
91
91
|
...options,
|
|
@@ -39,8 +39,10 @@ const ADDRESS_PROVIDER = {
|
|
|
39
39
|
Base: NOT_DEPLOYED,
|
|
40
40
|
Sonic: "0x4b27b296273B72d7c7bfee1ACE93DC081467C41B"
|
|
41
41
|
};
|
|
42
|
+
const ADDRESS_PROVIDER_V310 = "0xBaB2014Dd88223E168bA06911c06df638311a097";
|
|
42
43
|
export {
|
|
43
44
|
ADDRESS_PROVIDER,
|
|
45
|
+
ADDRESS_PROVIDER_V310,
|
|
44
46
|
AP_ACCOUNT_FACTORY,
|
|
45
47
|
AP_ACL,
|
|
46
48
|
AP_ADAPTER_COMPRESSOR,
|
|
@@ -34,3 +34,4 @@ export declare const AP_WETH_TOKEN = "WETH_TOKEN";
|
|
|
34
34
|
export declare const AP_ZAPPER_REGISTER = "ZAPPER_REGISTER";
|
|
35
35
|
export declare const AP_ZERO_PRICE_FEED = "ZERO_PRICE_FEED";
|
|
36
36
|
export declare const ADDRESS_PROVIDER: Record<NetworkType, Address>;
|
|
37
|
+
export declare const ADDRESS_PROVIDER_V310 = "0xBaB2014Dd88223E168bA06911c06df638311a097";
|
|
@@ -413,7 +413,7 @@ export declare class PriceOracleBaseContract<abi extends Abi | readonly unknown[
|
|
|
413
413
|
* @param priceFeed
|
|
414
414
|
* @returns
|
|
415
415
|
*/
|
|
416
|
-
|
|
416
|
+
findTokenForPriceFeed(priceFeed: Address): [token: Address | undefined, reserve: boolean];
|
|
417
417
|
stateHuman(raw?: boolean): PriceOracleStateHuman;
|
|
418
418
|
protected get priceFeedTree(): readonly PriceFeedTreeNode[];
|
|
419
419
|
}
|
|
@@ -355,6 +355,6 @@ type abi = typeof abi;
|
|
|
355
355
|
export declare class PriceOracleV300Contract extends PriceOracleBaseContract<abi> {
|
|
356
356
|
constructor(sdk: GearboxSDK, data: PriceOracleData, underlying: Address);
|
|
357
357
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
358
|
-
|
|
358
|
+
findTokenForPriceFeed(priceFeed: Address): [token: Address | undefined, reserve: boolean];
|
|
359
359
|
}
|
|
360
360
|
export {};
|