@zero-tech/zauction-sdk 0.2.10 → 0.2.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. package/package.json +3 -2
  2. package/src/actions/acceptBid.ts +167 -0
  3. package/src/actions/approveDomainTransfer.ts +25 -0
  4. package/src/actions/approveSpender.ts +27 -0
  5. package/src/actions/buyNow.ts +109 -0
  6. package/src/actions/cancelBid.ts +37 -0
  7. package/src/actions/getBuyNowListing.ts +65 -0
  8. package/src/actions/getPaymentTokenAllowance.ts +30 -0
  9. package/src/actions/index.ts +11 -0
  10. package/src/actions/isZAuctionApproved.ts +20 -0
  11. package/src/actions/placeBid.ts +102 -0
  12. package/src/actions/setBuyNowPrice.ts +56 -0
  13. package/src/actions/setNetworkPaymentToken.ts +46 -0
  14. package/src/api/actions/encodeBid.ts +44 -0
  15. package/src/api/actions/encodeCancelMessage.ts +24 -0
  16. package/src/api/actions/helpers.ts +61 -0
  17. package/src/api/actions/index.ts +6 -0
  18. package/src/api/actions/listBidsForAccount.ts +24 -0
  19. package/src/api/actions/listBidsForTokens.ts +39 -0
  20. package/src/api/actions/submitBid.ts +28 -0
  21. package/src/api/actions/submitCancelMessage.ts +30 -0
  22. package/src/api/client.ts +78 -0
  23. package/src/api/index.ts +1 -0
  24. package/src/api/types.ts +47 -0
  25. package/src/contracts/index.ts +53 -0
  26. package/src/contracts/types/IERC20.d.ts +294 -0
  27. package/src/contracts/types/IERC721.d.ts +472 -0
  28. package/src/contracts/types/IZNSHub.d.ts +578 -0
  29. package/src/contracts/types/ZAuction.d.ts +1487 -0
  30. package/src/contracts/types/ZAuctionV1.d.ts +440 -0
  31. package/src/contracts/types/commons.ts +36 -0
  32. package/src/contracts/types/factories/IERC20__factory.ts +203 -0
  33. package/src/contracts/types/factories/IERC721__factory.ts +308 -0
  34. package/src/contracts/types/factories/IZNSHub__factory.ts +311 -0
  35. package/src/contracts/types/factories/ZAuctionV1__factory.ts +326 -0
  36. package/src/contracts/types/factories/ZAuction__factory.ts +1033 -0
  37. package/src/contracts/types/index.ts +14 -0
  38. package/src/index.ts +468 -0
  39. package/src/subgraph/actions/index.ts +4 -0
  40. package/src/subgraph/actions/listAllBuyNowListings.ts +69 -0
  41. package/src/subgraph/actions/listAllSales.ts +57 -0
  42. package/src/subgraph/actions/listBuyNowSales.ts +44 -0
  43. package/src/subgraph/actions/listSales.ts +33 -0
  44. package/src/subgraph/client.ts +62 -0
  45. package/src/subgraph/helpers/index.ts +39 -0
  46. package/src/subgraph/index.ts +1 -0
  47. package/src/subgraph/queries.ts +75 -0
  48. package/src/subgraph/types.ts +58 -0
  49. package/src/types.ts +181 -0
  50. package/src/utilities/index.ts +2 -0
  51. package/src/utilities/logging.ts +27 -0
