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

Persist successful NFT Mints to table storage for reliable metrics #4

Open
safestak-keith opened this issue Dec 19, 2021 · 0 comments

Comments

@safestak-keith
Copy link
Contributor

Mintsafe currently logs purchase and distribution info to disk but it would be better to persist a single record for every successful NFT minted containing the aggregated fields for easy audits and reporting metrics.

We have created a type containing flattened aggregate information for the minted NFT

public record Mint(
    Guid PurchaseAttemptId,
    Guid SaleId,
    Guid CollectionId,
    string SaleAddress,
    string BuyerAddress,
    string PurchaseAttemptUtxo, // utxo.ToString()
    string PurchaseUtxoRetrievalSource, // Blockfrost|CardanoCli|Koios
    DateTime PurchaseAttemptAt, // ensure UTC
    string TxInfoRetrievalSource, // Blockfrost|Koios
    string MintTxHash,
    DateTime MintTxSubmissionAt, // ensure UTC
    string MintTxSubmissionDestination, // Blockfrost|CardanoCli|Koios
    long MintPriceLovelaces,
    long CreatorCutLovelaces,
    long MintsafeCutLovelaces,
    bool IsMintsafeCutDistributedAtMint, // true for mint price > 12 ADA 
    long ChangeReturnedToBuyer,
    Guid NiftyId,
    string PolicyId,
    string AssetName);

Extend the DataAccess project to persist this type to Table Storage. A sensible RowKey field will be NiftyId and a sensible PartitionKey will be SaleId.

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

No branches or pull requests

1 participant