@levrbet/shared 0.5.56 → 0.5.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,533 +2,534 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = [
4
4
  {
5
- inputs: [
6
- { internalType: "address", name: "configProvider", type: "address" },
7
- { internalType: "address", name: "usdcTokenAddress", type: "address" },
8
- ],
9
- stateMutability: "nonpayable",
10
5
  type: "constructor",
11
- },
12
- { inputs: [], name: "LBCM_CAMPAIGN_BUDGET_EXCEEDED", type: "error" },
13
- { inputs: [], name: "LBCM_CAMPAIGN_PAUSED", type: "error" },
14
- { inputs: [], name: "LBCM_CAMPAIGN_USER_PAUSED", type: "error" },
15
- { inputs: [], name: "LBCM_CAPPED_TOURNAMENT_NOT_ALLOWED", type: "error" },
16
- { inputs: [], name: "LBCM_CREDIT_ALREADY_CLAIMED", type: "error" },
17
- { inputs: [], name: "LBCM_CREDIT_GRANT_ALREADY_SPENT", type: "error" },
18
- { inputs: [], name: "LBCM_CREDIT_GRANT_REVOKED", type: "error" },
19
- { inputs: [], name: "LBCM_GRANT_ABOVE_MAX", type: "error" },
20
- { inputs: [], name: "LBCM_GRANT_BELOW_MIN", type: "error" },
21
- { inputs: [], name: "LBCM_INSUFFICIENT_CREDITS_SPENT", type: "error" },
22
- { inputs: [], name: "LBCM_INSUFFICIENT_PAYOUT_FOR_SPONSORSHIP", type: "error" },
23
- { inputs: [], name: "LBCM_INVALID_ADDRESS", type: "error" },
24
- { inputs: [], name: "LBCM_INVALID_BENEFICIARY", type: "error" },
25
- { inputs: [], name: "LBCM_INVALID_CREDITS", type: "error" },
26
- { inputs: [], name: "LBCM_INVALID_CREDIT_CAMPAIGN", type: "error" },
27
- { inputs: [], name: "LBCM_INVALID_CREDIT_GRANT", type: "error" },
28
- { inputs: [], name: "LBCM_INVALID_CREDIT_PROOF", type: "error" },
29
- { inputs: [], name: "LBCM_INVALID_LEVR_MARKET_ID", type: "error" },
30
- { inputs: [], name: "LBCM_INVALID_MERKLE_ROOT", type: "error" },
31
- { inputs: [], name: "LBCM_INVALID_SPEND", type: "error" },
32
- { inputs: [], name: "LBCM_MARKET_MAKER_NOT_ALLOWED", type: "error" },
33
- { inputs: [], name: "LBCM_NON_USDC_MARKET", type: "error" },
34
- { inputs: [], name: "LBCM_NOT_CREDITOR", type: "error" },
35
- { inputs: [], name: "LBCM_NOT_LEVR_ADMIN", type: "error" },
36
- { inputs: [], name: "LBCM_NO_CREDITS_TO_SPEND", type: "error" },
37
- { inputs: [], name: "LBCM_SPEND_ABOVE_MAX", type: "error" },
38
- { inputs: [], name: "LBCM_SPEND_BELOW_MIN", type: "error" },
39
- { inputs: [], name: "LBCM_UNEXPECTED_CAMPAIGN_ID", type: "error" },
40
- { inputs: [], name: "LBCM_USERS_LIMIT_EXCEEDED", type: "error" },
41
- { inputs: [{ internalType: "address", name: "user", type: "address" }], name: "LBCM_USER_BLACKLISTED", type: "error" },
42
- { inputs: [], name: "LBCM_USER_NOT_WHITELISTED", type: "error" },
43
- { inputs: [], name: "LB_CONFIG_INVALID_INTERFACE", type: "error" },
44
- { inputs: [], name: "LB_CONFIG_PROVIDER_NOT_CONTRACT", type: "error" },
45
- { inputs: [], name: "LB_NOT_LEVR_ADMIN", type: "error" },
46
- { inputs: [], name: "LM_INVALID_PROGRESS_BPS", type: "error" },
47
- { inputs: [{ internalType: "address", name: "token", type: "address" }], name: "SafeERC20FailedOperation", type: "error" },
48
- {
49
- anonymous: false,
50
- inputs: [
51
- { indexed: true, internalType: "address", name: "user", type: "address" },
52
- { indexed: false, internalType: "bool", name: "blacklisted", type: "bool" },
53
- ],
54
- name: "BlacklistUpdated",
55
- type: "event",
56
- },
57
- {
58
- anonymous: false,
59
- inputs: [
60
- { indexed: true, internalType: "uint256", name: "campaignId", type: "uint256" },
61
- { indexed: true, internalType: "bytes32", name: "merkleRoot", type: "bytes32" },
62
- { indexed: true, internalType: "address", name: "issuer", type: "address" },
63
- { indexed: false, internalType: "uint256", name: "totalCredits", type: "uint256" },
64
- ],
65
- name: "CreditCampaignCreated",
66
- type: "event",
67
- },
68
- {
69
- anonymous: false,
70
- inputs: [
71
- { indexed: true, internalType: "uint256", name: "campaignId", type: "uint256" },
72
- { indexed: false, internalType: "bool", name: "paused", type: "bool" },
73
- ],
74
- name: "CreditCampaignPaused",
75
- type: "event",
76
- },
77
- {
78
- anonymous: false,
79
6
  inputs: [
80
- { indexed: true, internalType: "uint256", name: "campaignId", type: "uint256" },
81
- { indexed: true, internalType: "address", name: "user", type: "address" },
82
- { indexed: false, internalType: "bool", name: "paused", type: "bool" },
7
+ { name: "configProvider", type: "address", internalType: "address" },
8
+ { name: "usdcTokenAddress", type: "address", internalType: "address" },
83
9
  ],
84
- name: "CreditCampaignUserPaused",
85
- type: "event",
86
- },
87
- {
88
- anonymous: false,
89
- inputs: [
90
- { indexed: true, internalType: "address", name: "user", type: "address" },
91
- { indexed: true, internalType: "uint256", name: "creditId", type: "uint256" },
92
- ],
93
- name: "CreditRevoked",
94
- type: "event",
95
- },
96
- {
97
- anonymous: false,
98
- inputs: [
99
- { indexed: true, internalType: "address", name: "creditor", type: "address" },
100
- { indexed: false, internalType: "bool", name: "added", type: "bool" },
101
- ],
102
- name: "CreditorUpdated",
103
- type: "event",
104
- },
105
- {
106
- anonymous: false,
107
- inputs: [
108
- { indexed: true, internalType: "uint256", name: "campaignId", type: "uint256" },
109
- { indexed: true, internalType: "uint256", name: "creditId", type: "uint256" },
110
- { indexed: true, internalType: "bytes32", name: "positionId", type: "bytes32" },
111
- { indexed: false, internalType: "address", name: "user", type: "address" },
112
- { indexed: false, internalType: "uint256", name: "creditAmount", type: "uint256" },
113
- { indexed: false, internalType: "bytes16", name: "levrMarketId", type: "bytes16" },
114
- { indexed: false, internalType: "enum Side", name: "side", type: "uint8" },
115
- { indexed: false, internalType: "uint8", name: "leverage", type: "uint8" },
116
- ],
117
- name: "CreditsSpent",
118
- type: "event",
119
- },
120
- {
121
- anonymous: false,
122
- inputs: [
123
- { indexed: true, internalType: "address", name: "prevProvider", type: "address" },
124
- { indexed: true, internalType: "address", name: "newProvider", type: "address" },
125
- ],
126
- name: "LevrConfigProviderUpdated",
127
- type: "event",
128
- },
129
- {
130
- anonymous: false,
131
- inputs: [
132
- { indexed: true, internalType: "bytes32", name: "positionId", type: "bytes32" },
133
- { indexed: true, internalType: "address", name: "user", type: "address" },
134
- { indexed: false, internalType: "uint256", name: "campaignId", type: "uint256" },
135
- { indexed: false, internalType: "bytes32", name: "leaf", type: "bytes32" },
136
- { indexed: false, internalType: "uint256", name: "creditId", type: "uint256" },
137
- { indexed: false, internalType: "uint256", name: "amountRedeemed", type: "uint256" },
138
- { indexed: false, internalType: "uint256", name: "userNetRedeemed", type: "uint256" },
139
- { indexed: false, internalType: "uint256", name: "shortfall", type: "uint256" },
140
- { indexed: false, internalType: "bool", name: "refunded", type: "bool" },
141
- ],
142
- name: "SponsoredPositionRedeemed",
143
- type: "event",
144
- },
145
- {
146
- anonymous: false,
147
- inputs: [
148
- { indexed: true, internalType: "uint256", name: "creditId", type: "uint256" },
149
- { indexed: true, internalType: "address", name: "user", type: "address" },
150
- { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
151
- { indexed: true, internalType: "address", name: "issuer", type: "address" },
152
- ],
153
- name: "UserCredited",
154
- type: "event",
10
+ stateMutability: "nonpayable",
155
11
  },
156
12
  {
157
- inputs: [],
13
+ type: "function",
158
14
  name: "CREDIT_USERS_LIMIT",
159
- outputs: [{ internalType: "uint8", name: "", type: "uint8" }],
15
+ inputs: [],
16
+ outputs: [{ name: "", type: "uint8", internalType: "uint8" }],
160
17
  stateMutability: "view",
161
- type: "function",
162
18
  },
163
19
  {
20
+ type: "function",
21
+ name: "adminRedeemSponsoredPosition",
164
22
  inputs: [
165
- { internalType: "bytes32", name: "positionId", type: "bytes32" },
166
- { internalType: "address", name: "beneficiary", type: "address" },
23
+ { name: "positionId", type: "bytes32", internalType: "bytes32" },
24
+ { name: "beneficiary", type: "address", internalType: "address" },
167
25
  ],
168
- name: "adminRedeemSponsoredPosition",
169
26
  outputs: [],
170
27
  stateMutability: "nonpayable",
171
- type: "function",
172
28
  },
173
29
  {
30
+ type: "function",
31
+ name: "blacklistUsers",
174
32
  inputs: [
175
- { internalType: "address[]", name: "users", type: "address[]" },
176
- { internalType: "bool", name: "blacklist", type: "bool" },
33
+ { name: "users", type: "address[]", internalType: "address[]" },
34
+ { name: "blacklist", type: "bool", internalType: "bool" },
177
35
  ],
178
- name: "blacklistUsers",
179
36
  outputs: [],
180
37
  stateMutability: "nonpayable",
181
- type: "function",
182
38
  },
183
39
  {
184
- inputs: [{ internalType: "address", name: "user", type: "address" }],
40
+ type: "function",
185
41
  name: "blacklisted",
186
- outputs: [{ internalType: "bool", name: "banned", type: "bool" }],
42
+ inputs: [{ name: "user", type: "address", internalType: "address" }],
43
+ outputs: [{ name: "banned", type: "bool", internalType: "bool" }],
187
44
  stateMutability: "view",
188
- type: "function",
189
45
  },
190
46
  {
47
+ type: "function",
48
+ name: "campaignCreditClaims",
191
49
  inputs: [
192
- { internalType: "uint256", name: "campaignId", type: "uint256" },
193
- { internalType: "bytes32", name: "leaf", type: "bytes32" },
50
+ { name: "campaignId", type: "uint256", internalType: "uint256" },
51
+ { name: "leaf", type: "bytes32", internalType: "bytes32" },
194
52
  ],
195
- name: "campaignCreditClaims",
196
- outputs: [{ internalType: "bool", name: "claimed", type: "bool" }],
53
+ outputs: [{ name: "claimed", type: "bool", internalType: "bool" }],
197
54
  stateMutability: "view",
198
- type: "function",
199
55
  },
200
56
  {
57
+ type: "function",
58
+ name: "createCreditCampaign",
201
59
  inputs: [
202
- { internalType: "bytes32", name: "root", type: "bytes32" },
203
- { internalType: "address", name: "issuer", type: "address" },
204
- { internalType: "uint256", name: "totalCredits", type: "uint256" },
205
- { internalType: "uint256", name: "expectedId", type: "uint256" },
60
+ { name: "root", type: "bytes32", internalType: "bytes32" },
61
+ { name: "issuer", type: "address", internalType: "address" },
62
+ { name: "totalCredits", type: "uint256", internalType: "uint256" },
63
+ { name: "expectedId", type: "uint256", internalType: "uint256" },
206
64
  ],
207
- name: "createCreditCampaign",
208
65
  outputs: [],
209
66
  stateMutability: "nonpayable",
210
- type: "function",
211
67
  },
212
68
  {
213
- inputs: [],
69
+ type: "function",
214
70
  name: "creditCampaignId",
215
- outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
71
+ inputs: [],
72
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
216
73
  stateMutability: "view",
217
- type: "function",
218
74
  },
219
75
  {
76
+ type: "function",
77
+ name: "creditUsers",
220
78
  inputs: [
221
- { internalType: "address[]", name: "users", type: "address[]" },
222
- { internalType: "uint256[]", name: "amounts", type: "uint256[]" },
223
- { internalType: "address", name: "issuer", type: "address" },
79
+ { name: "users", type: "address[]", internalType: "address[]" },
80
+ { name: "amounts", type: "uint256[]", internalType: "uint256[]" },
81
+ { name: "issuer", type: "address", internalType: "address" },
224
82
  ],
225
- name: "creditUsers",
226
83
  outputs: [],
227
84
  stateMutability: "nonpayable",
228
- type: "function",
229
85
  },
230
86
  {
87
+ type: "function",
88
+ name: "depositToPool",
231
89
  inputs: [
232
- { internalType: "address", name: "issuer", type: "address" },
233
- { internalType: "uint256", name: "amount", type: "uint256" },
90
+ { name: "issuer", type: "address", internalType: "address" },
91
+ { name: "amount", type: "uint256", internalType: "uint256" },
234
92
  ],
235
- name: "depositToPool",
236
93
  outputs: [],
237
94
  stateMutability: "nonpayable",
238
- type: "function",
239
95
  },
240
96
  {
241
- inputs: [],
97
+ type: "function",
242
98
  name: "getAuthorizedCreditors",
243
- outputs: [{ internalType: "address[]", name: "", type: "address[]" }],
99
+ inputs: [],
100
+ outputs: [{ name: "", type: "address[]", internalType: "address[]" }],
244
101
  stateMutability: "view",
245
- type: "function",
246
102
  },
247
103
  {
104
+ type: "function",
105
+ name: "getCampaignUserPaused",
248
106
  inputs: [
249
- { internalType: "uint256", name: "campaignId", type: "uint256" },
250
- { internalType: "address", name: "user", type: "address" },
107
+ { name: "campaignId", type: "uint256", internalType: "uint256" },
108
+ { name: "user", type: "address", internalType: "address" },
251
109
  ],
252
- name: "getCampaignUserPaused",
253
- outputs: [{ internalType: "bool", name: "", type: "bool" }],
110
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
254
111
  stateMutability: "view",
255
- type: "function",
256
112
  },
257
113
  {
258
- inputs: [{ internalType: "uint256", name: "campaignId", type: "uint256" }],
114
+ type: "function",
259
115
  name: "getCreditCampaign",
116
+ inputs: [{ name: "campaignId", type: "uint256", internalType: "uint256" }],
260
117
  outputs: [
261
118
  {
262
- components: [
263
- { internalType: "bytes32", name: "merkleRoot", type: "bytes32" },
264
- { internalType: "uint256", name: "totalCredits", type: "uint256" },
265
- { internalType: "uint256", name: "usedCredits", type: "uint256" },
266
- { internalType: "address", name: "issuer", type: "address" },
267
- { internalType: "bool", name: "paused", type: "bool" },
268
- ],
269
- internalType: "struct ILevrBetCreditManager.CreditCampaign",
270
119
  name: "",
271
120
  type: "tuple",
121
+ internalType: "struct ILevrBetCreditManager.CreditCampaign",
122
+ components: [
123
+ { name: "merkleRoot", type: "bytes32", internalType: "bytes32" },
124
+ { name: "totalCredits", type: "uint256", internalType: "uint256" },
125
+ { name: "usedCredits", type: "uint256", internalType: "uint256" },
126
+ { name: "issuer", type: "address", internalType: "address" },
127
+ { name: "paused", type: "bool", internalType: "bool" },
128
+ ],
272
129
  },
273
130
  ],
274
131
  stateMutability: "view",
275
- type: "function",
276
132
  },
277
133
  {
134
+ type: "function",
135
+ name: "getCreditGrant",
278
136
  inputs: [
279
- { internalType: "address", name: "user", type: "address" },
280
- { internalType: "uint256", name: "creditId", type: "uint256" },
137
+ { name: "user", type: "address", internalType: "address" },
138
+ { name: "creditId", type: "uint256", internalType: "uint256" },
281
139
  ],
282
- name: "getCreditGrant",
283
140
  outputs: [
284
141
  {
285
- components: [
286
- { internalType: "uint256", name: "amount", type: "uint256" },
287
- { internalType: "address", name: "issuer", type: "address" },
288
- { internalType: "address", name: "beneficiary", type: "address" },
289
- { internalType: "bool", name: "spent", type: "bool" },
290
- { internalType: "bool", name: "revoked", type: "bool" },
291
- ],
292
- internalType: "struct ILevrBetCreditManager.CreditGrant",
293
142
  name: "",
294
143
  type: "tuple",
144
+ internalType: "struct ILevrBetCreditManager.CreditGrant",
145
+ components: [
146
+ { name: "amount", type: "uint256", internalType: "uint256" },
147
+ { name: "issuer", type: "address", internalType: "address" },
148
+ { name: "beneficiary", type: "address", internalType: "address" },
149
+ { name: "spent", type: "bool", internalType: "bool" },
150
+ { name: "revoked", type: "bool", internalType: "bool" },
151
+ ],
295
152
  },
296
153
  ],
297
154
  stateMutability: "view",
298
- type: "function",
299
155
  },
300
156
  {
301
- inputs: [{ internalType: "bytes32", name: "positionId", type: "bytes32" }],
157
+ type: "function",
302
158
  name: "getSponsoredPosition",
159
+ inputs: [{ name: "positionId", type: "bytes32", internalType: "bytes32" }],
303
160
  outputs: [
304
161
  {
305
- components: [
306
- { internalType: "bytes32", name: "positionId", type: "bytes32" },
307
- { internalType: "bytes32", name: "leaf", type: "bytes32" },
308
- { internalType: "uint256", name: "campaignId", type: "uint256" },
309
- { internalType: "uint256", name: "creditId", type: "uint256" },
310
- { internalType: "uint256", name: "sponsoredAmount", type: "uint256" },
311
- { internalType: "address", name: "contractAddress", type: "address" },
312
- { internalType: "bool", name: "refunded", type: "bool" },
313
- ],
314
- internalType: "struct ILevrBetCreditManager.SponsoredPosition",
315
162
  name: "",
316
163
  type: "tuple",
164
+ internalType: "struct ILevrBetCreditManager.SponsoredPosition",
165
+ components: [
166
+ { name: "positionId", type: "bytes32", internalType: "bytes32" },
167
+ { name: "leaf", type: "bytes32", internalType: "bytes32" },
168
+ { name: "campaignId", type: "uint256", internalType: "uint256" },
169
+ { name: "creditId", type: "uint256", internalType: "uint256" },
170
+ { name: "sponsoredAmount", type: "uint256", internalType: "uint256" },
171
+ { name: "contractAddress", type: "address", internalType: "address" },
172
+ { name: "refunded", type: "bool", internalType: "bool" },
173
+ ],
317
174
  },
318
175
  ],
319
176
  stateMutability: "view",
320
- type: "function",
321
177
  },
322
178
  {
323
- inputs: [{ internalType: "address", name: "user", type: "address" }],
179
+ type: "function",
324
180
  name: "getUserCreditGrants",
181
+ inputs: [{ name: "user", type: "address", internalType: "address" }],
325
182
  outputs: [
326
183
  {
327
- components: [
328
- { internalType: "uint256", name: "amount", type: "uint256" },
329
- { internalType: "address", name: "issuer", type: "address" },
330
- { internalType: "address", name: "beneficiary", type: "address" },
331
- { internalType: "bool", name: "spent", type: "bool" },
332
- { internalType: "bool", name: "revoked", type: "bool" },
333
- ],
334
- internalType: "struct ILevrBetCreditManager.CreditGrant[]",
335
184
  name: "",
336
185
  type: "tuple[]",
186
+ internalType: "struct ILevrBetCreditManager.CreditGrant[]",
187
+ components: [
188
+ { name: "amount", type: "uint256", internalType: "uint256" },
189
+ { name: "issuer", type: "address", internalType: "address" },
190
+ { name: "beneficiary", type: "address", internalType: "address" },
191
+ { name: "spent", type: "bool", internalType: "bool" },
192
+ { name: "revoked", type: "bool", internalType: "bool" },
193
+ ],
337
194
  },
338
195
  ],
339
196
  stateMutability: "view",
340
- type: "function",
341
197
  },
342
198
  {
343
- inputs: [{ internalType: "address", name: "user", type: "address" }],
199
+ type: "function",
344
200
  name: "getUserCreditGrantsQueue",
345
- outputs: [{ internalType: "uint256[]", name: "", type: "uint256[]" }],
201
+ inputs: [{ name: "user", type: "address", internalType: "address" }],
202
+ outputs: [{ name: "", type: "uint256[]", internalType: "uint256[]" }],
346
203
  stateMutability: "view",
347
- type: "function",
348
204
  },
349
205
  {
350
- inputs: [{ internalType: "address", name: "user", type: "address" }],
206
+ type: "function",
351
207
  name: "getUserPendingCreditBalance",
352
- outputs: [{ internalType: "uint256", name: "total", type: "uint256" }],
208
+ inputs: [{ name: "user", type: "address", internalType: "address" }],
209
+ outputs: [{ name: "total", type: "uint256", internalType: "uint256" }],
353
210
  stateMutability: "view",
354
- type: "function",
355
211
  },
356
212
  {
357
- inputs: [{ internalType: "address", name: "user", type: "address" }],
213
+ type: "function",
358
214
  name: "getUserPositionIds",
359
- outputs: [{ internalType: "bytes32[]", name: "", type: "bytes32[]" }],
215
+ inputs: [{ name: "user", type: "address", internalType: "address" }],
216
+ outputs: [{ name: "", type: "bytes32[]", internalType: "bytes32[]" }],
360
217
  stateMutability: "view",
361
- type: "function",
362
218
  },
363
219
  {
364
- inputs: [{ internalType: "address", name: "user", type: "address" }],
220
+ type: "function",
365
221
  name: "getUserSponsoredPositions",
222
+ inputs: [{ name: "user", type: "address", internalType: "address" }],
366
223
  outputs: [
367
224
  {
368
- components: [
369
- { internalType: "bytes32", name: "positionId", type: "bytes32" },
370
- { internalType: "bytes32", name: "leaf", type: "bytes32" },
371
- { internalType: "uint256", name: "campaignId", type: "uint256" },
372
- { internalType: "uint256", name: "creditId", type: "uint256" },
373
- { internalType: "uint256", name: "sponsoredAmount", type: "uint256" },
374
- { internalType: "address", name: "contractAddress", type: "address" },
375
- { internalType: "bool", name: "refunded", type: "bool" },
376
- ],
377
- internalType: "struct ILevrBetCreditManager.SponsoredPosition[]",
378
225
  name: "",
379
226
  type: "tuple[]",
227
+ internalType: "struct ILevrBetCreditManager.SponsoredPosition[]",
228
+ components: [
229
+ { name: "positionId", type: "bytes32", internalType: "bytes32" },
230
+ { name: "leaf", type: "bytes32", internalType: "bytes32" },
231
+ { name: "campaignId", type: "uint256", internalType: "uint256" },
232
+ { name: "creditId", type: "uint256", internalType: "uint256" },
233
+ { name: "sponsoredAmount", type: "uint256", internalType: "uint256" },
234
+ { name: "contractAddress", type: "address", internalType: "address" },
235
+ { name: "refunded", type: "bool", internalType: "bool" },
236
+ ],
380
237
  },
381
238
  ],
382
239
  stateMutability: "view",
383
- type: "function",
384
240
  },
385
241
  {
242
+ type: "function",
243
+ name: "isCampaignCreditClaimed",
386
244
  inputs: [
387
- { internalType: "uint256", name: "campaignId", type: "uint256" },
388
- { internalType: "address", name: "user", type: "address" },
389
- { internalType: "uint256", name: "amount", type: "uint256" },
390
- { internalType: "uint256", name: "nonce", type: "uint256" },
245
+ { name: "campaignId", type: "uint256", internalType: "uint256" },
246
+ { name: "user", type: "address", internalType: "address" },
247
+ { name: "amount", type: "uint256", internalType: "uint256" },
248
+ { name: "nonce", type: "uint256", internalType: "uint256" },
391
249
  ],
392
- name: "isCampaignCreditClaimed",
393
- outputs: [{ internalType: "bool", name: "", type: "bool" }],
250
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
394
251
  stateMutability: "view",
395
- type: "function",
396
252
  },
397
253
  {
398
- inputs: [],
254
+ type: "function",
399
255
  name: "levrConfigProvider",
400
- outputs: [{ internalType: "address", name: "", type: "address" }],
256
+ inputs: [],
257
+ outputs: [{ name: "", type: "address", internalType: "address" }],
401
258
  stateMutability: "view",
402
- type: "function",
403
259
  },
404
260
  {
405
- inputs: [{ internalType: "bytes32", name: "positionId", type: "bytes32" }],
261
+ type: "function",
406
262
  name: "redeemSponsoredPosition",
263
+ inputs: [{ name: "positionId", type: "bytes32", internalType: "bytes32" }],
407
264
  outputs: [],
408
265
  stateMutability: "nonpayable",
409
- type: "function",
410
266
  },
411
267
  {
412
- inputs: [{ internalType: "bytes32[]", name: "positionIds", type: "bytes32[]" }],
268
+ type: "function",
413
269
  name: "redeemSponsoredPositions",
270
+ inputs: [{ name: "positionIds", type: "bytes32[]", internalType: "bytes32[]" }],
414
271
  outputs: [],
415
272
  stateMutability: "nonpayable",
416
- type: "function",
417
273
  },
418
274
  {
275
+ type: "function",
276
+ name: "revokeCredit",
419
277
  inputs: [
420
- { internalType: "address", name: "user", type: "address" },
421
- { internalType: "uint256", name: "creditId", type: "uint256" },
278
+ { name: "user", type: "address", internalType: "address" },
279
+ { name: "creditId", type: "uint256", internalType: "uint256" },
422
280
  ],
423
- name: "revokeCredit",
424
281
  outputs: [],
425
282
  stateMutability: "nonpayable",
426
- type: "function",
427
283
  },
428
284
  {
285
+ type: "function",
286
+ name: "setCreditCampaignPaused",
429
287
  inputs: [
430
- { internalType: "uint256", name: "campaignId", type: "uint256" },
431
- { internalType: "bool", name: "pause", type: "bool" },
288
+ { name: "campaignId", type: "uint256", internalType: "uint256" },
289
+ { name: "pause", type: "bool", internalType: "bool" },
432
290
  ],
433
- name: "setCreditCampaignPaused",
434
291
  outputs: [],
435
292
  stateMutability: "nonpayable",
436
- type: "function",
437
293
  },
438
294
  {
295
+ type: "function",
296
+ name: "setCreditCampaignUserPaused",
439
297
  inputs: [
440
- { internalType: "uint256", name: "campaignId", type: "uint256" },
441
- { internalType: "address", name: "user", type: "address" },
442
- { internalType: "bool", name: "pause", type: "bool" },
298
+ { name: "campaignId", type: "uint256", internalType: "uint256" },
299
+ { name: "user", type: "address", internalType: "address" },
300
+ { name: "pause", type: "bool", internalType: "bool" },
443
301
  ],
444
- name: "setCreditCampaignUserPaused",
445
302
  outputs: [],
446
303
  stateMutability: "nonpayable",
447
- type: "function",
448
304
  },
449
305
  {
306
+ type: "function",
307
+ name: "setCreditors",
450
308
  inputs: [
451
- { internalType: "address[]", name: "_creditors", type: "address[]" },
452
- { internalType: "bool", name: "add", type: "bool" },
309
+ { name: "_creditors", type: "address[]", internalType: "address[]" },
310
+ { name: "add", type: "bool", internalType: "bool" },
453
311
  ],
454
- name: "setCreditors",
455
312
  outputs: [],
456
313
  stateMutability: "nonpayable",
457
- type: "function",
458
314
  },
459
315
  {
316
+ type: "function",
317
+ name: "spendCredits",
460
318
  inputs: [
461
- { internalType: "uint256", name: "creditId", type: "uint256" },
462
- { internalType: "bytes32", name: "gameMarketId", type: "bytes32" },
463
- { internalType: "bytes16", name: "levrMarketId", type: "bytes16" },
464
- { internalType: "uint256", name: "minTokensOut", type: "uint256" },
465
- { internalType: "enum Side", name: "side", type: "uint8" },
466
- { internalType: "uint8", name: "leverage", type: "uint8" },
467
- { internalType: "bytes32[]", name: "userWhitelistProof", type: "bytes32[]" },
468
- { internalType: "bytes32[]", name: "contractWhitelistProof", type: "bytes32[]" },
319
+ { name: "creditId", type: "uint256", internalType: "uint256" },
320
+ { name: "gameMarketId", type: "bytes32", internalType: "bytes32" },
321
+ { name: "levrMarketId", type: "bytes16", internalType: "bytes16" },
322
+ { name: "minTokensOut", type: "uint256", internalType: "uint256" },
323
+ { name: "side", type: "uint8", internalType: "enum Side" },
324
+ { name: "leverage", type: "uint8", internalType: "uint8" },
325
+ { name: "userWhitelistProof", type: "bytes32[]", internalType: "bytes32[]" },
326
+ { name: "contractWhitelistProof", type: "bytes32[]", internalType: "bytes32[]" },
469
327
  ],
470
- name: "spendCredits",
471
328
  outputs: [],
472
329
  stateMutability: "nonpayable",
473
- type: "function",
474
330
  },
475
331
  {
332
+ type: "function",
333
+ name: "spendCredits",
476
334
  inputs: [
477
- { internalType: "uint256", name: "campaignId", type: "uint256" },
478
- { internalType: "bytes32[]", name: "proof", type: "bytes32[]" },
479
- { internalType: "uint256", name: "claimNonce", type: "uint256" },
480
- { internalType: "bytes32", name: "gameMarketId", type: "bytes32" },
481
- { internalType: "bytes16", name: "levrMarketId", type: "bytes16" },
482
- { internalType: "uint256", name: "assetAmount", type: "uint256" },
483
- { internalType: "uint256", name: "minTokensOut", type: "uint256" },
484
- { internalType: "enum Side", name: "side", type: "uint8" },
485
- { internalType: "uint8", name: "leverage", type: "uint8" },
486
- { internalType: "bytes32[]", name: "userWhitelistProof", type: "bytes32[]" },
487
- { internalType: "bytes32[]", name: "contractWhitelistProof", type: "bytes32[]" },
335
+ { name: "campaignId", type: "uint256", internalType: "uint256" },
336
+ { name: "proof", type: "bytes32[]", internalType: "bytes32[]" },
337
+ { name: "claimNonce", type: "uint256", internalType: "uint256" },
338
+ { name: "gameMarketId", type: "bytes32", internalType: "bytes32" },
339
+ { name: "levrMarketId", type: "bytes16", internalType: "bytes16" },
340
+ { name: "assetAmount", type: "uint256", internalType: "uint256" },
341
+ { name: "minTokensOut", type: "uint256", internalType: "uint256" },
342
+ { name: "side", type: "uint8", internalType: "enum Side" },
343
+ { name: "leverage", type: "uint8", internalType: "uint8" },
344
+ { name: "userWhitelistProof", type: "bytes32[]", internalType: "bytes32[]" },
345
+ { name: "contractWhitelistProof", type: "bytes32[]", internalType: "bytes32[]" },
488
346
  ],
489
- name: "spendCredits",
490
347
  outputs: [],
491
348
  stateMutability: "nonpayable",
492
- type: "function",
493
349
  },
494
350
  {
495
- inputs: [{ internalType: "bytes4", name: "interfaceId", type: "bytes4" }],
351
+ type: "function",
496
352
  name: "supportsInterface",
497
- outputs: [{ internalType: "bool", name: "", type: "bool" }],
353
+ inputs: [{ name: "interfaceId", type: "bytes4", internalType: "bytes4" }],
354
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
498
355
  stateMutability: "view",
499
- type: "function",
500
356
  },
501
357
  {
502
- inputs: [{ internalType: "address", name: "newLevrConfigProvider", type: "address" }],
358
+ type: "function",
503
359
  name: "updateLevrConfigProvider",
360
+ inputs: [{ name: "newLevrConfigProvider", type: "address", internalType: "address" }],
504
361
  outputs: [],
505
362
  stateMutability: "nonpayable",
506
- type: "function",
507
363
  },
508
364
  {
509
- inputs: [],
365
+ type: "function",
510
366
  name: "usdcToken",
511
- outputs: [{ internalType: "contract IERC20", name: "", type: "address" }],
367
+ inputs: [],
368
+ outputs: [{ name: "", type: "address", internalType: "contract IERC20" }],
512
369
  stateMutability: "view",
513
- type: "function",
514
370
  },
515
371
  {
516
- inputs: [{ internalType: "address", name: "user", type: "address" }],
372
+ type: "function",
517
373
  name: "userCreditId",
518
- outputs: [{ internalType: "uint256", name: "creditId", type: "uint256" }],
374
+ inputs: [{ name: "user", type: "address", internalType: "address" }],
375
+ outputs: [{ name: "creditId", type: "uint256", internalType: "uint256" }],
519
376
  stateMutability: "view",
520
- type: "function",
521
377
  },
522
378
  {
379
+ type: "function",
380
+ name: "withdrawFromFundManager",
523
381
  inputs: [
524
- { internalType: "address", name: "token", type: "address" },
525
- { internalType: "address", name: "to", type: "address" },
526
- { internalType: "uint256", name: "amount", type: "uint256" },
382
+ { name: "token", type: "address", internalType: "address" },
383
+ { name: "to", type: "address", internalType: "address" },
384
+ { name: "amount", type: "uint256", internalType: "uint256" },
527
385
  ],
528
- name: "withdrawFromFundManager",
529
386
  outputs: [],
530
387
  stateMutability: "nonpayable",
531
- type: "function",
532
388
  },
389
+ {
390
+ type: "event",
391
+ name: "BlacklistUpdated",
392
+ inputs: [
393
+ { name: "user", type: "address", indexed: true, internalType: "address" },
394
+ { name: "blacklisted", type: "bool", indexed: false, internalType: "bool" },
395
+ ],
396
+ anonymous: false,
397
+ },
398
+ {
399
+ type: "event",
400
+ name: "CreditCampaignCreated",
401
+ inputs: [
402
+ { name: "campaignId", type: "uint256", indexed: true, internalType: "uint256" },
403
+ { name: "merkleRoot", type: "bytes32", indexed: true, internalType: "bytes32" },
404
+ { name: "issuer", type: "address", indexed: true, internalType: "address" },
405
+ { name: "totalCredits", type: "uint256", indexed: false, internalType: "uint256" },
406
+ ],
407
+ anonymous: false,
408
+ },
409
+ {
410
+ type: "event",
411
+ name: "CreditCampaignPaused",
412
+ inputs: [
413
+ { name: "campaignId", type: "uint256", indexed: true, internalType: "uint256" },
414
+ { name: "paused", type: "bool", indexed: false, internalType: "bool" },
415
+ ],
416
+ anonymous: false,
417
+ },
418
+ {
419
+ type: "event",
420
+ name: "CreditCampaignUserPaused",
421
+ inputs: [
422
+ { name: "campaignId", type: "uint256", indexed: true, internalType: "uint256" },
423
+ { name: "user", type: "address", indexed: true, internalType: "address" },
424
+ { name: "paused", type: "bool", indexed: false, internalType: "bool" },
425
+ ],
426
+ anonymous: false,
427
+ },
428
+ {
429
+ type: "event",
430
+ name: "CreditRevoked",
431
+ inputs: [
432
+ { name: "user", type: "address", indexed: true, internalType: "address" },
433
+ { name: "creditId", type: "uint256", indexed: true, internalType: "uint256" },
434
+ ],
435
+ anonymous: false,
436
+ },
437
+ {
438
+ type: "event",
439
+ name: "CreditorUpdated",
440
+ inputs: [
441
+ { name: "creditor", type: "address", indexed: true, internalType: "address" },
442
+ { name: "added", type: "bool", indexed: false, internalType: "bool" },
443
+ ],
444
+ anonymous: false,
445
+ },
446
+ {
447
+ type: "event",
448
+ name: "CreditsSpent",
449
+ inputs: [
450
+ { name: "campaignId", type: "uint256", indexed: true, internalType: "uint256" },
451
+ { name: "creditId", type: "uint256", indexed: true, internalType: "uint256" },
452
+ { name: "positionId", type: "bytes32", indexed: true, internalType: "bytes32" },
453
+ { name: "user", type: "address", indexed: false, internalType: "address" },
454
+ { name: "creditAmount", type: "uint256", indexed: false, internalType: "uint256" },
455
+ { name: "levrMarketId", type: "bytes16", indexed: false, internalType: "bytes16" },
456
+ { name: "side", type: "uint8", indexed: false, internalType: "enum Side" },
457
+ { name: "leverage", type: "uint8", indexed: false, internalType: "uint8" },
458
+ { name: "claimNonce", type: "uint256", indexed: false, internalType: "uint256" },
459
+ ],
460
+ anonymous: false,
461
+ },
462
+ {
463
+ type: "event",
464
+ name: "LevrConfigProviderUpdated",
465
+ inputs: [
466
+ { name: "prevProvider", type: "address", indexed: true, internalType: "address" },
467
+ { name: "newProvider", type: "address", indexed: true, internalType: "address" },
468
+ ],
469
+ anonymous: false,
470
+ },
471
+ {
472
+ type: "event",
473
+ name: "SponsoredPositionRedeemed",
474
+ inputs: [
475
+ { name: "positionId", type: "bytes32", indexed: true, internalType: "bytes32" },
476
+ { name: "user", type: "address", indexed: true, internalType: "address" },
477
+ { name: "campaignId", type: "uint256", indexed: false, internalType: "uint256" },
478
+ { name: "leaf", type: "bytes32", indexed: false, internalType: "bytes32" },
479
+ { name: "creditId", type: "uint256", indexed: false, internalType: "uint256" },
480
+ { name: "amountRedeemed", type: "uint256", indexed: false, internalType: "uint256" },
481
+ { name: "userNetRedeemed", type: "uint256", indexed: false, internalType: "uint256" },
482
+ { name: "shortfall", type: "uint256", indexed: false, internalType: "uint256" },
483
+ { name: "refunded", type: "bool", indexed: false, internalType: "bool" },
484
+ ],
485
+ anonymous: false,
486
+ },
487
+ {
488
+ type: "event",
489
+ name: "UserCredited",
490
+ inputs: [
491
+ { name: "creditId", type: "uint256", indexed: true, internalType: "uint256" },
492
+ { name: "user", type: "address", indexed: true, internalType: "address" },
493
+ { name: "amount", type: "uint256", indexed: false, internalType: "uint256" },
494
+ { name: "issuer", type: "address", indexed: true, internalType: "address" },
495
+ ],
496
+ anonymous: false,
497
+ },
498
+ { type: "error", name: "LBCM_CAMPAIGN_BUDGET_EXCEEDED", inputs: [] },
499
+ { type: "error", name: "LBCM_CAMPAIGN_PAUSED", inputs: [] },
500
+ { type: "error", name: "LBCM_CAMPAIGN_USER_PAUSED", inputs: [] },
501
+ { type: "error", name: "LBCM_CAPPED_TOURNAMENT_NOT_ALLOWED", inputs: [] },
502
+ { type: "error", name: "LBCM_CREDIT_ALREADY_CLAIMED", inputs: [] },
503
+ { type: "error", name: "LBCM_CREDIT_GRANT_ALREADY_SPENT", inputs: [] },
504
+ { type: "error", name: "LBCM_CREDIT_GRANT_REVOKED", inputs: [] },
505
+ { type: "error", name: "LBCM_GRANT_ABOVE_MAX", inputs: [] },
506
+ { type: "error", name: "LBCM_GRANT_BELOW_MIN", inputs: [] },
507
+ { type: "error", name: "LBCM_INSUFFICIENT_CREDITS_SPENT", inputs: [] },
508
+ { type: "error", name: "LBCM_INSUFFICIENT_PAYOUT_FOR_SPONSORSHIP", inputs: [] },
509
+ { type: "error", name: "LBCM_INVALID_ADDRESS", inputs: [] },
510
+ { type: "error", name: "LBCM_INVALID_BENEFICIARY", inputs: [] },
511
+ { type: "error", name: "LBCM_INVALID_CREDITS", inputs: [] },
512
+ { type: "error", name: "LBCM_INVALID_CREDIT_CAMPAIGN", inputs: [] },
513
+ { type: "error", name: "LBCM_INVALID_CREDIT_GRANT", inputs: [] },
514
+ { type: "error", name: "LBCM_INVALID_CREDIT_PROOF", inputs: [] },
515
+ { type: "error", name: "LBCM_INVALID_LEVR_MARKET_ID", inputs: [] },
516
+ { type: "error", name: "LBCM_INVALID_MERKLE_ROOT", inputs: [] },
517
+ { type: "error", name: "LBCM_INVALID_SPEND", inputs: [] },
518
+ { type: "error", name: "LBCM_MARKET_MAKER_NOT_ALLOWED", inputs: [] },
519
+ { type: "error", name: "LBCM_NON_USDC_MARKET", inputs: [] },
520
+ { type: "error", name: "LBCM_NOT_CREDITOR", inputs: [] },
521
+ { type: "error", name: "LBCM_NOT_LEVR_ADMIN", inputs: [] },
522
+ { type: "error", name: "LBCM_NO_CREDITS_TO_SPEND", inputs: [] },
523
+ { type: "error", name: "LBCM_SPEND_ABOVE_MAX", inputs: [] },
524
+ { type: "error", name: "LBCM_SPEND_BELOW_MIN", inputs: [] },
525
+ { type: "error", name: "LBCM_UNEXPECTED_CAMPAIGN_ID", inputs: [] },
526
+ { type: "error", name: "LBCM_USERS_LIMIT_EXCEEDED", inputs: [] },
527
+ { type: "error", name: "LBCM_USER_BLACKLISTED", inputs: [{ name: "user", type: "address", internalType: "address" }] },
528
+ { type: "error", name: "LBCM_USER_NOT_WHITELISTED", inputs: [] },
529
+ { type: "error", name: "LB_CONFIG_INVALID_INTERFACE", inputs: [] },
530
+ { type: "error", name: "LB_CONFIG_PROVIDER_NOT_CONTRACT", inputs: [] },
531
+ { type: "error", name: "LB_NOT_LEVR_ADMIN", inputs: [] },
532
+ { type: "error", name: "LM_INVALID_PROGRESS_BPS", inputs: [] },
533
+ { type: "error", name: "SafeERC20FailedOperation", inputs: [{ name: "token", type: "address", internalType: "address" }] },
533
534
  ];
534
535
  //# sourceMappingURL=LevrBetCreditManager.js.map