@t2000/cli 10.5.0 → 10.6.0
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/{chunk-AUIQ7EA5.js → chunk-IKN3QSLY.js} +29 -21
- package/dist/{chunk-AUIQ7EA5.js.map → chunk-IKN3QSLY.js.map} +1 -1
- package/dist/{dist-EPKT2IYR.js → dist-2OK3TC4X.js} +3 -2
- package/dist/{dist-EPKT2IYR.js.map → dist-2OK3TC4X.js.map} +1 -1
- package/dist/{dist-ZUAOJJAM.js → dist-7RV6ZTM3.js} +6 -6
- package/dist/index.js +3 -3
- package/package.json +3 -3
- /package/dist/{dist-ZUAOJJAM.js.map → dist-7RV6ZTM3.js.map} +0 -0
|
@@ -12682,6 +12682,7 @@ function displayHandle(label, parentName = AUDRIC_PARENT_NAME) {
|
|
|
12682
12682
|
init_preflight();
|
|
12683
12683
|
init_errors();
|
|
12684
12684
|
init_token_registry();
|
|
12685
|
+
init_coinSelection();
|
|
12685
12686
|
var CETUS_CLMM_PACKAGE_ID = process.env.CETUS_CLMM_PACKAGE_ID ?? "0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb";
|
|
12686
12687
|
var CETUS_CLMM_PUBLISHED_AT = process.env.CETUS_CLMM_PUBLISHED_AT ?? "0x25ebb9a7c50eb17b3fa9c5a30fb8b5ad8f97caaf4928943acbcff7153dfee5e3";
|
|
12687
12688
|
var CETUS_GLOBAL_CONFIG_ID = process.env.CETUS_GLOBAL_CONFIG_ID ?? "0xdaa46292632c3c4d8f31f23ea0f9b36a28ff3677e9684980e4438403a67a3d8f";
|
|
@@ -12891,7 +12892,7 @@ function assertDeployed() {
|
|
|
12891
12892
|
);
|
|
12892
12893
|
}
|
|
12893
12894
|
}
|
|
12894
|
-
var
|
|
12895
|
+
var MIN_LP_USDC = 5000000n;
|
|
12895
12896
|
var REGISTRY_MODULE = "registry";
|
|
12896
12897
|
var LP_LOCK_MODULE = "lp_lock";
|
|
12897
12898
|
async function buildPublishAgentCoinTx(args) {
|
|
@@ -12917,8 +12918,8 @@ async function buildPublishAgentCoinTx(args) {
|
|
|
12917
12918
|
});
|
|
12918
12919
|
return { tx, moduleName: mod3.moduleName, otw: mod3.otw };
|
|
12919
12920
|
}
|
|
12920
|
-
var
|
|
12921
|
-
function buildTokenizeTx(args) {
|
|
12921
|
+
var USDC_COIN_METADATA_ID = "0x75cfbbf8c962d542e99a1d15731e6069f60a00db895407785b15d14f606f2b4a";
|
|
12922
|
+
async function buildTokenizeTx(args) {
|
|
12922
12923
|
assertDeployed();
|
|
12923
12924
|
if (!isValidSuiAddress(args.agent)) {
|
|
12924
12925
|
throw new T2000Error("INVALID_ADDRESS", `bad agent: ${args.agent}`);
|
|
@@ -12926,10 +12927,10 @@ function buildTokenizeTx(args) {
|
|
|
12926
12927
|
if (!isValidSuiAddress(args.launcher)) {
|
|
12927
12928
|
throw new T2000Error("INVALID_ADDRESS", `bad launcher: ${args.launcher}`);
|
|
12928
12929
|
}
|
|
12929
|
-
if (args.
|
|
12930
|
+
if (args.lpUsdcAmount < MIN_LP_USDC) {
|
|
12930
12931
|
throw new T2000Error(
|
|
12931
12932
|
"INVALID_AMOUNT",
|
|
12932
|
-
`
|
|
12933
|
+
`lpUsdcAmount ${args.lpUsdcAmount} < minimum ${MIN_LP_USDC} raw (5 USDC)`
|
|
12933
12934
|
);
|
|
12934
12935
|
}
|
|
12935
12936
|
const tx = new Transaction();
|
|
@@ -12953,18 +12954,25 @@ function buildTokenizeTx(args) {
|
|
|
12953
12954
|
const [lpCoin] = tx.splitCoins(supplyCoin, [
|
|
12954
12955
|
tx.pure.u64(AGENT_TOKEN_LP_ALLOCATION)
|
|
12955
12956
|
]);
|
|
12956
|
-
const
|
|
12957
|
-
|
|
12958
|
-
|
|
12957
|
+
const { coin: lpUsdc } = await selectAndSplitCoin(
|
|
12958
|
+
tx,
|
|
12959
|
+
args.client,
|
|
12960
|
+
args.launcher,
|
|
12961
|
+
USDC_TYPE,
|
|
12962
|
+
args.lpUsdcAmount
|
|
12963
|
+
);
|
|
12964
|
+
const usdcFirst = args.usdcFirst ?? false;
|
|
12965
|
+
const sqrtPrice = usdcFirst ? sqrtPriceX64FromAmounts(args.lpUsdcAmount, AGENT_TOKEN_LP_ALLOCATION) : sqrtPriceX64FromAmounts(AGENT_TOKEN_LP_ALLOCATION, args.lpUsdcAmount);
|
|
12966
|
+
const usdcMeta = args.usdcMetadataId ?? USDC_COIN_METADATA_ID;
|
|
12959
12967
|
const poolResult = createPoolV2(tx, {
|
|
12960
|
-
coinTypeA:
|
|
12961
|
-
coinTypeB:
|
|
12962
|
-
metadataA:
|
|
12963
|
-
metadataB:
|
|
12964
|
-
coinA:
|
|
12965
|
-
coinB:
|
|
12968
|
+
coinTypeA: usdcFirst ? USDC_TYPE : args.coinType,
|
|
12969
|
+
coinTypeB: usdcFirst ? args.coinType : USDC_TYPE,
|
|
12970
|
+
metadataA: usdcFirst ? usdcMeta : args.coinMetadataId,
|
|
12971
|
+
metadataB: usdcFirst ? args.coinMetadataId : usdcMeta,
|
|
12972
|
+
coinA: usdcFirst ? lpUsdc : lpCoin,
|
|
12973
|
+
coinB: usdcFirst ? lpCoin : lpUsdc,
|
|
12966
12974
|
sqrtPriceX64: sqrtPrice,
|
|
12967
|
-
fixAmountA: !
|
|
12975
|
+
fixAmountA: !usdcFirst,
|
|
12968
12976
|
// always fix the AGENT side
|
|
12969
12977
|
url: args.poolUrl
|
|
12970
12978
|
});
|
|
@@ -12989,10 +12997,10 @@ function buildTokenizeTx(args) {
|
|
|
12989
12997
|
tx.object.clock()
|
|
12990
12998
|
]
|
|
12991
12999
|
});
|
|
12992
|
-
const agentRefund =
|
|
12993
|
-
const
|
|
13000
|
+
const agentRefund = usdcFirst ? refundB : refundA;
|
|
13001
|
+
const usdcRefund = usdcFirst ? refundA : refundB;
|
|
12994
13002
|
tx.transferObjects([supplyCoin, agentRefund], tx.pure.address(args.agent));
|
|
12995
|
-
tx.transferObjects([
|
|
13003
|
+
tx.transferObjects([usdcRefund], tx.pure.address(args.launcher));
|
|
12996
13004
|
return tx;
|
|
12997
13005
|
}
|
|
12998
13006
|
|
|
@@ -13183,9 +13191,9 @@ export {
|
|
|
13183
13191
|
AGENT_CAPITAL_PACKAGE_ID,
|
|
13184
13192
|
CAPITAL_REGISTRY_ID,
|
|
13185
13193
|
CAPITAL_REGISTRY_VERSION,
|
|
13186
|
-
|
|
13194
|
+
MIN_LP_USDC,
|
|
13187
13195
|
buildPublishAgentCoinTx,
|
|
13188
|
-
|
|
13196
|
+
USDC_COIN_METADATA_ID,
|
|
13189
13197
|
buildTokenizeTx
|
|
13190
13198
|
};
|
|
13191
13199
|
/*! Bundled license information:
|
|
@@ -13208,4 +13216,4 @@ export {
|
|
|
13208
13216
|
@scure/bip39/index.js:
|
|
13209
13217
|
(*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)
|
|
13210
13218
|
*/
|
|
13211
|
-
//# sourceMappingURL=chunk-
|
|
13219
|
+
//# sourceMappingURL=chunk-IKN3QSLY.js.map
|