Skip to content

Commit

Permalink
update proto schemas version
Browse files Browse the repository at this point in the history
  • Loading branch information
imabdulbasit committed Sep 12, 2023
1 parent 4ebb91f commit fda292e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 30 deletions.
36 changes: 14 additions & 22 deletions consumer/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,6 @@ impl ErrorSource {

#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum EventKind {
CreateOpenDrop,
MintOpenDrop,
UpdateOpenDrop,
RetryCreateOpenDrop,
RetryMintOpenDrop,

CreateEditionDrop,
MintEditionDrop,
UpdateEditionDrop,
Expand All @@ -123,6 +117,11 @@ pub enum EventKind {
UpdateCollectionMint,
RetryUpdateCollectionMint,
SwitchMintCollection,
CreateOpenDrop,
MintOpenDrop,
UpdateOpenDrop,
RetryCreateOpenDrop,
RetryMintOpenDrop,
}

impl EventKind {
Expand Down Expand Up @@ -240,7 +239,7 @@ impl EventKind {
signature,
})
},
Self::MintToCollection => {
Self::MintToCollection | Self::MintOpenDrop => {
let id = id()?;
let collection_mint = CollectionMint::find_by_id(conn, id).await?;

Expand Down Expand Up @@ -270,11 +269,15 @@ impl EventKind {
.ok_or(ProcessorErrorKind::RecordNotFound)?
.mint
};
let transaction = SolanaCompletedMintTransaction { signature, address };

SolanaNftEvent::MintToCollectionSubmitted(SolanaCompletedMintTransaction {
signature,
address,
})
match self {
Self::MintToCollection => {
SolanaNftEvent::MintToCollectionSubmitted(transaction)
},
Self::MintOpenDrop => SolanaNftEvent::MintOpenDropSubmitted(transaction),
_ => unreachable!(),
}
},
Self::MintEditionDrop => {
let id = id()?;
Expand Down Expand Up @@ -356,17 +359,6 @@ impl EventKind {
address: collection.mint,
})
},
Self::MintOpenDrop => {
let id = id()?;
let collection_mint = CollectionMint::find_by_id(conn, id)
.await?
.ok_or(ProcessorErrorKind::RecordNotFound)?;

SolanaNftEvent::MintOpenDropSubmitted(SolanaCompletedMintTransaction {
signature,
address: collection_mint.mint,
})
},
Self::UpdateOpenDrop => {
SolanaNftEvent::UpdateOpenDropSubmitted(SolanaCompletedUpdateTransaction {
signature,
Expand Down
8 changes: 4 additions & 4 deletions core/proto.lock
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[[schemas]]
subject = "nfts"
version = 2
sha512 = "db8fa9f4b2874ab79305997c3b255a9b9c1b04d291c66f1cb97f332b32758055c01e6ba0e7a4089255c664324c51fc4fe25a9d138698b7a999b1f4d2b5503a48"
version = 29
sha512 = "b3b2136bd6c7a136d317da84395661de5fc056e8270510575a3281d78884d99a0d89f444754ed02cb18ad26dcc7cd65300c1df73b9d74d2edc6bcc8d552465d0"

[[schemas]]
subject = "solana_nfts"
version = 4
version = 11
sha512 = "967fefde938a0f6ce05194e4fca15673e681caac54d8aeec114c5d38418632b9696dbaf5362345a15114e5abb49de55d0af8b9edcc0f2c91f9ef1ccc4ff55d68"

[[schemas]]
subject = "treasury"
version = 3
version = 23
sha512 = "0e4d77999767d5971122e720c1cee7a57c3e47ce69f58a582f1762d8e65e031ea3bd9024cfc21bd7da5db6e38a71657151c58cdfa21d9ff643fb2fc657105cf5"
8 changes: 4 additions & 4 deletions core/proto.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[registry]
endpoint = "http://localhost:8081"
endpoint = "https://schemas.holaplex.tools"

[schemas]
nfts = 2
treasury = 3
solana_nfts = 4
nfts = 29
treasury = 23
solana_nfts = 11

0 comments on commit fda292e

Please sign in to comment.