@gearbox-protocol/sdk 16.0.0-next.56 → 16.0.0-next.58
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/dev/abi.js +99 -16
- package/dist/cjs/dev/claimFromFaucet.js +3 -3
- package/dist/cjs/dev/index.js +1 -1
- package/dist/cjs/onchain/accounts/CreditAccountsServiceV310.js +2 -2
- package/dist/cjs/onchain/accounts/intents/open-strategy.js +38 -4
- package/dist/cjs/onchain/base/TokensMeta.js +3 -3
- package/dist/cjs/onchain/chain/chains.js +7 -0
- package/dist/cjs/onchain/market/strategyName.js +1 -1
- package/dist/cjs/sdk/execute/ExecuteApi.js +1 -0
- package/dist/cjs/sdk/index.js +2 -0
- package/dist/cjs/sdk/prepare/PrepareApi.js +18 -1
- package/dist/cjs/sdk/prepare/errors.js +21 -0
- package/dist/cjs/sdk/prepare/index.js +2 -0
- package/dist/esm/dev/AccountOpener.js +1 -1
- package/dist/esm/dev/abi.js +99 -16
- package/dist/esm/dev/claimFromFaucet.js +4 -4
- package/dist/esm/dev/index.js +2 -2
- package/dist/esm/dev/withdrawalUtils.js +1 -1
- package/dist/esm/onchain/accounts/CreditAccountsServiceV310.js +4 -4
- package/dist/esm/onchain/accounts/intents/open-strategy.js +38 -4
- package/dist/esm/onchain/accounts/liquidations/LiquidationsService.js +1 -1
- package/dist/esm/onchain/accounts/withdrawal-compressor/RedemptionLoggerV310Contract.js +1 -1
- package/dist/esm/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.js +1 -1
- package/dist/esm/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.js +1 -1
- package/dist/esm/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.js +1 -1
- package/dist/esm/onchain/base/TokensMeta.js +6 -6
- package/dist/esm/onchain/chain/chains.js +7 -0
- package/dist/esm/onchain/core/createAddressProvider.js +1 -1
- package/dist/esm/onchain/market/adapters/contracts/AccountMigratorAdapterContract.js +1 -1
- package/dist/esm/onchain/market/adapters/contracts/ERC4626AdapterContract.js +1 -1
- package/dist/esm/onchain/market/credit/CreditFacadeV310BaseContract.js +1 -1
- package/dist/esm/onchain/market/pool/PoolV310Contract.js +1 -1
- package/dist/esm/onchain/market/strategyName.js +1 -1
- package/dist/esm/onchain/market/zapper/IETHZapperContract.js +1 -1
- package/dist/esm/onchain/market/zapper/ZapperContract.js +1 -1
- package/dist/esm/onchain/utils/viem/simulateWithPriceUpdates.js +1 -1
- package/dist/esm/preview/simulate/simulatePoolOperation.js +1 -1
- package/dist/esm/preview/trace/extractTransfers.js +1 -1
- package/dist/esm/sdk/execute/ExecuteApi.js +1 -0
- package/dist/esm/sdk/index.js +2 -2
- package/dist/esm/sdk/prepare/PrepareApi.js +19 -2
- package/dist/esm/sdk/prepare/errors.js +20 -1
- package/dist/esm/sdk/prepare/index.js +2 -2
- package/dist/types/dev/abi.d.ts +91 -15
- package/dist/types/dev/index.d.ts +2 -2
- package/dist/types/model/primitives.d.ts +1 -1
- package/dist/types/onchain/accounts/intents/open-strategy.d.ts +34 -3
- package/dist/types/onchain/accounts/intents/tests/open-strategy.fixtures.d.ts +2 -2
- package/dist/types/onchain/accounts/types.d.ts +2 -1
- package/dist/types/onchain/base/TokensMeta.d.ts +3 -3
- package/dist/types/onchain/base/token-types.d.ts +1 -1
- package/dist/types/onchain/market/strategyName.d.ts +1 -1
- package/dist/types/sdk/index.d.ts +2 -2
- package/dist/types/sdk/prepare/PrepareApi.d.ts +2 -2
- package/dist/types/sdk/prepare/errors.d.ts +25 -1
- package/dist/types/sdk/prepare/index.d.ts +2 -2
- package/dist/types/sdk/prepare/types.d.ts +25 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { iWithdrawalCompressorV313Abi } from "../abi/IWithdrawalCompressorV313.js";
|
|
1
2
|
import { getNetworkType } from "../onchain/chain/chains.js";
|
|
2
3
|
import { getWithdrawalCompressorAddress } from "../onchain/accounts/withdrawal-compressor/addresses.js";
|
|
3
|
-
import { iWithdrawalCompressorV313Abi } from "../abi/IWithdrawalCompressorV313.js";
|
|
4
4
|
import "../onchain/index.js";
|
|
5
5
|
import { iMidasDataFeedAbi, iMidasRedemptionVaultAbi, midasGatewayAbi, midasRedeemerAbi, midasRedemptionVaultPhantomTokenAbi, securitizeRedeemerAbi, securitizeRedemptionGatewayAbi, securitizeRedemptionPhantomTokenAbi } from "./withdrawalAbi.js";
|
|
6
6
|
import { erc20Abi, hexToString, parseAbi, parseEther } from "viem";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { iBaseRewardPoolAbi } from "../../abi/iBaseRewardPool.js";
|
|
2
|
+
import { ierc4626AdapterAbi } from "../../abi/ierc4626Adapter.js";
|
|
1
3
|
import { AP_REWARDS_COMPRESSOR } from "../constants/address-provider.js";
|
|
2
4
|
import { ADDRESS_0X0 } from "../constants/addresses.js";
|
|
3
5
|
import { MAX_UINT256 } from "../constants/math.js";
|
|
@@ -8,8 +10,6 @@ import "../base/index.js";
|
|
|
8
10
|
import { AccountBotsService } from "./bots/AccountBotsService.js";
|
|
9
11
|
import "./bots/index.js";
|
|
10
12
|
import { rewardsCompressorAbi } from "../../abi/compressors/rewardsCompressor.js";
|
|
11
|
-
import { iBaseRewardPoolAbi } from "../../abi/iBaseRewardPool.js";
|
|
12
|
-
import { ierc4626AdapterAbi } from "../../abi/ierc4626Adapter.js";
|
|
13
13
|
import { expectedBalanceDeltas } from "../market/credit/expectedBalanceDeltas.js";
|
|
14
14
|
import "../market/index.js";
|
|
15
15
|
import { CreditAccountCompressor } from "./credit-account-compressor/CreditAccountCompressor.js";
|
|
@@ -204,7 +204,7 @@ var CreditAccountsServiceV310 = class extends SDKConstruct {
|
|
|
204
204
|
else if (typeof withdrawToken === "string") tokenToWithdraw = withdrawToken;
|
|
205
205
|
const { creditFacade } = cmSuite;
|
|
206
206
|
let calls = [
|
|
207
|
-
creditFacade.prepareIncreaseDebt(debt),
|
|
207
|
+
...debt > 0n ? [creditFacade.prepareIncreaseDebt(debt)] : [],
|
|
208
208
|
...creditFacade.prepareAddCollateral(collateral, permits),
|
|
209
209
|
...openPathCalls,
|
|
210
210
|
...tokenToWithdraw ? [creditFacade.prepareWithdrawCollateral(tokenToWithdraw, MAX_UINT256, to)] : [],
|
|
@@ -216,7 +216,7 @@ var CreditAccountsServiceV310 = class extends SDKConstruct {
|
|
|
216
216
|
];
|
|
217
217
|
calls = await this.#prependMidasReceiveGreenlist(cm.address, calls);
|
|
218
218
|
calls = await this.prependPriceUpdates(cm.address, calls);
|
|
219
|
-
const tx = reopenCreditAccount ? cmSuite.multicallTx(reopenCreditAccount, calls) : cmSuite.openCreditAccountTx(to, calls, referralCode, rwaOptions);
|
|
219
|
+
const tx = reopenCreditAccount ? cmSuite.multicallTx(reopenCreditAccount, calls, rwaOptions) : cmSuite.openCreditAccountTx(to, calls, referralCode, rwaOptions);
|
|
220
220
|
tx.value = ethAmount.toString(10);
|
|
221
221
|
return tx;
|
|
222
222
|
}
|
|
@@ -6,7 +6,10 @@ import { getQuotasForUpdate } from "./utils/quotas-for-update.js";
|
|
|
6
6
|
import { createRouterPaths } from "./utils/router-path.js";
|
|
7
7
|
import "./utils/index.js";
|
|
8
8
|
//#region src/onchain/accounts/intents/open-strategy.ts
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Stand-in account address, used when the opening creates its own account:
|
|
11
|
+
* nothing exists on chain until the tx lands.
|
|
12
|
+
*/
|
|
10
13
|
const NO_ACCOUNT = "0x0000000000000000000000000000000000000000";
|
|
11
14
|
/**
|
|
12
15
|
* Builds the state opening a leveraged position out of wallet collateral would
|
|
@@ -21,7 +24,8 @@ const NO_ACCOUNT = "0x0000000000000000000000000000000000000000";
|
|
|
21
24
|
* `sdk.accounts.openCA`.
|
|
22
25
|
*/
|
|
23
26
|
async function buildOpenStrategyState(props) {
|
|
24
|
-
|
|
27
|
+
if (props.empty) return emptyOpenState(props);
|
|
28
|
+
const { sdk, creditManager, collateral, targetToken, leverage, slippage = 0, quotaReserve, leftoverBalances = [], creditAccount: existing } = props;
|
|
25
29
|
assertLeverageAtLeastOne(leverage);
|
|
26
30
|
const suite = sdk.marketRegister.findCreditManager(creditManager);
|
|
27
31
|
const market = sdk.marketRegister.findByCreditManager(creditManager);
|
|
@@ -31,7 +35,7 @@ async function buildOpenStrategyState(props) {
|
|
|
31
35
|
const margin = collateral.reduce((acc, a) => acc + convert(a.token, underlying, a.balance), 0n);
|
|
32
36
|
if (margin <= 0n) throw new IntentPreviewError("insufficientSourceBalance", void 0, "openStrategy: collateral is worth nothing in underlying");
|
|
33
37
|
const debt = debtForLeverage(margin, leverage);
|
|
34
|
-
const account = {
|
|
38
|
+
const account = existing ?? {
|
|
35
39
|
creditAccount: NO_ACCOUNT,
|
|
36
40
|
creditManager: creditManager.toLowerCase(),
|
|
37
41
|
creditFacade: suite.creditFacade.address.toLowerCase(),
|
|
@@ -100,7 +104,37 @@ async function buildOpenStrategyState(props) {
|
|
|
100
104
|
minAssets: minAssets.map(priced),
|
|
101
105
|
averageQuota,
|
|
102
106
|
minQuota,
|
|
103
|
-
calls: [...leg.calls]
|
|
107
|
+
calls: [...leg.calls],
|
|
108
|
+
creditAccount: existing?.creditAccount
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* The opening that holds an account and nothing else.
|
|
113
|
+
*
|
|
114
|
+
* Taken before the walk rather than threaded through it: the router has no
|
|
115
|
+
* guard for an empty basket and would still make its `eth_call`, and every
|
|
116
|
+
* assertion below reads amounts that are not there.
|
|
117
|
+
*/
|
|
118
|
+
async function emptyOpenState(props) {
|
|
119
|
+
const { sdk, creditManager } = props;
|
|
120
|
+
assertMarketOperable(sdk.marketRegister.findCreditManager(creditManager));
|
|
121
|
+
const snapshot = {
|
|
122
|
+
creditManager,
|
|
123
|
+
assets: [],
|
|
124
|
+
quotas: [],
|
|
125
|
+
totalDebt: 0n,
|
|
126
|
+
totalValue: 0n
|
|
127
|
+
};
|
|
128
|
+
const { assets: _assets, quotas: _quotas, ...projection } = sdk.positions.projection(snapshot, { availableLiquidityChange: 0n });
|
|
129
|
+
return {
|
|
130
|
+
...projection,
|
|
131
|
+
currentPrice: sdk.positions.currentPrice(snapshot),
|
|
132
|
+
priceImpact: void 0,
|
|
133
|
+
averageAssets: [],
|
|
134
|
+
minAssets: [],
|
|
135
|
+
averageQuota: [],
|
|
136
|
+
minQuota: [],
|
|
137
|
+
calls: []
|
|
104
138
|
};
|
|
105
139
|
}
|
|
106
140
|
/** Collateral plus the borrowed underlying, folded into one balance per token. */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { iLiquidationCompressorV313Abi } from "../../../abi/ILiquidationCompressorV313.js";
|
|
1
2
|
import { AddressSet } from "../../utils/AddressSet.js";
|
|
2
3
|
import { bytes32ToString } from "../../utils/bytes32ToString.js";
|
|
3
4
|
import { ADDRESS_0X0 } from "../../constants/addresses.js";
|
|
@@ -19,7 +20,6 @@ import { SecuritizeLiquidatorContract } from "../../market/rwa/securitize/Securi
|
|
|
19
20
|
import "../../market/rwa/securitize/index.js";
|
|
20
21
|
import "../../market/index.js";
|
|
21
22
|
import { LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS } from "./constants.js";
|
|
22
|
-
import { iLiquidationCompressorV313Abi } from "../../../abi/ILiquidationCompressorV313.js";
|
|
23
23
|
import { skipLiquidatableAccount } from "./skipLiquidatableAccount.js";
|
|
24
24
|
//#region src/onchain/accounts/liquidations/LiquidationsService.ts
|
|
25
25
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { iRedemptionLoggerV310Abi } from "../../../abi/iRedemptionLoggerV310.js";
|
|
1
2
|
import { BaseContract } from "../../base/BaseContract.js";
|
|
2
3
|
import "../../base/index.js";
|
|
3
4
|
import { sdkErr, sdkOk } from "../../../model/result.js";
|
|
4
5
|
import "../../../model/index.js";
|
|
5
6
|
import { decodeDelayedIntent } from "./intent-codec.js";
|
|
6
|
-
import { iRedemptionLoggerV310Abi } from "../../../abi/iRedemptionLoggerV310.js";
|
|
7
7
|
//#region src/onchain/accounts/withdrawal-compressor/RedemptionLoggerV310Contract.ts
|
|
8
8
|
const abi = iRedemptionLoggerV310Abi;
|
|
9
9
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractWithdrawalCompressorContract } from "./AbstractWithdrawalCompressorContract.js";
|
|
2
1
|
import { iWithdrawalCompressorV310Abi } from "../../../abi/IWithdrawalCompressorV310.js";
|
|
2
|
+
import { AbstractWithdrawalCompressorContract } from "./AbstractWithdrawalCompressorContract.js";
|
|
3
3
|
//#region src/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.ts
|
|
4
4
|
const abi = iWithdrawalCompressorV310Abi;
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractWithdrawalCompressorContract } from "./AbstractWithdrawalCompressorContract.js";
|
|
2
1
|
import { iWithdrawalCompressorV311Abi } from "../../../abi/IWithdrawalCompressorV311.js";
|
|
2
|
+
import { AbstractWithdrawalCompressorContract } from "./AbstractWithdrawalCompressorContract.js";
|
|
3
3
|
//#region src/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.ts
|
|
4
4
|
const abi = iWithdrawalCompressorV311Abi;
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { iWithdrawalCompressorV313Abi } from "../../../abi/IWithdrawalCompressorV313.js";
|
|
1
2
|
import { encodeDelayedIntent } from "./intent-codec.js";
|
|
2
3
|
import { AbstractWithdrawalCompressorContract, iCreditAccountAbi, toClaimableWithdrawal, toPendingWithdrawal, toRequestableWithdrawal } from "./AbstractWithdrawalCompressorContract.js";
|
|
3
|
-
import { iWithdrawalCompressorV313Abi } from "../../../abi/IWithdrawalCompressorV313.js";
|
|
4
4
|
import { toWithdrawalStatus } from "./types.js";
|
|
5
5
|
//#region src/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.ts
|
|
6
6
|
const abi = iWithdrawalCompressorV313Abi;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import { iExpirableAbi } from "../../abi/iExpirable.js";
|
|
2
|
+
import { iStateSerializerAbi } from "../../abi/iStateSerializer.js";
|
|
3
|
+
import { iVersionAbi } from "../../abi/iVersion.js";
|
|
1
4
|
import { AddressMap } from "../utils/AddressMap.js";
|
|
2
5
|
import { AddressSet } from "../utils/AddressSet.js";
|
|
3
6
|
import { bytes32ToString } from "../utils/bytes32ToString.js";
|
|
4
7
|
import { getAssetType } from "../chain/chains.js";
|
|
5
8
|
import { formatBN } from "../utils/formatter.js";
|
|
6
9
|
import "../utils/index.js";
|
|
7
|
-
import { iExpirableAbi } from "../../abi/iExpirable.js";
|
|
8
|
-
import { iStateSerializerAbi } from "../../abi/iStateSerializer.js";
|
|
9
|
-
import { iVersionAbi } from "../../abi/iVersion.js";
|
|
10
10
|
import { SdkRWADataNotLoadedError } from "../core/errors.js";
|
|
11
11
|
import { executeMulticallBatches } from "../utils/viem/executeMulticallBatches.js";
|
|
12
12
|
//#region src/onchain/base/TokensMeta.ts
|
|
@@ -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 (`"
|
|
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
|
-
* `"${
|
|
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(
|
|
166
|
+
symbol: `${this.symbol(target)} redemption from ${this.symbol(source)}`
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
169
|
}
|
|
@@ -125,6 +125,13 @@ const chains = {
|
|
|
125
125
|
symbol: "USDC"
|
|
126
126
|
},
|
|
127
127
|
tokenPrettyNames: AddressMap.fromRecord({
|
|
128
|
+
"0xab7d50fc2486a1ac06516e2ece9dadc95ba8cd20": "wstETH redemption from cp0xLRT",
|
|
129
|
+
"0x6252467c2fefb61cb55180282943139baeea36c5": "wstETH redemption from rstETH",
|
|
130
|
+
"0xd412ca00d177eba2843348f9c50dd17bfce32c40": "wstETH redemption from pzETH",
|
|
131
|
+
"0x26c98674e623647f11909791593fa3b6e9406c67": "wstETH redemption from steak7LRT",
|
|
132
|
+
"0x9fb930eacadad079683a4758424a53b9b3692775": "wstETH redemption from Re7LRT",
|
|
133
|
+
"0xd7f1a4e3aba92a9d20987c752bd4a6cc759d7738": "rsETH redemption from hgETH",
|
|
134
|
+
"0xc71219dca5a671aa6268ab8fb35e570bd72f372b": "iUSD redemption from liUSD-1w",
|
|
128
135
|
"0x924d24c238db7ecae2aa3a19430239ed684bde4a": "Beefy WBTC/cbBTC/hemiBTC",
|
|
129
136
|
"0x403cc0d2694ec2639101f32b146b90d766461ce9": "Beefy wstETH/tETH",
|
|
130
137
|
"0x02a4cceed3c400b5ba9fd22ad6ec18d8f7a3d48e": "Beefy ETH+/WETH",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { iVersionAbi } from "../../abi/iVersion.js";
|
|
1
2
|
import { AP_MARKET_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR } from "../constants/address-provider.js";
|
|
2
3
|
import { isV310 } from "../constants/versions.js";
|
|
3
4
|
import "../constants/index.js";
|
|
4
5
|
import { hexEq } from "../utils/hex.js";
|
|
5
|
-
import { iVersionAbi } from "../../abi/iVersion.js";
|
|
6
6
|
import { AddressProviderV310Contract } from "./AddressProviderV310Contract.js";
|
|
7
7
|
//#region src/onchain/core/createAddressProvider.ts
|
|
8
8
|
const OVERRIDE_ADDRESSES = { Mainnet: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractAdapterContract } from "./AbstractAdapter.js";
|
|
2
1
|
import { accountMigratorAbi } from "../../../../abi/AccountMigrator.js";
|
|
2
|
+
import { AbstractAdapterContract } from "./AbstractAdapter.js";
|
|
3
3
|
//#region src/onchain/market/adapters/contracts/AccountMigratorAdapterContract.ts
|
|
4
4
|
const abi = accountMigratorAbi;
|
|
5
5
|
const protocolAbi = accountMigratorAbi;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { ierc4626AdapterAbi } from "../../../../abi/ierc4626Adapter.js";
|
|
1
2
|
import { MissingSerializedParamsError } from "../../../base/errors.js";
|
|
2
3
|
import "../../../base/index.js";
|
|
3
|
-
import { ierc4626AdapterAbi } from "../../../../abi/ierc4626Adapter.js";
|
|
4
4
|
import { iERC4626Abi } from "../abi/targetContractAbi.js";
|
|
5
5
|
import { fnSigToName, swapFromTransfers } from "../transferHelpers.js";
|
|
6
6
|
import { AbstractAdapterContract } from "./AbstractAdapter.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { iPausableAbi } from "../../../abi/iPausable.js";
|
|
1
2
|
import { iCreditFacadeMulticallV310Abi, iCreditFacadeV310Abi } from "../../../abi/310/generated.js";
|
|
2
3
|
import { BaseContract } from "../../base/BaseContract.js";
|
|
3
4
|
import "../../base/index.js";
|
|
4
|
-
import { iPausableAbi } from "../../../abi/iPausable.js";
|
|
5
5
|
//#region src/onchain/market/credit/CreditFacadeV310BaseContract.ts
|
|
6
6
|
const abi = [
|
|
7
7
|
...iCreditFacadeV310Abi,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { iPausableAbi } from "../../../abi/iPausable.js";
|
|
1
2
|
import { iPoolV310Abi } from "../../../abi/310/generated.js";
|
|
2
3
|
import { AddressMap } from "../../utils/AddressMap.js";
|
|
3
4
|
import { RAY } from "../../constants/math.js";
|
|
@@ -7,7 +8,6 @@ import "../../utils/index.js";
|
|
|
7
8
|
import { SdkRWADataNotLoadedError } from "../../core/errors.js";
|
|
8
9
|
import { BaseContract } from "../../base/BaseContract.js";
|
|
9
10
|
import "../../base/index.js";
|
|
10
|
-
import { iPausableAbi } from "../../../abi/iPausable.js";
|
|
11
11
|
//#region src/onchain/market/pool/PoolV310Contract.ts
|
|
12
12
|
const abi = [...iPoolV310Abi, ...iPausableAbi];
|
|
13
13
|
var PoolV310Contract = class extends BaseContract {
|
|
@@ -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 `"
|
|
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.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ZapperContract } from "./ZapperContract.js";
|
|
2
1
|
import { iethZapperAbi } from "../../../abi/iETHZapper.js";
|
|
2
|
+
import { ZapperContract } from "./ZapperContract.js";
|
|
3
3
|
//#region src/onchain/market/zapper/IETHZapperContract.ts
|
|
4
4
|
const abi = iethZapperAbi;
|
|
5
5
|
var IETHZapperContract = class extends ZapperContract {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { iZapperAbi } from "../../../abi/iZapper.js";
|
|
1
2
|
import { BaseContract } from "../../base/BaseContract.js";
|
|
2
3
|
import "../../base/index.js";
|
|
3
4
|
import { sdkErr, sdkOk } from "../../../model/result.js";
|
|
4
5
|
import "../../../model/index.js";
|
|
5
|
-
import { iZapperAbi } from "../../../abi/iZapper.js";
|
|
6
6
|
//#region src/onchain/market/zapper/ZapperContract.ts
|
|
7
7
|
/**
|
|
8
8
|
* Base contract for every Gearbox zapper. Specialized zappers (e.g.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { errorAbis } from "../../../abi/errors.js";
|
|
2
|
-
import { generateCastTraceCall } from "./cast.js";
|
|
3
2
|
import { iUpdatablePriceFeedAbi } from "../../../abi/iUpdatablePriceFeed.js";
|
|
3
|
+
import { generateCastTraceCall } from "./cast.js";
|
|
4
4
|
import { simulateMulticall } from "./simulateMulticall.js";
|
|
5
5
|
import { BaseError, CallExecutionError, ContractFunctionRevertedError, decodeFunctionData, decodeFunctionResult, encodeFunctionData, parseAbi } from "viem";
|
|
6
6
|
import { getAction, parseAccount } from "viem/utils";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { iZapperAbi } from "../../abi/iZapper.js";
|
|
1
2
|
import { iPoolV310Abi } from "../../abi/310/generated.js";
|
|
2
3
|
import { sdkErr, sdkOk } from "../../model/result.js";
|
|
3
4
|
import "../../model/index.js";
|
|
4
|
-
import { iZapperAbi } from "../../abi/iZapper.js";
|
|
5
5
|
import { asPreviewSimulationError } from "./errors.js";
|
|
6
6
|
//#region src/preview/simulate/simulatePoolOperation.ts
|
|
7
7
|
function previewRead(operation) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { iCreditFacadeV310Abi } from "../../abi/310/generated.js";
|
|
2
1
|
import { ierc20Abi } from "../../abi/iERC20.js";
|
|
2
|
+
import { iCreditFacadeV310Abi } from "../../abi/310/generated.js";
|
|
3
3
|
import { AddressMap } from "../../onchain/utils/AddressMap.js";
|
|
4
4
|
import "../../onchain/index.js";
|
|
5
5
|
import { UnexpectedFacadeEventOrderError } from "./errors.js";
|
package/dist/esm/sdk/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import { LiquidationsNamespace } from "./liquidations/LiquidationsNamespace.js";
|
|
|
14
14
|
import "./liquidations/index.js";
|
|
15
15
|
import { ExecuteApi } from "./execute/ExecuteApi.js";
|
|
16
16
|
import "./execute/index.js";
|
|
17
|
-
import { creditAccountNotFound, noStrategyTargetCollateral, toRefusalError, unexpectedFailure } from "./prepare/errors.js";
|
|
17
|
+
import { creditAccountNotEmpty, creditAccountNotFound, emptyOpenTakesNothing, noStrategyTargetCollateral, toRefusalError, unexpectedFailure } from "./prepare/errors.js";
|
|
18
18
|
import { PrepareApi } from "./prepare/PrepareApi.js";
|
|
19
19
|
import "./prepare/index.js";
|
|
20
20
|
import { filterResponse } from "./utils/filterResponse.js";
|
|
@@ -28,4 +28,4 @@ import { PreviewNamespace } from "./preview/PreviewNamespace.js";
|
|
|
28
28
|
import "./preview/index.js";
|
|
29
29
|
import { DEFAULT_MAX_STATE_AGE, GearboxSDK } from "./GearboxSDK.js";
|
|
30
30
|
import "./types.js";
|
|
31
|
-
export { AbstractNamespace, AllSourcesFailedError, AnalyticsNamespace, DEFAULT_MAX_OFFCHAIN_LAG, DEFAULT_MAX_STATE_AGE, ExecuteApi, GearboxSDK, IntentPreviewError, LiquidationsNamespace, MissingSourceError, NoSourceServedError, OpportunitiesNamespace, PositionsNamespace, PrepareApi, PreviewNamespace, SourceChainMismatchError, SourceUnavailableError, assertSameChains, creditAccountNotFound, everyChainFailed, filterResponse, mergeChainList, mergeChainOne, noStrategyTargetCollateral, raise, refuse, toRefusalError, unexpectedFailure };
|
|
31
|
+
export { AbstractNamespace, AllSourcesFailedError, AnalyticsNamespace, DEFAULT_MAX_OFFCHAIN_LAG, DEFAULT_MAX_STATE_AGE, ExecuteApi, GearboxSDK, IntentPreviewError, LiquidationsNamespace, MissingSourceError, NoSourceServedError, OpportunitiesNamespace, PositionsNamespace, PrepareApi, PreviewNamespace, SourceChainMismatchError, SourceUnavailableError, assertSameChains, creditAccountNotEmpty, creditAccountNotFound, emptyOpenTakesNothing, everyChainFailed, filterResponse, mergeChainList, mergeChainOne, noStrategyTargetCollateral, raise, refuse, toRefusalError, unexpectedFailure };
|
|
@@ -6,8 +6,9 @@ import { toToken } from "../../onchain/validation/token.js";
|
|
|
6
6
|
import { toCreditAccountSlice } from "../../onchain/accounts/intents/utils/credit-account-slice.js";
|
|
7
7
|
import { CreditAccountOperationsService } from "../../onchain/accounts/intents/index.js";
|
|
8
8
|
import "../../onchain/index.js";
|
|
9
|
-
import { creditAccountNotFound, noStrategyTargetCollateral, toRefusalError, unexpectedFailure } from "./errors.js";
|
|
9
|
+
import { creditAccountNotEmpty, creditAccountNotFound, emptyOpenTakesNothing, noStrategyTargetCollateral, toRefusalError, unexpectedFailure } from "./errors.js";
|
|
10
10
|
import { withdrawableCollaterals } from "./withdrawable-collaterals.js";
|
|
11
|
+
import { isAddressEqual } from "viem";
|
|
11
12
|
//#region src/sdk/prepare/PrepareApi.ts
|
|
12
13
|
/**
|
|
13
14
|
* {@inheritDoc IOpportunitiesPrepare}
|
|
@@ -181,8 +182,23 @@ var PrepareApi = class extends MultichainConstruct {
|
|
|
181
182
|
try {
|
|
182
183
|
const sdk = await this.#chain(strategy.chainId);
|
|
183
184
|
const at = stateBlock(sdk);
|
|
185
|
+
if (params.empty) {
|
|
186
|
+
if (params.collateral.length > 0 || params.creditAccount || params.leverage !== 0n) return sdkErr(emptyOpenTakesNothing());
|
|
187
|
+
return opened(await service(sdk).openStrategyIntent({
|
|
188
|
+
sdk,
|
|
189
|
+
creditManager: strategy.creditManager,
|
|
190
|
+
empty: true
|
|
191
|
+
}), at);
|
|
192
|
+
}
|
|
184
193
|
const targetToken = params.targetToken ?? sdk.marketRegister.findCreditManager(strategy.creditManager).strategyTargetCollateral;
|
|
185
194
|
if (!targetToken) return sdkErr(noStrategyTargetCollateral(strategy.creditManager));
|
|
195
|
+
let creditAccount;
|
|
196
|
+
if (params.creditAccount) {
|
|
197
|
+
const reused = await slice(sdk, params.creditAccount);
|
|
198
|
+
if (!reused || !isAddressEqual(reused.creditManager, strategy.creditManager)) return sdkErr(creditAccountNotFound(params.creditAccount));
|
|
199
|
+
if (reused.totalDebt > 0n || reused.tokens.some((t) => t.quota > 0n)) return sdkErr(creditAccountNotEmpty(params.creditAccount));
|
|
200
|
+
creditAccount = reused;
|
|
201
|
+
}
|
|
186
202
|
return opened(await service(sdk).openStrategyIntent({
|
|
187
203
|
sdk,
|
|
188
204
|
creditManager: strategy.creditManager,
|
|
@@ -191,7 +207,8 @@ var PrepareApi = class extends MultichainConstruct {
|
|
|
191
207
|
leverage: params.leverage,
|
|
192
208
|
leftoverBalances: params.leftoverBalances,
|
|
193
209
|
slippage: params.slippage,
|
|
194
|
-
quotaReserve: params.quotaReserve
|
|
210
|
+
quotaReserve: params.quotaReserve,
|
|
211
|
+
creditAccount
|
|
195
212
|
}), at);
|
|
196
213
|
} catch (e) {
|
|
197
214
|
return sdkErr(unexpectedFailure(e));
|
|
@@ -62,6 +62,16 @@ function noStrategyTargetCollateral(creditManager) {
|
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
|
+
* {@inheritDoc CreditAccountNotEmptyError}
|
|
66
|
+
**/
|
|
67
|
+
function creditAccountNotEmpty(creditAccount) {
|
|
68
|
+
return {
|
|
69
|
+
code: "creditAccountNotEmpty",
|
|
70
|
+
message: `Credit account ${creditAccount} carries debt or quotas.`,
|
|
71
|
+
creditAccount
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
65
75
|
* {@inheritDoc CreditAccountNotFoundError}
|
|
66
76
|
**/
|
|
67
77
|
function creditAccountNotFound(creditAccount) {
|
|
@@ -72,6 +82,15 @@ function creditAccountNotFound(creditAccount) {
|
|
|
72
82
|
};
|
|
73
83
|
}
|
|
74
84
|
/**
|
|
85
|
+
* {@inheritDoc EmptyOpenTakesNothingError}
|
|
86
|
+
**/
|
|
87
|
+
function emptyOpenTakesNothing() {
|
|
88
|
+
return {
|
|
89
|
+
code: "emptyOpenTakesNothing",
|
|
90
|
+
message: "An empty opening takes no collateral, no account to reuse and no leverage."
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
75
94
|
* {@inheritDoc UnexpectedFailureError}
|
|
76
95
|
*
|
|
77
96
|
* Takes what was thrown, whatever that is: a `throw` is not obliged to raise an
|
|
@@ -86,4 +105,4 @@ function unexpectedFailure(thrown) {
|
|
|
86
105
|
};
|
|
87
106
|
}
|
|
88
107
|
//#endregion
|
|
89
|
-
export { creditAccountNotFound, noStrategyTargetCollateral, toRefusalError, unexpectedFailure };
|
|
108
|
+
export { creditAccountNotEmpty, creditAccountNotFound, emptyOpenTakesNothing, noStrategyTargetCollateral, toRefusalError, unexpectedFailure };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IntentPreviewError, raise, refuse } from "../../onchain/validation/refusal.js";
|
|
2
|
-
import { creditAccountNotFound, noStrategyTargetCollateral, toRefusalError, unexpectedFailure } from "./errors.js";
|
|
2
|
+
import { creditAccountNotEmpty, creditAccountNotFound, emptyOpenTakesNothing, noStrategyTargetCollateral, toRefusalError, unexpectedFailure } from "./errors.js";
|
|
3
3
|
import { PrepareApi } from "./PrepareApi.js";
|
|
4
4
|
import "./types.js";
|
|
5
|
-
export { IntentPreviewError, PrepareApi, creditAccountNotFound, noStrategyTargetCollateral, raise, refuse, toRefusalError, unexpectedFailure };
|
|
5
|
+
export { IntentPreviewError, PrepareApi, creditAccountNotEmpty, creditAccountNotFound, emptyOpenTakesNothing, noStrategyTargetCollateral, raise, refuse, toRefusalError, unexpectedFailure };
|
package/dist/types/dev/abi.d.ts
CHANGED
|
@@ -38,11 +38,11 @@ declare const iDegenNftv2Abi: readonly [{
|
|
|
38
38
|
}];
|
|
39
39
|
readonly outputs: readonly [];
|
|
40
40
|
}];
|
|
41
|
-
declare const
|
|
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 {
|
|
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 {
|
|
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,
|
|
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, `"
|
|
132
|
+
* may rewrite it (curated pretty names, `"target redemption from source"` for redemption
|
|
133
133
|
* phantom tokens).
|
|
134
134
|
*
|
|
135
135
|
* @example `"USDC"`
|