@oydual31/more-vaults-sdk 1.1.21 → 1.1.22
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/react/index.cjs +9 -9
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +9 -9
- package/dist/react/index.js.map +1 -1
- package/dist/viem/index.cjs +12 -12
- package/dist/viem/index.cjs.map +1 -1
- package/dist/viem/index.d.cts +4 -3
- package/dist/viem/index.d.ts +4 -3
- package/dist/viem/index.js +12 -12
- package/dist/viem/index.js.map +1 -1
- package/package.json +1 -1
- package/src/viem/adminActions.ts +2 -2
- package/src/viem/chains.ts +3 -2
- package/src/viem/curatorMulticall.ts +1 -1
- package/src/viem/curatorStatus.ts +4 -4
- package/src/viem/curatorSubVaults.ts +3 -3
- package/src/viem/curatorSwaps.ts +4 -2
- package/src/viem/vaultConfig.ts +1 -1
package/dist/viem/index.d.cts
CHANGED
|
@@ -409,8 +409,9 @@ declare const LZ_TIMEOUTS: {
|
|
|
409
409
|
*
|
|
410
410
|
* Note on struct differences:
|
|
411
411
|
* - SwapRouter (Eth/Arb/Op, 0xE592...): exactInputSingle struct includes `deadline`
|
|
412
|
-
* - SwapRouter02 (Base, 0x2626...):
|
|
413
|
-
*
|
|
412
|
+
* - SwapRouter02 (Base/Flow, 0x2626.../0xeEDC...): struct does NOT include `deadline`
|
|
413
|
+
* Flow EVM confirmed via PUSH4 scan: router only dispatches 0x04e45aaf (SwapRouter02),
|
|
414
|
+
* not 0x414bf389 (SwapRouter). Both are in curatorSwaps.ts SWAP_ROUTER02_CHAINS.
|
|
414
415
|
*/
|
|
415
416
|
declare const UNISWAP_V3_ROUTERS: Record<number, `0x${string}`>;
|
|
416
417
|
/** @deprecated Use OFT_ROUTES.stgUSDC instead */
|
|
@@ -3012,7 +3013,7 @@ declare function vetoActions(walletClient: WalletClient, publicClient: PublicCli
|
|
|
3012
3013
|
* - Ethereum (1): SwapRouter 0xE592... — HAS deadline field
|
|
3013
3014
|
* - Arbitrum (42161): SwapRouter 0xE592... — HAS deadline field
|
|
3014
3015
|
* - Optimism (10): SwapRouter 0xE592... — HAS deadline field
|
|
3015
|
-
* - Flow EVM (747): FlowSwap V3 0xeEDC... —
|
|
3016
|
+
* - Flow EVM (747): FlowSwap V3 0xeEDC... — NO deadline field (SwapRouter02-compatible)
|
|
3016
3017
|
*
|
|
3017
3018
|
* @module curatorSwaps
|
|
3018
3019
|
*/
|
package/dist/viem/index.d.ts
CHANGED
|
@@ -409,8 +409,9 @@ declare const LZ_TIMEOUTS: {
|
|
|
409
409
|
*
|
|
410
410
|
* Note on struct differences:
|
|
411
411
|
* - SwapRouter (Eth/Arb/Op, 0xE592...): exactInputSingle struct includes `deadline`
|
|
412
|
-
* - SwapRouter02 (Base, 0x2626...):
|
|
413
|
-
*
|
|
412
|
+
* - SwapRouter02 (Base/Flow, 0x2626.../0xeEDC...): struct does NOT include `deadline`
|
|
413
|
+
* Flow EVM confirmed via PUSH4 scan: router only dispatches 0x04e45aaf (SwapRouter02),
|
|
414
|
+
* not 0x414bf389 (SwapRouter). Both are in curatorSwaps.ts SWAP_ROUTER02_CHAINS.
|
|
414
415
|
*/
|
|
415
416
|
declare const UNISWAP_V3_ROUTERS: Record<number, `0x${string}`>;
|
|
416
417
|
/** @deprecated Use OFT_ROUTES.stgUSDC instead */
|
|
@@ -3012,7 +3013,7 @@ declare function vetoActions(walletClient: WalletClient, publicClient: PublicCli
|
|
|
3012
3013
|
* - Ethereum (1): SwapRouter 0xE592... — HAS deadline field
|
|
3013
3014
|
* - Arbitrum (42161): SwapRouter 0xE592... — HAS deadline field
|
|
3014
3015
|
* - Optimism (10): SwapRouter 0xE592... — HAS deadline field
|
|
3015
|
-
* - Flow EVM (747): FlowSwap V3 0xeEDC... —
|
|
3016
|
+
* - Flow EVM (747): FlowSwap V3 0xeEDC... — NO deadline field (SwapRouter02-compatible)
|
|
3016
3017
|
*
|
|
3017
3018
|
* @module curatorSwaps
|
|
3018
3019
|
*/
|
package/dist/viem/index.js
CHANGED
|
@@ -4328,7 +4328,7 @@ async function getCuratorVaultStatus(publicClient, vault) {
|
|
|
4328
4328
|
timeLockPeriod,
|
|
4329
4329
|
maxSlippagePercent,
|
|
4330
4330
|
currentNonce,
|
|
4331
|
-
availableAssets: availableAssets.map(getAddress),
|
|
4331
|
+
availableAssets: availableAssets.map((a) => getAddress(a)),
|
|
4332
4332
|
lzAdapter: getAddress(lzAdapter),
|
|
4333
4333
|
paused
|
|
4334
4334
|
};
|
|
@@ -4397,8 +4397,8 @@ async function getVaultAnalysis(publicClient, vault) {
|
|
|
4397
4397
|
functionName: "moreVaultsRegistry"
|
|
4398
4398
|
}).catch(() => null)
|
|
4399
4399
|
]);
|
|
4400
|
-
const availableAddresses = availableRaw.map(getAddress);
|
|
4401
|
-
const depositableAddresses = depositableRaw.map(getAddress);
|
|
4400
|
+
const availableAddresses = availableRaw.map((a) => getAddress(a));
|
|
4401
|
+
const depositableAddresses = depositableRaw.map((a) => getAddress(a));
|
|
4402
4402
|
const allAddresses = Array.from(/* @__PURE__ */ new Set([...availableAddresses, ...depositableAddresses]));
|
|
4403
4403
|
const metadataCalls = allAddresses.flatMap((addr) => [
|
|
4404
4404
|
{ address: addr, abi: METADATA_ABI, functionName: "name" },
|
|
@@ -4469,7 +4469,7 @@ async function getVaultAssetBreakdown(publicClient, vault) {
|
|
|
4469
4469
|
} catch {
|
|
4470
4470
|
return { assets: [], totalAssets: 0n, totalSupply: 0n, underlyingDecimals: 6 };
|
|
4471
4471
|
}
|
|
4472
|
-
const addresses = availableRaw.map(getAddress);
|
|
4472
|
+
const addresses = availableRaw.map((a) => getAddress(a));
|
|
4473
4473
|
const results = await publicClient.multicall({
|
|
4474
4474
|
contracts: [
|
|
4475
4475
|
// Per-asset: balanceOf, name, symbol, decimals
|
|
@@ -4582,7 +4582,7 @@ function encodeCuratorAction(action) {
|
|
|
4582
4582
|
return encodeFunctionData({
|
|
4583
4583
|
abi: ADMIN_WRITE_ABI,
|
|
4584
4584
|
functionName: "addAvailableAssets",
|
|
4585
|
-
args: [action.assets.map(getAddress)]
|
|
4585
|
+
args: [action.assets.map((a) => getAddress(a))]
|
|
4586
4586
|
});
|
|
4587
4587
|
case "disableAssetToDeposit":
|
|
4588
4588
|
return encodeFunctionData({
|
|
@@ -4822,7 +4822,7 @@ var UNISWAP_V3_SWAP_ROUTER02_ABI = [
|
|
|
4822
4822
|
stateMutability: "payable"
|
|
4823
4823
|
}
|
|
4824
4824
|
];
|
|
4825
|
-
var SWAP_ROUTER02_CHAINS = /* @__PURE__ */ new Set([8453]);
|
|
4825
|
+
var SWAP_ROUTER02_CHAINS = /* @__PURE__ */ new Set([8453, 747]);
|
|
4826
4826
|
function encodeUniswapV3SwapCalldata(params) {
|
|
4827
4827
|
const { chainId, tokenIn, tokenOut, fee, amountIn, minAmountOut, recipient } = params;
|
|
4828
4828
|
const router = UNISWAP_V3_ROUTERS[chainId];
|
|
@@ -5046,7 +5046,7 @@ async function getVaultConfiguration(publicClient, vault) {
|
|
|
5046
5046
|
const bigint_ = (i) => results[i].status === "success" ? results[i].result : 0n;
|
|
5047
5047
|
const bool_ = (i) => results[i].status === "success" ? results[i].result : false;
|
|
5048
5048
|
const num_ = (i) => results[i].status === "success" ? Number(results[i].result) : 0;
|
|
5049
|
-
const addrArray = (i) => results[i].status === "success" ? results[i].result.map(getAddress) : [];
|
|
5049
|
+
const addrArray = (i) => results[i].status === "success" ? results[i].result.map((a) => getAddress(a)) : [];
|
|
5050
5050
|
return {
|
|
5051
5051
|
// Roles
|
|
5052
5052
|
owner: addr(0),
|
|
@@ -5135,7 +5135,7 @@ async function addAvailableAsset(walletClient, publicClient, vault, asset) {
|
|
|
5135
5135
|
async function addAvailableAssets(walletClient, publicClient, vault, assets) {
|
|
5136
5136
|
const account = walletClient.account;
|
|
5137
5137
|
const v = getAddress(vault);
|
|
5138
|
-
const checksummed = assets.map(getAddress);
|
|
5138
|
+
const checksummed = assets.map((a) => getAddress(a));
|
|
5139
5139
|
try {
|
|
5140
5140
|
await publicClient.simulateContract({
|
|
5141
5141
|
address: v,
|
|
@@ -5211,7 +5211,7 @@ async function setDepositWhitelist(walletClient, publicClient, vault, depositors
|
|
|
5211
5211
|
if (depositors.length !== caps.length) {
|
|
5212
5212
|
throw new InvalidInputError("depositors and caps arrays must have the same length");
|
|
5213
5213
|
}
|
|
5214
|
-
const checksummed = depositors.map(getAddress);
|
|
5214
|
+
const checksummed = depositors.map((a) => getAddress(a));
|
|
5215
5215
|
try {
|
|
5216
5216
|
await publicClient.simulateContract({
|
|
5217
5217
|
address: v,
|
|
@@ -5363,8 +5363,8 @@ async function getSubVaultPositions(publicClient, vault) {
|
|
|
5363
5363
|
args: [ERC7540_ID]
|
|
5364
5364
|
}).catch(() => [])
|
|
5365
5365
|
]);
|
|
5366
|
-
const erc4626Vaults = erc4626Raw.map(getAddress);
|
|
5367
|
-
const erc7540Vaults = erc7540Raw.map(getAddress);
|
|
5366
|
+
const erc4626Vaults = erc4626Raw.map((a) => getAddress(a));
|
|
5367
|
+
const erc7540Vaults = erc7540Raw.map((a) => getAddress(a));
|
|
5368
5368
|
const allSubVaults = [
|
|
5369
5369
|
...erc4626Vaults.map((a) => ({ address: a, type: "erc4626" })),
|
|
5370
5370
|
...erc7540Vaults.map((a) => ({ address: a, type: "erc7540" }))
|
|
@@ -5573,7 +5573,7 @@ async function getVaultPortfolio(publicClient, vault) {
|
|
|
5573
5573
|
const totalAssets = vaultTotals[0]?.status === "success" ? vaultTotals[0].result : 0n;
|
|
5574
5574
|
const totalSupply = vaultTotals[1]?.status === "success" ? vaultTotals[1].result : 0n;
|
|
5575
5575
|
const underlyingAsset = vaultTotals[2]?.status === "success" ? getAddress(vaultTotals[2].result) : zeroAddress;
|
|
5576
|
-
const availableAddresses = availableRaw.map(getAddress);
|
|
5576
|
+
const availableAddresses = availableRaw.map((a) => getAddress(a));
|
|
5577
5577
|
const subVaultAddressSet = new Set(subVaultPositions.map((p) => p.address.toLowerCase()));
|
|
5578
5578
|
const liquidAddresses = availableAddresses.filter(
|
|
5579
5579
|
(addr) => !subVaultAddressSet.has(addr.toLowerCase())
|