@solana-mobile/dapp-store-cli 0.7.3 → 0.8.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.
@@ -124,23 +124,24 @@ function _ts_generator(thisArg, body) {
124
124
  }
125
125
  import { createPublisher } from "@solana-mobile/dapp-store-publishing-tools";
126
126
  import { Connection, Keypair, sendAndConfirmTransaction } from "@solana/web3.js";
127
- import { getMetaplexInstance } from "../../CliUtils.js";
127
+ import { Constants, getMetaplexInstance, showMessage } from "../../CliUtils.js";
128
128
  import { loadPublishDetailsWithChecks, writeToPublishDetails } from "../../config/PublishDetails.js";
129
129
  var createPublisherNft = function() {
130
- var _ref = _async_to_generator(function(param, param1) {
131
- var connection, publisher, publisherDetails, storageParams, dryRun, mintAddress, metaplex, txBuilder, blockhash, tx, txSig;
130
+ var _ref = _async_to_generator(function(param) {
131
+ var connection, publisher, publisherDetails, storageParams, priorityFeeLamports, mintAddress, metaplex, txBuilder, maxTries, i, blockhash, tx, txSig, e, _e_message, errorMsg, retryMsg;
132
132
  return _ts_generator(this, function(_state) {
133
133
  switch(_state.label){
134
134
  case 0:
135
- connection = param.connection, publisher = param.publisher, publisherDetails = param.publisherDetails, storageParams = param.storageParams, dryRun = param1.dryRun;
135
+ connection = param.connection, publisher = param.publisher, publisherDetails = param.publisherDetails, storageParams = param.storageParams, priorityFeeLamports = param.priorityFeeLamports;
136
+ console.info("Creating Publisher NFT");
136
137
  mintAddress = Keypair.generate();
137
138
  metaplex = getMetaplexInstance(connection, publisher, storageParams);
138
- console.info("Creating publisher at address: ".concat(mintAddress.publicKey.toBase58()));
139
139
  return [
140
140
  4,
141
141
  createPublisher({
142
142
  mintAddress: mintAddress,
143
- publisherDetails: publisherDetails
143
+ publisherDetails: publisherDetails,
144
+ priorityFeeLamports: priorityFeeLamports
144
145
  }, {
145
146
  metaplex: metaplex,
146
147
  publisher: publisher
@@ -148,18 +149,31 @@ var createPublisherNft = function() {
148
149
  ];
149
150
  case 1:
150
151
  txBuilder = _state.sent();
152
+ console.info("Publisher NFT data upload complete\nSigning transaction now");
153
+ maxTries = 8;
154
+ i = 1;
155
+ _state.label = 2;
156
+ case 2:
157
+ if (!(i <= maxTries)) return [
158
+ 3,
159
+ 8
160
+ ];
161
+ _state.label = 3;
162
+ case 3:
163
+ _state.trys.push([
164
+ 3,
165
+ 6,
166
+ ,
167
+ 7
168
+ ]);
151
169
  return [
152
170
  4,
153
171
  connection.getLatestBlockhashAndContext()
154
172
  ];
155
- case 2:
173
+ case 4:
156
174
  blockhash = _state.sent();
157
175
  tx = txBuilder.toTransaction(blockhash.value);
158
176
  tx.sign(mintAddress, publisher);
159
- if (!!dryRun) return [
160
- 3,
161
- 4
162
- ];
163
177
  return [
164
178
  4,
165
179
  sendAndConfirmTransaction(connection, tx, [
@@ -169,34 +183,53 @@ var createPublisherNft = function() {
169
183
  minContextSlot: blockhash.context.slot
170
184
  })
171
185
  ];
172
- case 3:
186
+ case 5:
173
187
  txSig = _state.sent();
174
- console.info({
175
- txSig: txSig,
176
- mintAddress: mintAddress.publicKey.toBase58()
177
- });
178
- _state.label = 4;
179
- case 4:
180
188
  return [
181
189
  2,
182
190
  {
183
- publisherAddress: mintAddress.publicKey.toBase58()
191
+ publisherAddress: mintAddress.publicKey.toBase58(),
192
+ transactionSignature: txSig
184
193
  }
185
194
  ];
195
+ case 6:
196
+ e = _state.sent();
197
+ errorMsg = (_e_message = e === null || e === void 0 ? void 0 : e.message) !== null && _e_message !== void 0 ? _e_message : "";
198
+ if (i == maxTries) {
199
+ showMessage("Transaction Failure", errorMsg, "error");
200
+ process.exit(-1);
201
+ } else {
202
+ retryMsg = errorMsg + "\nWill Retry minting publisher.";
203
+ showMessage("Transaction Failure", retryMsg, "standard");
204
+ }
205
+ return [
206
+ 3,
207
+ 7
208
+ ];
209
+ case 7:
210
+ i++;
211
+ return [
212
+ 3,
213
+ 2
214
+ ];
215
+ case 8:
216
+ return [
217
+ 2
218
+ ];
186
219
  }
187
220
  });
188
221
  });
189
- return function createPublisherNft(_, _1) {
222
+ return function createPublisherNft(_) {
190
223
  return _ref.apply(this, arguments);
191
224
  };
192
225
  }();
193
226
  export var createPublisherCommand = function() {
194
227
  var _ref = _async_to_generator(function(param) {
195
- var signer, url, dryRun, storageParams, connection, _ref, publisherDetails, publisherAddress;
228
+ var signer, url, dryRun, storageParams, _param_priorityFeeLamports, priorityFeeLamports, connection, _ref, publisherDetails, _ref1, publisherAddress, transactionSignature;
196
229
  return _ts_generator(this, function(_state) {
197
230
  switch(_state.label){
198
231
  case 0:
199
- signer = param.signer, url = param.url, dryRun = param.dryRun, storageParams = param.storageParams;
232
+ signer = param.signer, url = param.url, dryRun = param.dryRun, storageParams = param.storageParams, _param_priorityFeeLamports = param.priorityFeeLamports, priorityFeeLamports = _param_priorityFeeLamports === void 0 ? Constants.DEFAULT_PRIORITY_FEE : _param_priorityFeeLamports;
200
233
  connection = new Connection(url);
201
234
  return [
202
235
  4,
@@ -204,20 +237,22 @@ export var createPublisherCommand = function() {
204
237
  ];
205
238
  case 1:
206
239
  _ref = _state.sent(), publisherDetails = _ref.publisher;
240
+ if (!!dryRun) return [
241
+ 3,
242
+ 4
243
+ ];
207
244
  return [
208
245
  4,
209
246
  createPublisherNft({
210
247
  connection: connection,
211
248
  publisher: signer,
212
249
  publisherDetails: publisherDetails,
213
- storageParams: storageParams
214
- }, {
215
- dryRun: dryRun
250
+ storageParams: storageParams,
251
+ priorityFeeLamports: priorityFeeLamports
216
252
  })
217
253
  ];
218
254
  case 2:
219
- publisherAddress = _state.sent().publisherAddress;
220
- // TODO(sdlaver): dry-run should not modify config
255
+ _ref1 = _state.sent(), publisherAddress = _ref1.publisherAddress, transactionSignature = _ref1.transactionSignature;
221
256
  return [
222
257
  4,
223
258
  writeToPublishDetails({
@@ -231,9 +266,14 @@ export var createPublisherCommand = function() {
231
266
  return [
232
267
  2,
233
268
  {
234
- publisherAddress: publisherAddress
269
+ publisherAddress: publisherAddress,
270
+ transactionSignature: transactionSignature
235
271
  }
236
272
  ];
273
+ case 4:
274
+ return [
275
+ 2
276
+ ];
237
277
  }
238
278
  });
239
279
  });
@@ -152,15 +152,16 @@ function _ts_generator(thisArg, body) {
152
152
  }
153
153
  import { createRelease } from "@solana-mobile/dapp-store-publishing-tools";
154
154
  import { Connection, Keypair, PublicKey, sendAndConfirmTransaction } from "@solana/web3.js";
155
- import { getMetaplexInstance, showMessage } from "../../CliUtils.js";
155
+ import { Constants, getMetaplexInstance, showMessage } from "../../CliUtils.js";
156
156
  import { loadPublishDetailsWithChecks, writeToPublishDetails } from "../../config/PublishDetails.js";
157
157
  var createReleaseNft = function() {
158
158
  var _ref = _async_to_generator(function(param) {
159
- var appMintAddress, releaseDetails, appDetails, publisherDetails, connection, publisher, storageParams, releaseMintAddress, metaplex, txBuilder, maxTries, i, blockhash, tx, txSig, e, _e_message, errorMsg, retryMsg;
159
+ var appMintAddress, releaseDetails, appDetails, publisherDetails, connection, publisher, storageParams, priorityFeeLamports, releaseMintAddress, metaplex, txBuilder, maxTries, i, blockhash, tx, txSig, e, _e_message, errorMsg, retryMsg;
160
160
  return _ts_generator(this, function(_state) {
161
161
  switch(_state.label){
162
162
  case 0:
163
- appMintAddress = param.appMintAddress, releaseDetails = param.releaseDetails, appDetails = param.appDetails, publisherDetails = param.publisherDetails, connection = param.connection, publisher = param.publisher, storageParams = param.storageParams;
163
+ appMintAddress = param.appMintAddress, releaseDetails = param.releaseDetails, appDetails = param.appDetails, publisherDetails = param.publisherDetails, connection = param.connection, publisher = param.publisher, storageParams = param.storageParams, priorityFeeLamports = param.priorityFeeLamports;
164
+ console.info("Creating Release NFT");
164
165
  releaseMintAddress = Keypair.generate();
165
166
  metaplex = getMetaplexInstance(connection, publisher, storageParams);
166
167
  return [
@@ -170,7 +171,8 @@ var createReleaseNft = function() {
170
171
  releaseMintAddress: releaseMintAddress,
171
172
  releaseDetails: releaseDetails,
172
173
  appDetails: appDetails,
173
- publisherDetails: publisherDetails
174
+ publisherDetails: publisherDetails,
175
+ priorityFeeLamports: priorityFeeLamports
174
176
  }, {
175
177
  metaplex: metaplex,
176
178
  publisher: publisher
@@ -178,6 +180,7 @@ var createReleaseNft = function() {
178
180
  ];
179
181
  case 1:
180
182
  txBuilder = _state.sent().txBuilder;
183
+ console.info("Release NFT data upload complete\nSigning transaction now");
181
184
  maxTries = 8;
182
185
  i = 1;
183
186
  _state.label = 2;
@@ -213,14 +216,11 @@ var createReleaseNft = function() {
213
216
  ];
214
217
  case 5:
215
218
  txSig = _state.sent();
216
- console.info({
217
- txSig: txSig,
218
- releaseMintAddress: releaseMintAddress.publicKey.toBase58()
219
- });
220
219
  return [
221
220
  2,
222
221
  {
223
- releaseAddress: releaseMintAddress.publicKey.toBase58()
222
+ releaseAddress: releaseMintAddress.publicKey.toBase58(),
223
+ transactionSignature: txSig
224
224
  }
225
225
  ];
226
226
  case 6:
@@ -230,7 +230,7 @@ var createReleaseNft = function() {
230
230
  showMessage("Transaction Failure", errorMsg, "error");
231
231
  process.exit(-1);
232
232
  } else {
233
- retryMsg = errorMsg + "\nWill Retry minting release";
233
+ retryMsg = errorMsg + "\nWill Retry minting release NFT";
234
234
  showMessage("Transaction Failure", retryMsg, "standard");
235
235
  }
236
236
  return [
@@ -256,11 +256,11 @@ var createReleaseNft = function() {
256
256
  }();
257
257
  export var createReleaseCommand = function() {
258
258
  var _ref = _async_to_generator(function(param) {
259
- var appMintAddress, buildToolsPath, signer, url, _param_dryRun, dryRun, storageParams, connection, _ref, release, app, publisher, _app_address, releaseAddress;
259
+ var appMintAddress, buildToolsPath, signer, url, _param_dryRun, dryRun, storageParams, _param_priorityFeeLamports, priorityFeeLamports, connection, _ref, release, app, publisher, _app_address, _ref1, releaseAddress, transactionSignature;
260
260
  return _ts_generator(this, function(_state) {
261
261
  switch(_state.label){
262
262
  case 0:
263
- appMintAddress = param.appMintAddress, buildToolsPath = param.buildToolsPath, signer = param.signer, url = param.url, _param_dryRun = param.dryRun, dryRun = _param_dryRun === void 0 ? false : _param_dryRun, storageParams = param.storageParams;
263
+ appMintAddress = param.appMintAddress, buildToolsPath = param.buildToolsPath, signer = param.signer, url = param.url, _param_dryRun = param.dryRun, dryRun = _param_dryRun === void 0 ? false : _param_dryRun, storageParams = param.storageParams, _param_priorityFeeLamports = param.priorityFeeLamports, priorityFeeLamports = _param_priorityFeeLamports === void 0 ? Constants.DEFAULT_PRIORITY_FEE : _param_priorityFeeLamports;
264
264
  connection = new Connection(url);
265
265
  return [
266
266
  4,
@@ -268,6 +268,9 @@ export var createReleaseCommand = function() {
268
268
  ];
269
269
  case 1:
270
270
  _ref = _state.sent(), release = _ref.release, app = _ref.app, publisher = _ref.publisher;
271
+ if (app.android_package != release.android_details.android_package) {
272
+ throw new Error("App package name and release package name do not match.\nApp release specifies " + app.android_package + " while release specifies " + release.android_details.android_package);
273
+ }
271
274
  if (!!dryRun) return [
272
275
  3,
273
276
  4
@@ -281,11 +284,12 @@ export var createReleaseCommand = function() {
281
284
  releaseDetails: _object_spread({}, release),
282
285
  appDetails: app,
283
286
  publisherDetails: publisher,
284
- storageParams: storageParams
287
+ storageParams: storageParams,
288
+ priorityFeeLamports: priorityFeeLamports
285
289
  })
286
290
  ];
287
291
  case 2:
288
- releaseAddress = _state.sent().releaseAddress;
292
+ _ref1 = _state.sent(), releaseAddress = _ref1.releaseAddress, transactionSignature = _ref1.transactionSignature;
289
293
  return [
290
294
  4,
291
295
  writeToPublishDetails({
@@ -299,7 +303,8 @@ export var createReleaseCommand = function() {
299
303
  return [
300
304
  2,
301
305
  {
302
- releaseAddress: releaseAddress
306
+ releaseAddress: releaseAddress,
307
+ transactionSignature: transactionSignature
303
308
  }
304
309
  ];
305
310
  case 4:
@@ -265,7 +265,7 @@ export var loadPublishDetails = function() {
265
265
  }();
266
266
  export var loadPublishDetailsWithChecks = function() {
267
267
  var _ref = _async_to_generator(function() {
268
- var buildToolsDir, _config_publisher_media_find, _config_publisher_media, _config_app_media_find, _config_app_media, _config_release_media_find, _config_release_media, config, apkEntry, apkPath, _, publisherIcon, iconPath, iconBuffer, appIcon, iconPath1, iconBuffer1, releaseIcon, iconPath2, googlePkg, pkgCompare;
268
+ var buildToolsDir, _config_publisher_media_find, _config_publisher_media, _config_app_media_find, _config_app_media, _config_release_media_find, _config_release_media, _config_release_media1, config, apkEntry, apkPath, _, publisherIcon, iconPath, iconBuffer, appIcon, iconPath1, iconBuffer1, releaseIcon, iconPath2, screenshots, googlePkg, pkgCompare;
269
269
  var _arguments = arguments;
270
270
  return _ts_generator(this, function(_state) {
271
271
  switch(_state.label){
@@ -368,6 +368,12 @@ export var loadPublishDetailsWithChecks = function() {
368
368
  throw new Error("Invalid media path or file type: ".concat(item.uri, ". Please ensure the file is a jpeg, png, or webp file."));
369
369
  }
370
370
  });
371
+ screenshots = (_config_release_media1 = config.release.media) === null || _config_release_media1 === void 0 ? void 0 : _config_release_media1.filter(function(asset) {
372
+ return asset.purpose === "screenshot";
373
+ });
374
+ if (screenshots.length < 4) {
375
+ showMessage("Screenshots requirements changing in version 0.9.0", "At least 4 screenshots are required for publishing a new release. Found only ".concat(screenshots.length), "warning");
376
+ }
371
377
  validateLocalizableResources(config);
372
378
  googlePkg = config.solana_mobile_dapp_publisher_portal.google_store_package;
373
379
  if (googlePkg === null || googlePkg === void 0 ? void 0 : googlePkg.length) {
@@ -401,7 +407,7 @@ var checkIconCompatibility = function() {
401
407
  ];
402
408
  case 1:
403
409
  if (_state.sent()) {
404
- throw new Error("Icons must have square dimensions and be no greater than 512px by 512px.");
410
+ throw new Error("Icons must be 512px by 512px.");
405
411
  }
406
412
  return [
407
413
  2
@@ -453,7 +459,7 @@ var checkIconDimensions = function() {
453
459
  size = _state.sent();
454
460
  return [
455
461
  2,
456
- (size === null || size === void 0 ? void 0 : size.width) != (size === null || size === void 0 ? void 0 : size.height) || ((_size_width = size === null || size === void 0 ? void 0 : size.width) !== null && _size_width !== void 0 ? _size_width : 0) > 512
462
+ (size === null || size === void 0 ? void 0 : size.width) != (size === null || size === void 0 ? void 0 : size.height) || ((_size_width = size === null || size === void 0 ? void 0 : size.width) !== null && _size_width !== void 0 ? _size_width : 0) != 512
457
463
  ];
458
464
  }
459
465
  });
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solana-mobile/dapp-store-cli",
3
- "version": "0.7.3",
3
+ "version": "0.8.1",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -53,7 +53,7 @@
53
53
  "dependencies": {
54
54
  "@aws-sdk/client-s3": "^3.321.1",
55
55
  "@metaplex-foundation/js-plugin-aws": "^0.18.3",
56
- "@solana-mobile/dapp-store-publishing-tools": "workspace:0.7.3",
56
+ "@solana-mobile/dapp-store-publishing-tools": "workspace:0.8.1",
57
57
  "@solana/web3.js": "1.68.0",
58
58
  "@types/semver": "^7.3.13",
59
59
  "ajv": "^8.11.0",
@@ -181,9 +181,6 @@ export var CachedStorageDriver = /*#__PURE__*/ function() {
181
181
  _define_property(this, "assetManifestPath", void 0);
182
182
  _define_property(this, "storageDriver", void 0);
183
183
  this.assetManifestPath = assetManifestPath;
184
- console.info({
185
- loading: true
186
- });
187
184
  var _this_loadAssetManifest;
188
185
  this.assetManifest = (_this_loadAssetManifest = this.loadAssetManifest(assetManifestPath)) !== null && _this_loadAssetManifest !== void 0 ? _this_loadAssetManifest : {
189
186
  schema_version: CachedStorageDriver.SCHEMA_VERSION,
@@ -252,13 +249,6 @@ export var CachedStorageDriver = /*#__PURE__*/ function() {
252
249
  ];
253
250
  case 2:
254
251
  hash = createHash("sha256").update(file.buffer).digest("base64");
255
- console.info(JSON.stringify({
256
- file: {
257
- name: file.fileName,
258
- disn: file.displayName,
259
- un: file.uniqueName
260
- }
261
- }));
262
252
  uploadedAsset = _this.uploadedAsset(file.fileName, {
263
253
  sha256: hash
264
254
  });
@@ -290,6 +280,7 @@ export var CachedStorageDriver = /*#__PURE__*/ function() {
290
280
  ];
291
281
  case 4:
292
282
  _state.sent();
283
+ console.log("".concat(file.fileName, " uploaded at ").concat(uri));
293
284
  return [
294
285
  2,
295
286
  uri
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solana-mobile/dapp-store-cli",
3
- "version": "0.7.3",
3
+ "version": "0.8.1",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -46,7 +46,7 @@
46
46
  "dependencies": {
47
47
  "@aws-sdk/client-s3": "^3.321.1",
48
48
  "@metaplex-foundation/js-plugin-aws": "^0.18.3",
49
- "@solana-mobile/dapp-store-publishing-tools": "0.7.3",
49
+ "@solana-mobile/dapp-store-publishing-tools": "0.8.1",
50
50
  "@solana/web3.js": "1.68.0",
51
51
  "@types/semver": "^7.3.13",
52
52
  "ajv": "^8.11.0",
package/src/CliSetup.ts CHANGED
@@ -11,10 +11,12 @@ import {
11
11
  checkForSelfUpdate,
12
12
  checkSubmissionNetwork,
13
13
  Constants,
14
+ dryRunSuccessMessage,
14
15
  generateNetworkSuffix,
15
16
  parseKeypair,
16
17
  showMessage
17
18
  } from "./CliUtils.js";
19
+ import { LAMPORTS_PER_SOL } from "@solana/web3.js"
18
20
  import * as dotenv from "dotenv";
19
21
  import { initScaffold } from "./commands/scaffolding/index.js";
20
22
  import { loadPublishDetails, loadPublishDetailsWithChecks } from "./config/PublishDetails.js";
@@ -46,9 +48,14 @@ function resolveBuildToolsPath(buildToolsPath: string | undefined) {
46
48
  * This method should be updated with each new release of the CLI, and just do nothing when there isn't anything to report
47
49
  */
48
50
  function latestReleaseMessage() {
51
+ const messages = [
52
+ `- priority fee has been updated to ${Constants.DEFAULT_PRIORITY_FEE} lamports = ${Constants.DEFAULT_PRIORITY_FEE / LAMPORTS_PER_SOL} SOL. To adjust this value use param "-p" or "--priority-fee-lamports"`,
53
+ `- At least 4 screenshots are now required to update or release a new app`,
54
+ `- App icons should be exactly 512x512.`
55
+ ].join('\n\n')
49
56
  showMessage(
50
57
  `Publishing Tools Version ${ Constants.CLI_VERSION }`,
51
- "- priority fee has been updated to handle network congestion\n- short_description value reduced to 30 character limit",
58
+ messages,
52
59
  "warning"
53
60
  );
54
61
  }
@@ -94,19 +101,25 @@ export const createPublisherCliCmd = createCliCmd
94
101
  .option("-u, --url <url>", "RPC URL", Constants.DEFAULT_RPC_DEVNET)
95
102
  .option("-d, --dry-run", "Flag for dry run. Doesn't mint an NFT")
96
103
  .option("-s, --storage-config <storage-config>", "Provide alternative storage configuration details")
97
- .action(async ({ keypair, url, dryRun, storageConfig }) => {
104
+ .option("-p, --priority-fee-lamports <priority-fee-lamports>", "Priority Fee lamports")
105
+ .action(async ({ keypair, url, dryRun, storageConfig, priorityFeeLamports }) => {
98
106
  await tryWithErrorMessage(async () => {
99
107
  latestReleaseMessage();
100
108
  await checkForSelfUpdate();
101
109
 
102
110
  const signer = parseKeypair(keypair);
103
111
  if (signer) {
104
- const result: { publisherAddress: string } = await createPublisherCommand({ signer, url, dryRun, storageParams: storageConfig });
112
+ const result: { publisherAddress: string, transactionSignature: string } = await createPublisherCommand({ signer, url, dryRun, storageParams: storageConfig, priorityFeeLamports });
105
113
 
106
- const displayUrl = `https://solscan.io/token/${result.publisherAddress}${generateNetworkSuffix(url)}`;
107
- const resultText = `Publisher NFT successfully minted:\n${displayUrl}`;
114
+ if (dryRun) {
115
+ dryRunSuccessMessage()
116
+ } else {
117
+ const displayUrl = `https://explorer.solana.com/address/${result.publisherAddress}${generateNetworkSuffix(url)}`;
118
+ const transactionUrl = `https://explorer.solana.com/tx/${result.transactionSignature}${generateNetworkSuffix(url)}`;
119
+ const resultText = `Publisher NFT successfully minted successfully:\n${displayUrl}\n${transactionUrl}`;
108
120
 
109
- showMessage("Success", resultText);
121
+ showMessage("Success", resultText);
122
+ }
110
123
  }
111
124
  });
112
125
  });
@@ -125,7 +138,8 @@ export const createAppCliCmd = createCliCmd
125
138
  .option("-u, --url <url>", "RPC URL", Constants.DEFAULT_RPC_DEVNET)
126
139
  .option("-d, --dry-run", "Flag for dry run. Doesn't mint an NFT")
127
140
  .option("-s, --storage-config <storage-config>", "Provide alternative storage configuration details")
128
- .action(async ({ publisherMintAddress, keypair, url, dryRun, storageConfig }) => {
141
+ .option("-p, --priority-fee-lamports <priority-fee-lamports>", "Priority Fee lamports")
142
+ .action(async ({ publisherMintAddress, keypair, url, dryRun, storageConfig, priorityFeeLamports }) => {
129
143
  await tryWithErrorMessage(async () => {
130
144
  latestReleaseMessage();
131
145
  await checkForSelfUpdate();
@@ -143,13 +157,18 @@ export const createAppCliCmd = createCliCmd
143
157
  signer,
144
158
  url,
145
159
  dryRun,
146
- storageParams: storageConfig
160
+ storageParams: storageConfig,
161
+ priorityFeeLamports: priorityFeeLamports,
147
162
  });
148
163
 
149
- const displayUrl = `https://solscan.io/token/${result.appAddress}${generateNetworkSuffix(url)}`;
150
- const resultText = `App NFT successfully minted:\n${displayUrl}`;
151
-
152
- showMessage("Success", resultText);
164
+ if (dryRun) {
165
+ dryRunSuccessMessage()
166
+ } else {
167
+ const displayUrl = `https://explorer.solana.com/address/${result.appAddress}${generateNetworkSuffix(url)}`;
168
+ const transactionUrl = `https://explorer.solana.com/tx/${result.transactionSignature}${generateNetworkSuffix(url)}`;
169
+ const resultText = `App NFT successfully minted:\n${displayUrl}\n${transactionUrl}`;
170
+ showMessage("Success", resultText);
171
+ }
153
172
  }
154
173
  });
155
174
  });
@@ -172,7 +191,8 @@ export const createReleaseCliCmd = createCliCmd
172
191
  "Path to Android build tools which contains AAPT2"
173
192
  )
174
193
  .option("-s, --storage-config <storage-config>", "Provide alternative storage configuration details")
175
- .action(async ({ appMintAddress, keypair, url, dryRun, buildToolsPath, storageConfig }) => {
194
+ .option("-p, --priority-fee-lamports <priority-fee-lamports>", "Priority Fee lamports")
195
+ .action(async ({ appMintAddress, keypair, url, dryRun, buildToolsPath, storageConfig, priorityFeeLamports }) => {
176
196
  await tryWithErrorMessage(async () => {
177
197
  latestReleaseMessage();
178
198
  await checkForSelfUpdate();
@@ -196,12 +216,18 @@ export const createReleaseCliCmd = createCliCmd
196
216
  url,
197
217
  dryRun,
198
218
  storageParams: storageConfig,
219
+ priorityFeeLamports: priorityFeeLamports
199
220
  });
200
221
 
201
- const displayUrl = `https://solscan.io/token/${result?.releaseAddress}${generateNetworkSuffix(url)}`;
202
- const resultText = `Release NFT successfully minted:\n${displayUrl}`;
222
+ if (dryRun) {
223
+ dryRunSuccessMessage()
224
+ } else {
225
+ const displayUrl = `https://explorer.solana.com/address/${result?.releaseAddress}${generateNetworkSuffix(url)}`;
226
+ const transactionUrl = `https://explorer.solana.com/tx/${result.transactionSignature}${generateNetworkSuffix(url)}`;
227
+ const resultText = `Release NFT successfully minted:\n${displayUrl}\n${transactionUrl}`;
203
228
 
204
- showMessage("Success", resultText);
229
+ showMessage("Success", resultText);
230
+ }
205
231
  }
206
232
  });
207
233
  }
@@ -304,8 +330,11 @@ publishCommand
304
330
  requestorIsAuthorized,
305
331
  });
306
332
 
307
- const resultText = "Successfully submitted to the Solana Mobile dApp publisher portal";
308
- showMessage("Success", resultText);
333
+ if (dryRun) {
334
+ dryRunSuccessMessage()
335
+ } else {
336
+ showMessage("Success", "Successfully submitted to the Solana Mobile dApp publisher portal");
337
+ }
309
338
  }
310
339
  });
311
340
  }
@@ -376,8 +405,11 @@ publishCommand
376
405
  critical,
377
406
  });
378
407
 
379
- const resultText = "dApp successfully updated on the publisher portal";
380
- showMessage("Success", resultText);
408
+ if (dryRun) {
409
+ dryRunSuccessMessage()
410
+ } else {
411
+ showMessage("Success", "dApp successfully updated on the publisher portal");
412
+ }
381
413
  }
382
414
  });
383
415
  }
@@ -442,8 +474,11 @@ publishCommand
442
474
  critical,
443
475
  });
444
476
 
445
- const resultText = "dApp successfully removed from the publisher portal";
446
- showMessage("Success", resultText);
477
+ if (dryRun) {
478
+ dryRunSuccessMessage()
479
+ } else {
480
+ showMessage("Success", "dApp successfully removed from the publisher portal");
481
+ }
447
482
  }
448
483
  })
449
484
  }
@@ -502,8 +537,11 @@ publishCommand
502
537
  requestDetails,
503
538
  });
504
539
 
505
- const resultText = "Support request sent successfully";
506
- showMessage("Success", resultText);
540
+ if (dryRun) {
541
+ dryRunSuccessMessage()
542
+ } else {
543
+ showMessage("Success", "Support request sent successfully");
544
+ }
507
545
  }
508
546
  });
509
547
  }
package/src/CliUtils.ts CHANGED
@@ -18,9 +18,10 @@ import { awsStorage } from "@metaplex-foundation/js-plugin-aws";
18
18
  import { S3StorageManager } from "./config/index.js";
19
19
 
20
20
  export class Constants {
21
- static CLI_VERSION = "0.7.3";
21
+ static CLI_VERSION = "0.8.1";
22
22
  static CONFIG_FILE_NAME = "config.yaml";
23
23
  static DEFAULT_RPC_DEVNET = "https://api.devnet.solana.com";
24
+ static DEFAULT_PRIORITY_FEE = 500000;
24
25
 
25
26
  static getConfigFilePath = () => {
26
27
  return `${process.cwd()}/${Constants.CONFIG_FILE_NAME}`;
@@ -112,6 +113,10 @@ export const generateNetworkSuffix = (rpcUrl: string): string => {
112
113
  return suffix;
113
114
  };
114
115
 
116
+ export const dryRunSuccessMessage = () => {
117
+ showMessage("Dry run", "Dry run was successful", "standard")
118
+ }
119
+
115
120
  export const showMessage = (
116
121
  titleMessage = "",
117
122
  contentMessage = "",
@@ -175,11 +175,12 @@ Commands:
175
175
  Create a publisher
176
176
 
177
177
  Options:
178
- -k, --keypair <path-to-keypair-file> Path to keypair file
179
- -u, --url <url> RPC URL (default: "https://api.devnet.solana.com")
180
- -d, --dry-run Flag for dry run. Doesn't mint an NFT
181
- -s, --storage-config <storage-config> Provide alternative storage configuration details
182
- -h, --help display help for command
178
+ -k, --keypair <path-to-keypair-file> Path to keypair file
179
+ -u, --url <url> RPC URL (default: "https://api.devnet.solana.com")
180
+ -d, --dry-run Flag for dry run. Doesn't mint an NFT
181
+ -s, --storage-config <storage-config> Provide alternative storage configuration details
182
+ -p, --priority-fee-lamports <priority-fee-lamports> Priority Fee lamports
183
+ -h, --help display help for command
183
184
  `;
184
185
 
185
186
  const createAppHelp = `Usage: dapp-store create app [options]
@@ -192,6 +193,7 @@ Options:
192
193
  -u, --url <url> RPC URL (default: "https://api.devnet.solana.com")
193
194
  -d, --dry-run Flag for dry run. Doesn't mint an NFT
194
195
  -s, --storage-config <storage-config> Provide alternative storage configuration details
196
+ -p, --priority-fee-lamports <priority-fee-lamports> Priority Fee lamports
195
197
  -h, --help display help for command
196
198
  `;
197
199
 
@@ -200,13 +202,14 @@ Options:
200
202
  Create a release
201
203
 
202
204
  Options:
203
- -k, --keypair <path-to-keypair-file> Path to keypair file
204
- -a, --app-mint-address <app-mint-address> The mint address of the app NFT
205
- -u, --url <url> RPC URL (default: "https://api.devnet.solana.com")
206
- -d, --dry-run Flag for dry run. Doesn't mint an NFT
207
- -b, --build-tools-path <build-tools-path> Path to Android build tools which contains AAPT2
208
- -s, --storage-config <storage-config> Provide alternative storage configuration details
209
- -h, --help display help for command
205
+ -k, --keypair <path-to-keypair-file> Path to keypair file
206
+ -a, --app-mint-address <app-mint-address> The mint address of the app NFT
207
+ -u, --url <url> RPC URL (default: "https://api.devnet.solana.com")
208
+ -d, --dry-run Flag for dry run. Doesn't mint an NFT
209
+ -b, --build-tools-path <build-tools-path> Path to Android build tools which contains AAPT2
210
+ -s, --storage-config <storage-config> Provide alternative storage configuration details
211
+ -p, --priority-fee-lamports <priority-fee-lamports> Priority Fee lamports
212
+ -h, --help display help for command
210
213
  `;
211
214
 
212
215
  });