@gearbox-protocol/sdk 16.1.0 → 16.1.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.
@@ -4,12 +4,12 @@ let viem = require("viem");
4
4
  const iaclTraitAbi = (0, viem.parseAbi)(["function acl() external view returns (address)"]);
5
5
  const iOwnableAbi = (0, viem.parseAbi)(["function owner() external view returns (address)"]);
6
6
  const iDegenNftv2Abi = (0, viem.parseAbi)(["function minter() external view returns (address)", "function mint(address to, uint256 amount) external"]);
7
- const faucetAbi = [
7
+ const iFaucetAbi = [
8
8
  {
9
9
  type: "function",
10
10
  name: "assets",
11
11
  inputs: [{
12
- name: "",
12
+ name: "index",
13
13
  type: "uint256",
14
14
  internalType: "uint256"
15
15
  }],
@@ -58,6 +58,100 @@ const faucetAbi = [
58
58
  outputs: [],
59
59
  stateMutability: "nonpayable"
60
60
  },
61
+ {
62
+ type: "function",
63
+ name: "claimOnBehalfOf",
64
+ inputs: [{
65
+ name: "receiver",
66
+ type: "address",
67
+ internalType: "address"
68
+ }, {
69
+ name: "claims",
70
+ type: "tuple[]",
71
+ internalType: "struct TokenClaim[]",
72
+ components: [{
73
+ name: "token",
74
+ type: "address",
75
+ internalType: "address"
76
+ }, {
77
+ name: "amount",
78
+ type: "uint256",
79
+ internalType: "uint256"
80
+ }]
81
+ }],
82
+ outputs: [{
83
+ name: "",
84
+ type: "bool",
85
+ internalType: "bool"
86
+ }],
87
+ stateMutability: "nonpayable"
88
+ },
89
+ {
90
+ type: "function",
91
+ name: "claimOnBehalfOf",
92
+ inputs: [{
93
+ name: "receiver",
94
+ type: "address",
95
+ internalType: "address"
96
+ }, {
97
+ name: "amountUSD",
98
+ type: "uint256",
99
+ internalType: "uint256"
100
+ }],
101
+ outputs: [{
102
+ name: "",
103
+ type: "bool",
104
+ internalType: "bool"
105
+ }],
106
+ stateMutability: "nonpayable"
107
+ },
108
+ {
109
+ type: "function",
110
+ name: "claimOnBehalfOf",
111
+ inputs: [{
112
+ name: "receiver",
113
+ type: "address",
114
+ internalType: "address"
115
+ }],
116
+ outputs: [{
117
+ name: "",
118
+ type: "bool",
119
+ internalType: "bool"
120
+ }],
121
+ stateMutability: "nonpayable"
122
+ },
123
+ {
124
+ type: "function",
125
+ name: "configure",
126
+ inputs: [{
127
+ name: "minAmountUSD",
128
+ type: "uint256",
129
+ internalType: "uint256"
130
+ }, {
131
+ name: "tokens",
132
+ type: "tuple[]",
133
+ internalType: "struct FaucetToken[]",
134
+ components: [
135
+ {
136
+ name: "token",
137
+ type: "address",
138
+ internalType: "address"
139
+ },
140
+ {
141
+ name: "price",
142
+ type: "uint256",
143
+ internalType: "uint256"
144
+ },
145
+ {
146
+ name: "decimals",
147
+ type: "uint8",
148
+ internalType: "uint8"
149
+ }
150
+ ]
151
+ }],
152
+ outputs: [],
153
+ stateMutability: "nonpayable"
154
+ },
61
155
  {
62
156
  type: "function",
63
157
  name: "getAssets",
@@ -95,22 +189,11 @@ const faucetAbi = [
95
189
  }],
96
190
  stateMutability: "view"
97
191
  },
98
- {
99
- type: "function",
100
- name: "owner",
101
- inputs: [],
102
- outputs: [{
103
- name: "",
104
- type: "address",
105
- internalType: "address"
106
- }],
107
- stateMutability: "view"
108
- },
109
192
  {
110
193
  type: "function",
111
194
  name: "prices",
112
195
  inputs: [{
113
- name: "",
196
+ name: "token",
114
197
  type: "address",
115
198
  internalType: "address"
116
199
  }],
@@ -125,7 +208,7 @@ const faucetAbi = [
125
208
  type: "function",
126
209
  name: "scales",
127
210
  inputs: [{
128
- name: "",
211
+ name: "token",
129
212
  type: "address",
130
213
  internalType: "address"
131
214
  }],
@@ -204,8 +287,8 @@ const iOnchainExecutionIdAbi = [
204
287
  }
205
288
  ];
206
289
  //#endregion
207
- exports.faucetAbi = faucetAbi;
208
290
  exports.iDegenNftv2Abi = iDegenNftv2Abi;
291
+ exports.iFaucetAbi = iFaucetAbi;
209
292
  exports.iOnchainExecutionIdAbi = iOnchainExecutionIdAbi;
210
293
  exports.iOwnableAbi = iOwnableAbi;
211
294
  exports.iaclTraitAbi = iaclTraitAbi;
@@ -23,7 +23,7 @@ async function claimFromFaucet(opts) {
23
23
  } else if (typeof amount === "function") {
24
24
  const minAmountUSD = await (0, viem_actions.readContract)(publicClient, {
25
25
  address: faucet,
26
- abi: require_dev_abi.faucetAbi,
26
+ abi: require_dev_abi.iFaucetAbi,
27
27
  functionName: "minAmountUSD"
28
28
  });
29
29
  logger?.debug(`faucet min amount USD: ${minAmountUSD}`);
@@ -39,7 +39,7 @@ async function claimFromFaucet(opts) {
39
39
  const gas = await publicClient.estimateContractGas({
40
40
  account: claimer,
41
41
  address: faucet,
42
- abi: require_dev_abi.faucetAbi,
42
+ abi: require_dev_abi.iFaucetAbi,
43
43
  functionName: "claim",
44
44
  args
45
45
  });
@@ -47,7 +47,7 @@ async function claimFromFaucet(opts) {
47
47
  const { request } = await publicClient.simulateContract({
48
48
  account: claimer,
49
49
  address: faucet,
50
- abi: require_dev_abi.faucetAbi,
50
+ abi: require_dev_abi.iFaucetAbi,
51
51
  functionName: "claim",
52
52
  args,
53
53
  chain: wallet.chain,
@@ -49,7 +49,6 @@ exports.detectChain = require_dev_detectChain.detectChain;
49
49
  exports.enableDSTokenBackDating = require_dev_securitizeUtils.enableDSTokenBackDating;
50
50
  exports.evmMineDetailed = require_dev_createAnvilClient.evmMineDetailed;
51
51
  exports.extendAnvilClient = require_dev_createAnvilClient.extendAnvilClient;
52
- exports.faucetAbi = require_dev_abi.faucetAbi;
53
52
  exports.getAlchemyUrl = require_dev_providers.getAlchemyUrl;
54
53
  exports.getAnkrUrl = require_dev_providers.getAnkrUrl;
55
54
  exports.getDrpcUrl = require_dev_providers.getDrpcUrl;
@@ -60,6 +59,7 @@ exports.getThirdWebUrl = require_dev_providers.getThirdWebUrl;
60
59
  exports.greenlistMidasGateway = require_dev_kycUtils.greenlistMidasGateway;
61
60
  exports.httpTransportOptionsSchema = require_dev_transports.httpTransportOptionsSchema;
62
61
  exports.iDegenNftv2Abi = require_dev_abi.iDegenNftv2Abi;
62
+ exports.iFaucetAbi = require_dev_abi.iFaucetAbi;
63
63
  exports.iOnchainExecutionIdAbi = require_dev_abi.iOnchainExecutionIdAbi;
64
64
  exports.iOwnableAbi = require_dev_abi.iOwnableAbi;
65
65
  exports.iaclTraitAbi = require_dev_abi.iaclTraitAbi;
@@ -55,7 +55,7 @@ var TokensMeta = class extends require_onchain_utils_AddressMap.AddressMap {
55
55
  * Returns the display symbol for a token.
56
56
  *
57
57
  * This is not always the on-chain ERC-20 `symbol()`: curated pretty names
58
- * and redemption phantom tokens (`"source -> target"`) replace it.
58
+ * and redemption phantom tokens (`"target redemption from source"`) replace it.
59
59
  *
60
60
  * @param token - Token address.
61
61
  * @throws If the token is not in the registry.
@@ -154,7 +154,7 @@ var TokensMeta = class extends require_onchain_utils_AddressMap.AddressMap {
154
154
  }
155
155
  /**
156
156
  * Rewrites display symbols of redemption phantom tokens to
157
- * `"${source} -> ${target}"`.
157
+ * `"${target} redemption from ${source}"`.
158
158
  *
159
159
  * @param renames - Phantom / source / target address triples.
160
160
  **/
@@ -164,7 +164,7 @@ var TokensMeta = class extends require_onchain_utils_AddressMap.AddressMap {
164
164
  if (!meta || !this.has(source) || !this.has(target)) continue;
165
165
  this.upsert(phantom, {
166
166
  ...meta,
167
- symbol: `${this.symbol(source)} -> ${this.symbol(target)}`
167
+ symbol: `${this.symbol(target)} redemption from ${this.symbol(source)}`
168
168
  });
169
169
  }
170
170
  }
@@ -118,7 +118,8 @@ const chains = {
118
118
  "0x29350A3C2627FB78C7E915cd59AF754edf8998c5",
119
119
  "0x5A93bc6983F80f5c55675eA4e77bb46DdC9665e8",
120
120
  "0x5415092F06403F30486EF846dBAE0532c6Bd8759",
121
- "0x9D866298f6B8E168a06e313D47059f2C097A92F1"
121
+ "0x9D866298f6B8E168a06e313D47059f2C097A92F1",
122
+ "0x0F4e4432977Bbf3962322996F1c9aeFdBC62256d"
122
123
  ]),
123
124
  isPublic: true,
124
125
  wellKnownToken: {
@@ -126,6 +127,13 @@ const chains = {
126
127
  symbol: "USDC"
127
128
  },
128
129
  tokenPrettyNames: require_onchain_utils_AddressMap.AddressMap.fromRecord({
130
+ "0xab7d50fc2486a1ac06516e2ece9dadc95ba8cd20": "wstETH redemption from cp0xLRT",
131
+ "0x6252467c2fefb61cb55180282943139baeea36c5": "wstETH redemption from rstETH",
132
+ "0xd412ca00d177eba2843348f9c50dd17bfce32c40": "wstETH redemption from pzETH",
133
+ "0x26c98674e623647f11909791593fa3b6e9406c67": "wstETH redemption from steak7LRT",
134
+ "0x9fb930eacadad079683a4758424a53b9b3692775": "wstETH redemption from Re7LRT",
135
+ "0xd7f1a4e3aba92a9d20987c752bd4a6cc759d7738": "rsETH redemption from hgETH",
136
+ "0xc71219dca5a671aa6268ab8fb35e570bd72f372b": "iUSD redemption from liUSD-1w",
129
137
  "0x924d24c238db7ecae2aa3a19430239ed684bde4a": "Beefy WBTC/cbBTC/hemiBTC",
130
138
  "0x403cc0d2694ec2639101f32b146b90d766461ce9": "Beefy wstETH/tETH",
131
139
  "0x02a4cceed3c400b5ba9fd22ad6ec18d8f7a3d48e": "Beefy ETH+/WETH",
@@ -5,7 +5,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
5
5
  * borrowed underlying, e.g. `"wstETH / WETH"`.
6
6
  *
7
7
  * Uses each token's display {@link Token.symbol}, which may already be a
8
- * curated pretty name or a `"source -> target"` redemption rewrite.
8
+ * curated pretty name or a `"target redemption from source"` redemption rewrite.
9
9
  *
10
10
  * @param target - Collateral the position is built around.
11
11
  * @param underlying - Token the position borrows.
@@ -3,12 +3,12 @@ import { parseAbi } from "viem";
3
3
  const iaclTraitAbi = parseAbi(["function acl() external view returns (address)"]);
4
4
  const iOwnableAbi = parseAbi(["function owner() external view returns (address)"]);
5
5
  const iDegenNftv2Abi = parseAbi(["function minter() external view returns (address)", "function mint(address to, uint256 amount) external"]);
6
- const faucetAbi = [
6
+ const iFaucetAbi = [
7
7
  {
8
8
  type: "function",
9
9
  name: "assets",
10
10
  inputs: [{
11
- name: "",
11
+ name: "index",
12
12
  type: "uint256",
13
13
  internalType: "uint256"
14
14
  }],
@@ -57,6 +57,100 @@ const faucetAbi = [
57
57
  outputs: [],
58
58
  stateMutability: "nonpayable"
59
59
  },
60
+ {
61
+ type: "function",
62
+ name: "claimOnBehalfOf",
63
+ inputs: [{
64
+ name: "receiver",
65
+ type: "address",
66
+ internalType: "address"
67
+ }, {
68
+ name: "claims",
69
+ type: "tuple[]",
70
+ internalType: "struct TokenClaim[]",
71
+ components: [{
72
+ name: "token",
73
+ type: "address",
74
+ internalType: "address"
75
+ }, {
76
+ name: "amount",
77
+ type: "uint256",
78
+ internalType: "uint256"
79
+ }]
80
+ }],
81
+ outputs: [{
82
+ name: "",
83
+ type: "bool",
84
+ internalType: "bool"
85
+ }],
86
+ stateMutability: "nonpayable"
87
+ },
88
+ {
89
+ type: "function",
90
+ name: "claimOnBehalfOf",
91
+ inputs: [{
92
+ name: "receiver",
93
+ type: "address",
94
+ internalType: "address"
95
+ }, {
96
+ name: "amountUSD",
97
+ type: "uint256",
98
+ internalType: "uint256"
99
+ }],
100
+ outputs: [{
101
+ name: "",
102
+ type: "bool",
103
+ internalType: "bool"
104
+ }],
105
+ stateMutability: "nonpayable"
106
+ },
107
+ {
108
+ type: "function",
109
+ name: "claimOnBehalfOf",
110
+ inputs: [{
111
+ name: "receiver",
112
+ type: "address",
113
+ internalType: "address"
114
+ }],
115
+ outputs: [{
116
+ name: "",
117
+ type: "bool",
118
+ internalType: "bool"
119
+ }],
120
+ stateMutability: "nonpayable"
121
+ },
122
+ {
123
+ type: "function",
124
+ name: "configure",
125
+ inputs: [{
126
+ name: "minAmountUSD",
127
+ type: "uint256",
128
+ internalType: "uint256"
129
+ }, {
130
+ name: "tokens",
131
+ type: "tuple[]",
132
+ internalType: "struct FaucetToken[]",
133
+ components: [
134
+ {
135
+ name: "token",
136
+ type: "address",
137
+ internalType: "address"
138
+ },
139
+ {
140
+ name: "price",
141
+ type: "uint256",
142
+ internalType: "uint256"
143
+ },
144
+ {
145
+ name: "decimals",
146
+ type: "uint8",
147
+ internalType: "uint8"
148
+ }
149
+ ]
150
+ }],
151
+ outputs: [],
152
+ stateMutability: "nonpayable"
153
+ },
60
154
  {
61
155
  type: "function",
62
156
  name: "getAssets",
@@ -94,22 +188,11 @@ const faucetAbi = [
94
188
  }],
95
189
  stateMutability: "view"
96
190
  },
97
- {
98
- type: "function",
99
- name: "owner",
100
- inputs: [],
101
- outputs: [{
102
- name: "",
103
- type: "address",
104
- internalType: "address"
105
- }],
106
- stateMutability: "view"
107
- },
108
191
  {
109
192
  type: "function",
110
193
  name: "prices",
111
194
  inputs: [{
112
- name: "",
195
+ name: "token",
113
196
  type: "address",
114
197
  internalType: "address"
115
198
  }],
@@ -124,7 +207,7 @@ const faucetAbi = [
124
207
  type: "function",
125
208
  name: "scales",
126
209
  inputs: [{
127
- name: "",
210
+ name: "token",
128
211
  type: "address",
129
212
  internalType: "address"
130
213
  }],
@@ -203,4 +286,4 @@ const iOnchainExecutionIdAbi = [
203
286
  }
204
287
  ];
205
288
  //#endregion
206
- export { faucetAbi, iDegenNftv2Abi, iOnchainExecutionIdAbi, iOwnableAbi, iaclTraitAbi };
289
+ export { iDegenNftv2Abi, iFaucetAbi, iOnchainExecutionIdAbi, iOwnableAbi, iaclTraitAbi };
@@ -1,6 +1,6 @@
1
1
  import { formatBN } from "../onchain/utils/formatter.js";
2
2
  import "../onchain/index.js";
3
- import { faucetAbi } from "./abi.js";
3
+ import { iFaucetAbi } from "./abi.js";
4
4
  import { readContract } from "viem/actions";
5
5
  //#region src/dev/claimFromFaucet.ts
6
6
  async function claimFromFaucet(opts) {
@@ -22,7 +22,7 @@ async function claimFromFaucet(opts) {
22
22
  } else if (typeof amount === "function") {
23
23
  const minAmountUSD = await readContract(publicClient, {
24
24
  address: faucet,
25
- abi: faucetAbi,
25
+ abi: iFaucetAbi,
26
26
  functionName: "minAmountUSD"
27
27
  });
28
28
  logger?.debug(`faucet min amount USD: ${minAmountUSD}`);
@@ -38,7 +38,7 @@ async function claimFromFaucet(opts) {
38
38
  const gas = await publicClient.estimateContractGas({
39
39
  account: claimer,
40
40
  address: faucet,
41
- abi: faucetAbi,
41
+ abi: iFaucetAbi,
42
42
  functionName: "claim",
43
43
  args
44
44
  });
@@ -46,7 +46,7 @@ async function claimFromFaucet(opts) {
46
46
  const { request } = await publicClient.simulateContract({
47
47
  account: claimer,
48
48
  address: faucet,
49
- abi: faucetAbi,
49
+ abi: iFaucetAbi,
50
50
  functionName: "claim",
51
51
  args,
52
52
  chain: wallet.chain,
@@ -1,4 +1,4 @@
1
- import { faucetAbi, iDegenNftv2Abi, iOnchainExecutionIdAbi, iOwnableAbi, iaclTraitAbi } from "./abi.js";
1
+ import { iDegenNftv2Abi, iFaucetAbi, iOnchainExecutionIdAbi, iOwnableAbi, iaclTraitAbi } from "./abi.js";
2
2
  import { claimFromFaucet } from "./claimFromFaucet.js";
3
3
  import { anvilNodeInfo, createAnvilClient, evmMineDetailed, extendAnvilClient, isAnvil } from "./createAnvilClient.js";
4
4
  import { createMinter } from "./mint/factory.js";
@@ -25,4 +25,4 @@ import { claimDSToken, claimDSTokens, enableDSTokenBackDating } from "./securiti
25
25
  import "./types.js";
26
26
  import { ONCHAIN_EXECUTION_ID_ADDRESS, verifyTestnet } from "./verifyTestnet.js";
27
27
  import { makePendingWithdrawalsClaimable } from "./withdrawalUtils.js";
28
- export { AccountOpener, Create2Deployer, DEFAULT_CREATE2_SALT, EthCallSpy, NoAvailableTransportsError, ONCHAIN_EXECUTION_ID_ADDRESS, OpenTxRevertedError, PUBLIC_CREATE2_FACTORY, RevolverTransport, SUPPORTED_RPC_PROVIDERS, SelectionStrategy, anvilNodeInfo, calcLiquidatableLTs, claimDSToken, claimDSTokens, claimFromFaucet, createAnvilClient, createMinter, deployUsingPublicCreate2, detectChain, enableDSTokenBackDating, evmMineDetailed, extendAnvilClient, faucetAbi, getAlchemyUrl, getAnkrUrl, getDrpcUrl, getErpcKey, getPublicCreate2Address, getRpcProviderUrl, getThirdWebUrl, greenlistMidasGateway, httpTransportOptionsSchema, iDegenNftv2Abi, iOnchainExecutionIdAbi, iOwnableAbi, iaclTraitAbi, isAnvil, isDeployedUsingPublicCreate2, isOutOfSyncError, isRangeError, isRateLimitError, isTransientError, logSplitterTransport, makePendingWithdrawalsClaimable, migrateFaucet, providerConfigSchema, registerMidasInvestor, registerRWAInvestor, registerSecuritizeInvestor, replaceStorage, resilientTransport, resilientTransportOptionsSchema, revolverTransportConfigBaseSchema, revolverTransportConfigSchema, rpcProvidersSchema, setLTZero, setLTs, unpauseMidasIssuanceVault, verifyTestnet, writeAndWait };
28
+ export { AccountOpener, Create2Deployer, DEFAULT_CREATE2_SALT, EthCallSpy, NoAvailableTransportsError, ONCHAIN_EXECUTION_ID_ADDRESS, OpenTxRevertedError, PUBLIC_CREATE2_FACTORY, RevolverTransport, SUPPORTED_RPC_PROVIDERS, SelectionStrategy, anvilNodeInfo, calcLiquidatableLTs, claimDSToken, claimDSTokens, claimFromFaucet, createAnvilClient, createMinter, deployUsingPublicCreate2, detectChain, enableDSTokenBackDating, evmMineDetailed, extendAnvilClient, getAlchemyUrl, getAnkrUrl, getDrpcUrl, getErpcKey, getPublicCreate2Address, getRpcProviderUrl, getThirdWebUrl, greenlistMidasGateway, httpTransportOptionsSchema, iDegenNftv2Abi, iFaucetAbi, iOnchainExecutionIdAbi, iOwnableAbi, iaclTraitAbi, isAnvil, isDeployedUsingPublicCreate2, isOutOfSyncError, isRangeError, isRateLimitError, isTransientError, logSplitterTransport, makePendingWithdrawalsClaimable, migrateFaucet, providerConfigSchema, registerMidasInvestor, registerRWAInvestor, registerSecuritizeInvestor, replaceStorage, resilientTransport, resilientTransportOptionsSchema, revolverTransportConfigBaseSchema, revolverTransportConfigSchema, rpcProvidersSchema, setLTZero, setLTs, unpauseMidasIssuanceVault, verifyTestnet, writeAndWait };
@@ -54,7 +54,7 @@ var TokensMeta = class extends AddressMap {
54
54
  * Returns the display symbol for a token.
55
55
  *
56
56
  * This is not always the on-chain ERC-20 `symbol()`: curated pretty names
57
- * and redemption phantom tokens (`"source -> target"`) replace it.
57
+ * and redemption phantom tokens (`"target redemption from source"`) replace it.
58
58
  *
59
59
  * @param token - Token address.
60
60
  * @throws If the token is not in the registry.
@@ -153,7 +153,7 @@ var TokensMeta = class extends AddressMap {
153
153
  }
154
154
  /**
155
155
  * Rewrites display symbols of redemption phantom tokens to
156
- * `"${source} -> ${target}"`.
156
+ * `"${target} redemption from ${source}"`.
157
157
  *
158
158
  * @param renames - Phantom / source / target address triples.
159
159
  **/
@@ -163,7 +163,7 @@ var TokensMeta = class extends AddressMap {
163
163
  if (!meta || !this.has(source) || !this.has(target)) continue;
164
164
  this.upsert(phantom, {
165
165
  ...meta,
166
- symbol: `${this.symbol(source)} -> ${this.symbol(target)}`
166
+ symbol: `${this.symbol(target)} redemption from ${this.symbol(source)}`
167
167
  });
168
168
  }
169
169
  }
@@ -117,7 +117,8 @@ const chains = {
117
117
  "0x29350A3C2627FB78C7E915cd59AF754edf8998c5",
118
118
  "0x5A93bc6983F80f5c55675eA4e77bb46DdC9665e8",
119
119
  "0x5415092F06403F30486EF846dBAE0532c6Bd8759",
120
- "0x9D866298f6B8E168a06e313D47059f2C097A92F1"
120
+ "0x9D866298f6B8E168a06e313D47059f2C097A92F1",
121
+ "0x0F4e4432977Bbf3962322996F1c9aeFdBC62256d"
121
122
  ]),
122
123
  isPublic: true,
123
124
  wellKnownToken: {
@@ -125,6 +126,13 @@ const chains = {
125
126
  symbol: "USDC"
126
127
  },
127
128
  tokenPrettyNames: AddressMap.fromRecord({
129
+ "0xab7d50fc2486a1ac06516e2ece9dadc95ba8cd20": "wstETH redemption from cp0xLRT",
130
+ "0x6252467c2fefb61cb55180282943139baeea36c5": "wstETH redemption from rstETH",
131
+ "0xd412ca00d177eba2843348f9c50dd17bfce32c40": "wstETH redemption from pzETH",
132
+ "0x26c98674e623647f11909791593fa3b6e9406c67": "wstETH redemption from steak7LRT",
133
+ "0x9fb930eacadad079683a4758424a53b9b3692775": "wstETH redemption from Re7LRT",
134
+ "0xd7f1a4e3aba92a9d20987c752bd4a6cc759d7738": "rsETH redemption from hgETH",
135
+ "0xc71219dca5a671aa6268ab8fb35e570bd72f372b": "iUSD redemption from liUSD-1w",
128
136
  "0x924d24c238db7ecae2aa3a19430239ed684bde4a": "Beefy WBTC/cbBTC/hemiBTC",
129
137
  "0x403cc0d2694ec2639101f32b146b90d766461ce9": "Beefy wstETH/tETH",
130
138
  "0x02a4cceed3c400b5ba9fd22ad6ec18d8f7a3d48e": "Beefy ETH+/WETH",
@@ -4,7 +4,7 @@
4
4
  * borrowed underlying, e.g. `"wstETH / WETH"`.
5
5
  *
6
6
  * Uses each token's display {@link Token.symbol}, which may already be a
7
- * curated pretty name or a `"source -> target"` redemption rewrite.
7
+ * curated pretty name or a `"target redemption from source"` redemption rewrite.
8
8
  *
9
9
  * @param target - Collateral the position is built around.
10
10
  * @param underlying - Token the position borrows.
@@ -38,11 +38,11 @@ declare const iDegenNftv2Abi: readonly [{
38
38
  }];
39
39
  readonly outputs: readonly [];
40
40
  }];
41
- declare const faucetAbi: readonly [{
41
+ declare const iFaucetAbi: readonly [{
42
42
  readonly type: "function";
43
43
  readonly name: "assets";
44
44
  readonly inputs: readonly [{
45
- readonly name: "";
45
+ readonly name: "index";
46
46
  readonly type: "uint256";
47
47
  readonly internalType: "uint256";
48
48
  }];
@@ -87,6 +87,92 @@ declare const faucetAbi: readonly [{
87
87
  }];
88
88
  readonly outputs: readonly [];
89
89
  readonly stateMutability: "nonpayable";
90
+ }, {
91
+ readonly type: "function";
92
+ readonly name: "claimOnBehalfOf";
93
+ readonly inputs: readonly [{
94
+ readonly name: "receiver";
95
+ readonly type: "address";
96
+ readonly internalType: "address";
97
+ }, {
98
+ readonly name: "claims";
99
+ readonly type: "tuple[]";
100
+ readonly internalType: "struct TokenClaim[]";
101
+ readonly components: readonly [{
102
+ readonly name: "token";
103
+ readonly type: "address";
104
+ readonly internalType: "address";
105
+ }, {
106
+ readonly name: "amount";
107
+ readonly type: "uint256";
108
+ readonly internalType: "uint256";
109
+ }];
110
+ }];
111
+ readonly outputs: readonly [{
112
+ readonly name: "";
113
+ readonly type: "bool";
114
+ readonly internalType: "bool";
115
+ }];
116
+ readonly stateMutability: "nonpayable";
117
+ }, {
118
+ readonly type: "function";
119
+ readonly name: "claimOnBehalfOf";
120
+ readonly inputs: readonly [{
121
+ readonly name: "receiver";
122
+ readonly type: "address";
123
+ readonly internalType: "address";
124
+ }, {
125
+ readonly name: "amountUSD";
126
+ readonly type: "uint256";
127
+ readonly internalType: "uint256";
128
+ }];
129
+ readonly outputs: readonly [{
130
+ readonly name: "";
131
+ readonly type: "bool";
132
+ readonly internalType: "bool";
133
+ }];
134
+ readonly stateMutability: "nonpayable";
135
+ }, {
136
+ readonly type: "function";
137
+ readonly name: "claimOnBehalfOf";
138
+ readonly inputs: readonly [{
139
+ readonly name: "receiver";
140
+ readonly type: "address";
141
+ readonly internalType: "address";
142
+ }];
143
+ readonly outputs: readonly [{
144
+ readonly name: "";
145
+ readonly type: "bool";
146
+ readonly internalType: "bool";
147
+ }];
148
+ readonly stateMutability: "nonpayable";
149
+ }, {
150
+ readonly type: "function";
151
+ readonly name: "configure";
152
+ readonly inputs: readonly [{
153
+ readonly name: "minAmountUSD";
154
+ readonly type: "uint256";
155
+ readonly internalType: "uint256";
156
+ }, {
157
+ readonly name: "tokens";
158
+ readonly type: "tuple[]";
159
+ readonly internalType: "struct FaucetToken[]";
160
+ readonly components: readonly [{
161
+ readonly name: "token";
162
+ readonly type: "address";
163
+ readonly internalType: "address";
164
+ }, {
165
+ readonly name: "price";
166
+ readonly type: "uint256";
167
+ readonly internalType: "uint256";
168
+ }, {
169
+ readonly name: "decimals";
170
+ readonly type: "uint8";
171
+ readonly internalType: "uint8";
172
+ }];
173
+ }];
174
+ readonly outputs: readonly [];
175
+ readonly stateMutability: "nonpayable";
90
176
  }, {
91
177
  readonly type: "function";
92
178
  readonly name: "getAssets";
@@ -121,21 +207,11 @@ declare const faucetAbi: readonly [{
121
207
  readonly internalType: "uint256";
122
208
  }];
123
209
  readonly stateMutability: "view";
124
- }, {
125
- readonly type: "function";
126
- readonly name: "owner";
127
- readonly inputs: readonly [];
128
- readonly outputs: readonly [{
129
- readonly name: "";
130
- readonly type: "address";
131
- readonly internalType: "address";
132
- }];
133
- readonly stateMutability: "view";
134
210
  }, {
135
211
  readonly type: "function";
136
212
  readonly name: "prices";
137
213
  readonly inputs: readonly [{
138
- readonly name: "";
214
+ readonly name: "token";
139
215
  readonly type: "address";
140
216
  readonly internalType: "address";
141
217
  }];
@@ -149,7 +225,7 @@ declare const faucetAbi: readonly [{
149
225
  readonly type: "function";
150
226
  readonly name: "scales";
151
227
  readonly inputs: readonly [{
152
- readonly name: "";
228
+ readonly name: "token";
153
229
  readonly type: "address";
154
230
  readonly internalType: "address";
155
231
  }];
@@ -218,4 +294,4 @@ declare const iOnchainExecutionIdAbi: readonly [{
218
294
  readonly stateMutability: "view";
219
295
  }];
220
296
  //#endregion
221
- export { faucetAbi, iDegenNftv2Abi, iOnchainExecutionIdAbi, iOwnableAbi, iaclTraitAbi };
297
+ export { iDegenNftv2Abi, iFaucetAbi, iOnchainExecutionIdAbi, iOwnableAbi, iaclTraitAbi };
@@ -2,7 +2,7 @@ import { AccountOpener, AccountOpenerOptions, OpenAccountHumanizedPreview, OpenA
2
2
  import { RpcErrorResult, RpcResponse, RpcSuccessResult } from "./types.js";
3
3
  import { CheckMulticallFn, DetectedCall, EthCallMethod, EthCallRequest, EthCallSpy } from "./EthCallSpy.js";
4
4
  import { NoAvailableTransportsError, ProviderConfig, ProviderStatus, RevolverTransport, RevolverTransportConfig, RevolverTransportValue, SelectionStrategy, providerConfigSchema, revolverTransportConfigBaseSchema, revolverTransportConfigSchema } from "./RevolverTransport.js";
5
- import { faucetAbi, iDegenNftv2Abi, iOnchainExecutionIdAbi, iOwnableAbi, iaclTraitAbi } from "./abi.js";
5
+ import { iDegenNftv2Abi, iFaucetAbi, iOnchainExecutionIdAbi, iOwnableAbi, iaclTraitAbi } from "./abi.js";
6
6
  import { calcLiquidatableLTs } from "./calcLiquidatableLTs.js";
7
7
  import { claimFromFaucet } from "./claimFromFaucet.js";
8
8
  import { Create2Deployer, Create2Parameters, DEFAULT_CREATE2_SALT, EnsureExistsUsingPublicCreate2ReturnType, GetCreate2AddressParameters, PUBLIC_CREATE2_FACTORY, deployUsingPublicCreate2, getPublicCreate2Address, isDeployedUsingPublicCreate2 } from "./create2.js";
@@ -26,4 +26,4 @@ import { EnableDSTokenBackDatingProps, RestoreDSTokenBackDating, claimDSToken, c
26
26
  import { httpTransportOptionsSchema } from "./transports.js";
27
27
  import { ONCHAIN_EXECUTION_ID_ADDRESS, VerifyTestnetParams, verifyTestnet } from "./verifyTestnet.js";
28
28
  import { MakePendingWithdrawalsClaimableOptions, makePendingWithdrawalsClaimable } from "./withdrawalUtils.js";
29
- export { AccountOpener, AccountOpenerOptions, AnvilActions, AnvilClient, AnvilClientConfig, AnvilDealParameters, AnvilNodeInfo, AnvilRPCSchema, CheckMulticallFn, Create2Deployer, Create2Parameters, DEFAULT_CREATE2_SALT, DetectedCall, EnableDSTokenBackDatingProps, EnsureExistsUsingPublicCreate2ReturnType, EthCallMethod, EthCallRequest, EthCallSpy, GetCreate2AddressParameters, GreenlistMidasGatewayProps, IMinter, type LogSplitterTransportOptions, MakePendingWithdrawalsClaimableOptions, NoAvailableTransportsError, ONCHAIN_EXECUTION_ID_ADDRESS, OpenAccountHumanizedPreview, OpenAccountResult, OpenAccountsResult, OpenTxRevertedError, PUBLIC_CREATE2_FACTORY, PoolDepositResult, ProviderConfig, ProviderStatus, RWAKycFailure, RegisterMidasInvestorProps, RegisterRWAInvestorProps, RegisterRWAInvestorResult, RegisterSecuritizeInvestorProps, ReplaceStorageParams, ResilientTransportOptions, RestoreDSTokenBackDating, RestoreMidasIssuanceVaultPause, RevolverTransport, RevolverTransportConfig, RevolverTransportValue, RpcErrorResult, RpcProvider, RpcResponse, RpcSuccessResult, SUPPORTED_RPC_PROVIDERS, SelectionStrategy, TargetAccount, UnpauseMidasIssuanceVaultProps, VerifyTestnetParams, anvilNodeInfo, calcLiquidatableLTs, claimDSToken, claimDSTokens, claimFromFaucet, createAnvilClient, createMinter, deployUsingPublicCreate2, detectChain, enableDSTokenBackDating, evmMineDetailed, extendAnvilClient, faucetAbi, getAlchemyUrl, getAnkrUrl, getDrpcUrl, getErpcKey, getPublicCreate2Address, getRpcProviderUrl, getThirdWebUrl, greenlistMidasGateway, httpTransportOptionsSchema, iDegenNftv2Abi, iOnchainExecutionIdAbi, iOwnableAbi, iaclTraitAbi, isAnvil, isDeployedUsingPublicCreate2, isOutOfSyncError, isRangeError, isRateLimitError, isTransientError, logSplitterTransport, makePendingWithdrawalsClaimable, migrateFaucet, providerConfigSchema, registerMidasInvestor, registerRWAInvestor, registerSecuritizeInvestor, replaceStorage, resilientTransport, resilientTransportOptionsSchema, revolverTransportConfigBaseSchema, revolverTransportConfigSchema, rpcProvidersSchema, setLTZero, setLTs, unpauseMidasIssuanceVault, verifyTestnet, writeAndWait };
29
+ export { AccountOpener, AccountOpenerOptions, AnvilActions, AnvilClient, AnvilClientConfig, AnvilDealParameters, AnvilNodeInfo, AnvilRPCSchema, CheckMulticallFn, Create2Deployer, Create2Parameters, DEFAULT_CREATE2_SALT, DetectedCall, EnableDSTokenBackDatingProps, EnsureExistsUsingPublicCreate2ReturnType, EthCallMethod, EthCallRequest, EthCallSpy, GetCreate2AddressParameters, GreenlistMidasGatewayProps, IMinter, type LogSplitterTransportOptions, MakePendingWithdrawalsClaimableOptions, NoAvailableTransportsError, ONCHAIN_EXECUTION_ID_ADDRESS, OpenAccountHumanizedPreview, OpenAccountResult, OpenAccountsResult, OpenTxRevertedError, PUBLIC_CREATE2_FACTORY, PoolDepositResult, ProviderConfig, ProviderStatus, RWAKycFailure, RegisterMidasInvestorProps, RegisterRWAInvestorProps, RegisterRWAInvestorResult, RegisterSecuritizeInvestorProps, ReplaceStorageParams, ResilientTransportOptions, RestoreDSTokenBackDating, RestoreMidasIssuanceVaultPause, RevolverTransport, RevolverTransportConfig, RevolverTransportValue, RpcErrorResult, RpcProvider, RpcResponse, RpcSuccessResult, SUPPORTED_RPC_PROVIDERS, SelectionStrategy, TargetAccount, UnpauseMidasIssuanceVaultProps, VerifyTestnetParams, anvilNodeInfo, calcLiquidatableLTs, claimDSToken, claimDSTokens, claimFromFaucet, createAnvilClient, createMinter, deployUsingPublicCreate2, detectChain, enableDSTokenBackDating, evmMineDetailed, extendAnvilClient, getAlchemyUrl, getAnkrUrl, getDrpcUrl, getErpcKey, getPublicCreate2Address, getRpcProviderUrl, getThirdWebUrl, greenlistMidasGateway, httpTransportOptionsSchema, iDegenNftv2Abi, iFaucetAbi, iOnchainExecutionIdAbi, iOwnableAbi, iaclTraitAbi, isAnvil, isDeployedUsingPublicCreate2, isOutOfSyncError, isRangeError, isRateLimitError, isTransientError, logSplitterTransport, makePendingWithdrawalsClaimable, migrateFaucet, providerConfigSchema, registerMidasInvestor, registerRWAInvestor, registerSecuritizeInvestor, replaceStorage, resilientTransport, resilientTransportOptionsSchema, revolverTransportConfigBaseSchema, revolverTransportConfigSchema, rpcProvidersSchema, setLTZero, setLTs, unpauseMidasIssuanceVault, verifyTestnet, writeAndWait };
@@ -129,7 +129,7 @@ interface Token {
129
129
  * Ticker symbol.
130
130
  *
131
131
  * Display ticker, not necessarily the on-chain ERC-20 `symbol()`. The SDK
132
- * may rewrite it (curated pretty names, `"source -> target"` for redemption
132
+ * may rewrite it (curated pretty names, `"target redemption from source"` for redemption
133
133
  * phantom tokens).
134
134
  *
135
135
  * @example `"USDC"`
@@ -22,7 +22,7 @@ interface FormatBNOptions {
22
22
  }
23
23
  /**
24
24
  * Source, target, and phantom token of a delayed redemption, used to rewrite
25
- * the phantom's display symbol as `"source -> target"`.
25
+ * the phantom's display symbol as `"target redemption from source"`.
26
26
  **/
27
27
  interface RedemptionPhantomRename {
28
28
  /**
@@ -72,7 +72,7 @@ declare class TokensMeta extends AddressMap<TokenMetaData> {
72
72
  * Returns the display symbol for a token.
73
73
  *
74
74
  * This is not always the on-chain ERC-20 `symbol()`: curated pretty names
75
- * and redemption phantom tokens (`"source -> target"`) replace it.
75
+ * and redemption phantom tokens (`"target redemption from source"`) replace it.
76
76
  *
77
77
  * @param token - Token address.
78
78
  * @throws If the token is not in the registry.
@@ -133,7 +133,7 @@ declare class TokensMeta extends AddressMap<TokenMetaData> {
133
133
  unwrapRWA(token: Address): Address;
134
134
  /**
135
135
  * Rewrites display symbols of redemption phantom tokens to
136
- * `"${source} -> ${target}"`.
136
+ * `"${target} redemption from ${source}"`.
137
137
  *
138
138
  * @param renames - Phantom / source / target address triples.
139
139
  **/
@@ -19,7 +19,7 @@ declare const NON_STRATEGY_PHANTOM_TOKEN_TYPES: readonly ["PHANTOM_TOKEN::INFINI
19
19
  * Token metadata stored in {@link TokensMeta}.
20
20
  *
21
21
  * `symbol` is a display ticker. The SDK may rewrite it (curated pretty names,
22
- * `"source -> target"` for redemption phantom tokens) and it is not guaranteed
22
+ * `"target redemption from source"` for redemption phantom tokens) and it is not guaranteed
23
23
  * to match the ERC-20 `symbol()` on chain.
24
24
  */
25
25
  interface SimpleTokenMeta extends TokenData {
@@ -6,7 +6,7 @@ import "../../model/index.js";
6
6
  * borrowed underlying, e.g. `"wstETH / WETH"`.
7
7
  *
8
8
  * Uses each token's display {@link Token.symbol}, which may already be a
9
- * curated pretty name or a `"source -> target"` redemption rewrite.
9
+ * curated pretty name or a `"target redemption from source"` redemption rewrite.
10
10
  *
11
11
  * @param target - Collateral the position is built around.
12
12
  * @param underlying - Token the position borrows.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "16.1.0",
3
+ "version": "16.1.2",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "repository": {