Skip to content

Commit

Permalink
Change commitment level to confirmed. (#279)
Browse files Browse the repository at this point in the history
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 authored Jun 4, 2024
1 parent 9a80752 commit 9cfd2c1
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
9 changes: 8 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,7 @@ const createAppNft = async (
publisher,
mintAddress,
], {
commitment: "confirmed",
minContextSlot: blockhash.context.slot
});
return { appAddress: mintAddress.publicKey.toBase58(), transactionSignature: txSig };
Expand Down Expand Up @@ -91,7 +92,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
9 changes: 8 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,7 @@ const createPublisherNft = async (
publisher,
mintAddress,
], {
commitment: "confirmed",
minContextSlot: blockhash.context.slot
});
return { publisherAddress: mintAddress.publicKey.toBase58(), transactionSignature: txSig};
Expand Down Expand Up @@ -78,7 +79,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
9 changes: 8 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,7 @@ const createReleaseNft = async ({
publisher,
releaseMintAddress,
], {
commitment: "confirmed",
minContextSlot: blockhash.context.slot,
});
return { releaseAddress: releaseMintAddress.publicKey.toBase58(), transactionSignature: txSig };
Expand All @@ -103,7 +104,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 9cfd2c1

Please sign in to comment.