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

Sign batched queued mints transaction #133

Merged
merged 3 commits into from
Oct 18, 2023
Merged

Sign batched queued mints transaction #133

merged 3 commits into from
Oct 18, 2023

Conversation

imabdulbasit
Copy link
Contributor

No description provided.

@imabdulbasit imabdulbasit marked this pull request as ready for review October 17, 2023 04:58
Comment on lines 233 to 250
for (sig1, sig2, sig3) in signatures {
let key = key.clone();

let sig1_bytes = <[u8; 64]>::from_hex(sig1.signature.full_sig)?;
let sig1 = bs58::encode(sig1_bytes).into_string();

let sig3_bytes = <[u8; 64]>::from_hex(sig3.signature.full_sig)?;
let sig3 = bs58::encode(sig3_bytes).into_string();

let mut signed_message_signatures = vec![sig1, sig3];

// this will be true if mint is uncompressed
if let Some(sig2) = sig2 {
signed_message_signatures.insert(1, sig2);
}

let txn = SolanaTransactionResult {
serialized_message: None,
Copy link
Contributor

Choose a reason for hiding this comment

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

what is happening here? Why assume 3 sigs?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok this is a dedicated handler for the mint batched that is better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

uncompressed mint has one extra signature at idx 1 . Maybe there is a cleaner way to do this.

@imabdulbasit imabdulbasit merged commit 17f65e0 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