@levrbet/shared 0.5.54 → 0.5.56

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