@levrbet/shared 0.5.38 → 0.5.40

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.
@@ -1,71 +1,526 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = [
4
- { "type": "constructor", "inputs": [{ "name": "configProvider", "type": "address", "internalType": "address" }, { "name": "usdcTokenAddress", "type": "address", "internalType": "address" }], "stateMutability": "nonpayable" },
5
- { "type": "function", "name": "CREDIT_USERS_LIMIT", "inputs": [], "outputs": [{ "name": "", "type": "uint8", "internalType": "uint8" }], "stateMutability": "view" },
6
- { "type": "function", "name": "adminRedeemSponsoredPosition", "inputs": [{ "name": "positionId", "type": "bytes32", "internalType": "bytes32" }, { "name": "beneficiary", "type": "address", "internalType": "address" }], "outputs": [], "stateMutability": "nonpayable" },
7
- { "type": "function", "name": "blacklistUsers", "inputs": [{ "name": "users", "type": "address[]", "internalType": "address[]" }, { "name": "blacklist", "type": "bool", "internalType": "bool" }], "outputs": [], "stateMutability": "nonpayable" },
8
- { "type": "function", "name": "blacklisted", "inputs": [{ "name": "user", "type": "address", "internalType": "address" }], "outputs": [{ "name": "banned", "type": "bool", "internalType": "bool" }], "stateMutability": "view" },
9
- { "type": "function", "name": "campaignCreditClaims", "inputs": [{ "name": "campaignId", "type": "uint256", "internalType": "uint256" }, { "name": "leaf", "type": "bytes32", "internalType": "bytes32" }], "outputs": [{ "name": "claimed", "type": "bool", "internalType": "bool" }], "stateMutability": "view" },
10
- { "type": "function", "name": "createCreditCampaign", "inputs": [{ "name": "root", "type": "bytes32", "internalType": "bytes32" }, { "name": "issuer", "type": "address", "internalType": "address" }, { "name": "totalCredits", "type": "uint256", "internalType": "uint256" }], "outputs": [], "stateMutability": "nonpayable" },
11
- { "type": "function", "name": "creditCampaignId", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" },
12
- { "type": "function", "name": "creditUsers", "inputs": [{ "name": "users", "type": "address[]", "internalType": "address[]" }, { "name": "amounts", "type": "uint256[]", "internalType": "uint256[]" }, { "name": "issuer", "type": "address", "internalType": "address" }], "outputs": [], "stateMutability": "nonpayable" },
13
- { "type": "function", "name": "depositToPool", "inputs": [{ "name": "issuer", "type": "address", "internalType": "address" }, { "name": "amount", "type": "uint256", "internalType": "uint256" }], "outputs": [], "stateMutability": "nonpayable" },
14
- { "type": "function", "name": "getAuthorizedCreditors", "inputs": [], "outputs": [{ "name": "", "type": "address[]", "internalType": "address[]" }], "stateMutability": "view" },
15
- { "type": "function", "name": "getCreditCampaign", "inputs": [{ "name": "campaignId", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "tuple", "internalType": "struct ILevrBetCreditManager.CreditCampaign", "components": [{ "name": "merkleRoot", "type": "bytes32", "internalType": "bytes32" }, { "name": "totalCredits", "type": "uint256", "internalType": "uint256" }, { "name": "usedCredits", "type": "uint256", "internalType": "uint256" }, { "name": "issuer", "type": "address", "internalType": "address" }, { "name": "paused", "type": "bool", "internalType": "bool" }] }], "stateMutability": "view" },
16
- { "type": "function", "name": "getCreditGrant", "inputs": [{ "name": "user", "type": "address", "internalType": "address" }, { "name": "creditId", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "tuple", "internalType": "struct ILevrBetCreditManager.CreditGrant", "components": [{ "name": "amount", "type": "uint256", "internalType": "uint256" }, { "name": "issuer", "type": "address", "internalType": "address" }, { "name": "beneficiary", "type": "address", "internalType": "address" }, { "name": "spent", "type": "bool", "internalType": "bool" }, { "name": "revoked", "type": "bool", "internalType": "bool" }] }], "stateMutability": "view" },
17
- { "type": "function", "name": "getSponsoredPosition", "inputs": [{ "name": "positionId", "type": "bytes32", "internalType": "bytes32" }], "outputs": [{ "name": "", "type": "tuple", "internalType": "struct ILevrBetCreditManager.SponsoredPosition", "components": [{ "name": "positionId", "type": "bytes32", "internalType": "bytes32" }, { "name": "leaf", "type": "bytes32", "internalType": "bytes32" }, { "name": "campaignId", "type": "uint256", "internalType": "uint256" }, { "name": "creditId", "type": "uint256", "internalType": "uint256" }, { "name": "sponsoredAmount", "type": "uint256", "internalType": "uint256" }, { "name": "contractAddress", "type": "address", "internalType": "address" }, { "name": "refunded", "type": "bool", "internalType": "bool" }] }], "stateMutability": "view" },
18
- { "type": "function", "name": "getUserCreditGrants", "inputs": [{ "name": "user", "type": "address", "internalType": "address" }], "outputs": [{ "name": "", "type": "tuple[]", "internalType": "struct ILevrBetCreditManager.CreditGrant[]", "components": [{ "name": "amount", "type": "uint256", "internalType": "uint256" }, { "name": "issuer", "type": "address", "internalType": "address" }, { "name": "beneficiary", "type": "address", "internalType": "address" }, { "name": "spent", "type": "bool", "internalType": "bool" }, { "name": "revoked", "type": "bool", "internalType": "bool" }] }], "stateMutability": "view" },
19
- { "type": "function", "name": "getUserCreditGrantsQueue", "inputs": [{ "name": "user", "type": "address", "internalType": "address" }], "outputs": [{ "name": "", "type": "uint256[]", "internalType": "uint256[]" }], "stateMutability": "view" },
20
- { "type": "function", "name": "getUserPendingCreditBalance", "inputs": [{ "name": "user", "type": "address", "internalType": "address" }], "outputs": [{ "name": "total", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" },
21
- { "type": "function", "name": "getUserPositionIds", "inputs": [{ "name": "user", "type": "address", "internalType": "address" }], "outputs": [{ "name": "", "type": "bytes32[]", "internalType": "bytes32[]" }], "stateMutability": "view" },
22
- { "type": "function", "name": "getUserSponsoredPositions", "inputs": [{ "name": "user", "type": "address", "internalType": "address" }], "outputs": [{ "name": "", "type": "tuple[]", "internalType": "struct ILevrBetCreditManager.SponsoredPosition[]", "components": [{ "name": "positionId", "type": "bytes32", "internalType": "bytes32" }, { "name": "leaf", "type": "bytes32", "internalType": "bytes32" }, { "name": "campaignId", "type": "uint256", "internalType": "uint256" }, { "name": "creditId", "type": "uint256", "internalType": "uint256" }, { "name": "sponsoredAmount", "type": "uint256", "internalType": "uint256" }, { "name": "contractAddress", "type": "address", "internalType": "address" }, { "name": "refunded", "type": "bool", "internalType": "bool" }] }], "stateMutability": "view" },
23
- { "type": "function", "name": "isCampaignCreditClaimed", "inputs": [{ "name": "campaignId", "type": "uint256", "internalType": "uint256" }, { "name": "user", "type": "address", "internalType": "address" }, { "name": "amount", "type": "uint256", "internalType": "uint256" }, { "name": "nonce", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], "stateMutability": "view" },
24
- { "type": "function", "name": "levrConfigProvider", "inputs": [], "outputs": [{ "name": "", "type": "address", "internalType": "address" }], "stateMutability": "view" },
25
- { "type": "function", "name": "redeemSponsoredPosition", "inputs": [{ "name": "positionId", "type": "bytes32", "internalType": "bytes32" }], "outputs": [], "stateMutability": "nonpayable" },
26
- { "type": "function", "name": "revokeCredit", "inputs": [{ "name": "user", "type": "address", "internalType": "address" }, { "name": "creditId", "type": "uint256", "internalType": "uint256" }], "outputs": [], "stateMutability": "nonpayable" },
27
- { "type": "function", "name": "setCreditCampaignPaused", "inputs": [{ "name": "campaignId", "type": "uint256", "internalType": "uint256" }, { "name": "pause", "type": "bool", "internalType": "bool" }], "outputs": [], "stateMutability": "nonpayable" },
28
- { "type": "function", "name": "setCreditors", "inputs": [{ "name": "_creditors", "type": "address[]", "internalType": "address[]" }, { "name": "add", "type": "bool", "internalType": "bool" }], "outputs": [], "stateMutability": "nonpayable" },
29
- { "type": "function", "name": "spendCredits", "inputs": [{ "name": "gameMarketId", "type": "bytes32", "internalType": "bytes32" }, { "name": "levrMarketId", "type": "bytes16", "internalType": "bytes16" }, { "name": "minTokensOut", "type": "uint256", "internalType": "uint256" }, { "name": "side", "type": "uint8", "internalType": "enum Side" }, { "name": "leverage", "type": "uint8", "internalType": "uint8" }, { "name": "whitelistProof", "type": "bytes32[]", "internalType": "bytes32[]" }], "outputs": [], "stateMutability": "nonpayable" },
30
- { "type": "function", "name": "spendCredits", "inputs": [{ "name": "campaignId", "type": "uint256", "internalType": "uint256" }, { "name": "proof", "type": "bytes32[]", "internalType": "bytes32[]" }, { "name": "claimNonce", "type": "uint256", "internalType": "uint256" }, { "name": "gameMarketId", "type": "bytes32", "internalType": "bytes32" }, { "name": "levrMarketId", "type": "bytes16", "internalType": "bytes16" }, { "name": "assetAmount", "type": "uint256", "internalType": "uint256" }, { "name": "minTokensOut", "type": "uint256", "internalType": "uint256" }, { "name": "side", "type": "uint8", "internalType": "enum Side" }, { "name": "leverage", "type": "uint8", "internalType": "uint8" }, { "name": "whitelistProof", "type": "bytes32[]", "internalType": "bytes32[]" }], "outputs": [], "stateMutability": "nonpayable" },
31
- { "type": "function", "name": "supportsInterface", "inputs": [{ "name": "interfaceId", "type": "bytes4", "internalType": "bytes4" }], "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], "stateMutability": "view" },
32
- { "type": "function", "name": "updateLevrConfigProvider", "inputs": [{ "name": "newLevrConfigProvider", "type": "address", "internalType": "address" }], "outputs": [], "stateMutability": "nonpayable" },
33
- { "type": "function", "name": "usdcToken", "inputs": [], "outputs": [{ "name": "", "type": "address", "internalType": "contract IERC20" }], "stateMutability": "view" },
34
- { "type": "function", "name": "userCreditId", "inputs": [{ "name": "user", "type": "address", "internalType": "address" }], "outputs": [{ "name": "creditId", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" },
35
- { "type": "function", "name": "withdrawFromFundManager", "inputs": [{ "name": "token", "type": "address", "internalType": "address" }, { "name": "to", "type": "address", "internalType": "address" }, { "name": "amount", "type": "uint256", "internalType": "uint256" }], "outputs": [], "stateMutability": "nonpayable" },
36
- { "type": "event", "name": "BlacklistUpdated", "inputs": [{ "name": "user", "type": "address", "indexed": true, "internalType": "address" }, { "name": "blacklisted", "type": "bool", "indexed": false, "internalType": "bool" }], "anonymous": false },
37
- { "type": "event", "name": "CreditCampaignCreated", "inputs": [{ "name": "campaignId", "type": "uint256", "indexed": true, "internalType": "uint256" }, { "name": "merkleRoot", "type": "bytes32", "indexed": true, "internalType": "bytes32" }, { "name": "issuer", "type": "address", "indexed": true, "internalType": "address" }, { "name": "totalCredits", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false },
38
- { "type": "event", "name": "CreditCampaignPaused", "inputs": [{ "name": "campaignId", "type": "uint256", "indexed": true, "internalType": "uint256" }, { "name": "paused", "type": "bool", "indexed": false, "internalType": "bool" }], "anonymous": false },
39
- { "type": "event", "name": "CreditRevoked", "inputs": [{ "name": "user", "type": "address", "indexed": true, "internalType": "address" }, { "name": "creditId", "type": "uint256", "indexed": true, "internalType": "uint256" }], "anonymous": false },
40
- { "type": "event", "name": "CreditorUpdated", "inputs": [{ "name": "creditor", "type": "address", "indexed": true, "internalType": "address" }, { "name": "added", "type": "bool", "indexed": false, "internalType": "bool" }], "anonymous": false },
41
- { "type": "event", "name": "CreditsSpent", "inputs": [{ "name": "campaignId", "type": "uint256", "indexed": true, "internalType": "uint256" }, { "name": "creditId", "type": "uint256", "indexed": true, "internalType": "uint256" }, { "name": "positionId", "type": "bytes32", "indexed": true, "internalType": "bytes32" }, { "name": "user", "type": "address", "indexed": false, "internalType": "address" }, { "name": "creditAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "levrMarketId", "type": "bytes16", "indexed": false, "internalType": "bytes16" }, { "name": "side", "type": "uint8", "indexed": false, "internalType": "enum Side" }, { "name": "leverage", "type": "uint8", "indexed": false, "internalType": "uint8" }], "anonymous": false },
42
- { "type": "event", "name": "LevrConfigProviderUpdated", "inputs": [{ "name": "prevProvider", "type": "address", "indexed": true, "internalType": "address" }, { "name": "newProvider", "type": "address", "indexed": true, "internalType": "address" }], "anonymous": false },
43
- { "type": "event", "name": "SponsoredPositionRedeemed", "inputs": [{ "name": "positionId", "type": "bytes32", "indexed": true, "internalType": "bytes32" }, { "name": "user", "type": "address", "indexed": true, "internalType": "address" }, { "name": "campaignId", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "leaf", "type": "bytes32", "indexed": false, "internalType": "bytes32" }, { "name": "creditId", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "amountRedeemed", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "userNetRedeemed", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "shortfall", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "refunded", "type": "bool", "indexed": false, "internalType": "bool" }], "anonymous": false },
44
- { "type": "event", "name": "UserCredited", "inputs": [{ "name": "creditId", "type": "uint256", "indexed": true, "internalType": "uint256" }, { "name": "user", "type": "address", "indexed": true, "internalType": "address" }, { "name": "amount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "issuer", "type": "address", "indexed": true, "internalType": "address" }], "anonymous": false },
45
- { "type": "error", "name": "LBCM_CAMPAIGN_BUDGET_EXCEEDED", "inputs": [] },
46
- { "type": "error", "name": "LBCM_CAMPAIGN_PAUSED", "inputs": [] },
47
- { "type": "error", "name": "LBCM_CREDIT_ALREADY_CLAIMED", "inputs": [] },
48
- { "type": "error", "name": "LBCM_GRANT_BELOW_MIN", "inputs": [] },
49
- { "type": "error", "name": "LBCM_INSUFFICIENT_CREDITS_SPENT", "inputs": [] },
50
- { "type": "error", "name": "LBCM_INSUFFICIENT_PAYOUT_FOR_SPONSORSHIP", "inputs": [] },
51
- { "type": "error", "name": "LBCM_INVALID_ADDRESS", "inputs": [] },
52
- { "type": "error", "name": "LBCM_INVALID_BENEFICIARY", "inputs": [] },
53
- { "type": "error", "name": "LBCM_INVALID_CREDITS", "inputs": [] },
54
- { "type": "error", "name": "LBCM_INVALID_CREDIT_CAMPAIGN", "inputs": [] },
55
- { "type": "error", "name": "LBCM_INVALID_CREDIT_PROOF", "inputs": [] },
56
- { "type": "error", "name": "LBCM_INVALID_LEVR_MARKET_ID", "inputs": [] },
57
- { "type": "error", "name": "LBCM_INVALID_MERKLE_ROOT", "inputs": [] },
58
- { "type": "error", "name": "LBCM_INVALID_SPEND", "inputs": [] },
59
- { "type": "error", "name": "LBCM_NON_USDC_MARKET", "inputs": [] },
60
- { "type": "error", "name": "LBCM_NOT_CREDITOR", "inputs": [] },
61
- { "type": "error", "name": "LBCM_NOT_LEVR_ADMIN", "inputs": [] },
62
- { "type": "error", "name": "LBCM_NO_CREDITS_TO_SPEND", "inputs": [] },
63
- { "type": "error", "name": "LBCM_USERS_LIMIT_EXCEEDED", "inputs": [] },
64
- { "type": "error", "name": "LBCM_USER_BLACKLISTED", "inputs": [{ "name": "user", "type": "address", "internalType": "address" }] },
65
- { "type": "error", "name": "LB_CONFIG_INVALID_INTERFACE", "inputs": [] },
66
- { "type": "error", "name": "LB_CONFIG_PROVIDER_NOT_CONTRACT", "inputs": [] },
67
- { "type": "error", "name": "LB_NOT_LEVR_ADMIN", "inputs": [] },
68
- { "type": "error", "name": "LM_INVALID_PROGRESS_BPS", "inputs": [] },
69
- { "type": "error", "name": "SafeERC20FailedOperation", "inputs": [{ "name": "token", "type": "address", "internalType": "address" }] },
4
+ {
5
+ type: "constructor",
6
+ inputs: [
7
+ { name: "configProvider", type: "address", internalType: "address" },
8
+ { name: "usdcTokenAddress", type: "address", internalType: "address" },
9
+ ],
10
+ stateMutability: "nonpayable",
11
+ },
12
+ {
13
+ type: "function",
14
+ name: "CREDIT_USERS_LIMIT",
15
+ inputs: [],
16
+ outputs: [{ name: "", type: "uint8", internalType: "uint8" }],
17
+ stateMutability: "view",
18
+ },
19
+ {
20
+ type: "function",
21
+ name: "adminRedeemSponsoredPosition",
22
+ inputs: [
23
+ { name: "positionId", type: "bytes32", internalType: "bytes32" },
24
+ { name: "beneficiary", type: "address", internalType: "address" },
25
+ ],
26
+ outputs: [],
27
+ stateMutability: "nonpayable",
28
+ },
29
+ {
30
+ type: "function",
31
+ name: "blacklistUsers",
32
+ inputs: [
33
+ { name: "users", type: "address[]", internalType: "address[]" },
34
+ { name: "blacklist", type: "bool", internalType: "bool" },
35
+ ],
36
+ outputs: [],
37
+ stateMutability: "nonpayable",
38
+ },
39
+ {
40
+ type: "function",
41
+ name: "blacklisted",
42
+ inputs: [{ name: "user", type: "address", internalType: "address" }],
43
+ outputs: [{ name: "banned", type: "bool", internalType: "bool" }],
44
+ stateMutability: "view",
45
+ },
46
+ {
47
+ type: "function",
48
+ name: "campaignCreditClaims",
49
+ inputs: [
50
+ { name: "campaignId", type: "uint256", internalType: "uint256" },
51
+ { name: "leaf", type: "bytes32", internalType: "bytes32" },
52
+ ],
53
+ outputs: [{ name: "claimed", type: "bool", internalType: "bool" }],
54
+ stateMutability: "view",
55
+ },
56
+ {
57
+ type: "function",
58
+ name: "createCreditCampaign",
59
+ 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" },
64
+ ],
65
+ outputs: [],
66
+ stateMutability: "nonpayable",
67
+ },
68
+ {
69
+ type: "function",
70
+ name: "creditCampaignId",
71
+ inputs: [],
72
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
73
+ stateMutability: "view",
74
+ },
75
+ {
76
+ type: "function",
77
+ name: "creditUsers",
78
+ inputs: [
79
+ { name: "users", type: "address[]", internalType: "address[]" },
80
+ { name: "amounts", type: "uint256[]", internalType: "uint256[]" },
81
+ { name: "issuer", type: "address", internalType: "address" },
82
+ ],
83
+ outputs: [],
84
+ stateMutability: "nonpayable",
85
+ },
86
+ {
87
+ type: "function",
88
+ name: "depositToPool",
89
+ inputs: [
90
+ { name: "issuer", type: "address", internalType: "address" },
91
+ { name: "amount", type: "uint256", internalType: "uint256" },
92
+ ],
93
+ outputs: [],
94
+ stateMutability: "nonpayable",
95
+ },
96
+ {
97
+ type: "function",
98
+ name: "getAuthorizedCreditors",
99
+ inputs: [],
100
+ outputs: [{ name: "", type: "address[]", internalType: "address[]" }],
101
+ stateMutability: "view",
102
+ },
103
+ {
104
+ type: "function",
105
+ name: "getCampaignUserPaused",
106
+ inputs: [
107
+ { name: "campaignId", type: "uint256", internalType: "uint256" },
108
+ { name: "user", type: "address", internalType: "address" },
109
+ ],
110
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
111
+ stateMutability: "view",
112
+ },
113
+ {
114
+ type: "function",
115
+ name: "getCreditCampaign",
116
+ inputs: [{ name: "campaignId", type: "uint256", internalType: "uint256" }],
117
+ outputs: [
118
+ {
119
+ name: "",
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
+ ],
129
+ },
130
+ ],
131
+ stateMutability: "view",
132
+ },
133
+ {
134
+ type: "function",
135
+ name: "getCreditGrant",
136
+ inputs: [
137
+ { name: "user", type: "address", internalType: "address" },
138
+ { name: "creditId", type: "uint256", internalType: "uint256" },
139
+ ],
140
+ outputs: [
141
+ {
142
+ name: "",
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
+ ],
152
+ },
153
+ ],
154
+ stateMutability: "view",
155
+ },
156
+ {
157
+ type: "function",
158
+ name: "getSponsoredPosition",
159
+ inputs: [{ name: "positionId", type: "bytes32", internalType: "bytes32" }],
160
+ outputs: [
161
+ {
162
+ name: "",
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
+ ],
174
+ },
175
+ ],
176
+ stateMutability: "view",
177
+ },
178
+ {
179
+ type: "function",
180
+ name: "getUserCreditGrants",
181
+ inputs: [{ name: "user", type: "address", internalType: "address" }],
182
+ outputs: [
183
+ {
184
+ name: "",
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
+ ],
194
+ },
195
+ ],
196
+ stateMutability: "view",
197
+ },
198
+ {
199
+ type: "function",
200
+ name: "getUserCreditGrantsQueue",
201
+ inputs: [{ name: "user", type: "address", internalType: "address" }],
202
+ outputs: [{ name: "", type: "uint256[]", internalType: "uint256[]" }],
203
+ stateMutability: "view",
204
+ },
205
+ {
206
+ type: "function",
207
+ name: "getUserPendingCreditBalance",
208
+ inputs: [{ name: "user", type: "address", internalType: "address" }],
209
+ outputs: [{ name: "total", type: "uint256", internalType: "uint256" }],
210
+ stateMutability: "view",
211
+ },
212
+ {
213
+ type: "function",
214
+ name: "getUserPositionIds",
215
+ inputs: [{ name: "user", type: "address", internalType: "address" }],
216
+ outputs: [{ name: "", type: "bytes32[]", internalType: "bytes32[]" }],
217
+ stateMutability: "view",
218
+ },
219
+ {
220
+ type: "function",
221
+ name: "getUserSponsoredPositions",
222
+ inputs: [{ name: "user", type: "address", internalType: "address" }],
223
+ outputs: [
224
+ {
225
+ name: "",
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
+ ],
237
+ },
238
+ ],
239
+ stateMutability: "view",
240
+ },
241
+ {
242
+ type: "function",
243
+ name: "isCampaignCreditClaimed",
244
+ 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" },
249
+ ],
250
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
251
+ stateMutability: "view",
252
+ },
253
+ {
254
+ type: "function",
255
+ name: "levrConfigProvider",
256
+ inputs: [],
257
+ outputs: [{ name: "", type: "address", internalType: "address" }],
258
+ stateMutability: "view",
259
+ },
260
+ {
261
+ type: "function",
262
+ name: "redeemSponsoredPosition",
263
+ inputs: [{ name: "positionId", type: "bytes32", internalType: "bytes32" }],
264
+ outputs: [],
265
+ stateMutability: "nonpayable",
266
+ },
267
+ {
268
+ type: "function",
269
+ name: "redeemSponsoredPositions",
270
+ inputs: [{ name: "positionIds", type: "bytes32[]", internalType: "bytes32[]" }],
271
+ outputs: [],
272
+ stateMutability: "nonpayable",
273
+ },
274
+ {
275
+ type: "function",
276
+ name: "revokeCredit",
277
+ inputs: [
278
+ { name: "user", type: "address", internalType: "address" },
279
+ { name: "creditId", type: "uint256", internalType: "uint256" },
280
+ ],
281
+ outputs: [],
282
+ stateMutability: "nonpayable",
283
+ },
284
+ {
285
+ type: "function",
286
+ name: "setCreditCampaignPaused",
287
+ inputs: [
288
+ { name: "campaignId", type: "uint256", internalType: "uint256" },
289
+ { name: "pause", type: "bool", internalType: "bool" },
290
+ ],
291
+ outputs: [],
292
+ stateMutability: "nonpayable",
293
+ },
294
+ {
295
+ type: "function",
296
+ name: "setCreditCampaignUserPaused",
297
+ inputs: [
298
+ { name: "campaignId", type: "uint256", internalType: "uint256" },
299
+ { name: "user", type: "address", internalType: "address" },
300
+ { name: "pause", type: "bool", internalType: "bool" },
301
+ ],
302
+ outputs: [],
303
+ stateMutability: "nonpayable",
304
+ },
305
+ {
306
+ type: "function",
307
+ name: "setCreditors",
308
+ inputs: [
309
+ { name: "_creditors", type: "address[]", internalType: "address[]" },
310
+ { name: "add", type: "bool", internalType: "bool" },
311
+ ],
312
+ outputs: [],
313
+ stateMutability: "nonpayable",
314
+ },
315
+ {
316
+ type: "function",
317
+ name: "spendCredits",
318
+ 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[]" },
326
+ ],
327
+ outputs: [],
328
+ stateMutability: "nonpayable",
329
+ },
330
+ {
331
+ type: "function",
332
+ name: "spendCredits",
333
+ 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[]" },
344
+ ],
345
+ outputs: [],
346
+ stateMutability: "nonpayable",
347
+ },
348
+ {
349
+ type: "function",
350
+ name: "supportsInterface",
351
+ inputs: [{ name: "interfaceId", type: "bytes4", internalType: "bytes4" }],
352
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
353
+ stateMutability: "view",
354
+ },
355
+ {
356
+ type: "function",
357
+ name: "updateLevrConfigProvider",
358
+ inputs: [{ name: "newLevrConfigProvider", type: "address", internalType: "address" }],
359
+ outputs: [],
360
+ stateMutability: "nonpayable",
361
+ },
362
+ {
363
+ type: "function",
364
+ name: "usdcToken",
365
+ inputs: [],
366
+ outputs: [{ name: "", type: "address", internalType: "contract IERC20" }],
367
+ stateMutability: "view",
368
+ },
369
+ {
370
+ type: "function",
371
+ name: "userCreditId",
372
+ inputs: [{ name: "user", type: "address", internalType: "address" }],
373
+ outputs: [{ name: "creditId", type: "uint256", internalType: "uint256" }],
374
+ stateMutability: "view",
375
+ },
376
+ {
377
+ type: "function",
378
+ name: "withdrawFromFundManager",
379
+ inputs: [
380
+ { name: "token", type: "address", internalType: "address" },
381
+ { name: "to", type: "address", internalType: "address" },
382
+ { name: "amount", type: "uint256", internalType: "uint256" },
383
+ ],
384
+ outputs: [],
385
+ stateMutability: "nonpayable",
386
+ },
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" }] },
70
525
  ];
71
526
  //# sourceMappingURL=LevrBetCreditManager.js.map