Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support batch mint of random queued nfts #88

Merged
merged 4 commits into from
Oct 18, 2023
Merged

Conversation

imabdulbasit
Copy link
Contributor

@imabdulbasit imabdulbasit commented Oct 16, 2023

todo: update schemas

@imabdulbasit imabdulbasit marked this pull request as draft October 16, 2023 10:54
@imabdulbasit imabdulbasit marked this pull request as ready for review October 17, 2023 04:58
consumer/src/events.rs Outdated Show resolved Hide resolved
consumer/src/solana.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@kespinola kespinola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some cases of the unwrap and unwrap_or around.

Comment on lines 748 to 749
.ok_or(ProcessorErrorKind::RecordNotFound)
.unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.ok_or(ProcessorErrorKind::RecordNotFound)
.unwrap();
.ok_or(ProcessorErrorKind::RecordNotFound)?;

Comment on lines +1200 to +1204
let blockhash = if let Some(blockhash) = blockhash {
blockhash
} else {
with_retry!(rpc.get_latest_blockhash()).await?
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the function is async

@@ -390,6 +398,7 @@ impl EventKind {
address: collection_mint.mint,
})
},
Self::MintOpenDropBatched => unreachable!(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not instead of writing a different batch method you incorporate the logic here? Can have helper function for consolidating the logic.

@imabdulbasit imabdulbasit merged commit c889b5e into main Oct 18, 2023
4 checks passed
@imabdulbasit imabdulbasit deleted the abdul/batch-mint branch October 18, 2023 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants