@@ -15,13 +15,37 @@ public struct NFTMetadata
15
15
public string name ;
16
16
public string external_url ;
17
17
public Dictionary < string , object > properties ;
18
+
19
+ public override string ToString ( )
20
+ {
21
+ string propertiesStr = "" ;
22
+ foreach ( var property in properties )
23
+ propertiesStr = $ "\n >>key: { property . Key . ToString ( ) } // value: { property . Value . ToString ( ) } ";
24
+ return
25
+ $ "NFTMetadata:"
26
+ + $ "\n >id: { id } "
27
+ + $ "\n >uri: { uri } "
28
+ + $ "\n >description: { description } "
29
+ + $ "\n >image: { image } "
30
+ + $ "\n >name: { name } "
31
+ + $ "\n >external_url: { external_url } "
32
+ + $ "\n >properties: { propertiesStr } ";
33
+ }
18
34
}
19
35
20
36
[ System . Serializable ]
21
37
public struct NFTMetadataWithSupply
22
38
{
23
39
public NFTMetadata metadata ;
24
40
public int supply ;
41
+
42
+ public override string ToString ( )
43
+ {
44
+ return
45
+ $ "NFTMetadataWithSupply:"
46
+ + $ "\n >>>>>\n { metadata . ToString ( ) } \n <<<<<\n "
47
+ + $ "\n >supply: { supply } ";
48
+ }
25
49
}
26
50
27
51
[ System . Serializable ]
@@ -32,6 +56,17 @@ public struct NFT
32
56
public string type ;
33
57
public int supply ;
34
58
public int quantityOwned ; // only for ERC1155.GetOwned()
59
+
60
+ public override string ToString ( )
61
+ {
62
+ return
63
+ $ "NFT:"
64
+ + $ "\n >>>>>\n { metadata . ToString ( ) } \n <<<<<\n "
65
+ + $ "\n >owner: { owner } "
66
+ + $ "\n >type: { type } "
67
+ + $ "\n >supply: { supply } "
68
+ + $ "\n >quantityOwned: { quantityOwned } ";
69
+ }
35
70
}
36
71
37
72
// Tokens
@@ -42,6 +77,15 @@ public struct Currency
42
77
public string name ;
43
78
public string symbol ;
44
79
public string decimals ;
80
+
81
+ public override string ToString ( )
82
+ {
83
+ return
84
+ $ "Currency:"
85
+ + $ "\n >name: { name } "
86
+ + $ "\n >symbol: { symbol } "
87
+ + $ "\n >decimals: { decimals } ";
88
+ }
45
89
}
46
90
47
91
[ System . Serializable ]
@@ -52,6 +96,17 @@ public struct CurrencyValue
52
96
public string decimals ;
53
97
public string value ;
54
98
public string displayValue ;
99
+
100
+ public override string ToString ( )
101
+ {
102
+ return
103
+ $ "CurrencyValue:"
104
+ + $ "\n >name: { name } "
105
+ + $ "\n >symbol: { symbol } "
106
+ + $ "\n >decimals: { decimals } "
107
+ + $ "\n >value: { value } "
108
+ + $ "\n >displayValue: { displayValue } ";
109
+ }
55
110
}
56
111
57
112
// Marketplace
@@ -69,13 +124,38 @@ public class Listing
69
124
public string buyoutPrice ;
70
125
public CurrencyValue buyoutCurrencyValuePerToken ;
71
126
public int type ;
127
+
128
+ public override string ToString ( )
129
+ {
130
+ return
131
+ $ "Listing:"
132
+ + $ "\n >id: { id } "
133
+ + $ "\n >sellerAddress: { sellerAddress } "
134
+ + $ "\n >assetContractAddress: { assetContractAddress } "
135
+ + $ "\n >tokenId: { tokenId } "
136
+ + $ "\n >>>>>\n { asset . ToString ( ) } \n <<<<<\n "
137
+ + $ "\n >quantity: { quantity } "
138
+ + $ "\n >currencyContractAddress: { currencyContractAddress } "
139
+ + $ "\n >buyoutPrice: { buyoutPrice } "
140
+ + $ "\n >>>>>\n { buyoutCurrencyValuePerToken . ToString ( ) } \n <<<<<\n "
141
+ + $ "\n >type: { type } ";
142
+ }
72
143
}
73
144
74
145
[ System . Serializable ]
75
146
public class DirectListing : Listing
76
147
{
77
148
public string startTimeInSeconds ;
78
149
public string secondsUntilEnd ;
150
+
151
+ public override string ToString ( )
152
+ {
153
+ return
154
+ $ "DirectListing:"
155
+ + $ "\n >>>>>\n { base . ToString ( ) } \n <<<<<\n "
156
+ + $ "\n >startTimeInSeconds: { startTimeInSeconds } "
157
+ + $ "\n >secondsUntilEnd: { secondsUntilEnd } ";
158
+ }
79
159
}
80
160
81
161
[ System . Serializable ]
@@ -85,6 +165,17 @@ public class AuctionListing : Listing
85
165
public string endTimeInEpochSeconds ;
86
166
public string reservePrice ;
87
167
public CurrencyValue reservePriceCurrencyValuePerToken ;
168
+
169
+ public override string ToString ( )
170
+ {
171
+ return
172
+ $ "AuctionListing:"
173
+ + $ "\n >>>>>\n { base . ToString ( ) } \n <<<<<\n "
174
+ + $ "\n >startTimeInEpochSeconds: { startTimeInEpochSeconds } "
175
+ + $ "\n >endTimeInEpochSeconds: { endTimeInEpochSeconds } "
176
+ + $ "\n >reservePrice: { reservePrice } "
177
+ + $ "\n >>>>>\n { reservePriceCurrencyValuePerToken . ToString ( ) } \n <<<<<\n ";
178
+ }
88
179
}
89
180
90
181
[ System . Serializable ]
@@ -99,6 +190,21 @@ public abstract class NewListing
99
190
public string currencyContractAddress ;
100
191
public string reservePricePerToken ;
101
192
public string buyoutPricePerToken ;
193
+
194
+ public override string ToString ( )
195
+ {
196
+ return
197
+ $ "NewListing:"
198
+ + $ "\n >type: { type } "
199
+ + $ "\n >assetContractAddress: { assetContractAddress } "
200
+ + $ "\n >tokenId: { tokenId } "
201
+ + $ "\n >startTimestamp: { startTimestamp } "
202
+ + $ "\n >listingDurationInSeconds: { listingDurationInSeconds } "
203
+ + $ "\n >quantity: { quantity } "
204
+ + $ "\n >currencyContractAddress: { currencyContractAddress } "
205
+ + $ "\n >reservePricePerToken: { reservePricePerToken } "
206
+ + $ "\n >buyoutPricePerToken: { buyoutPricePerToken } ";
207
+ }
102
208
}
103
209
104
210
[ System . Serializable ]
@@ -110,6 +216,14 @@ public NewAuctionListing()
110
216
{
111
217
this . type = "NewAuctionListing" ;
112
218
}
219
+
220
+ public override string ToString ( )
221
+ {
222
+ return
223
+ $ "NewAuctionListing:"
224
+ + $ "\n >>>>>\n { base . ToString ( ) } \n <<<<<\n "
225
+ + $ "\n >reservePricePerToken: { reservePricePerToken } ";
226
+ }
113
227
}
114
228
115
229
[ System . Serializable ]
@@ -119,6 +233,13 @@ public NewDirectListing()
119
233
{
120
234
this . type = "NewDirectListing" ;
121
235
}
236
+
237
+ public override string ToString ( )
238
+ {
239
+ return
240
+ $ "NewDirectListing:"
241
+ + $ "\n >>>>>\n { base . ToString ( ) } \n <<<<<\n ";
242
+ }
122
243
}
123
244
124
245
[ System . Serializable ]
@@ -130,13 +251,33 @@ public struct Offer
130
251
public string pricePerToken ;
131
252
public CurrencyValue currencyValue ;
132
253
public string currencyContractAddress ;
254
+
255
+ public override string ToString ( )
256
+ {
257
+ return
258
+ $ "Offer:"
259
+ + $ "\n >listingId: { listingId } "
260
+ + $ "\n >buyerAddress: { buyerAddress } "
261
+ + $ "\n >quantityDesired: { quantityDesired } "
262
+ + $ "\n >pricePerToken: { pricePerToken } "
263
+ + $ "\n >>>>>\n { currencyValue . ToString ( ) } \n <<<<<\n "
264
+ + $ "\n >currencyContractAddress: { currencyContractAddress } ";
265
+ }
133
266
}
134
267
135
268
[ System . Serializable ]
136
269
public class QueryAllParams
137
270
{
138
271
public int start ;
139
272
public int count ;
273
+
274
+ public override string ToString ( )
275
+ {
276
+ return
277
+ $ "QueryAllParams:"
278
+ + $ "\n >start: { start } "
279
+ + $ "\n >count: { count } ";
280
+ }
140
281
}
141
282
142
283
[ System . Serializable ]
@@ -145,6 +286,16 @@ public class MarketplaceFilter : QueryAllParams
145
286
public string seller ;
146
287
public string tokenContract ;
147
288
public string tokenId ;
289
+
290
+ public override string ToString ( )
291
+ {
292
+ return
293
+ $ "MarketplaceFilter:"
294
+ + $ "\n >>>>>\n { base . ToString ( ) } \n <<<<<\n "
295
+ + $ "\n >seller: { seller } "
296
+ + $ "\n >tokenContract: { tokenContract } "
297
+ + $ "\n >tokenId: { tokenId } ";
298
+ }
148
299
}
149
300
150
301
// Claim conditions
@@ -159,6 +310,19 @@ public class ClaimConditions
159
310
public string maxClaimableSupply ;
160
311
public string maxClaimablePerWallet ;
161
312
public string waitInSeconds ;
313
+
314
+ public override string ToString ( )
315
+ {
316
+ return
317
+ $ "ClaimConditions:"
318
+ + $ "\n >availableSupply: { availableSupply } "
319
+ + $ "\n >currentMintSupply: { currentMintSupply } "
320
+ + $ "\n >>>>>\n { currencyMetadata . ToString ( ) } \n <<<<<\n "
321
+ + $ "\n >currencyAddress: { currencyAddress } "
322
+ + $ "\n >maxClaimableSupply: { maxClaimableSupply } "
323
+ + $ "\n >maxClaimablePerWallet: { maxClaimablePerWallet } "
324
+ + $ "\n >waitInSeconds: { waitInSeconds } ";
325
+ }
162
326
}
163
327
164
328
[ System . Serializable ]
@@ -168,6 +332,16 @@ public class SnapshotEntry
168
332
public string maxClaimable ;
169
333
public string price ;
170
334
public string currencyAddress ;
335
+
336
+ public override string ToString ( )
337
+ {
338
+ return
339
+ $ "SnapshotEntry:"
340
+ + $ "\n >address: { address } "
341
+ + $ "\n >maxClaimable: { maxClaimable } "
342
+ + $ "\n >price: { price } "
343
+ + $ "\n >currencyAddress: { currencyAddress } ";
344
+ }
171
345
}
172
346
173
347
// Transactions
@@ -181,6 +355,18 @@ public struct Receipt
181
355
public string gasUsed ;
182
356
public string blockHash ;
183
357
public string transactionHash ;
358
+
359
+ public override string ToString ( )
360
+ {
361
+ return
362
+ $ "Receipt:"
363
+ + $ "\n >from: { from } "
364
+ + $ "\n >to: { to } "
365
+ + $ "\n >transactionIndex: { transactionIndex } "
366
+ + $ "\n >gasUsed: { gasUsed } "
367
+ + $ "\n >blockHash: { blockHash } "
368
+ + $ "\n >transactionHash: { transactionHash } ";
369
+ }
184
370
}
185
371
186
372
[ System . Serializable ]
@@ -193,6 +379,14 @@ public bool isSuccessful()
193
379
{
194
380
return receipt . transactionHash != null ;
195
381
}
382
+
383
+ public override string ToString ( )
384
+ {
385
+ return
386
+ $ "TransactionResult:"
387
+ + $ "\n { receipt . ToString ( ) } "
388
+ + $ "\n >id: { id } ";
389
+ }
196
390
}
197
391
198
392
[ System . Serializable ]
@@ -204,13 +398,33 @@ public struct TransactionRequest
204
398
public string value ;
205
399
public string gasLimit ;
206
400
public string gasPrice ;
401
+
402
+ public override string ToString ( )
403
+ {
404
+ return
405
+ $ "TransactionRequest:"
406
+ + $ "\n >from: { from } "
407
+ + $ "\n >to: { to } "
408
+ + $ "\n >data: { data } "
409
+ + $ "\n >value: { value } "
410
+ + $ "\n >gasLimit: { gasLimit } "
411
+ + $ "\n >gasPrice: { gasPrice } ";
412
+ }
207
413
}
208
414
209
415
[ System . Serializable ]
210
416
public struct LoginPayload
211
417
{
212
418
public LoginPayloadData payload ;
213
419
public string signature ;
420
+
421
+ public override string ToString ( )
422
+ {
423
+ return
424
+ $ "LoginPayloadData:"
425
+ + $ "\n >>>>>\n { payload . ToString ( ) } \n <<<<<\n "
426
+ + $ "\n >signature: { signature } ";
427
+ }
214
428
}
215
429
216
430
[ System . Serializable ]
@@ -221,5 +435,16 @@ public struct LoginPayloadData
221
435
public string nonce ;
222
436
public string expiration_time ;
223
437
public string chain_id ;
438
+
439
+ public override string ToString ( )
440
+ {
441
+ return
442
+ $ "LoginPayloadData:"
443
+ + $ "\n >domain: { domain } "
444
+ + $ "\n >address: { address } "
445
+ + $ "\n >nonce: { nonce } "
446
+ + $ "\n >expiration_time: { expiration_time } "
447
+ + $ "\n >chain_id: { chain_id } ";
448
+ }
224
449
}
225
450
}
0 commit comments