@sherwoodagent/cli 0.24.0 → 0.25.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/{chat-3SAX4VRO.js → chat-52PWNH7Y.js} +7 -7
- package/dist/{chunk-NGET2RWT.js → chunk-66VFSLPS.js} +2 -2
- package/dist/{chunk-LMDHM36X.js → chunk-7PCI3WHQ.js} +4 -4
- package/dist/{chunk-35536GNW.js → chunk-GWIW6DDG.js} +2 -2
- package/dist/{chunk-5NN424VN.js → chunk-JEVBC7DV.js} +4 -4
- package/dist/{chunk-ZIH3SCFJ.js → chunk-QBNWBWD3.js} +5 -5
- package/dist/{chunk-5S2TBADL.js → chunk-RGOTBJIN.js} +25 -2
- package/dist/chunk-RGOTBJIN.js.map +1 -0
- package/dist/{chunk-R7Q2L6VV.js → chunk-SBVHGUQJ.js} +3 -3
- package/dist/{chunk-PEJPTKLK.js → chunk-VQIFAXUY.js} +5 -5
- package/dist/{chunk-R75DM3VL.js → chunk-ZPLUJT4V.js} +10 -7
- package/dist/chunk-ZPLUJT4V.js.map +1 -0
- package/dist/{client-XG6LL6TS.js → client-CWQFYZ5Z.js} +4 -4
- package/dist/{config-EHCEKT2B.js → config-YXZKPSZB.js} +8 -2
- package/dist/{eas-ZMTIOZH6.js → eas-YZIHYQAI.js} +6 -6
- package/dist/{governor-JIXAG6WU.js → governor-YPDAOT3S.js} +6 -6
- package/dist/index.js +166 -34
- package/dist/index.js.map +1 -1
- package/dist/{network-UVMYTKQX.js → network-QEMP3DSP.js} +3 -3
- package/dist/{price-AGCWXLZ6.js → price-SWNEGWO4.js} +5 -5
- package/dist/{research-KUIZM6AK.js → research-PH77VSE4.js} +9 -9
- package/dist/research-ZX7T2ZIJ.js +14 -0
- package/dist/{session-2FIR4LJP.js → session-NMA4RLKC.js} +10 -10
- package/dist/{trade-UTM3DSO3.js → trade-N2A74UPX.js} +16 -16
- package/dist/{xmtp-B2XFVPIV.js → xmtp-YNOGIZ4G.js} +6 -6
- package/package.json +1 -1
- package/dist/chunk-5S2TBADL.js.map +0 -1
- package/dist/chunk-R75DM3VL.js.map +0 -1
- package/dist/research-2I6AA3BI.js +0 -14
- /package/dist/{chat-3SAX4VRO.js.map → chat-52PWNH7Y.js.map} +0 -0
- /package/dist/{chunk-NGET2RWT.js.map → chunk-66VFSLPS.js.map} +0 -0
- /package/dist/{chunk-LMDHM36X.js.map → chunk-7PCI3WHQ.js.map} +0 -0
- /package/dist/{chunk-35536GNW.js.map → chunk-GWIW6DDG.js.map} +0 -0
- /package/dist/{chunk-5NN424VN.js.map → chunk-JEVBC7DV.js.map} +0 -0
- /package/dist/{chunk-ZIH3SCFJ.js.map → chunk-QBNWBWD3.js.map} +0 -0
- /package/dist/{chunk-R7Q2L6VV.js.map → chunk-SBVHGUQJ.js.map} +0 -0
- /package/dist/{chunk-PEJPTKLK.js.map → chunk-VQIFAXUY.js.map} +0 -0
- /package/dist/{client-XG6LL6TS.js.map → client-CWQFYZ5Z.js.map} +0 -0
- /package/dist/{config-EHCEKT2B.js.map → config-YXZKPSZB.js.map} +0 -0
- /package/dist/{eas-ZMTIOZH6.js.map → eas-YZIHYQAI.js.map} +0 -0
- /package/dist/{governor-JIXAG6WU.js.map → governor-YPDAOT3S.js.map} +0 -0
- /package/dist/{network-UVMYTKQX.js.map → network-QEMP3DSP.js.map} +0 -0
- /package/dist/{price-AGCWXLZ6.js.map → price-SWNEGWO4.js.map} +0 -0
- /package/dist/{research-KUIZM6AK.js.map → research-PH77VSE4.js.map} +0 -0
- /package/dist/{research-2I6AA3BI.js.map → research-ZX7T2ZIJ.js.map} +0 -0
- /package/dist/{session-2FIR4LJP.js.map → session-NMA4RLKC.js.map} +0 -0
- /package/dist/{trade-UTM3DSO3.js.map → trade-N2A74UPX.js.map} +0 -0
- /package/dist/{xmtp-B2XFVPIV.js.map → xmtp-YNOGIZ4G.js.map} +0 -0
|
@@ -12,11 +12,11 @@ import {
|
|
|
12
12
|
queryJoinRequests,
|
|
13
13
|
revokeAttestation,
|
|
14
14
|
stripReferrerPrefix
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-JEVBC7DV.js";
|
|
16
|
+
import "./chunk-ZPLUJT4V.js";
|
|
17
|
+
import "./chunk-SBVHGUQJ.js";
|
|
18
|
+
import "./chunk-GWIW6DDG.js";
|
|
19
|
+
import "./chunk-RGOTBJIN.js";
|
|
20
20
|
export {
|
|
21
21
|
createApproval,
|
|
22
22
|
createJoinRequest,
|
|
@@ -32,4 +32,4 @@ export {
|
|
|
32
32
|
revokeAttestation,
|
|
33
33
|
stripReferrerPrefix
|
|
34
34
|
};
|
|
35
|
-
//# sourceMappingURL=eas-
|
|
35
|
+
//# sourceMappingURL=eas-YZIHYQAI.js.map
|
|
@@ -34,11 +34,11 @@ import {
|
|
|
34
34
|
settleProposal,
|
|
35
35
|
vetoProposal,
|
|
36
36
|
vote
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
37
|
+
} from "./chunk-7PCI3WHQ.js";
|
|
38
|
+
import "./chunk-ZPLUJT4V.js";
|
|
39
|
+
import "./chunk-SBVHGUQJ.js";
|
|
40
|
+
import "./chunk-GWIW6DDG.js";
|
|
41
|
+
import "./chunk-RGOTBJIN.js";
|
|
42
42
|
export {
|
|
43
43
|
PROPOSAL_STATE,
|
|
44
44
|
PROPOSAL_STATES,
|
|
@@ -76,4 +76,4 @@ export {
|
|
|
76
76
|
vetoProposal,
|
|
77
77
|
vote
|
|
78
78
|
};
|
|
79
|
-
//# sourceMappingURL=governor-
|
|
79
|
+
//# sourceMappingURL=governor-YPDAOT3S.js.map
|
package/dist/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
resolveVaultSyndicate,
|
|
17
17
|
setTextRecord,
|
|
18
18
|
setVaultAddress
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-QBNWBWD3.js";
|
|
20
20
|
import {
|
|
21
21
|
UniswapProvider,
|
|
22
22
|
applySlippage,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
getQuote,
|
|
28
28
|
listModels,
|
|
29
29
|
provisionApiKey
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-VQIFAXUY.js";
|
|
31
31
|
import {
|
|
32
32
|
PROPOSAL_STATE,
|
|
33
33
|
PROPOSAL_STATES,
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
setVotingPeriod,
|
|
59
59
|
settleProposal,
|
|
60
60
|
vote
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-7PCI3WHQ.js";
|
|
62
62
|
import {
|
|
63
63
|
fetchMetadata,
|
|
64
64
|
uploadMetadata
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
queryJoinRequests,
|
|
73
73
|
revokeAttestation,
|
|
74
74
|
stripReferrerPrefix
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-JEVBC7DV.js";
|
|
76
76
|
import {
|
|
77
77
|
AERODROME,
|
|
78
78
|
AGENT_REGISTRY,
|
|
@@ -93,7 +93,7 @@ import {
|
|
|
93
93
|
UNISWAP,
|
|
94
94
|
VENICE,
|
|
95
95
|
VENICE_STAKING_ABI
|
|
96
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-ZPLUJT4V.js";
|
|
97
97
|
import {
|
|
98
98
|
formatContractError,
|
|
99
99
|
getAccount,
|
|
@@ -101,8 +101,9 @@ import {
|
|
|
101
101
|
sendTxWithRetry,
|
|
102
102
|
waitForReceipt,
|
|
103
103
|
writeContractWithRetry
|
|
104
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-SBVHGUQJ.js";
|
|
105
105
|
import {
|
|
106
|
+
CHAIN_REGISTRY,
|
|
106
107
|
VALID_NETWORKS,
|
|
107
108
|
getChain,
|
|
108
109
|
getExplorerUrl,
|
|
@@ -110,11 +111,13 @@ import {
|
|
|
110
111
|
getRpcUrl,
|
|
111
112
|
isTestnet,
|
|
112
113
|
setNetwork
|
|
113
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-GWIW6DDG.js";
|
|
114
115
|
import {
|
|
115
116
|
addSyndicate,
|
|
116
117
|
cacheGroupId,
|
|
118
|
+
cacheSwapRoute,
|
|
117
119
|
getAgentId,
|
|
120
|
+
getCachedSwapRoute,
|
|
118
121
|
getChainContracts,
|
|
119
122
|
getNotifyTo,
|
|
120
123
|
getPrimarySyndicate,
|
|
@@ -130,7 +133,7 @@ import {
|
|
|
130
133
|
setPrivateKey,
|
|
131
134
|
setUniswapApiKey,
|
|
132
135
|
setVeniceApiKey
|
|
133
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-RGOTBJIN.js";
|
|
134
137
|
|
|
135
138
|
// src/index.ts
|
|
136
139
|
import { config as loadDotenv } from "dotenv";
|
|
@@ -550,7 +553,125 @@ function buildSettleCalls6(clone) {
|
|
|
550
553
|
}
|
|
551
554
|
|
|
552
555
|
// src/commands/strategy-template.ts
|
|
556
|
+
import { concat as concat2, numberToHex } from "viem";
|
|
553
557
|
var ZERO = "0x0000000000000000000000000000000000000000";
|
|
558
|
+
function encodeV3Path(tokens, fees) {
|
|
559
|
+
if (tokens.length !== fees.length + 1) throw new Error("tokens.length must be fees.length + 1");
|
|
560
|
+
const parts = [];
|
|
561
|
+
for (let i = 0; i < tokens.length; i++) {
|
|
562
|
+
parts.push(tokens[i].toLowerCase());
|
|
563
|
+
if (i < fees.length) {
|
|
564
|
+
parts.push(numberToHex(fees[i], { size: 3 }));
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
return concat2(parts);
|
|
568
|
+
}
|
|
569
|
+
function buildSwapExtraData(network, tokenIn, tokenOut, feeTier, hop) {
|
|
570
|
+
if (network === "robinhood-testnet") {
|
|
571
|
+
return encodeAbiParameters7([{ type: "uint24" }], [feeTier]);
|
|
572
|
+
}
|
|
573
|
+
if (hop) {
|
|
574
|
+
const path = encodeV3Path([tokenIn, hop.via, tokenOut], [hop.feeIn, hop.feeOut]);
|
|
575
|
+
const encoded2 = encodeAbiParameters7([{ type: "bytes" }], [path]);
|
|
576
|
+
return `0x01${encoded2.slice(2)}`;
|
|
577
|
+
}
|
|
578
|
+
const encoded = encodeAbiParameters7([{ type: "uint24" }], [feeTier]);
|
|
579
|
+
return `0x00${encoded.slice(2)}`;
|
|
580
|
+
}
|
|
581
|
+
async function detectSwapRoute(asset, token, preferredFeeTier) {
|
|
582
|
+
const network = getNetwork();
|
|
583
|
+
if (network === "robinhood-testnet") {
|
|
584
|
+
return {
|
|
585
|
+
extraData: buildSwapExtraData(network, asset, token, preferredFeeTier),
|
|
586
|
+
routeDesc: `direct (fee ${preferredFeeTier})`
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
const chainId = CHAIN_REGISTRY[network].chain.id;
|
|
590
|
+
const cached = getCachedSwapRoute(chainId, asset, token);
|
|
591
|
+
if (cached) {
|
|
592
|
+
const extraData = cached.hop ? buildSwapExtraData(network, asset, token, 0, {
|
|
593
|
+
via: cached.hop.via,
|
|
594
|
+
feeIn: cached.hop.feeIn,
|
|
595
|
+
feeOut: cached.hop.feeOut
|
|
596
|
+
}) : buildSwapExtraData(network, asset, token, cached.feeTier);
|
|
597
|
+
const desc = cached.hop ? `cached multi-hop: ${cached.hop.feeIn}\u2192WETH\u2192${cached.hop.feeOut}` : `cached direct (fee ${cached.feeTier})`;
|
|
598
|
+
return { extraData, routeDesc: desc };
|
|
599
|
+
}
|
|
600
|
+
const publicClient = getPublicClient();
|
|
601
|
+
const quoterAddr = UNISWAP().QUOTER_V2;
|
|
602
|
+
const quoterAbi = [{
|
|
603
|
+
type: "function",
|
|
604
|
+
name: "quoteExactInputSingle",
|
|
605
|
+
inputs: [{ type: "tuple", components: [
|
|
606
|
+
{ type: "address", name: "tokenIn" },
|
|
607
|
+
{ type: "address", name: "tokenOut" },
|
|
608
|
+
{ type: "uint256", name: "amountIn" },
|
|
609
|
+
{ type: "uint24", name: "fee" },
|
|
610
|
+
{ type: "uint160", name: "sqrtPriceLimitX96" }
|
|
611
|
+
] }],
|
|
612
|
+
outputs: [
|
|
613
|
+
{ type: "uint256" },
|
|
614
|
+
{ type: "uint160" },
|
|
615
|
+
{ type: "uint32" },
|
|
616
|
+
{ type: "uint256" }
|
|
617
|
+
],
|
|
618
|
+
stateMutability: "nonpayable"
|
|
619
|
+
}];
|
|
620
|
+
const testAmount = asset.toLowerCase() === TOKENS().USDC.toLowerCase() ? 1000000n : 1000000000000000n;
|
|
621
|
+
const feeTiers = [preferredFeeTier, 1e4, 3e3, 500].filter((v, i, a) => a.indexOf(v) === i);
|
|
622
|
+
for (const fee of feeTiers) {
|
|
623
|
+
try {
|
|
624
|
+
await publicClient.simulateContract({
|
|
625
|
+
address: quoterAddr,
|
|
626
|
+
abi: quoterAbi,
|
|
627
|
+
functionName: "quoteExactInputSingle",
|
|
628
|
+
args: [{ tokenIn: asset, tokenOut: token, amountIn: testAmount, fee, sqrtPriceLimitX96: 0n }]
|
|
629
|
+
});
|
|
630
|
+
cacheSwapRoute(chainId, asset, token, { mode: "direct", feeTier: fee, detectedAt: Math.floor(Date.now() / 1e3) });
|
|
631
|
+
return {
|
|
632
|
+
extraData: buildSwapExtraData(network, asset, token, fee),
|
|
633
|
+
routeDesc: `direct (fee ${fee})`
|
|
634
|
+
};
|
|
635
|
+
} catch {
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
const weth = TOKENS().WETH;
|
|
639
|
+
if (asset.toLowerCase() === weth.toLowerCase()) return null;
|
|
640
|
+
let bestAssetToWethFee = null;
|
|
641
|
+
for (const fee of [500, 3e3, 1e4]) {
|
|
642
|
+
try {
|
|
643
|
+
await publicClient.simulateContract({
|
|
644
|
+
address: quoterAddr,
|
|
645
|
+
abi: quoterAbi,
|
|
646
|
+
functionName: "quoteExactInputSingle",
|
|
647
|
+
args: [{ tokenIn: asset, tokenOut: weth, amountIn: testAmount, fee, sqrtPriceLimitX96: 0n }]
|
|
648
|
+
});
|
|
649
|
+
bestAssetToWethFee = fee;
|
|
650
|
+
break;
|
|
651
|
+
} catch {
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
if (!bestAssetToWethFee) return null;
|
|
655
|
+
const wethTestAmount = 1000000000000000n;
|
|
656
|
+
for (const fee of feeTiers) {
|
|
657
|
+
try {
|
|
658
|
+
await publicClient.simulateContract({
|
|
659
|
+
address: quoterAddr,
|
|
660
|
+
abi: quoterAbi,
|
|
661
|
+
functionName: "quoteExactInputSingle",
|
|
662
|
+
args: [{ tokenIn: weth, tokenOut: token, amountIn: wethTestAmount, fee, sqrtPriceLimitX96: 0n }]
|
|
663
|
+
});
|
|
664
|
+
const hop = { via: weth, feeIn: bestAssetToWethFee, feeOut: fee };
|
|
665
|
+
cacheSwapRoute(chainId, asset, token, { mode: "multi-hop", feeTier: 0, hop, detectedAt: Math.floor(Date.now() / 1e3) });
|
|
666
|
+
return {
|
|
667
|
+
extraData: buildSwapExtraData(network, asset, token, 0, hop),
|
|
668
|
+
routeDesc: `multi-hop: ${bestAssetToWethFee}\u2192WETH\u2192${fee}`
|
|
669
|
+
};
|
|
670
|
+
} catch {
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
return null;
|
|
674
|
+
}
|
|
554
675
|
var TEMPLATES = [
|
|
555
676
|
{
|
|
556
677
|
name: "Moonwell Supply",
|
|
@@ -793,8 +914,10 @@ async function buildInitDataForTemplate(templateKey, opts, vault) {
|
|
|
793
914
|
process.exit(1);
|
|
794
915
|
}
|
|
795
916
|
const tokens = TOKENS();
|
|
796
|
-
const
|
|
797
|
-
const
|
|
917
|
+
const defaultAsset = getNetwork() === "robinhood-testnet" ? "WETH" : "USDC";
|
|
918
|
+
const assetSymbol = opts.asset || defaultAsset;
|
|
919
|
+
const asset = resolveToken(assetSymbol);
|
|
920
|
+
const decimals = assetSymbol.toUpperCase() === "USDC" ? 6 : 18;
|
|
798
921
|
const totalAmount = parseUnits(opts.amount, decimals);
|
|
799
922
|
const maxSlippageBps = Number(opts.maxSlippage || "500");
|
|
800
923
|
const feeTier = opts.feeTier || "3000";
|
|
@@ -818,11 +941,22 @@ async function buildInitDataForTemplate(templateKey, opts, vault) {
|
|
|
818
941
|
}
|
|
819
942
|
const swapAdapter = opts.swapAdapter || resolveSwapAdapter();
|
|
820
943
|
const chainlinkVerifier = CHAINLINK().VERIFIER_PROXY;
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
944
|
+
console.log(chalk.dim(" Detecting swap routes..."));
|
|
945
|
+
const allocations = [];
|
|
946
|
+
for (let i = 0; i < tokenAddrs.length; i++) {
|
|
947
|
+
const token = tokenAddrs[i];
|
|
948
|
+
const route = await detectSwapRoute(asset, token, Number(feeTier));
|
|
949
|
+
if (!route) {
|
|
950
|
+
console.error(chalk.red(`No swap route found for ${token}. No Uniswap V3 pool (direct or via WETH).`));
|
|
951
|
+
process.exit(1);
|
|
952
|
+
}
|
|
953
|
+
console.log(chalk.dim(` ${token.slice(0, 10)}... \u2192 ${route.routeDesc}`));
|
|
954
|
+
allocations.push({
|
|
955
|
+
token,
|
|
956
|
+
weightBps: weightsBps[i],
|
|
957
|
+
swapExtraData: route.extraData
|
|
958
|
+
});
|
|
959
|
+
}
|
|
826
960
|
return {
|
|
827
961
|
initData: buildInitData6(asset, swapAdapter, chainlinkVerifier, allocations, totalAmount, maxSlippageBps),
|
|
828
962
|
asset,
|
|
@@ -881,10 +1015,8 @@ function resolveSwapAdapter() {
|
|
|
881
1015
|
}
|
|
882
1016
|
return "0xdae81cDCfcB14c56fCeB788A147Fcd6CbEdfEeca";
|
|
883
1017
|
}
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
process.exit(1);
|
|
887
|
-
}
|
|
1018
|
+
const adapterAddr = UNISWAP().SWAP_ADAPTER;
|
|
1019
|
+
if (adapterAddr !== ZERO) return adapterAddr;
|
|
888
1020
|
console.error(chalk.red("UniswapSwapAdapter not deployed yet. Use --swap-adapter to specify manually."));
|
|
889
1021
|
process.exit(1);
|
|
890
1022
|
}
|
|
@@ -1161,9 +1293,9 @@ function registerStrategyTemplateCommands(strategy2) {
|
|
|
1161
1293
|
console.error(chalk.red("Missing --name, --performance-fee, or --duration. Use --write-calls to skip proposal submission."));
|
|
1162
1294
|
process.exit(1);
|
|
1163
1295
|
}
|
|
1164
|
-
const { propose: propose2 } = await import("./governor-
|
|
1296
|
+
const { propose: propose2 } = await import("./governor-YPDAOT3S.js");
|
|
1165
1297
|
const { pinJSON } = await import("./ipfs-22YLNQ2C.js");
|
|
1166
|
-
const { parseDuration: parseDuration2 } = await import("./governor-
|
|
1298
|
+
const { parseDuration: parseDuration2 } = await import("./governor-YPDAOT3S.js");
|
|
1167
1299
|
const performanceFeeBps = BigInt(opts.performanceFee);
|
|
1168
1300
|
if (performanceFeeBps < 0n || performanceFeeBps > 10000n) {
|
|
1169
1301
|
console.error(chalk.red("--performance-fee must be 0-10000 (basis points)"));
|
|
@@ -1271,7 +1403,7 @@ function registerStrategyTemplateCommands(strategy2) {
|
|
|
1271
1403
|
let prices = [];
|
|
1272
1404
|
let priceSource = null;
|
|
1273
1405
|
try {
|
|
1274
|
-
const { getTokenPricesInAsset } = await import("./price-
|
|
1406
|
+
const { getTokenPricesInAsset } = await import("./price-SWNEGWO4.js");
|
|
1275
1407
|
prices = await getTokenPricesInAsset({
|
|
1276
1408
|
tokens: allocations.map((a, i) => ({
|
|
1277
1409
|
token: a.token,
|
|
@@ -1818,7 +1950,7 @@ function registerVeniceCommands(program2) {
|
|
|
1818
1950
|
console.log(chalk2.dim(` Key: ${apiKey.slice(0, 8)}...${apiKey.slice(-4)}`));
|
|
1819
1951
|
console.log(chalk2.dim(" Saved to ~/.sherwood/config.json"));
|
|
1820
1952
|
try {
|
|
1821
|
-
const { createVeniceProvisionAttestation, getEasScanUrl: getEasScanUrl2 } = await import("./eas-
|
|
1953
|
+
const { createVeniceProvisionAttestation, getEasScanUrl: getEasScanUrl2 } = await import("./eas-YZIHYQAI.js");
|
|
1822
1954
|
const { uid } = await createVeniceProvisionAttestation(account.address);
|
|
1823
1955
|
if (uid !== "0x0000000000000000000000000000000000000000000000000000000000000000") {
|
|
1824
1956
|
console.log(chalk2.dim(` Attested: ${getEasScanUrl2(uid)}`));
|
|
@@ -1969,10 +2101,10 @@ ${opts.prompt}`;
|
|
|
1969
2101
|
console.log(chalk2.dim(`Model: ${result.model} | Tokens: ${result.usage.promptTokens} in, ${result.usage.completionTokens} out, ${result.usage.totalTokens} total`));
|
|
1970
2102
|
}
|
|
1971
2103
|
try {
|
|
1972
|
-
const { createVeniceInferenceAttestation, getEasScanUrl: getEasScanUrl2 } = await import("./eas-
|
|
2104
|
+
const { createVeniceInferenceAttestation, getEasScanUrl: getEasScanUrl2 } = await import("./eas-YZIHYQAI.js");
|
|
1973
2105
|
const { keccak256, toHex, isAddress: isAddr } = await import("viem");
|
|
1974
|
-
const { getChainContracts: getChainContracts2 } = await import("./config-
|
|
1975
|
-
const { getChain: getActiveChain } = await import("./network-
|
|
2106
|
+
const { getChainContracts: getChainContracts2 } = await import("./config-YXZKPSZB.js");
|
|
2107
|
+
const { getChain: getActiveChain } = await import("./network-QEMP3DSP.js");
|
|
1976
2108
|
const vaultRecipient = opts.vault && isAddr(opts.vault) ? opts.vault : getChainContracts2(getActiveChain().id).vault;
|
|
1977
2109
|
const promptHash = keccak256(toHex(userContent)).slice(0, 18);
|
|
1978
2110
|
const { uid } = await createVeniceInferenceAttestation(
|
|
@@ -3101,8 +3233,8 @@ function printSimulationResult(result, callType) {
|
|
|
3101
3233
|
}
|
|
3102
3234
|
async function sendSimulationAlert(subdomain, proposalId, vault, execResult, settleResult) {
|
|
3103
3235
|
try {
|
|
3104
|
-
const xmtp = await import("./xmtp-
|
|
3105
|
-
const { getAccount: getAccount2 } = await import("./client-
|
|
3236
|
+
const xmtp = await import("./xmtp-YNOGIZ4G.js");
|
|
3237
|
+
const { getAccount: getAccount2 } = await import("./client-CWQFYZ5Z.js");
|
|
3106
3238
|
const group = await xmtp.getGroup("", subdomain);
|
|
3107
3239
|
const allRisks = [...execResult.risks, ...settleResult?.risks ?? []];
|
|
3108
3240
|
const criticals = allRisks.filter((r) => r.level === "critical");
|
|
@@ -3794,7 +3926,7 @@ try {
|
|
|
3794
3926
|
var require2 = createRequire(import.meta.url);
|
|
3795
3927
|
var { version: CLI_VERSION } = require2("../package.json");
|
|
3796
3928
|
async function loadXmtp() {
|
|
3797
|
-
return import("./xmtp-
|
|
3929
|
+
return import("./xmtp-YNOGIZ4G.js");
|
|
3798
3930
|
}
|
|
3799
3931
|
async function loadCron() {
|
|
3800
3932
|
return import("./cron-EOULYO3R.js");
|
|
@@ -4757,7 +4889,7 @@ vaultCmd.command("balance").description("Show LP share balance and asset value")
|
|
|
4757
4889
|
var strategy = program.command("strategy").description("Strategy templates \u2014 list, clone, propose");
|
|
4758
4890
|
registerStrategyTemplateCommands(strategy);
|
|
4759
4891
|
program.command("providers").description("List available DeFi providers").action(async () => {
|
|
4760
|
-
const { MessariProvider, NansenProvider } = await import("./research-
|
|
4892
|
+
const { MessariProvider, NansenProvider } = await import("./research-ZX7T2ZIJ.js");
|
|
4761
4893
|
const providers = [new MoonwellProvider(), new UniswapProvider(), new MessariProvider(), new NansenProvider()];
|
|
4762
4894
|
for (const p of providers) {
|
|
4763
4895
|
const info = p.info();
|
|
@@ -4768,7 +4900,7 @@ ${info.name} (${info.type})`);
|
|
|
4768
4900
|
}
|
|
4769
4901
|
});
|
|
4770
4902
|
try {
|
|
4771
|
-
const { registerChatCommands } = await import("./chat-
|
|
4903
|
+
const { registerChatCommands } = await import("./chat-52PWNH7Y.js");
|
|
4772
4904
|
registerChatCommands(program);
|
|
4773
4905
|
} catch {
|
|
4774
4906
|
program.command("chat <name> [action] [actionArgs...]").description("Syndicate chat (XMTP) \u2014 requires @xmtp/cli").action(() => {
|
|
@@ -4778,16 +4910,16 @@ try {
|
|
|
4778
4910
|
process.exit(1);
|
|
4779
4911
|
});
|
|
4780
4912
|
}
|
|
4781
|
-
var { registerSessionCommands } = await import("./session-
|
|
4913
|
+
var { registerSessionCommands } = await import("./session-NMA4RLKC.js");
|
|
4782
4914
|
registerSessionCommands(program);
|
|
4783
4915
|
registerVeniceCommands(program);
|
|
4784
4916
|
registerAllowanceCommands(program);
|
|
4785
4917
|
registerIdentityCommands(program);
|
|
4786
4918
|
registerProposalCommands(program);
|
|
4787
4919
|
registerGovernorCommands(program);
|
|
4788
|
-
var { registerResearchCommands } = await import("./research-
|
|
4920
|
+
var { registerResearchCommands } = await import("./research-PH77VSE4.js");
|
|
4789
4921
|
registerResearchCommands(program);
|
|
4790
|
-
var { registerTradeCommands } = await import("./trade-
|
|
4922
|
+
var { registerTradeCommands } = await import("./trade-N2A74UPX.js");
|
|
4791
4923
|
registerTradeCommands(program);
|
|
4792
4924
|
var configCmd = program.command("config");
|
|
4793
4925
|
configCmd.command("set").description("Save settings to ~/.sherwood/config.json (persists across sessions)").option("--private-key <key>", "Wallet private key (0x-prefixed)").option("--vault <address>", "Default SyndicateVault address").option("--rpc <url>", "Custom RPC URL for the active --chain network").option("--notify-to <id>", "Destination for cron summaries (Telegram chat ID, phone, etc.)").option("--uniswap-api-key <key>", "Uniswap Trading API key (from developers.uniswap.org)").option("--venice-api-key <key>", "Venice AI inference API key").action((opts) => {
|