@gearbox-protocol/sdk 11.2.1 → 11.3.0
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/abi/router/infinifiWorker.js +541 -0
- package/dist/cjs/abi/router/uniswapV4Worker.js +574 -0
- package/dist/cjs/plugins/adapters/AdaptersPlugin.js +9 -0
- package/dist/cjs/plugins/adapters/abi/actionAbi.js +9 -0
- package/dist/cjs/plugins/adapters/abi/conctructorAbi.js +17 -8
- package/dist/cjs/plugins/adapters/abi/conctructorAbiPatterns.js +4 -4
- package/dist/cjs/plugins/adapters/contracts/BalancerV3WrapperAdapterContract.js +2 -1
- package/dist/cjs/plugins/adapters/contracts/InfinifiGatewayAdapterContract.js +58 -0
- package/dist/cjs/plugins/adapters/contracts/InfinifiUnwindingGatewayAdapterContract.js +49 -0
- package/dist/cjs/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.js +2 -1
- package/dist/cjs/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.js +2 -1
- package/dist/cjs/plugins/adapters/contracts/UniswapV4AdapterContract.js +62 -0
- package/dist/cjs/plugins/adapters/types.js +3 -0
- package/dist/esm/abi/router/infinifiWorker.js +517 -0
- package/dist/esm/abi/router/uniswapV4Worker.js +550 -0
- package/dist/esm/plugins/adapters/AdaptersPlugin.js +9 -0
- package/dist/esm/plugins/adapters/abi/actionAbi.js +9 -0
- package/dist/esm/plugins/adapters/abi/conctructorAbi.js +18 -9
- package/dist/esm/plugins/adapters/abi/conctructorAbiPatterns.js +3 -3
- package/dist/esm/plugins/adapters/contracts/BalancerV3WrapperAdapterContract.js +2 -1
- package/dist/esm/plugins/adapters/contracts/InfinifiGatewayAdapterContract.js +34 -0
- package/dist/esm/plugins/adapters/contracts/InfinifiUnwindingGatewayAdapterContract.js +25 -0
- package/dist/esm/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.js +2 -1
- package/dist/esm/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.js +2 -1
- package/dist/esm/plugins/adapters/contracts/UniswapV4AdapterContract.js +38 -0
- package/dist/esm/plugins/adapters/types.js +3 -0
- package/dist/types/abi/router/infinifiWorker.d.ts +726 -0
- package/dist/types/abi/router/uniswapV4Worker.d.ts +774 -0
- package/dist/types/plugins/adapters/abi/conctructorAbiPatterns.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/BalancerV3RouterAdapterContract.d.ts +139 -13
- package/dist/types/plugins/adapters/contracts/BalancerV3WrapperAdapterContract.d.ts +117 -1
- package/dist/types/plugins/adapters/contracts/InfinifiGatewayAdapterContract.d.ts +351 -0
- package/dist/types/plugins/adapters/contracts/InfinifiUnwindingGatewayAdapterContract.d.ts +208 -0
- package/dist/types/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.d.ts +180 -1
- package/dist/types/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.d.ts +276 -1
- package/dist/types/plugins/adapters/contracts/PendleRouterAdapterContract.d.ts +559 -0
- package/dist/types/plugins/adapters/contracts/UniswapV4AdapterContract.d.ts +320 -0
- package/dist/types/plugins/adapters/types.d.ts +4 -1
- package/package.json +2 -2
|
@@ -2,10 +2,10 @@ const BASIC_ADAPTER_ABI = [
|
|
|
2
2
|
{ type: "address", name: "creditManager" },
|
|
3
3
|
{ type: "address", name: "target" }
|
|
4
4
|
];
|
|
5
|
-
const
|
|
5
|
+
const PHANTOM_TOKEN_ADAPTER_ABI = [
|
|
6
6
|
{ type: "address", name: "creditManager" },
|
|
7
7
|
{ type: "address", name: "target" },
|
|
8
|
-
{ type: "address", name: "
|
|
8
|
+
{ type: "address", name: "phantomToken" }
|
|
9
9
|
];
|
|
10
10
|
const LP_ADAPTER_ABI = [
|
|
11
11
|
{ type: "address", name: "creditManager" },
|
|
@@ -65,8 +65,8 @@ export {
|
|
|
65
65
|
CURVE_V1_WRAPPER_ADAPTER_ABI,
|
|
66
66
|
GATEWAY_ADAPTER_ABI,
|
|
67
67
|
LP_ADAPTER_ABI,
|
|
68
|
+
PHANTOM_TOKEN_ADAPTER_ABI,
|
|
68
69
|
REFERER_ID_ADAPTER_ABI,
|
|
69
|
-
STAKED_TOKEN_ADAPTER_ABI,
|
|
70
70
|
STAKING_REWARDS_ADAPTER_ABI,
|
|
71
71
|
UINT_REFERRAL_ADAPTER_ABI
|
|
72
72
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { iBalancerV3WrapperAdapterAbi } from "@gearbox-protocol/integrations-v3";
|
|
1
2
|
import { decodeAbiParameters } from "viem";
|
|
2
3
|
import { AbstractAdapterContract } from "./AbstractAdapter.js";
|
|
3
|
-
const abi =
|
|
4
|
+
const abi = iBalancerV3WrapperAdapterAbi;
|
|
4
5
|
class BalancerV3WrapperAdapterContract extends AbstractAdapterContract {
|
|
5
6
|
balancerPoolToken;
|
|
6
7
|
constructor(sdk, args) {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { iInfinifiGatewayAdapterAbi } from "@gearbox-protocol/integrations-v3";
|
|
2
|
+
import { decodeAbiParameters } from "viem";
|
|
3
|
+
import { AbstractAdapterContract } from "./AbstractAdapter.js";
|
|
4
|
+
const abi = iInfinifiGatewayAdapterAbi;
|
|
5
|
+
class InfinifiGatewayAdapterContract extends AbstractAdapterContract {
|
|
6
|
+
usdc;
|
|
7
|
+
iusd;
|
|
8
|
+
siusd;
|
|
9
|
+
allowedLockedTokens;
|
|
10
|
+
constructor(sdk, args) {
|
|
11
|
+
super(sdk, { ...args, abi });
|
|
12
|
+
const decoded = decodeAbiParameters(
|
|
13
|
+
[
|
|
14
|
+
{ type: "address", name: "creditManager" },
|
|
15
|
+
{ type: "address", name: "targetContract" },
|
|
16
|
+
{ type: "address", name: "usdc" },
|
|
17
|
+
{ type: "address", name: "iusd" },
|
|
18
|
+
{ type: "address", name: "siusd" },
|
|
19
|
+
{
|
|
20
|
+
type: "address[]",
|
|
21
|
+
name: "allowedLockedTokens"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
args.baseParams.serializedParams
|
|
25
|
+
);
|
|
26
|
+
this.usdc = decoded[2];
|
|
27
|
+
this.iusd = decoded[3];
|
|
28
|
+
this.siusd = decoded[4];
|
|
29
|
+
this.allowedLockedTokens = [...decoded[5]];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
InfinifiGatewayAdapterContract
|
|
34
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { iInfinifiUnwindingGatewayAdapterAbi } from "@gearbox-protocol/integrations-v3";
|
|
2
|
+
import { decodeAbiParameters } from "viem";
|
|
3
|
+
import { AbstractAdapterContract } from "./AbstractAdapter.js";
|
|
4
|
+
const abi = iInfinifiUnwindingGatewayAdapterAbi;
|
|
5
|
+
class InfinifiUnwindingGatewayAdapterContract extends AbstractAdapterContract {
|
|
6
|
+
allowedLockedTokens;
|
|
7
|
+
constructor(sdk, args) {
|
|
8
|
+
super(sdk, { ...args, abi });
|
|
9
|
+
const decoded = decodeAbiParameters(
|
|
10
|
+
[
|
|
11
|
+
{ type: "address", name: "creditManager" },
|
|
12
|
+
{ type: "address", name: "targetContract" },
|
|
13
|
+
{
|
|
14
|
+
type: "address[]",
|
|
15
|
+
name: "allowedLockedTokens"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
args.baseParams.serializedParams
|
|
19
|
+
);
|
|
20
|
+
this.allowedLockedTokens = [...decoded[2]];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
InfinifiUnwindingGatewayAdapterContract
|
|
25
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { iMidasIssuanceVaultAdapterAbi } from "@gearbox-protocol/integrations-v3";
|
|
1
2
|
import { decodeAbiParameters } from "viem";
|
|
2
3
|
import { AbstractAdapterContract } from "./AbstractAdapter.js";
|
|
3
|
-
const abi =
|
|
4
|
+
const abi = iMidasIssuanceVaultAdapterAbi;
|
|
4
5
|
class MidasIssuanceVaultAdapterContract extends AbstractAdapterContract {
|
|
5
6
|
mToken;
|
|
6
7
|
referrerId;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { iMidasRedemptionVaultAdapterAbi } from "@gearbox-protocol/integrations-v3";
|
|
1
2
|
import { decodeAbiParameters } from "viem";
|
|
2
3
|
import { AbstractAdapterContract } from "./AbstractAdapter.js";
|
|
3
|
-
const abi =
|
|
4
|
+
const abi = iMidasRedemptionVaultAdapterAbi;
|
|
4
5
|
class MidasRedemptionVaultAdapterContract extends AbstractAdapterContract {
|
|
5
6
|
gateway;
|
|
6
7
|
mToken;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { iUniswapV4AdapterAbi } from "@gearbox-protocol/integrations-v3";
|
|
2
|
+
import { decodeAbiParameters } from "viem";
|
|
3
|
+
import { AbstractAdapterContract } from "./AbstractAdapter.js";
|
|
4
|
+
const abi = iUniswapV4AdapterAbi;
|
|
5
|
+
class UniswapV4AdapterContract extends AbstractAdapterContract {
|
|
6
|
+
supportedPoolKeys;
|
|
7
|
+
constructor(sdk, args) {
|
|
8
|
+
super(sdk, { ...args, abi });
|
|
9
|
+
const decoded = decodeAbiParameters(
|
|
10
|
+
[
|
|
11
|
+
{ type: "address", name: "creditManager" },
|
|
12
|
+
{ type: "address", name: "targetContract" },
|
|
13
|
+
{
|
|
14
|
+
type: "tuple[]",
|
|
15
|
+
name: "supportedPools",
|
|
16
|
+
components: [
|
|
17
|
+
{ type: "address", name: "token0" },
|
|
18
|
+
{ type: "address", name: "token1" },
|
|
19
|
+
{ type: "uint24", name: "fee" },
|
|
20
|
+
{ type: "int24", name: "tickSpacing" },
|
|
21
|
+
{ type: "address", name: "hooks" }
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
args.baseParams.serializedParams
|
|
26
|
+
);
|
|
27
|
+
this.supportedPoolKeys = decoded[2].map((pool) => ({
|
|
28
|
+
token0: pool.token0,
|
|
29
|
+
token1: pool.token1,
|
|
30
|
+
fee: pool.fee,
|
|
31
|
+
tickSpacing: pool.tickSpacing,
|
|
32
|
+
hooks: pool.hooks
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
UniswapV4AdapterContract
|
|
38
|
+
};
|
|
@@ -17,6 +17,8 @@ var AdapterType = /* @__PURE__ */ ((AdapterType2) => {
|
|
|
17
17
|
AdapterType2["ERC4626_VAULT"] = "ERC4626_VAULT";
|
|
18
18
|
AdapterType2["ERC4626_VAULT_REFERRAL"] = "ERC4626_VAULT_REFERRAL";
|
|
19
19
|
AdapterType2["FLUID_DEX"] = "FLUID_DEX";
|
|
20
|
+
AdapterType2["INFINIFI_GATEWAY"] = "INFINIFI_GATEWAY";
|
|
21
|
+
AdapterType2["INFINIFI_UNWINDING"] = "INFINIFI_UNWINDING";
|
|
20
22
|
AdapterType2["INFRARED_VAULT"] = "INFRARED_VAULT";
|
|
21
23
|
AdapterType2["KODIAK_ISLAND_GATEWAY"] = "KODIAK_ISLAND_GATEWAY";
|
|
22
24
|
AdapterType2["LIDO_V1"] = "LIDO_V1";
|
|
@@ -33,6 +35,7 @@ var AdapterType = /* @__PURE__ */ ((AdapterType2) => {
|
|
|
33
35
|
AdapterType2["TRADERJOE_ROUTER"] = "TRADERJOE_ROUTER";
|
|
34
36
|
AdapterType2["UNISWAP_V2_ROUTER"] = "UNISWAP_V2_ROUTER";
|
|
35
37
|
AdapterType2["UNISWAP_V3_ROUTER"] = "UNISWAP_V3_ROUTER";
|
|
38
|
+
AdapterType2["UNISWAP_V4_GATEWAY"] = "UNISWAP_V4_GATEWAY";
|
|
36
39
|
AdapterType2["UPSHIFT_VAULT"] = "UPSHIFT_VAULT";
|
|
37
40
|
AdapterType2["VELODROME_V2_ROUTER"] = "VELODROME_V2_ROUTER";
|
|
38
41
|
AdapterType2["YEARN_V2"] = "YEARN_V2";
|