@ember-finance/sdk 2.5.0 → 2.6.0-pre.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/src/abis/AtomicLiquidity.json +4050 -0
- package/dist/src/abis/ERC20Token.json +2 -2
- package/dist/src/abis/EmberETHVault.json +279 -5
- package/dist/src/abis/EmberProtocolConfig.json +170 -2
- package/dist/src/abis/EmberVault.json +2 -2
- package/dist/src/abis/EmberVaultMintBurnOFTAdapter.json +43 -2
- package/dist/src/api/v2/apis/accounts-api.d.ts +75 -0
- package/dist/src/api/v2/apis/accounts-api.js +134 -1
- package/dist/src/api/v2/apis/vaults-api.d.ts +16 -4
- package/dist/src/api/v2/apis/vaults-api.js +21 -7
- package/dist/src/api/v2/models/account-holdback.d.ts +103 -0
- package/dist/src/api/v2/models/account-holdback.js +17 -0
- package/dist/src/api/v2/models/account-transaction-transaction-data.d.ts +5 -1
- package/dist/src/api/v2/models/account-transaction.d.ts +5 -0
- package/dist/src/api/v2/models/account-transaction.js +6 -1
- package/dist/src/api/v2/models/chain-vault-details.d.ts +14 -0
- package/dist/src/api/v2/models/escrow-claim-transaction.d.ts +56 -0
- package/dist/src/api/v2/models/escrow-claim-transaction.js +14 -0
- package/dist/src/api/v2/models/evm-atomic-liquidity-lib.d.ts +48 -0
- package/dist/src/api/v2/models/evm-atomic-liquidity-lib.js +14 -0
- package/dist/src/api/v2/models/evm-atomic-vault.d.ts +102 -0
- package/dist/src/api/v2/models/evm-atomic-vault.js +14 -0
- package/dist/src/api/v2/models/evm-contracts.d.ts +16 -0
- package/dist/src/api/v2/models/fee-multiplier-tier.d.ts +30 -0
- package/dist/src/api/v2/models/fee-multiplier-tier.js +14 -0
- package/dist/src/api/v2/models/holdback-release-transaction.d.ts +56 -0
- package/dist/src/api/v2/models/holdback-release-transaction.js +14 -0
- package/dist/src/api/v2/models/index.d.ts +10 -0
- package/dist/src/api/v2/models/index.js +10 -0
- package/dist/src/api/v2/models/instant-withdraw-config.d.ts +109 -0
- package/dist/src/api/v2/models/instant-withdraw-config.js +14 -0
- package/dist/src/api/v2/models/instant-withdraw-transaction.d.ts +74 -0
- package/dist/src/api/v2/models/instant-withdraw-transaction.js +14 -0
- package/dist/src/api/v2/models/instant-withdraw-via-swap-transaction.d.ts +74 -0
- package/dist/src/api/v2/models/instant-withdraw-via-swap-transaction.js +14 -0
- package/dist/src/api/v2/models/supported-ember-vault.d.ts +42 -0
- package/dist/src/api/v2/models/supported-ember-vault.js +14 -0
- package/dist/src/api/v2/models/vault-detail.d.ts +11 -0
- package/dist/src/api/v2/models/vault-detail.js +4 -0
- package/dist/src/atomic/instant-withdraw.d.ts +125 -0
- package/dist/src/atomic/instant-withdraw.js +122 -0
- package/dist/src/ember-vaults.d.ts +2 -1
- package/dist/src/evm-vaults/on-chain-calls/atomic-liquidity.d.ts +98 -0
- package/dist/src/evm-vaults/on-chain-calls/atomic-liquidity.js +212 -0
- package/dist/src/evm-vaults/on-chain-calls/index.d.ts +1 -0
- package/dist/src/evm-vaults/on-chain-calls/index.js +1 -0
- package/dist/src/evm-vaults/on-chain-calls/operator.d.ts +10 -0
- package/dist/src/evm-vaults/on-chain-calls/operator.js +28 -0
- package/dist/src/evm-vaults/on-chain-calls/tx-builder.d.ts +109 -0
- package/dist/src/evm-vaults/on-chain-calls/tx-builder.js +281 -0
- package/dist/src/evm-vaults/on-chain-calls/user.d.ts +50 -0
- package/dist/src/evm-vaults/on-chain-calls/user.js +75 -0
- package/dist/src/evm-vaults/on-chain-calls/vault-admin.d.ts +55 -0
- package/dist/src/evm-vaults/on-chain-calls/vault-admin.js +122 -0
- package/dist/src/evm-vaults/on-chain-calls/vault-reader.d.ts +6 -0
- package/dist/src/evm-vaults/on-chain-calls/vault-reader.js +9 -0
- package/dist/src/evm-vaults/utils/deployment-parser.d.ts +8 -0
- package/dist/src/evm-vaults/utils/deployment-parser.js +11 -0
- package/dist/src/sui-vaults/interfaces/index.d.ts +15 -0
- package/dist/src/sui-vaults/on-chain-calls/admin.d.ts +37 -1
- package/dist/src/sui-vaults/on-chain-calls/admin.js +56 -0
- package/dist/src/sui-vaults/on-chain-calls/atomic-liquidity.d.ts +62 -0
- package/dist/src/sui-vaults/on-chain-calls/atomic-liquidity.js +174 -0
- package/dist/src/sui-vaults/on-chain-calls/index.d.ts +1 -0
- package/dist/src/sui-vaults/on-chain-calls/index.js +1 -0
- package/dist/src/sui-vaults/on-chain-calls/onchain-calls.d.ts +2 -1
- package/dist/src/sui-vaults/on-chain-calls/operator.d.ts +129 -1
- package/dist/src/sui-vaults/on-chain-calls/operator.js +210 -0
- package/dist/src/sui-vaults/on-chain-calls/tx-builder.d.ts +482 -0
- package/dist/src/sui-vaults/on-chain-calls/tx-builder.js +1430 -0
- package/dist/src/sui-vaults/on-chain-calls/user.d.ts +107 -1
- package/dist/src/sui-vaults/on-chain-calls/user.js +190 -0
- package/dist/src/sui-vaults/on-chain-calls/vault-admin.d.ts +229 -1
- package/dist/src/sui-vaults/on-chain-calls/vault-admin.js +391 -0
- package/dist/src/sui-vaults/on-chain-calls/vault.d.ts +2 -1
- package/dist/src/sui-vaults/utils/common.d.ts +2 -1
- package/dist/src/sui-vaults/utils/deployment-parser.d.ts +12 -0
- package/dist/src/sui-vaults/utils/deployment-parser.js +24 -0
- package/package.json +3 -2
|
@@ -4,6 +4,7 @@ import EmberETHVaultABI from "../../abis/EmberETHVault.json" with { type: "json"
|
|
|
4
4
|
import EmberProtocolConfigABI from "../../abis/EmberProtocolConfig.json" with { type: "json" };
|
|
5
5
|
import ERC20TokenABI from "../../abis/ERC20Token.json" with { type: "json" };
|
|
6
6
|
import EmberVaultOFTAdapterABI from "../../abis/EmberVaultMintBurnOFTAdapter.json" with { type: "json" };
|
|
7
|
+
import AtomicLiquidityABI from "../../abis/AtomicLiquidity.json" with { type: "json" };
|
|
7
8
|
import EmberDepositParkingLotABI from "../../abis/EmberDepositParkingLot.json" with { type: "json" };
|
|
8
9
|
import OpenCoverVaultABI from "../../abis/OpenCoverVault.json" with { type: "json" };
|
|
9
10
|
/**
|
|
@@ -574,6 +575,63 @@ export class EVMTxBuilder {
|
|
|
574
575
|
chainId: this.getChainId()
|
|
575
576
|
};
|
|
576
577
|
}
|
|
578
|
+
/**
|
|
579
|
+
* EmberETHVault: claim the caller's own escrowed (deferred) ETH withdrawal — accrued
|
|
580
|
+
* when a withdrawal couldn't be sent (receiver rejected the transfer). EmberETHVault only.
|
|
581
|
+
*/
|
|
582
|
+
claimWithdrawal(vaultAddress) {
|
|
583
|
+
return {
|
|
584
|
+
to: vaultAddress,
|
|
585
|
+
functionName: "claimWithdrawal",
|
|
586
|
+
args: [],
|
|
587
|
+
abi: EmberETHVaultABI.abi,
|
|
588
|
+
value: 0n,
|
|
589
|
+
chainId: this.getChainId()
|
|
590
|
+
};
|
|
591
|
+
}
|
|
592
|
+
/**
|
|
593
|
+
* EmberETHVault: deliver `receiver`'s escrowed ETH withdrawal on their behalf
|
|
594
|
+
* (permissionless — funds can only go to `receiver`). EmberETHVault only.
|
|
595
|
+
*/
|
|
596
|
+
claimWithdrawalFor(vaultAddress, receiver) {
|
|
597
|
+
return {
|
|
598
|
+
to: vaultAddress,
|
|
599
|
+
functionName: "claimWithdrawalFor",
|
|
600
|
+
args: [receiver],
|
|
601
|
+
abi: EmberETHVaultABI.abi,
|
|
602
|
+
value: 0n,
|
|
603
|
+
chainId: this.getChainId()
|
|
604
|
+
};
|
|
605
|
+
}
|
|
606
|
+
/**
|
|
607
|
+
* EmberETHVault: redirect the CALLER's own escrowed ETH withdrawal to `to`. For a
|
|
608
|
+
* receiver that can transact but can no longer receive ETH; delivers only the
|
|
609
|
+
* caller's own escrow. EmberETHVault only.
|
|
610
|
+
*/
|
|
611
|
+
claimWithdrawalTo(vaultAddress, to) {
|
|
612
|
+
return {
|
|
613
|
+
to: vaultAddress,
|
|
614
|
+
functionName: "claimWithdrawalTo",
|
|
615
|
+
args: [to],
|
|
616
|
+
abi: EmberETHVaultABI.abi,
|
|
617
|
+
value: 0n,
|
|
618
|
+
chainId: this.getChainId()
|
|
619
|
+
};
|
|
620
|
+
}
|
|
621
|
+
/**
|
|
622
|
+
* EmberETHVault: owner recovery of `receiver`'s escrowed ETH to `to` (a permanently
|
|
623
|
+
* unpayable receiver). Owner-only (called directly on the vault). EmberETHVault only.
|
|
624
|
+
*/
|
|
625
|
+
recoverUnclaimedWithdrawal(vaultAddress, receiver, to) {
|
|
626
|
+
return {
|
|
627
|
+
to: vaultAddress,
|
|
628
|
+
functionName: "recoverUnclaimedWithdrawal",
|
|
629
|
+
args: [receiver, to],
|
|
630
|
+
abi: EmberETHVaultABI.abi,
|
|
631
|
+
value: 0n,
|
|
632
|
+
chainId: this.getChainId()
|
|
633
|
+
};
|
|
634
|
+
}
|
|
577
635
|
/**
|
|
578
636
|
* Withdraws assets from the vault without redeeming shares (operator only)
|
|
579
637
|
* Used by operators to move funds to sub-accounts for strategy execution
|
|
@@ -1050,4 +1108,227 @@ export class EVMTxBuilder {
|
|
|
1050
1108
|
chainId: this.getChainId()
|
|
1051
1109
|
};
|
|
1052
1110
|
}
|
|
1111
|
+
// ============================================
|
|
1112
|
+
// Atomic Liquidity Vault methods (BFE-817/818)
|
|
1113
|
+
//
|
|
1114
|
+
// Atomic vaults are a sibling of EmberVault with instant-withdraw + cross-vault
|
|
1115
|
+
// EmberShare swap, backed by an ERC-4626 strategy. Shares are non-transferable
|
|
1116
|
+
// (no receipt token). These encode against the AtomicLiquidity ABI; admin
|
|
1117
|
+
// setters take `caller` because access is gated via the protocol-config role.
|
|
1118
|
+
// ============================================
|
|
1119
|
+
atomicCall(vaultAddress, functionName, args) {
|
|
1120
|
+
return {
|
|
1121
|
+
to: vaultAddress,
|
|
1122
|
+
functionName,
|
|
1123
|
+
args,
|
|
1124
|
+
abi: AtomicLiquidityABI.abi,
|
|
1125
|
+
value: 0n,
|
|
1126
|
+
chainId: this.getChainId()
|
|
1127
|
+
};
|
|
1128
|
+
}
|
|
1129
|
+
/** Claim the caller's own escrowed (deferred) holdback collateral. */
|
|
1130
|
+
atomicClaimHoldback(vaultAddress) {
|
|
1131
|
+
return this.atomicCall(vaultAddress, "claimHoldback", []);
|
|
1132
|
+
}
|
|
1133
|
+
/** Deliver `recipient`'s escrowed holdback on their behalf (permissionless). */
|
|
1134
|
+
atomicClaimHoldbackFor(vaultAddress, recipient) {
|
|
1135
|
+
return this.atomicCall(vaultAddress, "claimHoldbackFor", [recipient]);
|
|
1136
|
+
}
|
|
1137
|
+
/**
|
|
1138
|
+
* Redirect the CALLER's own escrowed holdback to `to`. For a recipient that can
|
|
1139
|
+
* transact but can no longer receive the collateral token (e.g. token blacklist);
|
|
1140
|
+
* moves only the caller's own escrow.
|
|
1141
|
+
*/
|
|
1142
|
+
atomicClaimHoldbackTo(vaultAddress, to) {
|
|
1143
|
+
return this.atomicCall(vaultAddress, "claimHoldbackTo", [to]);
|
|
1144
|
+
}
|
|
1145
|
+
/**
|
|
1146
|
+
* Owner recovery of `recipient`'s escrowed holdback to `to` (a permanently unpayable
|
|
1147
|
+
* recipient). Owner-only, called directly on the vault (not via protocol config).
|
|
1148
|
+
*/
|
|
1149
|
+
atomicRecoverUnclaimedHoldback(vaultAddress, recipient, to) {
|
|
1150
|
+
return this.atomicCall(vaultAddress, "recoverUnclaimedHoldback", [recipient, to]);
|
|
1151
|
+
}
|
|
1152
|
+
/**
|
|
1153
|
+
* Builds an atomic-vault ADMIN call routed through the vault's protocol config. Atomic admin
|
|
1154
|
+
* setters are `onlyProtocolConfig`, so they must be invoked on the EmberProtocolConfig (which
|
|
1155
|
+
* forwards msg.sender as `caller`) — never on the vault directly. Targets the vault's OWN
|
|
1156
|
+
* protocol config (atomic vaults may use a config distinct from the global one). Each config
|
|
1157
|
+
* forwarder takes the vault address as its first argument and derives `caller` from msg.sender.
|
|
1158
|
+
*/
|
|
1159
|
+
atomicConfigCall(vaultAddress, forwarderName, forwarderArgs) {
|
|
1160
|
+
return {
|
|
1161
|
+
to: this.parser.getProtocolConfigAddressForVault(vaultAddress),
|
|
1162
|
+
functionName: forwarderName,
|
|
1163
|
+
args: [vaultAddress, ...forwarderArgs],
|
|
1164
|
+
abi: EmberProtocolConfigABI.abi,
|
|
1165
|
+
value: 0n,
|
|
1166
|
+
chainId: this.getChainId()
|
|
1167
|
+
};
|
|
1168
|
+
}
|
|
1169
|
+
/** Instant (capped, fee'd) withdraw of `shares` to `receiver`; auto-pulls from strategy. */
|
|
1170
|
+
atomicInstantWithdraw(vaultAddress, shares, receiver) {
|
|
1171
|
+
return this.atomicCall(vaultAddress, "instantWithdraw", [shares, receiver]);
|
|
1172
|
+
}
|
|
1173
|
+
/** Swap `shareAmount` of a whitelisted source EmberShare into this vault's collateral. */
|
|
1174
|
+
atomicSwapEmberShares(vaultAddress, share, shareAmount, receiver) {
|
|
1175
|
+
return this.atomicCall(vaultAddress, "swapEmberShares", [
|
|
1176
|
+
share,
|
|
1177
|
+
shareAmount,
|
|
1178
|
+
receiver
|
|
1179
|
+
]);
|
|
1180
|
+
}
|
|
1181
|
+
/** Supply `assets` of idle collateral into the external ERC-4626 strategy. */
|
|
1182
|
+
atomicSupplyToStrategy(vaultAddress, assets) {
|
|
1183
|
+
return this.atomicCall(vaultAddress, "supplyToStrategy", [assets]);
|
|
1184
|
+
}
|
|
1185
|
+
/** Withdraw `assets` of collateral back from the strategy into the vault. */
|
|
1186
|
+
atomicWithdrawFromStrategy(vaultAddress, assets) {
|
|
1187
|
+
return this.atomicCall(vaultAddress, "withdrawFromStrategy", [assets]);
|
|
1188
|
+
}
|
|
1189
|
+
/** Submit `amount` of collected source `share` for redemption on the source EmberVault. */
|
|
1190
|
+
atomicRedeemCollectedEmberShares(vaultAddress, share, amount) {
|
|
1191
|
+
return this.atomicCall(vaultAddress, "redeemCollectedEmberShares", [
|
|
1192
|
+
share,
|
|
1193
|
+
amount
|
|
1194
|
+
]);
|
|
1195
|
+
}
|
|
1196
|
+
/** Release the holdback FIFO for `share` at `unwindingPercentage` (1e18 = 100%), up to `maxEntries`. */
|
|
1197
|
+
atomicReleaseUsersHoldback(vaultAddress, share, unwindingPercentage, maxEntries) {
|
|
1198
|
+
return this.atomicCall(vaultAddress, "releaseUsersHoldback", [
|
|
1199
|
+
share,
|
|
1200
|
+
unwindingPercentage,
|
|
1201
|
+
maxEntries
|
|
1202
|
+
]);
|
|
1203
|
+
}
|
|
1204
|
+
/** Set the external ERC-4626 strategy (address(0) to disable). Drain the old strategy first. */
|
|
1205
|
+
atomicSetStrategy(vaultAddress, _caller, newStrategy) {
|
|
1206
|
+
return this.atomicConfigCall(vaultAddress, "setVaultStrategy", [newStrategy]);
|
|
1207
|
+
}
|
|
1208
|
+
/**
|
|
1209
|
+
* Whitelist (or update) a source EmberShare with fee / capacity / holdback / utilization
|
|
1210
|
+
* percentages, a per-swap minimum gross floor (`minSwapGross`, 0 disables), and a
|
|
1211
|
+
* TVL-independent absolute held-value cap (`maxHeldValueAbsolute`, 0 disables).
|
|
1212
|
+
*/
|
|
1213
|
+
atomicSetEmberShareWhitelist(vaultAddress, _caller, share, whitelisted, feePercentage, maxCapacityPercentage, holdbackPercentage, maxUtilizationPercentage, minSwapGross, maxHeldValueAbsolute) {
|
|
1214
|
+
return this.atomicConfigCall(vaultAddress, "setVaultEmberShareWhitelist", [
|
|
1215
|
+
share,
|
|
1216
|
+
whitelisted,
|
|
1217
|
+
feePercentage,
|
|
1218
|
+
maxCapacityPercentage,
|
|
1219
|
+
holdbackPercentage,
|
|
1220
|
+
maxUtilizationPercentage,
|
|
1221
|
+
minSwapGross,
|
|
1222
|
+
maxHeldValueAbsolute
|
|
1223
|
+
]);
|
|
1224
|
+
}
|
|
1225
|
+
/** Set per-account swap waivers (fee and/or holdback); (false,false) removes them. */
|
|
1226
|
+
atomicSetSwapWaiver(vaultAddress, _caller, account, feeWaived, holdbackWaived) {
|
|
1227
|
+
return this.atomicConfigCall(vaultAddress, "setVaultSwapWaiver", [
|
|
1228
|
+
account,
|
|
1229
|
+
feeWaived,
|
|
1230
|
+
holdbackWaived
|
|
1231
|
+
]);
|
|
1232
|
+
}
|
|
1233
|
+
/**
|
|
1234
|
+
* Add/update (remove=false) or remove (remove=true) a fee-multiplier curve
|
|
1235
|
+
* tier for an EmberShare. threshold is a utilization percentage (1e18 = 100%);
|
|
1236
|
+
* multiplier is a fee multiplier (1e18 = 1x, must be >= 1e18 on upsert).
|
|
1237
|
+
*/
|
|
1238
|
+
atomicUpdateEmberShareFeeMultiplierTier(vaultAddress, _caller, share, threshold, multiplier, remove) {
|
|
1239
|
+
return this.atomicConfigCall(vaultAddress, "updateVaultEmberShareFeeMultiplierTier", [share, threshold, multiplier, remove]);
|
|
1240
|
+
}
|
|
1241
|
+
/** Set the cumulative instant-withdraw cap (in shares). */
|
|
1242
|
+
atomicSetMaxInstantWithdrawShares(vaultAddress, _caller, newMax) {
|
|
1243
|
+
return this.atomicConfigCall(vaultAddress, "setVaultMaxInstantWithdrawShares", [
|
|
1244
|
+
newMax
|
|
1245
|
+
]);
|
|
1246
|
+
}
|
|
1247
|
+
/** Set the instant-withdraw fee percentage. */
|
|
1248
|
+
atomicSetInstantWithdrawFeePercentage(vaultAddress, _caller, newFeePercentage) {
|
|
1249
|
+
return this.atomicConfigCall(vaultAddress, "setVaultInstantWithdrawFeePercentage", [newFeePercentage]);
|
|
1250
|
+
}
|
|
1251
|
+
/** Set the platform fee percentage. */
|
|
1252
|
+
atomicSetFeePercentage(vaultAddress, _caller, newFeePercentage) {
|
|
1253
|
+
return this.atomicConfigCall(vaultAddress, "updateVaultFeePercentage", [
|
|
1254
|
+
newFeePercentage
|
|
1255
|
+
]);
|
|
1256
|
+
}
|
|
1257
|
+
/** Set the maximum TVL. */
|
|
1258
|
+
atomicSetMaxTVL(vaultAddress, _caller, newMaxTVL) {
|
|
1259
|
+
return this.atomicConfigCall(vaultAddress, "updateVaultMaxTVL", [newMaxTVL]);
|
|
1260
|
+
}
|
|
1261
|
+
/** Set the minimum withdrawable shares. */
|
|
1262
|
+
atomicSetMinWithdrawableShares(vaultAddress, _caller, newMinWithdrawableShares) {
|
|
1263
|
+
return this.atomicConfigCall(vaultAddress, "updateVaultMinWithdrawableShares", [
|
|
1264
|
+
newMinWithdrawableShares
|
|
1265
|
+
]);
|
|
1266
|
+
}
|
|
1267
|
+
/** Set the max rate change per update bound. */
|
|
1268
|
+
atomicSetMaxRateChangePerUpdate(vaultAddress, _caller, newMaxRateChangePerUpdate) {
|
|
1269
|
+
return this.atomicConfigCall(vaultAddress, "updateVaultMaxRateChangePerUpdate", [
|
|
1270
|
+
newMaxRateChangePerUpdate
|
|
1271
|
+
]);
|
|
1272
|
+
}
|
|
1273
|
+
/** Set the minimum interval between rate updates (ms). */
|
|
1274
|
+
atomicSetRateUpdateInterval(vaultAddress, _caller, newInterval) {
|
|
1275
|
+
return this.atomicConfigCall(vaultAddress, "updateVaultRateUpdateInterval", [
|
|
1276
|
+
newInterval
|
|
1277
|
+
]);
|
|
1278
|
+
}
|
|
1279
|
+
/** Rename the vault. */
|
|
1280
|
+
atomicSetVaultName(vaultAddress, _caller, newName) {
|
|
1281
|
+
return this.atomicConfigCall(vaultAddress, "updateVaultName", [newName]);
|
|
1282
|
+
}
|
|
1283
|
+
/** Set the vault validator contract. */
|
|
1284
|
+
atomicSetVaultValidator(vaultAddress, _caller, validator) {
|
|
1285
|
+
return this.atomicConfigCall(vaultAddress, "setVaultValidator", [validator]);
|
|
1286
|
+
}
|
|
1287
|
+
/** Add/remove a sub-account. */
|
|
1288
|
+
atomicSetSubAccountStatus(vaultAddress, _caller, account, isSubAccount) {
|
|
1289
|
+
return this.atomicConfigCall(vaultAddress, "setVaultSubAccount", [
|
|
1290
|
+
account,
|
|
1291
|
+
isSubAccount
|
|
1292
|
+
]);
|
|
1293
|
+
}
|
|
1294
|
+
/** Pause/unpause one operation ("deposits" | "withdrawals" | "privilegedOperations"). */
|
|
1295
|
+
atomicSetPausedStatus(vaultAddress, _caller, operation, paused) {
|
|
1296
|
+
return this.atomicConfigCall(vaultAddress, "setVaultPausedStatus", [
|
|
1297
|
+
operation,
|
|
1298
|
+
paused
|
|
1299
|
+
]);
|
|
1300
|
+
}
|
|
1301
|
+
/** Move `amount` of collateral to a registered sub-account (operator). */
|
|
1302
|
+
atomicSupplyToSubAccount(vaultAddress, subAccount, amount) {
|
|
1303
|
+
return this.atomicCall(vaultAddress, "supplyToSubAccount", [subAccount, amount]);
|
|
1304
|
+
}
|
|
1305
|
+
/** Rotate the admin role. */
|
|
1306
|
+
atomicSetAdmin(vaultAddress, _caller, newAdmin) {
|
|
1307
|
+
return this.atomicConfigCall(vaultAddress, "updateVaultAdmin", [newAdmin]);
|
|
1308
|
+
}
|
|
1309
|
+
/** Rotate the operator role. */
|
|
1310
|
+
atomicSetOperator(vaultAddress, _caller, newOperator) {
|
|
1311
|
+
return this.atomicConfigCall(vaultAddress, "updateVaultOperator", [newOperator]);
|
|
1312
|
+
}
|
|
1313
|
+
/** Rotate the rate-manager role. */
|
|
1314
|
+
atomicSetRateManager(vaultAddress, _caller, newRateManager) {
|
|
1315
|
+
return this.atomicConfigCall(vaultAddress, "updateVaultRateManager", [
|
|
1316
|
+
newRateManager
|
|
1317
|
+
]);
|
|
1318
|
+
}
|
|
1319
|
+
/** Transfer contract ownership (UUPS owner). */
|
|
1320
|
+
atomicTransferOwnership(vaultAddress, newOwner) {
|
|
1321
|
+
return this.atomicCall(vaultAddress, "transferOwnership", [newOwner]);
|
|
1322
|
+
}
|
|
1323
|
+
/** Renounce ownership (irreversible). */
|
|
1324
|
+
atomicRenounceOwnership(vaultAddress) {
|
|
1325
|
+
return this.atomicCall(vaultAddress, "renounceOwnership", []);
|
|
1326
|
+
}
|
|
1327
|
+
/** Upgrade the implementation and optionally call init data (UUPS). */
|
|
1328
|
+
atomicUpgradeToAndCall(vaultAddress, newImplementation, data) {
|
|
1329
|
+
return this.atomicCall(vaultAddress, "upgradeToAndCall", [
|
|
1330
|
+
newImplementation,
|
|
1331
|
+
data
|
|
1332
|
+
]);
|
|
1333
|
+
}
|
|
1053
1334
|
}
|
|
@@ -455,4 +455,54 @@ export declare class EVMUserCalls extends EVMOnChainCalls {
|
|
|
455
455
|
* @returns The allowance as bigint
|
|
456
456
|
*/
|
|
457
457
|
getTokenAllowance(tokenAddress: string, spender: string, owner?: string): Promise<bigint>;
|
|
458
|
+
/**
|
|
459
|
+
* EmberETHVault: claim your own escrowed (deferred) ETH withdrawal — ETH that couldn't be
|
|
460
|
+
* sent when your withdrawal was processed (your receiver rejected the transfer) and is now
|
|
461
|
+
* escrowed. Reverts if nothing is escrowed. Query via the reader's `getUnclaimedWithdrawals`.
|
|
462
|
+
*/
|
|
463
|
+
claimWithdrawal(vaultAddress: string, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
464
|
+
/**
|
|
465
|
+
* EmberETHVault: deliver `receiver`'s escrowed ETH withdrawal on their behalf.
|
|
466
|
+
* Permissionless — the funds can only ever go to `receiver`.
|
|
467
|
+
*/
|
|
468
|
+
claimWithdrawalFor(vaultAddress: string, receiver: string, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
469
|
+
/**
|
|
470
|
+
* EmberETHVault: redirect YOUR OWN escrowed ETH withdrawal to `to`. Use when you can
|
|
471
|
+
* transact but can no longer receive ETH at your original address (e.g. a contract
|
|
472
|
+
* receiver that now reverts). Delivers only the caller's own escrow.
|
|
473
|
+
*/
|
|
474
|
+
claimWithdrawalTo(vaultAddress: string, to: string, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
475
|
+
/**
|
|
476
|
+
* EmberETHVault: owner recovery of `receiver`'s escrowed ETH to `to`, for a receiver
|
|
477
|
+
* that can neither receive ETH nor call claimWithdrawalTo. Owner-only.
|
|
478
|
+
*/
|
|
479
|
+
recoverUnclaimedWithdrawal(vaultAddress: string, receiver: string, to: string, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
480
|
+
/** Atomic vault: instant (capped, fee'd) withdraw of `shares` to `receiver`; auto-pulls from strategy. */
|
|
481
|
+
instantWithdraw(vaultAddress: string, shares: NumStr, receiver: string, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
482
|
+
/** Atomic vault: swap `shareAmount` of a whitelisted source EmberShare `share` into collateral. */
|
|
483
|
+
swapEmberShares(vaultAddress: string, share: string, shareAmount: NumStr, receiver: string, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
484
|
+
/**
|
|
485
|
+
* Atomic vault: claim your own escrowed holdback — collateral that couldn't be
|
|
486
|
+
* delivered during `releaseUsersHoldback` (e.g. you were blocklisted on the
|
|
487
|
+
* collateral token at release time and are now payable again). Reverts if nothing
|
|
488
|
+
* is escrowed for you. Query the amount via the reader's `unclaimedHoldback`.
|
|
489
|
+
*/
|
|
490
|
+
claimHoldback(vaultAddress: string, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
491
|
+
/**
|
|
492
|
+
* Atomic vault: deliver a recipient's escrowed holdback on their behalf. Permissionless
|
|
493
|
+
* — the funds can only ever go to `recipient` — so anyone (e.g. the operator) may
|
|
494
|
+
* trigger delivery once the recipient is payable again.
|
|
495
|
+
*/
|
|
496
|
+
claimHoldbackFor(vaultAddress: string, recipient: string, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
497
|
+
/**
|
|
498
|
+
* Atomic vault: redirect YOUR OWN escrowed holdback to `to`. Use when you can transact
|
|
499
|
+
* but can no longer receive the collateral token at your original address (e.g. a
|
|
500
|
+
* token-level blacklist). Delivers only the caller's own escrow.
|
|
501
|
+
*/
|
|
502
|
+
claimHoldbackTo(vaultAddress: string, to: string, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
503
|
+
/**
|
|
504
|
+
* Atomic vault: owner recovery of `recipient`'s escrowed holdback to `to`, for a
|
|
505
|
+
* recipient that can neither receive the collateral nor call claimHoldbackTo. Owner-only.
|
|
506
|
+
*/
|
|
507
|
+
recoverUnclaimedHoldback(vaultAddress: string, recipient: string, to: string, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
458
508
|
}
|
|
@@ -702,4 +702,79 @@ export class EVMUserCalls extends EVMOnChainCalls {
|
|
|
702
702
|
const token = this.getERC20Contract(tokenAddress);
|
|
703
703
|
return token.allowance(ownerAddress, spender);
|
|
704
704
|
}
|
|
705
|
+
/**
|
|
706
|
+
* EmberETHVault: claim your own escrowed (deferred) ETH withdrawal — ETH that couldn't be
|
|
707
|
+
* sent when your withdrawal was processed (your receiver rejected the transfer) and is now
|
|
708
|
+
* escrowed. Reverts if nothing is escrowed. Query via the reader's `getUnclaimedWithdrawals`.
|
|
709
|
+
*/
|
|
710
|
+
async claimWithdrawal(vaultAddress, options) {
|
|
711
|
+
return this.execCall(this.txBuilder.claimWithdrawal(vaultAddress), options);
|
|
712
|
+
}
|
|
713
|
+
/**
|
|
714
|
+
* EmberETHVault: deliver `receiver`'s escrowed ETH withdrawal on their behalf.
|
|
715
|
+
* Permissionless — the funds can only ever go to `receiver`.
|
|
716
|
+
*/
|
|
717
|
+
async claimWithdrawalFor(vaultAddress, receiver, options) {
|
|
718
|
+
return this.execCall(this.txBuilder.claimWithdrawalFor(vaultAddress, receiver), options);
|
|
719
|
+
}
|
|
720
|
+
/**
|
|
721
|
+
* EmberETHVault: redirect YOUR OWN escrowed ETH withdrawal to `to`. Use when you can
|
|
722
|
+
* transact but can no longer receive ETH at your original address (e.g. a contract
|
|
723
|
+
* receiver that now reverts). Delivers only the caller's own escrow.
|
|
724
|
+
*/
|
|
725
|
+
async claimWithdrawalTo(vaultAddress, to, options) {
|
|
726
|
+
return this.execCall(this.txBuilder.claimWithdrawalTo(vaultAddress, to), options);
|
|
727
|
+
}
|
|
728
|
+
/**
|
|
729
|
+
* EmberETHVault: owner recovery of `receiver`'s escrowed ETH to `to`, for a receiver
|
|
730
|
+
* that can neither receive ETH nor call claimWithdrawalTo. Owner-only.
|
|
731
|
+
*/
|
|
732
|
+
async recoverUnclaimedWithdrawal(vaultAddress, receiver, to, options) {
|
|
733
|
+
return this.execCall(this.txBuilder.recoverUnclaimedWithdrawal(vaultAddress, receiver, to), options);
|
|
734
|
+
}
|
|
735
|
+
// ============================================
|
|
736
|
+
// Atomic Liquidity Vault — user actions (BFE-817/818)
|
|
737
|
+
// ============================================
|
|
738
|
+
/** Atomic vault: instant (capped, fee'd) withdraw of `shares` to `receiver`; auto-pulls from strategy. */
|
|
739
|
+
async instantWithdraw(vaultAddress, shares, receiver, options) {
|
|
740
|
+
const txCall = this.txBuilder.atomicInstantWithdraw(vaultAddress, shares, receiver);
|
|
741
|
+
return this.execCall(txCall, options);
|
|
742
|
+
}
|
|
743
|
+
/** Atomic vault: swap `shareAmount` of a whitelisted source EmberShare `share` into collateral. */
|
|
744
|
+
async swapEmberShares(vaultAddress, share, shareAmount, receiver, options) {
|
|
745
|
+
const txCall = this.txBuilder.atomicSwapEmberShares(vaultAddress, share, shareAmount, receiver);
|
|
746
|
+
return this.execCall(txCall, options);
|
|
747
|
+
}
|
|
748
|
+
/**
|
|
749
|
+
* Atomic vault: claim your own escrowed holdback — collateral that couldn't be
|
|
750
|
+
* delivered during `releaseUsersHoldback` (e.g. you were blocklisted on the
|
|
751
|
+
* collateral token at release time and are now payable again). Reverts if nothing
|
|
752
|
+
* is escrowed for you. Query the amount via the reader's `unclaimedHoldback`.
|
|
753
|
+
*/
|
|
754
|
+
async claimHoldback(vaultAddress, options) {
|
|
755
|
+
return this.execCall(this.txBuilder.atomicClaimHoldback(vaultAddress), options);
|
|
756
|
+
}
|
|
757
|
+
/**
|
|
758
|
+
* Atomic vault: deliver a recipient's escrowed holdback on their behalf. Permissionless
|
|
759
|
+
* — the funds can only ever go to `recipient` — so anyone (e.g. the operator) may
|
|
760
|
+
* trigger delivery once the recipient is payable again.
|
|
761
|
+
*/
|
|
762
|
+
async claimHoldbackFor(vaultAddress, recipient, options) {
|
|
763
|
+
return this.execCall(this.txBuilder.atomicClaimHoldbackFor(vaultAddress, recipient), options);
|
|
764
|
+
}
|
|
765
|
+
/**
|
|
766
|
+
* Atomic vault: redirect YOUR OWN escrowed holdback to `to`. Use when you can transact
|
|
767
|
+
* but can no longer receive the collateral token at your original address (e.g. a
|
|
768
|
+
* token-level blacklist). Delivers only the caller's own escrow.
|
|
769
|
+
*/
|
|
770
|
+
async claimHoldbackTo(vaultAddress, to, options) {
|
|
771
|
+
return this.execCall(this.txBuilder.atomicClaimHoldbackTo(vaultAddress, to), options);
|
|
772
|
+
}
|
|
773
|
+
/**
|
|
774
|
+
* Atomic vault: owner recovery of `recipient`'s escrowed holdback to `to`, for a
|
|
775
|
+
* recipient that can neither receive the collateral nor call claimHoldbackTo. Owner-only.
|
|
776
|
+
*/
|
|
777
|
+
async recoverUnclaimedHoldback(vaultAddress, recipient, to, options) {
|
|
778
|
+
return this.execCall(this.txBuilder.atomicRecoverUnclaimedHoldback(vaultAddress, recipient, to), options);
|
|
779
|
+
}
|
|
705
780
|
}
|
|
@@ -162,4 +162,59 @@ export declare class EVMVaultAdminCalls extends EVMOnChainCalls {
|
|
|
162
162
|
* @returns EvmOnChainCallResponse
|
|
163
163
|
*/
|
|
164
164
|
updateVaultName(vaultAddress: string, newName: string, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
165
|
+
/** Atomic vault: set the external ERC-4626 strategy (address(0) to disable). Drain the old strategy first. */
|
|
166
|
+
setStrategy(vaultAddress: string, caller: string, newStrategy: string, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
167
|
+
/**
|
|
168
|
+
* Atomic vault: whitelist (or update) a source EmberShare with fee / capacity / holdback /
|
|
169
|
+
* utilization percentages, a per-swap minimum gross floor, and an absolute held-value cap.
|
|
170
|
+
*
|
|
171
|
+
* @param minSwapGross Minimum gross collateral value per swap (collateral units); 0 disables
|
|
172
|
+
* the dust floor that would otherwise allow holdback-queue bloat.
|
|
173
|
+
* @param maxHeldValueAbsolute TVL-independent ceiling on this source share's post-swap held
|
|
174
|
+
* value (collateral units); 0 disables it.
|
|
175
|
+
*/
|
|
176
|
+
setEmberShareWhitelist(vaultAddress: string, caller: string, share: string, whitelisted: boolean, feePercentage: NumStr, maxCapacityPercentage: NumStr, holdbackPercentage: NumStr, maxUtilizationPercentage: NumStr, minSwapGross: NumStr, maxHeldValueAbsolute: NumStr, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
177
|
+
/** Atomic vault: set per-account swap waivers (fee and/or holdback); (false,false) removes them. */
|
|
178
|
+
setSwapWaiver(vaultAddress: string, caller: string, account: string, feeWaived: boolean, holdbackWaived: boolean, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
179
|
+
/**
|
|
180
|
+
* Atomic vault: add/update (remove=false) or remove (remove=true) a
|
|
181
|
+
* fee-multiplier curve tier for an EmberShare. `threshold` is a utilization
|
|
182
|
+
* percentage (1e18 = 100%); `multiplier` is a fee multiplier (1e18 = 1x, must
|
|
183
|
+
* be >= 1e18 on upsert). Admin only; routed through the protocol config.
|
|
184
|
+
*/
|
|
185
|
+
updateEmberShareFeeMultiplierTier(vaultAddress: string, caller: string, share: string, threshold: NumStr, multiplier: NumStr, remove: boolean, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
186
|
+
/** Atomic vault: set the cumulative instant-withdraw cap (in shares). */
|
|
187
|
+
setMaxInstantWithdrawShares(vaultAddress: string, caller: string, newMax: NumStr, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
188
|
+
/** Atomic vault: set the instant-withdraw fee percentage. */
|
|
189
|
+
setInstantWithdrawFeePercentage(vaultAddress: string, caller: string, newFeePercentage: NumStr, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
190
|
+
/** Atomic vault: set the platform fee percentage. */
|
|
191
|
+
setFeePercentage(vaultAddress: string, caller: string, newFeePercentage: NumStr, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
192
|
+
/** Atomic vault: set the maximum TVL. */
|
|
193
|
+
setMaxTVL(vaultAddress: string, caller: string, newMaxTVL: NumStr, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
194
|
+
/** Atomic vault: set the minimum withdrawable shares. */
|
|
195
|
+
setMinWithdrawableShares(vaultAddress: string, caller: string, newMinWithdrawableShares: NumStr, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
196
|
+
/** Atomic vault: set the max rate change per update bound. */
|
|
197
|
+
setMaxRateChangePerUpdate(vaultAddress: string, caller: string, newMaxRateChangePerUpdate: NumStr, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
198
|
+
/** Atomic vault: set the minimum interval between rate updates (ms). */
|
|
199
|
+
setRateUpdateInterval(vaultAddress: string, caller: string, newInterval: NumStr, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
200
|
+
/** Atomic vault: rename the vault. */
|
|
201
|
+
setVaultName(vaultAddress: string, caller: string, newName: string, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
202
|
+
/** Atomic vault: set the vault validator contract. */
|
|
203
|
+
setVaultValidator(vaultAddress: string, caller: string, validator: string, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
204
|
+
/** Atomic vault: add/remove a sub-account. */
|
|
205
|
+
setSubAccountStatus(vaultAddress: string, caller: string, account: string, isSubAccount: boolean, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
206
|
+
/** Atomic vault: pause/unpause an operation ("deposits" | "withdrawals" | "privilegedOperations"). */
|
|
207
|
+
setPausedStatus(vaultAddress: string, caller: string, operation: string, paused: boolean, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
208
|
+
/** Atomic vault: rotate the admin role. */
|
|
209
|
+
setAdmin(vaultAddress: string, caller: string, newAdmin: string, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
210
|
+
/** Atomic vault: rotate the operator role. */
|
|
211
|
+
setOperator(vaultAddress: string, caller: string, newOperator: string, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
212
|
+
/** Atomic vault: rotate the rate-manager role. */
|
|
213
|
+
setRateManager(vaultAddress: string, caller: string, newRateManager: string, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
214
|
+
/** Atomic vault: transfer contract ownership (UUPS owner). */
|
|
215
|
+
transferOwnership(vaultAddress: string, newOwner: string, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
216
|
+
/** Atomic vault: renounce ownership (irreversible). */
|
|
217
|
+
renounceOwnership(vaultAddress: string, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
218
|
+
/** Atomic vault: upgrade the implementation and optionally call init data (UUPS). */
|
|
219
|
+
upgradeToAndCall(vaultAddress: string, newImplementation: string, data: string, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
|
|
165
220
|
}
|
|
@@ -220,4 +220,126 @@ export class EVMVaultAdminCalls extends EVMOnChainCalls {
|
|
|
220
220
|
const txCall = this.txBuilder.updateVaultName(vaultAddress, newName);
|
|
221
221
|
return this.execCall(txCall, options);
|
|
222
222
|
}
|
|
223
|
+
// ============================================
|
|
224
|
+
// Atomic Liquidity Vault — vault admin actions (BFE-817/818)
|
|
225
|
+
// Gated via protocol-config; pass the admin as `caller`.
|
|
226
|
+
// ============================================
|
|
227
|
+
/** Atomic vault: set the external ERC-4626 strategy (address(0) to disable). Drain the old strategy first. */
|
|
228
|
+
async setStrategy(vaultAddress, caller, newStrategy, options) {
|
|
229
|
+
const txCall = this.txBuilder.atomicSetStrategy(vaultAddress, caller, newStrategy);
|
|
230
|
+
return this.execCall(txCall, options);
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Atomic vault: whitelist (or update) a source EmberShare with fee / capacity / holdback /
|
|
234
|
+
* utilization percentages, a per-swap minimum gross floor, and an absolute held-value cap.
|
|
235
|
+
*
|
|
236
|
+
* @param minSwapGross Minimum gross collateral value per swap (collateral units); 0 disables
|
|
237
|
+
* the dust floor that would otherwise allow holdback-queue bloat.
|
|
238
|
+
* @param maxHeldValueAbsolute TVL-independent ceiling on this source share's post-swap held
|
|
239
|
+
* value (collateral units); 0 disables it.
|
|
240
|
+
*/
|
|
241
|
+
async setEmberShareWhitelist(vaultAddress, caller, share, whitelisted, feePercentage, maxCapacityPercentage, holdbackPercentage, maxUtilizationPercentage, minSwapGross, maxHeldValueAbsolute, options) {
|
|
242
|
+
const txCall = this.txBuilder.atomicSetEmberShareWhitelist(vaultAddress, caller, share, whitelisted, feePercentage, maxCapacityPercentage, holdbackPercentage, maxUtilizationPercentage, minSwapGross, maxHeldValueAbsolute);
|
|
243
|
+
return this.execCall(txCall, options);
|
|
244
|
+
}
|
|
245
|
+
/** Atomic vault: set per-account swap waivers (fee and/or holdback); (false,false) removes them. */
|
|
246
|
+
async setSwapWaiver(vaultAddress, caller, account, feeWaived, holdbackWaived, options) {
|
|
247
|
+
const txCall = this.txBuilder.atomicSetSwapWaiver(vaultAddress, caller, account, feeWaived, holdbackWaived);
|
|
248
|
+
return this.execCall(txCall, options);
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Atomic vault: add/update (remove=false) or remove (remove=true) a
|
|
252
|
+
* fee-multiplier curve tier for an EmberShare. `threshold` is a utilization
|
|
253
|
+
* percentage (1e18 = 100%); `multiplier` is a fee multiplier (1e18 = 1x, must
|
|
254
|
+
* be >= 1e18 on upsert). Admin only; routed through the protocol config.
|
|
255
|
+
*/
|
|
256
|
+
async updateEmberShareFeeMultiplierTier(vaultAddress, caller, share, threshold, multiplier, remove, options) {
|
|
257
|
+
const txCall = this.txBuilder.atomicUpdateEmberShareFeeMultiplierTier(vaultAddress, caller, share, threshold, multiplier, remove);
|
|
258
|
+
return this.execCall(txCall, options);
|
|
259
|
+
}
|
|
260
|
+
/** Atomic vault: set the cumulative instant-withdraw cap (in shares). */
|
|
261
|
+
async setMaxInstantWithdrawShares(vaultAddress, caller, newMax, options) {
|
|
262
|
+
const txCall = this.txBuilder.atomicSetMaxInstantWithdrawShares(vaultAddress, caller, newMax);
|
|
263
|
+
return this.execCall(txCall, options);
|
|
264
|
+
}
|
|
265
|
+
/** Atomic vault: set the instant-withdraw fee percentage. */
|
|
266
|
+
async setInstantWithdrawFeePercentage(vaultAddress, caller, newFeePercentage, options) {
|
|
267
|
+
const txCall = this.txBuilder.atomicSetInstantWithdrawFeePercentage(vaultAddress, caller, newFeePercentage);
|
|
268
|
+
return this.execCall(txCall, options);
|
|
269
|
+
}
|
|
270
|
+
/** Atomic vault: set the platform fee percentage. */
|
|
271
|
+
async setFeePercentage(vaultAddress, caller, newFeePercentage, options) {
|
|
272
|
+
const txCall = this.txBuilder.atomicSetFeePercentage(vaultAddress, caller, newFeePercentage);
|
|
273
|
+
return this.execCall(txCall, options);
|
|
274
|
+
}
|
|
275
|
+
/** Atomic vault: set the maximum TVL. */
|
|
276
|
+
async setMaxTVL(vaultAddress, caller, newMaxTVL, options) {
|
|
277
|
+
const txCall = this.txBuilder.atomicSetMaxTVL(vaultAddress, caller, newMaxTVL);
|
|
278
|
+
return this.execCall(txCall, options);
|
|
279
|
+
}
|
|
280
|
+
/** Atomic vault: set the minimum withdrawable shares. */
|
|
281
|
+
async setMinWithdrawableShares(vaultAddress, caller, newMinWithdrawableShares, options) {
|
|
282
|
+
const txCall = this.txBuilder.atomicSetMinWithdrawableShares(vaultAddress, caller, newMinWithdrawableShares);
|
|
283
|
+
return this.execCall(txCall, options);
|
|
284
|
+
}
|
|
285
|
+
/** Atomic vault: set the max rate change per update bound. */
|
|
286
|
+
async setMaxRateChangePerUpdate(vaultAddress, caller, newMaxRateChangePerUpdate, options) {
|
|
287
|
+
const txCall = this.txBuilder.atomicSetMaxRateChangePerUpdate(vaultAddress, caller, newMaxRateChangePerUpdate);
|
|
288
|
+
return this.execCall(txCall, options);
|
|
289
|
+
}
|
|
290
|
+
/** Atomic vault: set the minimum interval between rate updates (ms). */
|
|
291
|
+
async setRateUpdateInterval(vaultAddress, caller, newInterval, options) {
|
|
292
|
+
const txCall = this.txBuilder.atomicSetRateUpdateInterval(vaultAddress, caller, newInterval);
|
|
293
|
+
return this.execCall(txCall, options);
|
|
294
|
+
}
|
|
295
|
+
/** Atomic vault: rename the vault. */
|
|
296
|
+
async setVaultName(vaultAddress, caller, newName, options) {
|
|
297
|
+
const txCall = this.txBuilder.atomicSetVaultName(vaultAddress, caller, newName);
|
|
298
|
+
return this.execCall(txCall, options);
|
|
299
|
+
}
|
|
300
|
+
/** Atomic vault: set the vault validator contract. */
|
|
301
|
+
async setVaultValidator(vaultAddress, caller, validator, options) {
|
|
302
|
+
const txCall = this.txBuilder.atomicSetVaultValidator(vaultAddress, caller, validator);
|
|
303
|
+
return this.execCall(txCall, options);
|
|
304
|
+
}
|
|
305
|
+
/** Atomic vault: add/remove a sub-account. */
|
|
306
|
+
async setSubAccountStatus(vaultAddress, caller, account, isSubAccount, options) {
|
|
307
|
+
const txCall = this.txBuilder.atomicSetSubAccountStatus(vaultAddress, caller, account, isSubAccount);
|
|
308
|
+
return this.execCall(txCall, options);
|
|
309
|
+
}
|
|
310
|
+
/** Atomic vault: pause/unpause an operation ("deposits" | "withdrawals" | "privilegedOperations"). */
|
|
311
|
+
async setPausedStatus(vaultAddress, caller, operation, paused, options) {
|
|
312
|
+
const txCall = this.txBuilder.atomicSetPausedStatus(vaultAddress, caller, operation, paused);
|
|
313
|
+
return this.execCall(txCall, options);
|
|
314
|
+
}
|
|
315
|
+
/** Atomic vault: rotate the admin role. */
|
|
316
|
+
async setAdmin(vaultAddress, caller, newAdmin, options) {
|
|
317
|
+
const txCall = this.txBuilder.atomicSetAdmin(vaultAddress, caller, newAdmin);
|
|
318
|
+
return this.execCall(txCall, options);
|
|
319
|
+
}
|
|
320
|
+
/** Atomic vault: rotate the operator role. */
|
|
321
|
+
async setOperator(vaultAddress, caller, newOperator, options) {
|
|
322
|
+
const txCall = this.txBuilder.atomicSetOperator(vaultAddress, caller, newOperator);
|
|
323
|
+
return this.execCall(txCall, options);
|
|
324
|
+
}
|
|
325
|
+
/** Atomic vault: rotate the rate-manager role. */
|
|
326
|
+
async setRateManager(vaultAddress, caller, newRateManager, options) {
|
|
327
|
+
const txCall = this.txBuilder.atomicSetRateManager(vaultAddress, caller, newRateManager);
|
|
328
|
+
return this.execCall(txCall, options);
|
|
329
|
+
}
|
|
330
|
+
/** Atomic vault: transfer contract ownership (UUPS owner). */
|
|
331
|
+
async transferOwnership(vaultAddress, newOwner, options) {
|
|
332
|
+
const txCall = this.txBuilder.atomicTransferOwnership(vaultAddress, newOwner);
|
|
333
|
+
return this.execCall(txCall, options);
|
|
334
|
+
}
|
|
335
|
+
/** Atomic vault: renounce ownership (irreversible). */
|
|
336
|
+
async renounceOwnership(vaultAddress, options) {
|
|
337
|
+
const txCall = this.txBuilder.atomicRenounceOwnership(vaultAddress);
|
|
338
|
+
return this.execCall(txCall, options);
|
|
339
|
+
}
|
|
340
|
+
/** Atomic vault: upgrade the implementation and optionally call init data (UUPS). */
|
|
341
|
+
async upgradeToAndCall(vaultAddress, newImplementation, data, options) {
|
|
342
|
+
const txCall = this.txBuilder.atomicUpgradeToAndCall(vaultAddress, newImplementation, data);
|
|
343
|
+
return this.execCall(txCall, options);
|
|
344
|
+
}
|
|
223
345
|
}
|
|
@@ -275,6 +275,12 @@ export declare class EVMVaultReader {
|
|
|
275
275
|
* @returns Total supply
|
|
276
276
|
*/
|
|
277
277
|
getTotalSupply(vaultAddress: string, isETHVault?: boolean): Promise<bigint>;
|
|
278
|
+
/**
|
|
279
|
+
* Escrowed (deferred) ETH withdrawal claimable by `account` on an EmberETHVault —
|
|
280
|
+
* accrued when a withdrawal couldn't be sent (the receiver rejected the ETH transfer).
|
|
281
|
+
* Claim via `claimWithdrawal` / `claimWithdrawalFor`. Returns 0 if none. EmberETHVault only.
|
|
282
|
+
*/
|
|
283
|
+
getUnclaimedWithdrawals(vaultAddress: string, account: string): Promise<bigint>;
|
|
278
284
|
/**
|
|
279
285
|
* Converts assets to shares
|
|
280
286
|
* @param vaultAddress The vault address
|
|
@@ -275,6 +275,15 @@ export class EVMVaultReader {
|
|
|
275
275
|
const vault = this.getVaultContract(vaultAddress, isETHVault);
|
|
276
276
|
return vault.totalSupply();
|
|
277
277
|
}
|
|
278
|
+
/**
|
|
279
|
+
* Escrowed (deferred) ETH withdrawal claimable by `account` on an EmberETHVault —
|
|
280
|
+
* accrued when a withdrawal couldn't be sent (the receiver rejected the ETH transfer).
|
|
281
|
+
* Claim via `claimWithdrawal` / `claimWithdrawalFor`. Returns 0 if none. EmberETHVault only.
|
|
282
|
+
*/
|
|
283
|
+
async getUnclaimedWithdrawals(vaultAddress, account) {
|
|
284
|
+
const vault = this.getVaultContract(vaultAddress, true);
|
|
285
|
+
return vault.unclaimedWithdrawals(account);
|
|
286
|
+
}
|
|
278
287
|
/**
|
|
279
288
|
* Converts assets to shares
|
|
280
289
|
* @param vaultAddress The vault address
|