@gearbox-protocol/sdk 8.23.0 → 8.23.2
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/plugins/zappers/ZappersPlugin.js +6 -3
- package/dist/cjs/plugins/zappers/index.js +2 -0
- package/dist/cjs/sdk/chain/chains.js +3 -2
- package/dist/esm/plugins/zappers/ZappersPlugin.js +6 -3
- package/dist/esm/plugins/zappers/index.js +1 -0
- package/dist/esm/sdk/chain/chains.js +3 -2
- package/dist/types/plugins/zappers/ZappersPlugin.d.ts +1 -0
- package/dist/types/plugins/zappers/extraZappers.d.ts +1 -1
- package/dist/types/plugins/zappers/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -23,9 +23,13 @@ __export(ZappersPlugin_exports, {
|
|
|
23
23
|
module.exports = __toCommonJS(ZappersPlugin_exports);
|
|
24
24
|
var import_compressors = require("../../abi/compressors.js");
|
|
25
25
|
var import_sdk = require("../../sdk/index.js");
|
|
26
|
-
var import_extraZappers = require("./extraZappers.js");
|
|
27
26
|
class ZappersPlugin extends import_sdk.BasePlugin {
|
|
28
27
|
#zappers;
|
|
28
|
+
#extraZappers;
|
|
29
|
+
constructor(extraZappers = [], loadOnAttach = false) {
|
|
30
|
+
super(loadOnAttach);
|
|
31
|
+
this.#extraZappers = extraZappers;
|
|
32
|
+
}
|
|
29
33
|
async load(force) {
|
|
30
34
|
if (!force && this.loaded) {
|
|
31
35
|
return this.state;
|
|
@@ -70,8 +74,7 @@ class ZappersPlugin extends import_sdk.BasePlugin {
|
|
|
70
74
|
return this.state;
|
|
71
75
|
}
|
|
72
76
|
#addExtraZappers() {
|
|
73
|
-
const
|
|
74
|
-
for (const z of zaps) {
|
|
77
|
+
for (const z of this.#extraZappers) {
|
|
75
78
|
const existing = this.#zappers?.get(z.pool);
|
|
76
79
|
if (existing) {
|
|
77
80
|
const hasZapper = existing.some(
|
|
@@ -15,10 +15,12 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau
|
|
|
15
15
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
16
|
var zappers_exports = {};
|
|
17
17
|
module.exports = __toCommonJS(zappers_exports);
|
|
18
|
+
__reExport(zappers_exports, require("./extraZappers.js"), module.exports);
|
|
18
19
|
__reExport(zappers_exports, require("./types.js"), module.exports);
|
|
19
20
|
__reExport(zappers_exports, require("./ZappersPlugin.js"), module.exports);
|
|
20
21
|
// Annotate the CommonJS export names for ESM import in node:
|
|
21
22
|
0 && (module.exports = {
|
|
23
|
+
...require("./extraZappers.js"),
|
|
22
24
|
...require("./types.js"),
|
|
23
25
|
...require("./ZappersPlugin.js")
|
|
24
26
|
});
|
|
@@ -72,10 +72,11 @@ const chains = {
|
|
|
72
72
|
"0x4d427D418342d8CE89a7634c3a402851978B680A": "K3",
|
|
73
73
|
"0xc168343c791d56dd1da4b4b8b0cc1c1ec1a16e6b": "cp0x",
|
|
74
74
|
"0x3b56538833fc02f4f0e75609390f26ded0c32e42": "Re7",
|
|
75
|
-
"0x7a133fbd01736fd076158307c9476cc3877f1af5": "Invariant Group"
|
|
75
|
+
"0x7a133fbd01736fd076158307c9476cc3877f1af5": "Invariant Group"
|
|
76
|
+
},
|
|
77
|
+
testMarketConfigurators: {
|
|
76
78
|
"0x09d8305F49374AEA6A78aF6C996df2913e8f3b19": "Tulipa"
|
|
77
79
|
},
|
|
78
|
-
testMarketConfigurators: {},
|
|
79
80
|
isPublic: true,
|
|
80
81
|
wellKnownToken: {
|
|
81
82
|
address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
@@ -6,9 +6,13 @@ import {
|
|
|
6
6
|
hexEq,
|
|
7
7
|
VERSION_RANGE_310
|
|
8
8
|
} from "../../sdk/index.js";
|
|
9
|
-
import { extraZappers } from "./extraZappers.js";
|
|
10
9
|
class ZappersPlugin extends BasePlugin {
|
|
11
10
|
#zappers;
|
|
11
|
+
#extraZappers;
|
|
12
|
+
constructor(extraZappers = [], loadOnAttach = false) {
|
|
13
|
+
super(loadOnAttach);
|
|
14
|
+
this.#extraZappers = extraZappers;
|
|
15
|
+
}
|
|
12
16
|
async load(force) {
|
|
13
17
|
if (!force && this.loaded) {
|
|
14
18
|
return this.state;
|
|
@@ -53,8 +57,7 @@ class ZappersPlugin extends BasePlugin {
|
|
|
53
57
|
return this.state;
|
|
54
58
|
}
|
|
55
59
|
#addExtraZappers() {
|
|
56
|
-
const
|
|
57
|
-
for (const z of zaps) {
|
|
60
|
+
for (const z of this.#extraZappers) {
|
|
58
61
|
const existing = this.#zappers?.get(z.pool);
|
|
59
62
|
if (existing) {
|
|
60
63
|
const hasZapper = existing.some(
|
|
@@ -56,10 +56,11 @@ const chains = {
|
|
|
56
56
|
"0x4d427D418342d8CE89a7634c3a402851978B680A": "K3",
|
|
57
57
|
"0xc168343c791d56dd1da4b4b8b0cc1c1ec1a16e6b": "cp0x",
|
|
58
58
|
"0x3b56538833fc02f4f0e75609390f26ded0c32e42": "Re7",
|
|
59
|
-
"0x7a133fbd01736fd076158307c9476cc3877f1af5": "Invariant Group"
|
|
59
|
+
"0x7a133fbd01736fd076158307c9476cc3877f1af5": "Invariant Group"
|
|
60
|
+
},
|
|
61
|
+
testMarketConfigurators: {
|
|
60
62
|
"0x09d8305F49374AEA6A78aF6C996df2913e8f3b19": "Tulipa"
|
|
61
63
|
},
|
|
62
|
-
testMarketConfigurators: {},
|
|
63
64
|
isPublic: true,
|
|
64
65
|
wellKnownToken: {
|
|
65
66
|
address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
@@ -7,6 +7,7 @@ export interface ZappersPluginState {
|
|
|
7
7
|
}
|
|
8
8
|
export declare class ZappersPlugin extends BasePlugin<ZappersPluginState> implements IGearboxSDKPlugin<ZappersPluginState> {
|
|
9
9
|
#private;
|
|
10
|
+
constructor(extraZappers?: ZapperDataFull[], loadOnAttach?: boolean);
|
|
10
11
|
load(force?: boolean): Promise<ZappersPluginState>;
|
|
11
12
|
get zappers(): AddressMap<ZapperDataFull[]>;
|
|
12
13
|
get loaded(): boolean;
|