Source Code for Wapal NFT Marketplace
Consider the following payload functions for the sales department:
- '0x584b50b999c78ade62f8359c91b5165ff390338d45f8e55969a04e65d76258c9::coin_listing::buy'
- '0x584b50b999c78ade62f8359c91b5165ff390338d45f8e55969a04e65d76258c9::collection_offer::sell_tokenv2'
- '0x584b50b999c78ade62f8359c91b5165ff390338d45f8e55969a04e65d76258c9::collection_offer::sell_tokenv1_entry'
- '0x584b50b999c78ade62f8359c91b5165ff390338d45f8e55969a04e65d76258c9::marketplace_scripts::buy_many'
- '0x584b50b999c78ade62f8359c91b5165ff390338d45f8e55969a04e65d76258c9::coin_listing::purchase_many'
- '0x584b50b999c78ade62f8359c91b5165ff390338d45f8e55969a04e65d76258c9::token_offer::sell_tokenv2'
- '0x584b50b999c78ade62f8359c91b5165ff390338d45f8e55969a04e65d76258c9::token_offer::sell_tokenv1_entry'
Review this list of payload functions and select those that are permitted. In each transaction, there may be a Sale or their Sale, each associated with a ListingFilledEvent or CollectionOfferFilledEvent. It is imperative to choose these records to generate sales.
Within each of these records, there is event_data, allowing the extraction of seller, buyer, price, collection name, nft_id, royalty, and price. To calculate the cost, factor in a bit of sharing. Additionally, to determine the price in USD, establish a relationship with the 'aptos.price.ez_hourly_token_prices' table, containing only the aptos token price. Note that a left join is necessary due to the incompleteness of the 'aptos.price.ez_hourly_token_prices' table.
Also, be aware that the wapal contract address for sales transactions is 0x584b50b999c78ade62f8359c91b5165ff390338d45f8e55969a04e65d76258c9.