@gearbox-protocol/sdk 16.1.0 → 16.1.1
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/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/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 +2 -2
- 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/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/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/package.json +1 -1
package/dist/cjs/dev/abi.js
CHANGED
|
@@ -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
|
|
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.
|
|
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.
|
|
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.
|
|
50
|
+
abi: require_dev_abi.iFaucetAbi,
|
|
51
51
|
functionName: "claim",
|
|
52
52
|
args,
|
|
53
53
|
chain: wallet.chain,
|
package/dist/cjs/dev/index.js
CHANGED
|
@@ -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 (`"
|
|
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
|
-
* `"${
|
|
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(
|
|
167
|
+
symbol: `${this.symbol(target)} redemption from ${this.symbol(source)}`
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
170
|
}
|
|
@@ -126,6 +126,13 @@ const chains = {
|
|
|
126
126
|
symbol: "USDC"
|
|
127
127
|
},
|
|
128
128
|
tokenPrettyNames: require_onchain_utils_AddressMap.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",
|
|
129
136
|
"0x924d24c238db7ecae2aa3a19430239ed684bde4a": "Beefy WBTC/cbBTC/hemiBTC",
|
|
130
137
|
"0x403cc0d2694ec2639101f32b146b90d766461ce9": "Beefy wstETH/tETH",
|
|
131
138
|
"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 `"
|
|
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.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ierc20Abi } from "../abi/iERC20.js";
|
|
2
1
|
import { iCreditFacadeV310Abi } from "../abi/310/generated.js";
|
|
2
|
+
import { ierc20Abi } from "../abi/iERC20.js";
|
|
3
3
|
import { AddressMap } from "../onchain/utils/AddressMap.js";
|
|
4
4
|
import { AddressSet } from "../onchain/utils/AddressSet.js";
|
|
5
5
|
import { AssetsMap } from "../onchain/utils/AssetsMap.js";
|
package/dist/esm/dev/abi.js
CHANGED
|
@@ -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
|
|
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 {
|
|
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 {
|
|
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:
|
|
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:
|
|
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:
|
|
49
|
+
abi: iFaucetAbi,
|
|
50
50
|
functionName: "claim",
|
|
51
51
|
args,
|
|
52
52
|
chain: wallet.chain,
|
package/dist/esm/dev/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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,
|
|
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 };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { iWithdrawalCompressorV313Abi } from "../abi/IWithdrawalCompressorV313.js";
|
|
2
1
|
import { getNetworkType } from "../onchain/chain/chains.js";
|
|
3
2
|
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,5 +1,3 @@
|
|
|
1
|
-
import { iBaseRewardPoolAbi } from "../../abi/iBaseRewardPool.js";
|
|
2
|
-
import { ierc4626AdapterAbi } from "../../abi/ierc4626Adapter.js";
|
|
3
1
|
import { AP_REWARDS_COMPRESSOR } from "../constants/address-provider.js";
|
|
4
2
|
import { ADDRESS_0X0 } from "../constants/addresses.js";
|
|
5
3
|
import { MAX_UINT256 } from "../constants/math.js";
|
|
@@ -10,6 +8,8 @@ import "../base/index.js";
|
|
|
10
8
|
import { AccountBotsService } from "./bots/AccountBotsService.js";
|
|
11
9
|
import "./bots/index.js";
|
|
12
10
|
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";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { iLiquidationCompressorV313Abi } from "../../../abi/ILiquidationCompressorV313.js";
|
|
2
1
|
import { AddressSet } from "../../utils/AddressSet.js";
|
|
3
2
|
import { bytes32ToString } from "../../utils/bytes32ToString.js";
|
|
4
3
|
import { ADDRESS_0X0 } from "../../constants/addresses.js";
|
|
@@ -20,6 +19,7 @@ import { SecuritizeLiquidatorContract } from "../../market/rwa/securitize/Securi
|
|
|
20
19
|
import "../../market/rwa/securitize/index.js";
|
|
21
20
|
import "../../market/index.js";
|
|
22
21
|
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";
|
|
2
1
|
import { BaseContract } from "../../base/BaseContract.js";
|
|
3
2
|
import "../../base/index.js";
|
|
4
3
|
import { sdkErr, sdkOk } from "../../../model/result.js";
|
|
5
4
|
import "../../../model/index.js";
|
|
6
5
|
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 { iWithdrawalCompressorV310Abi } from "../../../abi/IWithdrawalCompressorV310.js";
|
|
2
1
|
import { AbstractWithdrawalCompressorContract } from "./AbstractWithdrawalCompressorContract.js";
|
|
2
|
+
import { iWithdrawalCompressorV310Abi } from "../../../abi/IWithdrawalCompressorV310.js";
|
|
3
3
|
//#region src/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.ts
|
|
4
4
|
const abi = iWithdrawalCompressorV310Abi;
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { iWithdrawalCompressorV311Abi } from "../../../abi/IWithdrawalCompressorV311.js";
|
|
2
1
|
import { AbstractWithdrawalCompressorContract } from "./AbstractWithdrawalCompressorContract.js";
|
|
2
|
+
import { iWithdrawalCompressorV311Abi } from "../../../abi/IWithdrawalCompressorV311.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";
|
|
2
1
|
import { encodeDelayedIntent } from "./intent-codec.js";
|
|
3
2
|
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";
|
|
4
1
|
import { AddressMap } from "../utils/AddressMap.js";
|
|
5
2
|
import { AddressSet } from "../utils/AddressSet.js";
|
|
6
3
|
import { bytes32ToString } from "../utils/bytes32ToString.js";
|
|
7
4
|
import { getAssetType } from "../chain/chains.js";
|
|
8
5
|
import { formatBN } from "../utils/formatter.js";
|
|
9
6
|
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";
|
|
2
1
|
import { AP_MARKET_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR } from "../constants/address-provider.js";
|
|
3
2
|
import { isV310 } from "../constants/versions.js";
|
|
4
3
|
import "../constants/index.js";
|
|
5
4
|
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 { accountMigratorAbi } from "../../../../abi/AccountMigrator.js";
|
|
2
1
|
import { AbstractAdapterContract } from "./AbstractAdapter.js";
|
|
2
|
+
import { accountMigratorAbi } from "../../../../abi/AccountMigrator.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";
|
|
2
1
|
import { MissingSerializedParamsError } from "../../../base/errors.js";
|
|
3
2
|
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";
|
|
2
1
|
import { iCreditFacadeMulticallV310Abi, iCreditFacadeV310Abi } from "../../../abi/310/generated.js";
|
|
3
2
|
import { BaseContract } from "../../base/BaseContract.js";
|
|
4
3
|
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,4 +1,3 @@
|
|
|
1
|
-
import { iPausableAbi } from "../../../abi/iPausable.js";
|
|
2
1
|
import { iPoolV310Abi } from "../../../abi/310/generated.js";
|
|
3
2
|
import { AddressMap } from "../../utils/AddressMap.js";
|
|
4
3
|
import { RAY } from "../../constants/math.js";
|
|
@@ -8,6 +7,7 @@ import "../../utils/index.js";
|
|
|
8
7
|
import { SdkRWADataNotLoadedError } from "../../core/errors.js";
|
|
9
8
|
import { BaseContract } from "../../base/BaseContract.js";
|
|
10
9
|
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 { iethZapperAbi } from "../../../abi/iETHZapper.js";
|
|
2
1
|
import { ZapperContract } from "./ZapperContract.js";
|
|
2
|
+
import { iethZapperAbi } from "../../../abi/iETHZapper.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";
|
|
2
1
|
import { BaseContract } from "../../base/BaseContract.js";
|
|
3
2
|
import "../../base/index.js";
|
|
4
3
|
import { sdkErr, sdkOk } from "../../../model/result.js";
|
|
5
4
|
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 { iUpdatablePriceFeedAbi } from "../../../abi/iUpdatablePriceFeed.js";
|
|
3
2
|
import { generateCastTraceCall } from "./cast.js";
|
|
3
|
+
import { iUpdatablePriceFeedAbi } from "../../../abi/iUpdatablePriceFeed.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";
|
|
2
1
|
import { iPoolV310Abi } from "../../abi/310/generated.js";
|
|
3
2
|
import { sdkErr, sdkOk } from "../../model/result.js";
|
|
4
3
|
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 { ierc20Abi } from "../../abi/iERC20.js";
|
|
2
1
|
import { iCreditFacadeV310Abi } from "../../abi/310/generated.js";
|
|
2
|
+
import { ierc20Abi } from "../../abi/iERC20.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/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"`
|
|
@@ -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 `"
|
|
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 (`"
|
|
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
|
-
* `"${
|
|
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
|
-
* `"
|
|
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 `"
|
|
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.
|