@memfork/cli 0.1.13 → 0.1.15
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.
|
@@ -54,6 +54,7 @@ export async function autoProvision(opts) {
|
|
|
54
54
|
const privateKey = keypair.getSecretKey(); // bech32 suiprivkey1…
|
|
55
55
|
console.log(chalk.dim(` address: ${address}`));
|
|
56
56
|
// ── 2. Fund wallet ───────────────────────────────────────────────────────────
|
|
57
|
+
let sponsorUrl;
|
|
57
58
|
if (network === "testnet") {
|
|
58
59
|
console.log(` ${chalk.dim("[2/6]")} Fund your testnet wallet`);
|
|
59
60
|
console.log();
|
|
@@ -68,10 +69,9 @@ export async function autoProvision(opts) {
|
|
|
68
69
|
else {
|
|
69
70
|
// Mainnet: request a gas drip from the sponsor service so the fresh
|
|
70
71
|
// wallet can pay for the two MemWal calls (createAccount + addDelegateKey).
|
|
71
|
-
//
|
|
72
|
-
// happen before the tree exists and must self-pay.
|
|
72
|
+
// initTree (step 6) is a MemForks call — it goes through /sponsor directly.
|
|
73
73
|
step(2, "Requesting mainnet gas from MemForks sponsor");
|
|
74
|
-
|
|
74
|
+
sponsorUrl = process.env.MEMFORK_SPONSOR_URL ?? "https://memforks-sponsor-production.up.railway.app";
|
|
75
75
|
try {
|
|
76
76
|
const res = await fetch(`${sponsorUrl}/drip`, {
|
|
77
77
|
method: "POST",
|
|
@@ -158,6 +158,7 @@ export async function autoProvision(opts) {
|
|
|
158
158
|
signer: privateKey,
|
|
159
159
|
network,
|
|
160
160
|
packageId: consts.memforksPackageId,
|
|
161
|
+
...(sponsorUrl ? { sponsorUrl } : {}),
|
|
161
162
|
memwal: {
|
|
162
163
|
accountId,
|
|
163
164
|
delegateKey: delegate.privateKey,
|