diff --git a/example/config.yaml b/example/config.yaml index 13fdf3f..83e4bcc 100644 --- a/example/config.yaml +++ b/example/config.yaml @@ -25,6 +25,10 @@ release: uri: ./media/release_icon.png - purpose: screenshot uri: ./media/app_screenshot.png + - purpose: screenshot + uri: ./media/app_screenshot1.png + - purpose: screenshot + uri: ./media/app_screenshot2.png files: - purpose: install uri: ./files/app-debug.apk @@ -37,7 +41,4 @@ release: saga_features: Some information about saga specific features solana_mobile_dapp_publisher_portal: google_store_package: com.company.dapp.otherpkg - testing_instructions: >- - Here are some steps informing Solana Mobile of how to test this dapp. You - can specify multiple lines of instructions. For example, if a login is - needed, you would add those details here. + testing_instructions: Here are some steps informing Solana Mobile of how to test this dapp. You can specify multiple lines of instructions. For example, if a login is needed, you would add those details here. diff --git a/example/media/app_screenshot1.png b/example/media/app_screenshot1.png new file mode 100644 index 0000000..c9c2540 Binary files /dev/null and b/example/media/app_screenshot1.png differ diff --git a/example/media/app_screenshot2.png b/example/media/app_screenshot2.png new file mode 100644 index 0000000..c9c2540 Binary files /dev/null and b/example/media/app_screenshot2.png differ diff --git a/packages/cli/src/CliSetup.ts b/packages/cli/src/CliSetup.ts index 74cb3a3..5cd3e47 100644 --- a/packages/cli/src/CliSetup.ts +++ b/packages/cli/src/CliSetup.ts @@ -48,7 +48,7 @@ function resolveBuildToolsPath(buildToolsPath: string | undefined) { function latestReleaseMessage() { showMessage( `Publishing Tools Version ${ Constants.CLI_VERSION }`, - "- short_description value reduced to 30 character limit", + "- priority fee has been updated to handle network congestion\n- short_description value reduced to 30 character limit", "warning" ); } @@ -108,6 +108,7 @@ export const createPublisherCliCmd = createCliCmd showMessage("Success", resultText); } + process.exit() }); }); @@ -151,6 +152,7 @@ export const createAppCliCmd = createCliCmd showMessage("Success", resultText); } + process.exit() }); }); @@ -203,6 +205,7 @@ export const createReleaseCliCmd = createCliCmd showMessage("Success", resultText); } + process.exit() }); } ); @@ -235,6 +238,7 @@ mainCli buildToolsPath: resolvedBuildToolsPath, }); } + process.exit() }); }); @@ -307,6 +311,7 @@ publishCommand const resultText = "Successfully submitted to the Solana Mobile dApp publisher portal"; showMessage("Success", resultText); } + process.exit() }); } ); @@ -380,6 +385,7 @@ publishCommand showMessage("Success", resultText); } }); + process.exit() } ); @@ -445,6 +451,7 @@ publishCommand const resultText = "dApp successfully removed from the publisher portal"; showMessage("Success", resultText); } + process.exit() }) } ); @@ -505,6 +512,7 @@ publishCommand const resultText = "Support request sent successfully"; showMessage("Success", resultText); } + process.exit() }); } ); \ No newline at end of file diff --git a/packages/cli/src/commands/create/CreateCliRelease.ts b/packages/cli/src/commands/create/CreateCliRelease.ts index d4bf936..6e92d7b 100644 --- a/packages/cli/src/commands/create/CreateCliRelease.ts +++ b/packages/cli/src/commands/create/CreateCliRelease.ts @@ -12,6 +12,7 @@ import { } from "@solana/web3.js"; import { getMetaplexInstance, + showMessage } from "../../CliUtils.js"; import { loadPublishDetailsWithChecks, writeToPublishDetails } from "../../config/PublishDetails.js"; @@ -56,22 +57,34 @@ const createReleaseNft = async ({ { metaplex, publisher } ); - const blockhash = await connection.getLatestBlockhashAndContext(); - const tx = txBuilder.toTransaction(blockhash.value); - tx.sign(releaseMintAddress, publisher); - - const txSig = await sendAndConfirmTransaction(connection, tx, [ - publisher, - releaseMintAddress, - ], { - minContextSlot: blockhash.context.slot - }); - console.info({ - txSig, - releaseMintAddress: releaseMintAddress.publicKey.toBase58(), - }); - - return { releaseAddress: releaseMintAddress.publicKey.toBase58() }; + const maxTries = 4; + for (let i = 1; i <= maxTries; i++) { + try { + const blockhash = await connection.getLatestBlockhashAndContext(); + const tx = txBuilder.toTransaction(blockhash.value); + tx.sign(releaseMintAddress, publisher); + const txSig = await sendAndConfirmTransaction(connection, tx, [ + publisher, + releaseMintAddress, + ], { + minContextSlot: blockhash.context.slot, + }); + console.info({ + txSig, + releaseMintAddress: releaseMintAddress.publicKey.toBase58(), + }); + return { releaseAddress: releaseMintAddress.publicKey.toBase58() }; + } catch (e) { + const errorMsg = (e as Error | null)?.message ?? ""; + if (i == maxTries) { + showMessage("Transaction Failure", errorMsg, "error"); + process.exit(-1) + } else { + const retryMsg = errorMsg + "\nWill Retry minting release" + showMessage("Transaction Failure", retryMsg, "standard"); + } + } + } }; export const createReleaseCommand = async ({ diff --git a/packages/core/src/CoreUtils.ts b/packages/core/src/CoreUtils.ts index 54119af..1e945b7 100644 --- a/packages/core/src/CoreUtils.ts +++ b/packages/core/src/CoreUtils.ts @@ -41,11 +41,18 @@ export const mintNft = async ( }); txBuilder.prepend({ - instruction: ComputeBudgetProgram.setComputeUnitPrice({ - microLamports: 5000, - }), - signers: [], - }); + instruction: ComputeBudgetProgram.setComputeUnitLimit({ + units: 250000, + }), + signers: [], + }); + + txBuilder.prepend({ + instruction: ComputeBudgetProgram.setComputeUnitPrice({ + microLamports: 2000000, + }), + signers: [], + }); return txBuilder; };