@@ -0,0 +1,326 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import { Contract, Signer, utils } from "ethers";
6
+ import { Provider } from "@ethersproject/providers";
7
+ import type { ZAuctionV1, ZAuctionV1Interface } from "../ZAuctionV1";
8
+
9
+ const _abi = [
10
+ {
11
+ inputs: [
12
+ {
13
+ internalType: "contract IERC20",
14
+ name: "tokenAddress",
15
+ type: "address",
16
+ },
17
+ {
18
+ internalType: "contract IRegistrar",
19
+ name: "registrarAddress",
20
+ type: "address",
21
+ },
22
+ ],
23
+ stateMutability: "nonpayable",
24
+ type: "constructor",
25
+ },
26
+ {
27
+ anonymous: false,
28
+ inputs: [
29
+ {
30
+ indexed: false,
31
+ internalType: "uint256",
32
+ name: "auctionid",
33
+ type: "uint256",
34
+ },
35
+ {
36
+ indexed: true,
37
+ internalType: "address",
38
+ name: "bidder",
39
+ type: "address",
40
+ },
41
+ {
42
+ indexed: true,
43
+ internalType: "address",
44
+ name: "seller",
45
+ type: "address",
46
+ },
47
+ {
48
+ indexed: false,
49
+ internalType: "uint256",
50
+ name: "amount",
51
+ type: "uint256",
52
+ },
53
+ {
54
+ indexed: false,
55
+ internalType: "address",
56
+ name: "nftaddress",
57
+ type: "address",
58
+ },
59
+ {
60
+ indexed: false,
61
+ internalType: "uint256",
62
+ name: "tokenid",
63
+ type: "uint256",
64
+ },
65
+ {
66
+ indexed: false,
67
+ internalType: "uint256",
68
+ name: "expireblock",
69
+ type: "uint256",
70
+ },
71
+ ],
72
+ name: "BidAccepted",
73
+ type: "event",
74
+ },
75
+ {
76
+ anonymous: false,
77
+ inputs: [
78
+ {
79
+ indexed: true,
80
+ internalType: "address",
81
+ name: "bidder",
82
+ type: "address",
83
+ },
84
+ {
85
+ indexed: true,
86
+ internalType: "uint256",
87
+ name: "auctionid",
88
+ type: "uint256",
89
+ },
90
+ {
91
+ indexed: false,
92
+ internalType: "uint256",
93
+ name: "price",
94
+ type: "uint256",
95
+ },
96
+ ],
97
+ name: "Cancelled",
98
+ type: "event",
99
+ },
100
+ {
101
+ inputs: [
102
+ {
103
+ internalType: "bytes",
104
+ name: "signature",
105
+ type: "bytes",
106
+ },
107
+ {
108
+ internalType: "uint256",
109
+ name: "auctionid",
110
+ type: "uint256",
111
+ },
112
+ {
113
+ internalType: "address",
114
+ name: "bidder",
115
+ type: "address",
116
+ },
117
+ {
118
+ internalType: "uint256",
119
+ name: "bid",
120
+ type: "uint256",
121
+ },
122
+ {
123
+ internalType: "address",
124
+ name: "nftaddress",
125
+ type: "address",
126
+ },
127
+ {
128
+ internalType: "uint256",
129
+ name: "tokenid",
130
+ type: "uint256",
131
+ },
132
+ {
133
+ internalType: "uint256",
134
+ name: "minbid",
135
+ type: "uint256",
136
+ },
137
+ {
138
+ internalType: "uint256",
139
+ name: "startblock",
140
+ type: "uint256",
141
+ },
142
+ {
143
+ internalType: "uint256",
144
+ name: "expireblock",
145
+ type: "uint256",
146
+ },
147
+ ],
148
+ name: "acceptBid",
149
+ outputs: [],
150
+ stateMutability: "nonpayable",
151
+ type: "function",
152
+ },
153
+ {
154
+ inputs: [
155
+ {
156
+ internalType: "uint256",
157
+ name: "auctionid",
158
+ type: "uint256",
159
+ },
160
+ {
161
+ internalType: "uint256",
162
+ name: "price",
163
+ type: "uint256",
164
+ },
165
+ ],
166
+ name: "cancelBidsUnderPrice",
167
+ outputs: [],
168
+ stateMutability: "nonpayable",
169
+ type: "function",
170
+ },
171
+ {
172
+ inputs: [
173
+ {
174
+ internalType: "address",
175
+ name: "",
176
+ type: "address",
177
+ },
178
+ {
179
+ internalType: "uint256",
180
+ name: "",
181
+ type: "uint256",
182
+ },
183
+ ],
184
+ name: "consumed",
185
+ outputs: [
186
+ {
187
+ internalType: "bool",
188
+ name: "",
189
+ type: "bool",
190
+ },
191
+ ],
192
+ stateMutability: "view",
193
+ type: "function",
194
+ },
195
+ {
196
+ inputs: [
197
+ {
198
+ internalType: "uint256",
199
+ name: "auctionid",
200
+ type: "uint256",
201
+ },
202
+ {
203
+ internalType: "uint256",
204
+ name: "bid",
205
+ type: "uint256",
206
+ },
207
+ {
208
+ internalType: "address",
209
+ name: "nftaddress",
210
+ type: "address",
211
+ },
212
+ {
213
+ internalType: "uint256",
214
+ name: "tokenid",
215
+ type: "uint256",
216
+ },
217
+ {
218
+ internalType: "uint256",
219
+ name: "minbid",
220
+ type: "uint256",
221
+ },
222
+ {
223
+ internalType: "uint256",
224
+ name: "startblock",
225
+ type: "uint256",
226
+ },
227
+ {
228
+ internalType: "uint256",
229
+ name: "expireblock",
230
+ type: "uint256",
231
+ },
232
+ ],
233
+ name: "createBid",
234
+ outputs: [
235
+ {
236
+ internalType: "bytes32",
237
+ name: "data",
238
+ type: "bytes32",
239
+ },
240
+ ],
241
+ stateMutability: "view",
242
+ type: "function",
243
+ },
244
+ {
245
+ inputs: [
246
+ {
247
+ internalType: "bytes32",
248
+ name: "hash",
249
+ type: "bytes32",
250
+ },
251
+ {
252
+ internalType: "bytes",
253
+ name: "signature",
254
+ type: "bytes",
255
+ },
256
+ ],
257
+ name: "recover",
258
+ outputs: [
259
+ {
260
+ internalType: "address",
261
+ name: "",
262
+ type: "address",
263
+ },
264
+ ],
265
+ stateMutability: "pure",
266
+ type: "function",
267
+ },
268
+ {
269
+ inputs: [],
270
+ name: "registrar",
271
+ outputs: [
272
+ {
273
+ internalType: "contract IRegistrar",
274
+ name: "",
275
+ type: "address",
276
+ },
277
+ ],
278
+ stateMutability: "view",
279
+ type: "function",
280
+ },
281
+ {
282
+ inputs: [
283
+ {
284
+ internalType: "bytes32",
285
+ name: "hash",
286
+ type: "bytes32",
287
+ },
288
+ ],
289
+ name: "toEthSignedMessageHash",
290
+ outputs: [
291
+ {
292
+ internalType: "bytes32",
293
+ name: "",
294
+ type: "bytes32",
295
+ },
296
+ ],
297
+ stateMutability: "pure",
298
+ type: "function",
299
+ },
300
+ {
301
+ inputs: [],
302
+ name: "token",
303
+ outputs: [
304
+ {
305
+ internalType: "contract IERC20",
306
+ name: "",
307
+ type: "address",
308
+ },
309
+ ],
310
+ stateMutability: "view",
311
+ type: "function",
312
+ },
313
+ ];
314
+
315
+ export class ZAuctionV1__factory {
316
+ static readonly abi = _abi;
317
+ static createInterface(): ZAuctionV1Interface {
318
+ return new utils.Interface(_abi) as ZAuctionV1Interface;
319
+ }
320
+ static connect(
321
+ address: string,
322
+ signerOrProvider: Signer | Provider
323
+ ): ZAuctionV1 {
324
+ return new Contract(address, _abi, signerOrProvider) as ZAuctionV1;
325
+ }
326
+ }