@t2000/cli 10.5.0 → 10.7.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-OVMHMLKL.js} +30 -29
- package/dist/{chunk-AUIQ7EA5.js.map → chunk-OVMHMLKL.js.map} +1 -1
- package/dist/{dist-ZUAOJJAM.js → dist-2UHCX46E.js} +4 -6
- package/dist/{dist-EPKT2IYR.js → dist-RUF347PL.js} +6 -5
- package/dist/{dist-EPKT2IYR.js.map → dist-RUF347PL.js.map} +1 -1
- package/dist/index.js +3 -3
- package/package.json +3 -3
- /package/dist/{dist-ZUAOJJAM.js.map → dist-2UHCX46E.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";
|
|
@@ -12705,10 +12706,10 @@ function bigintSqrt(n) {
|
|
|
12705
12706
|
}
|
|
12706
12707
|
return prev;
|
|
12707
12708
|
}
|
|
12708
|
-
function
|
|
12709
|
+
function createPoolV3(tx, args) {
|
|
12709
12710
|
const [tickLower, tickUpper] = fullRangeTickRange(tx);
|
|
12710
12711
|
return tx.moveCall({
|
|
12711
|
-
target: `${CETUS_CLMM_PUBLISHED_AT}::pool_creator::
|
|
12712
|
+
target: `${CETUS_CLMM_PUBLISHED_AT}::pool_creator::create_pool_v3`,
|
|
12712
12713
|
typeArguments: [args.coinTypeA, args.coinTypeB],
|
|
12713
12714
|
arguments: [
|
|
12714
12715
|
tx.object(CETUS_GLOBAL_CONFIG_ID),
|
|
@@ -12720,8 +12721,6 @@ function createPoolV2(tx, args) {
|
|
|
12720
12721
|
tickUpper,
|
|
12721
12722
|
args.coinA,
|
|
12722
12723
|
args.coinB,
|
|
12723
|
-
tx.object(args.metadataA),
|
|
12724
|
-
tx.object(args.metadataB),
|
|
12725
12724
|
tx.pure.bool(args.fixAmountA),
|
|
12726
12725
|
tx.object.clock()
|
|
12727
12726
|
]
|
|
@@ -12878,10 +12877,10 @@ async function buildAgentCoinModule(params) {
|
|
|
12878
12877
|
otw: symbol
|
|
12879
12878
|
};
|
|
12880
12879
|
}
|
|
12881
|
-
var AGENT_CAPITAL_PACKAGE_ID = process.env.AGENT_CAPITAL_PACKAGE_ID ?? "
|
|
12882
|
-
var CAPITAL_REGISTRY_ID = process.env.CAPITAL_REGISTRY_ID ?? "
|
|
12880
|
+
var AGENT_CAPITAL_PACKAGE_ID = process.env.AGENT_CAPITAL_PACKAGE_ID ?? "0xa83ecc4e530594f8e184faf6a4c3da6791267f6791a653644d59e2e603c055b8";
|
|
12881
|
+
var CAPITAL_REGISTRY_ID = process.env.CAPITAL_REGISTRY_ID ?? "0xef4057baac856d65b47f14a1ba14211299637955ea5bc15d7708f6eef27ee0df";
|
|
12883
12882
|
var CAPITAL_REGISTRY_VERSION = Number(
|
|
12884
|
-
process.env.CAPITAL_REGISTRY_VERSION ??
|
|
12883
|
+
process.env.CAPITAL_REGISTRY_VERSION ?? 931861908
|
|
12885
12884
|
);
|
|
12886
12885
|
function assertDeployed() {
|
|
12887
12886
|
if (!AGENT_CAPITAL_PACKAGE_ID || !CAPITAL_REGISTRY_ID) {
|
|
@@ -12891,7 +12890,7 @@ function assertDeployed() {
|
|
|
12891
12890
|
);
|
|
12892
12891
|
}
|
|
12893
12892
|
}
|
|
12894
|
-
var
|
|
12893
|
+
var MIN_LP_USDC = 5000000n;
|
|
12895
12894
|
var REGISTRY_MODULE = "registry";
|
|
12896
12895
|
var LP_LOCK_MODULE = "lp_lock";
|
|
12897
12896
|
async function buildPublishAgentCoinTx(args) {
|
|
@@ -12917,8 +12916,7 @@ async function buildPublishAgentCoinTx(args) {
|
|
|
12917
12916
|
});
|
|
12918
12917
|
return { tx, moduleName: mod3.moduleName, otw: mod3.otw };
|
|
12919
12918
|
}
|
|
12920
|
-
|
|
12921
|
-
function buildTokenizeTx(args) {
|
|
12919
|
+
async function buildTokenizeTx(args) {
|
|
12922
12920
|
assertDeployed();
|
|
12923
12921
|
if (!isValidSuiAddress(args.agent)) {
|
|
12924
12922
|
throw new T2000Error("INVALID_ADDRESS", `bad agent: ${args.agent}`);
|
|
@@ -12926,10 +12924,10 @@ function buildTokenizeTx(args) {
|
|
|
12926
12924
|
if (!isValidSuiAddress(args.launcher)) {
|
|
12927
12925
|
throw new T2000Error("INVALID_ADDRESS", `bad launcher: ${args.launcher}`);
|
|
12928
12926
|
}
|
|
12929
|
-
if (args.
|
|
12927
|
+
if (args.lpUsdcAmount < MIN_LP_USDC) {
|
|
12930
12928
|
throw new T2000Error(
|
|
12931
12929
|
"INVALID_AMOUNT",
|
|
12932
|
-
`
|
|
12930
|
+
`lpUsdcAmount ${args.lpUsdcAmount} < minimum ${MIN_LP_USDC} raw (5 USDC)`
|
|
12933
12931
|
);
|
|
12934
12932
|
}
|
|
12935
12933
|
const tx = new Transaction();
|
|
@@ -12953,18 +12951,22 @@ function buildTokenizeTx(args) {
|
|
|
12953
12951
|
const [lpCoin] = tx.splitCoins(supplyCoin, [
|
|
12954
12952
|
tx.pure.u64(AGENT_TOKEN_LP_ALLOCATION)
|
|
12955
12953
|
]);
|
|
12956
|
-
const
|
|
12957
|
-
|
|
12958
|
-
|
|
12959
|
-
|
|
12960
|
-
|
|
12961
|
-
|
|
12962
|
-
|
|
12963
|
-
|
|
12964
|
-
|
|
12965
|
-
|
|
12954
|
+
const { coin: lpUsdc } = await selectAndSplitCoin(
|
|
12955
|
+
tx,
|
|
12956
|
+
args.client,
|
|
12957
|
+
args.launcher,
|
|
12958
|
+
USDC_TYPE,
|
|
12959
|
+
args.lpUsdcAmount
|
|
12960
|
+
);
|
|
12961
|
+
const usdcFirst = args.usdcFirst ?? false;
|
|
12962
|
+
const sqrtPrice = usdcFirst ? sqrtPriceX64FromAmounts(args.lpUsdcAmount, AGENT_TOKEN_LP_ALLOCATION) : sqrtPriceX64FromAmounts(AGENT_TOKEN_LP_ALLOCATION, args.lpUsdcAmount);
|
|
12963
|
+
const poolResult = createPoolV3(tx, {
|
|
12964
|
+
coinTypeA: usdcFirst ? USDC_TYPE : args.coinType,
|
|
12965
|
+
coinTypeB: usdcFirst ? args.coinType : USDC_TYPE,
|
|
12966
|
+
coinA: usdcFirst ? lpUsdc : lpCoin,
|
|
12967
|
+
coinB: usdcFirst ? lpCoin : lpUsdc,
|
|
12966
12968
|
sqrtPriceX64: sqrtPrice,
|
|
12967
|
-
fixAmountA: !
|
|
12969
|
+
fixAmountA: !usdcFirst,
|
|
12968
12970
|
// always fix the AGENT side
|
|
12969
12971
|
url: args.poolUrl
|
|
12970
12972
|
});
|
|
@@ -12989,10 +12991,10 @@ function buildTokenizeTx(args) {
|
|
|
12989
12991
|
tx.object.clock()
|
|
12990
12992
|
]
|
|
12991
12993
|
});
|
|
12992
|
-
const agentRefund =
|
|
12993
|
-
const
|
|
12994
|
+
const agentRefund = usdcFirst ? refundB : refundA;
|
|
12995
|
+
const usdcRefund = usdcFirst ? refundA : refundB;
|
|
12994
12996
|
tx.transferObjects([supplyCoin, agentRefund], tx.pure.address(args.agent));
|
|
12995
|
-
tx.transferObjects([
|
|
12997
|
+
tx.transferObjects([usdcRefund], tx.pure.address(args.launcher));
|
|
12996
12998
|
return tx;
|
|
12997
12999
|
}
|
|
12998
13000
|
|
|
@@ -13183,9 +13185,8 @@ export {
|
|
|
13183
13185
|
AGENT_CAPITAL_PACKAGE_ID,
|
|
13184
13186
|
CAPITAL_REGISTRY_ID,
|
|
13185
13187
|
CAPITAL_REGISTRY_VERSION,
|
|
13186
|
-
|
|
13188
|
+
MIN_LP_USDC,
|
|
13187
13189
|
buildPublishAgentCoinTx,
|
|
13188
|
-
SUI_COIN_METADATA_ID,
|
|
13189
13190
|
buildTokenizeTx
|
|
13190
13191
|
};
|
|
13191
13192
|
/*! Bundled license information:
|
|
@@ -13208,4 +13209,4 @@ export {
|
|
|
13208
13209
|
@scure/bip39/index.js:
|
|
13209
13210
|
(*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)
|
|
13210
13211
|
*/
|
|
13211
|
-
//# sourceMappingURL=chunk-
|
|
13212
|
+
//# sourceMappingURL=chunk-OVMHMLKL.js.map
|