Smart Contract
ListingUtils
A.88dd257fcf26d3cc.ListingUtils
1pub contract ListingUtils {
2
3 pub struct PurchaseModel {
4 pub let listingResourceID: UInt64
5 pub let storefrontAddress: Address
6 pub let buyPrice: UFix64
7
8 init(
9 listingResourceID: UInt64,
10 storefrontAddress: Address,
11 buyPrice: UFix64
12 ) {
13 self.listingResourceID = listingResourceID
14 self.storefrontAddress = storefrontAddress
15 self.buyPrice = buyPrice
16 }
17 }
18
19 pub struct ListingModel {
20 pub let saleNFTID: UInt64
21 pub let saleItemPrice: UFix64
22
23 init(
24 saleNFTID: UInt64,
25 saleItemPrice: UFix64
26 ) {
27 self.saleNFTID = saleNFTID
28 self.saleItemPrice = saleItemPrice
29 }
30 }
31
32 pub struct SellItem {
33 pub let listingId: UInt64
34 pub let nftId: UInt64
35 pub let seller: Address
36
37 init(
38 listingId: UInt64,
39 nftId: UInt64,
40 seller: Address
41 ) {
42 self.listingId = listingId
43 self.nftId = nftId
44 self.seller = seller
45 }
46 }
47
48}