| Crates.io | cw721-marketplace-utils |
| lib.rs | cw721-marketplace-utils |
| version | 0.1.5 |
| created_at | 2024-05-17 16:47:28.754277+00 |
| updated_at | 2024-05-17 16:47:28.754277+00 |
| description | Utility types and helpers for cw721-marketplace, cw721-marketplace-permissioned and cw721-marketplace-single-collection |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1243480 |
| size | 19,031 |
Utility functions, types and helpers intended for use in the following packages:
cw721-marketplacecw721-marketplace-permissionedcw721-marketplace-single-collectionThis package was created to reduce the amount of redundant code inside the above 3 very similar packages.
PageResult{swaps, page, total} - A formatter struct for paginated swaps data
ListResponse{swaps} - Response type for entry point List
DetailsResponse{creator, contract, payment_token, token_id, expires, price, swap_type} - Response type for entry point Details
SwapType{Offer, Sale} - Enum type for CW721Swap that distinguishes whether the cw721 token is for sale by owner, or being bid on buy a potential buyer.
CW721Swap{id, creator, nft_contract, payment_token, token_id, expires, price, swap_type} - Struct for creating or finishing a cw721 marketplace swap using entry point Create or entry point Finish
FeeSplit{marketplace, seller} - A formatter struct for split ratios for marketplaces that collect a fee share of swaps when the Finish entry point is executed.
fee_percentage(amount, share_percent) - Utility function that bifurcates a price value into a FeeSplit when given a swap price and a percentage amount.
XXX Note: This package is a work in progress and part of an unfinished journey of deduplicating redundant code in the cw721 marketplace repostories.