Skip to content

Commit

Permalink
Change commitment level to confirmed.
Browse files Browse the repository at this point in the history
skip preflight - enabled.
disable retry on rate limit - enabled

Default was to max which took a long time which constantly checking the rpc causing rate limits.
  • Loading branch information
ankur2136 committed Jun 3, 2024
1 parent 9a80752 commit cfc39f4
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
10 changes: 9 additions & 1 deletion packages/cli/src/commands/create/CreateCliApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ const createAppNft = async (
publisher,
mintAddress,
], {
skipPreflight: true,
commitment: "confirmed",
minContextSlot: blockhash.context.slot
});
return { appAddress: mintAddress.publicKey.toBase58(), transactionSignature: txSig };
Expand Down Expand Up @@ -91,7 +93,13 @@ export const createAppCommand = async ({
storageParams,
priorityFeeLamports = Constants.DEFAULT_PRIORITY_FEE,
}: CreateAppCommandInput) => {
const connection = new Connection(url);
const connection = new Connection(
url,
{
commitment: "confirmed",
disableRetryOnRateLimit: true,
}
);

const { app: appDetails, publisher: publisherDetails } =
await loadPublishDetailsWithChecks();
Expand Down
10 changes: 9 additions & 1 deletion packages/cli/src/commands/create/CreateCliPublisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ const createPublisherNft = async (
publisher,
mintAddress,
], {
skipPreflight: true,
commitment: "confirmed",
minContextSlot: blockhash.context.slot
});
return { publisherAddress: mintAddress.publicKey.toBase58(), transactionSignature: txSig};
Expand Down Expand Up @@ -78,7 +80,13 @@ export const createPublisherCommand = async ({
storageParams: string;
priorityFeeLamports: number;
}) => {
const connection = new Connection(url);
const connection = new Connection(
url,
{
commitment: "confirmed",
disableRetryOnRateLimit: true,
}
);

const { publisher: publisherDetails } = await loadPublishDetailsWithChecks();

Expand Down
10 changes: 9 additions & 1 deletion packages/cli/src/commands/create/CreateCliRelease.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ const createReleaseNft = async ({
publisher,
releaseMintAddress,
], {
skipPreflight: true,
commitment: "confirmed",
minContextSlot: blockhash.context.slot,
});
return { releaseAddress: releaseMintAddress.publicKey.toBase58(), transactionSignature: txSig };
Expand All @@ -103,7 +105,13 @@ export const createReleaseCommand = async ({
storageParams,
priorityFeeLamports = Constants.DEFAULT_PRIORITY_FEE,
}: CreateReleaseCommandInput) => {
const connection = new Connection(url);
const connection = new Connection(
url,
{
commitment: "confirmed",
disableRetryOnRateLimit: true,
}
);

const config = await loadPublishDetailsWithChecks(buildToolsPath);

Expand Down

0 comments on commit cfc39f4

Please sign in to comment.