@boostxyz/sdk 4.0.0 → 5.1.0
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.
- package/dist/Actions/Action.cjs +1 -1
- package/dist/Actions/Action.js +5 -5
- package/dist/Actions/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.cjs.map +1 -1
- package/dist/Actions/EventAction.d.ts +18 -0
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +206 -137
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.js +3 -3
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.js +4 -4
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- package/dist/AllowLists/SimpleDenyList.js +3 -3
- package/dist/Auth/PassthroughAuth.cjs +1 -1
- package/dist/Auth/PassthroughAuth.js +1 -1
- package/dist/BoostCore.cjs +2 -2
- package/dist/BoostCore.cjs.map +1 -1
- package/dist/BoostCore.d.ts +34 -0
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +275 -256
- package/dist/BoostCore.js.map +1 -1
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.js +6 -6
- package/dist/{Budget-DxACEu9b.js → Budget-CTxrE06r.js} +29 -29
- package/dist/{Budget-DxACEu9b.js.map → Budget-CTxrE06r.js.map} +1 -1
- package/dist/{Budget-Dlbk4PdV.cjs → Budget-Cui2BUr4.cjs} +2 -2
- package/dist/{Budget-Dlbk4PdV.cjs.map → Budget-Cui2BUr4.cjs.map} +1 -1
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.js +3 -3
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.js +32 -32
- package/dist/Deployable/DeployableTarget.cjs +1 -1
- package/dist/Deployable/DeployableTarget.js +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.js +20 -20
- package/dist/Incentive-AWwdbmix.cjs +2 -0
- package/dist/Incentive-AWwdbmix.cjs.map +1 -0
- package/dist/Incentive-CsFJZxYl.js +901 -0
- package/dist/Incentive-CsFJZxYl.js.map +1 -0
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.js +11 -11
- package/dist/Incentives/CGDAIncentive.cjs +1 -1
- package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
- package/dist/Incentives/CGDAIncentive.d.ts +1 -1
- package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
- package/dist/Incentives/CGDAIncentive.js +26 -24
- package/dist/Incentives/CGDAIncentive.js.map +1 -1
- package/dist/Incentives/ERC20Incentive.cjs +1 -1
- package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
- package/dist/Incentives/ERC20Incentive.js +17 -17
- package/dist/Incentives/ERC20Incentive.js.map +1 -1
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.d.ts +1035 -0
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.d.ts.map +1 -0
- package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.js +19 -19
- package/dist/Incentives/ERC20VariableCriteriaIncentive.js.map +1 -1
- package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
- package/dist/Incentives/ERC20VariableIncentive.cjs.map +1 -1
- package/dist/Incentives/ERC20VariableIncentive.d.ts +1 -1
- package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20VariableIncentive.js +27 -25
- package/dist/Incentives/ERC20VariableIncentive.js.map +1 -1
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.d.ts +6 -5
- package/dist/Incentives/Incentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.js +17 -16
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.js +9 -9
- package/dist/{SimpleDenyList-gR_yuuLp.cjs → SimpleDenyList-DQT0Fj3v.cjs} +2 -2
- package/dist/{SimpleDenyList-gR_yuuLp.cjs.map → SimpleDenyList-DQT0Fj3v.cjs.map} +1 -1
- package/dist/{SimpleDenyList-DGr4ekN1.js → SimpleDenyList-kcqV-01w.js} +12 -12
- package/dist/{SimpleDenyList-DGr4ekN1.js.map → SimpleDenyList-kcqV-01w.js.map} +1 -1
- package/dist/Validators/LimitedSignerValidator.cjs +1 -1
- package/dist/Validators/LimitedSignerValidator.js +15 -15
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.js +16 -16
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.js +4 -4
- package/dist/componentInterfaces-D7r9xJmt.cjs +2 -0
- package/dist/componentInterfaces-D7r9xJmt.cjs.map +1 -0
- package/dist/componentInterfaces-PR3ijhgZ.js +18 -0
- package/dist/componentInterfaces-PR3ijhgZ.js.map +1 -0
- package/dist/deployments-BNFI9vnc.cjs +2 -0
- package/dist/deployments-BNFI9vnc.cjs.map +1 -0
- package/dist/deployments-D68FgefY.js +102 -0
- package/dist/deployments-D68FgefY.js.map +1 -0
- package/dist/deployments.json +53 -48
- package/dist/generated-CRD9XfOT.cjs +3 -0
- package/dist/generated-CRD9XfOT.cjs.map +1 -0
- package/dist/{generated-BhRjnVvd.js → generated-ClbO_ULI.js} +1323 -744
- package/dist/generated-ClbO_ULI.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +134 -130
- package/dist/utils.cjs +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.ts +7 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +1121 -41
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
- package/src/Actions/EventAction.ts +85 -1
- package/src/BoostCore.ts +27 -0
- package/src/Incentives/CGDAIncentive.ts +3 -1
- package/src/Incentives/ERC20PeggedVariableCriteriaIncentive.test.ts +315 -0
- package/src/Incentives/ERC20PeggedVariableCriteriaIncentive.ts +728 -0
- package/src/Incentives/ERC20VariableIncentive.ts +3 -1
- package/src/Incentives/Incentive.ts +8 -2
- package/src/index.ts +1 -0
- package/src/utils.ts +10 -0
- package/dist/Incentive-BYhx7lTb.js +0 -397
- package/dist/Incentive-BYhx7lTb.js.map +0 -1
- package/dist/Incentive-Dq77dxww.cjs +0 -2
- package/dist/Incentive-Dq77dxww.cjs.map +0 -1
- package/dist/componentInterfaces-Bt-4sNB5.cjs +0 -2
- package/dist/componentInterfaces-Bt-4sNB5.cjs.map +0 -1
- package/dist/componentInterfaces-C4uAYjSo.js +0 -16
- package/dist/componentInterfaces-C4uAYjSo.js.map +0 -1
- package/dist/deployments-BBL2DHhq.js +0 -102
- package/dist/deployments-BBL2DHhq.js.map +0 -1
- package/dist/deployments-j7kUxPuV.cjs +0 -2
- package/dist/deployments-j7kUxPuV.cjs.map +0 -1
- package/dist/generated-BhRjnVvd.js.map +0 -1
- package/dist/generated-BscUK6fP.cjs +0 -3
- package/dist/generated-BscUK6fP.cjs.map +0 -1
|
@@ -0,0 +1,1035 @@
|
|
|
1
|
+
import { erc20PeggedVariableCriteriaIncentiveAbi } from '@boostxyz/evm';
|
|
2
|
+
import { type Address, type ContractEventName } from 'viem';
|
|
3
|
+
import type { DeployableOptions, GenericDeployableParams } from '../Deployable/Deployable';
|
|
4
|
+
import { DeployableTarget } from '../Deployable/DeployableTarget';
|
|
5
|
+
import { type ClaimPayload } from '../claiming';
|
|
6
|
+
import { type GenericLog, type ReadParams, RegistryType, type WriteParams } from '../utils';
|
|
7
|
+
import type { GetIncentiveScalarParams, IncentiveCriteria } from './ERC20VariableCriteriaIncentive';
|
|
8
|
+
export { erc20PeggedVariableCriteriaIncentiveAbi };
|
|
9
|
+
/**
|
|
10
|
+
* The object representation of a `Erc20PeggedVariableCriteriaIncentive.InitPayload`
|
|
11
|
+
*
|
|
12
|
+
* @export
|
|
13
|
+
* @interface Erc20PeggedVariableCriteriaIncentive
|
|
14
|
+
* @typedef {Erc20PeggedVariableCriteriaIncentive}
|
|
15
|
+
*/
|
|
16
|
+
export interface ERC20PeggedVariableCriteriaIncentivePayload {
|
|
17
|
+
/**
|
|
18
|
+
* The address of the incentivized asset.
|
|
19
|
+
*
|
|
20
|
+
* @type {Address}
|
|
21
|
+
*/
|
|
22
|
+
asset: Address;
|
|
23
|
+
/**
|
|
24
|
+
* The peg to normalize to.
|
|
25
|
+
*
|
|
26
|
+
* @type {Address}
|
|
27
|
+
*/
|
|
28
|
+
peg: Address;
|
|
29
|
+
/**
|
|
30
|
+
* The amount of the asset to distribute.
|
|
31
|
+
*
|
|
32
|
+
* @type {bigint}
|
|
33
|
+
*/
|
|
34
|
+
reward: bigint;
|
|
35
|
+
/**
|
|
36
|
+
* Total spend for the incentive.
|
|
37
|
+
*
|
|
38
|
+
* @type {bigint}
|
|
39
|
+
*/
|
|
40
|
+
limit: bigint;
|
|
41
|
+
/**
|
|
42
|
+
* Maximum reward each claim is elligible for.
|
|
43
|
+
*
|
|
44
|
+
* @type {bigint}
|
|
45
|
+
*/
|
|
46
|
+
maxReward: bigint;
|
|
47
|
+
/**
|
|
48
|
+
* (Optional) The address of the entity that can managed the incentive.
|
|
49
|
+
*
|
|
50
|
+
* @type {Address}
|
|
51
|
+
* @optional
|
|
52
|
+
*/
|
|
53
|
+
manager?: Address;
|
|
54
|
+
/**
|
|
55
|
+
* The criteria for the incentive that determines how the reward is distributed.
|
|
56
|
+
*
|
|
57
|
+
* @type {IncentiveCriteria}
|
|
58
|
+
*/
|
|
59
|
+
criteria: IncentiveCriteria;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* A generic `viem.Log` event with support for `Erc20PeggedVariableCriteriaIncentive` event types.
|
|
63
|
+
*
|
|
64
|
+
* @export
|
|
65
|
+
* @typedef {Erc20PeggedVariableCriteriaIncentiveLog}
|
|
66
|
+
* @template {ContractEventName<typeof erc20PeggedVariableCriteriaIncentiveAbi>} [event=ContractEventName<
|
|
67
|
+
* typeof erc20PeggedVariableCriteriaIncentiveAbi
|
|
68
|
+
* >]
|
|
69
|
+
*/
|
|
70
|
+
export type Erc20PeggedVariableCriteriaIncentiveLog<event extends ContractEventName<typeof erc20PeggedVariableCriteriaIncentiveAbi> = ContractEventName<typeof erc20PeggedVariableCriteriaIncentiveAbi>> = GenericLog<typeof erc20PeggedVariableCriteriaIncentiveAbi, event>;
|
|
71
|
+
/**
|
|
72
|
+
* A simple ERC20 incentive implementation that allows claiming of tokens
|
|
73
|
+
*
|
|
74
|
+
* @export
|
|
75
|
+
* @class Erc20PeggedVariableCriteriaIncentive
|
|
76
|
+
* @typedef {ERC20PeggedVariableCriteriaIncentive}
|
|
77
|
+
* @extends {DeployableTarget<ERC20PeggedVariableCriteriaIncentive>}
|
|
78
|
+
*/
|
|
79
|
+
export declare class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<ERC20PeggedVariableCriteriaIncentivePayload, typeof erc20PeggedVariableCriteriaIncentiveAbi> {
|
|
80
|
+
readonly abi: readonly [{
|
|
81
|
+
readonly type: "constructor";
|
|
82
|
+
readonly inputs: readonly [];
|
|
83
|
+
readonly stateMutability: "nonpayable";
|
|
84
|
+
}, {
|
|
85
|
+
readonly type: "error";
|
|
86
|
+
readonly inputs: readonly [];
|
|
87
|
+
readonly name: "AlreadyInitialized";
|
|
88
|
+
}, {
|
|
89
|
+
readonly type: "error";
|
|
90
|
+
readonly inputs: readonly [];
|
|
91
|
+
readonly name: "ClaimFailed";
|
|
92
|
+
}, {
|
|
93
|
+
readonly type: "error";
|
|
94
|
+
readonly inputs: readonly [];
|
|
95
|
+
readonly name: "CloneAlreadyInitialized";
|
|
96
|
+
}, {
|
|
97
|
+
readonly type: "error";
|
|
98
|
+
readonly inputs: readonly [];
|
|
99
|
+
readonly name: "InitializerNotImplemented";
|
|
100
|
+
}, {
|
|
101
|
+
readonly type: "error";
|
|
102
|
+
readonly inputs: readonly [{
|
|
103
|
+
readonly name: "asset";
|
|
104
|
+
readonly internalType: "address";
|
|
105
|
+
readonly type: "address";
|
|
106
|
+
}, {
|
|
107
|
+
readonly name: "available";
|
|
108
|
+
readonly internalType: "uint256";
|
|
109
|
+
readonly type: "uint256";
|
|
110
|
+
}, {
|
|
111
|
+
readonly name: "required";
|
|
112
|
+
readonly internalType: "uint256";
|
|
113
|
+
readonly type: "uint256";
|
|
114
|
+
}];
|
|
115
|
+
readonly name: "InsufficientFunds";
|
|
116
|
+
}, {
|
|
117
|
+
readonly type: "error";
|
|
118
|
+
readonly inputs: readonly [];
|
|
119
|
+
readonly name: "InvalidInitialization";
|
|
120
|
+
}, {
|
|
121
|
+
readonly type: "error";
|
|
122
|
+
readonly inputs: readonly [];
|
|
123
|
+
readonly name: "InvalidInitialization";
|
|
124
|
+
}, {
|
|
125
|
+
readonly type: "error";
|
|
126
|
+
readonly inputs: readonly [];
|
|
127
|
+
readonly name: "InvalidInitializationData";
|
|
128
|
+
}, {
|
|
129
|
+
readonly type: "error";
|
|
130
|
+
readonly inputs: readonly [];
|
|
131
|
+
readonly name: "LengthMismatch";
|
|
132
|
+
}, {
|
|
133
|
+
readonly type: "error";
|
|
134
|
+
readonly inputs: readonly [];
|
|
135
|
+
readonly name: "NewOwnerIsZeroAddress";
|
|
136
|
+
}, {
|
|
137
|
+
readonly type: "error";
|
|
138
|
+
readonly inputs: readonly [];
|
|
139
|
+
readonly name: "NoHandoverRequest";
|
|
140
|
+
}, {
|
|
141
|
+
readonly type: "error";
|
|
142
|
+
readonly inputs: readonly [];
|
|
143
|
+
readonly name: "NotClaimable";
|
|
144
|
+
}, {
|
|
145
|
+
readonly type: "error";
|
|
146
|
+
readonly inputs: readonly [];
|
|
147
|
+
readonly name: "NotInitializing";
|
|
148
|
+
}, {
|
|
149
|
+
readonly type: "error";
|
|
150
|
+
readonly inputs: readonly [];
|
|
151
|
+
readonly name: "Unauthorized";
|
|
152
|
+
}, {
|
|
153
|
+
readonly type: "event";
|
|
154
|
+
readonly anonymous: false;
|
|
155
|
+
readonly inputs: readonly [{
|
|
156
|
+
readonly name: "recipient";
|
|
157
|
+
readonly internalType: "address";
|
|
158
|
+
readonly type: "address";
|
|
159
|
+
readonly indexed: true;
|
|
160
|
+
}, {
|
|
161
|
+
readonly name: "data";
|
|
162
|
+
readonly internalType: "bytes";
|
|
163
|
+
readonly type: "bytes";
|
|
164
|
+
readonly indexed: false;
|
|
165
|
+
}];
|
|
166
|
+
readonly name: "Claimed";
|
|
167
|
+
}, {
|
|
168
|
+
readonly type: "event";
|
|
169
|
+
readonly anonymous: false;
|
|
170
|
+
readonly inputs: readonly [{
|
|
171
|
+
readonly name: "asset";
|
|
172
|
+
readonly internalType: "address";
|
|
173
|
+
readonly type: "address";
|
|
174
|
+
readonly indexed: true;
|
|
175
|
+
}, {
|
|
176
|
+
readonly name: "peg";
|
|
177
|
+
readonly internalType: "address";
|
|
178
|
+
readonly type: "address";
|
|
179
|
+
readonly indexed: true;
|
|
180
|
+
}, {
|
|
181
|
+
readonly name: "reward";
|
|
182
|
+
readonly internalType: "uint256";
|
|
183
|
+
readonly type: "uint256";
|
|
184
|
+
readonly indexed: false;
|
|
185
|
+
}, {
|
|
186
|
+
readonly name: "limit";
|
|
187
|
+
readonly internalType: "uint256";
|
|
188
|
+
readonly type: "uint256";
|
|
189
|
+
readonly indexed: false;
|
|
190
|
+
}, {
|
|
191
|
+
readonly name: "manager";
|
|
192
|
+
readonly internalType: "address";
|
|
193
|
+
readonly type: "address";
|
|
194
|
+
readonly indexed: false;
|
|
195
|
+
}, {
|
|
196
|
+
readonly name: "maxReward";
|
|
197
|
+
readonly internalType: "uint256";
|
|
198
|
+
readonly type: "uint256";
|
|
199
|
+
readonly indexed: false;
|
|
200
|
+
}, {
|
|
201
|
+
readonly name: "criteria";
|
|
202
|
+
readonly internalType: "struct AERC20PeggedVariableCriteriaIncentive.IncentiveCriteria";
|
|
203
|
+
readonly type: "tuple";
|
|
204
|
+
readonly components: readonly [{
|
|
205
|
+
readonly name: "criteriaType";
|
|
206
|
+
readonly internalType: "enum SignatureType";
|
|
207
|
+
readonly type: "uint8";
|
|
208
|
+
}, {
|
|
209
|
+
readonly name: "signature";
|
|
210
|
+
readonly internalType: "bytes32";
|
|
211
|
+
readonly type: "bytes32";
|
|
212
|
+
}, {
|
|
213
|
+
readonly name: "fieldIndex";
|
|
214
|
+
readonly internalType: "uint8";
|
|
215
|
+
readonly type: "uint8";
|
|
216
|
+
}, {
|
|
217
|
+
readonly name: "targetContract";
|
|
218
|
+
readonly internalType: "address";
|
|
219
|
+
readonly type: "address";
|
|
220
|
+
}];
|
|
221
|
+
readonly indexed: false;
|
|
222
|
+
}];
|
|
223
|
+
readonly name: "ERC20PeggedIncentiveInitialized";
|
|
224
|
+
}, {
|
|
225
|
+
readonly type: "event";
|
|
226
|
+
readonly anonymous: false;
|
|
227
|
+
readonly inputs: readonly [{
|
|
228
|
+
readonly name: "version";
|
|
229
|
+
readonly internalType: "uint64";
|
|
230
|
+
readonly type: "uint64";
|
|
231
|
+
readonly indexed: false;
|
|
232
|
+
}];
|
|
233
|
+
readonly name: "Initialized";
|
|
234
|
+
}, {
|
|
235
|
+
readonly type: "event";
|
|
236
|
+
readonly anonymous: false;
|
|
237
|
+
readonly inputs: readonly [{
|
|
238
|
+
readonly name: "pendingOwner";
|
|
239
|
+
readonly internalType: "address";
|
|
240
|
+
readonly type: "address";
|
|
241
|
+
readonly indexed: true;
|
|
242
|
+
}];
|
|
243
|
+
readonly name: "OwnershipHandoverCanceled";
|
|
244
|
+
}, {
|
|
245
|
+
readonly type: "event";
|
|
246
|
+
readonly anonymous: false;
|
|
247
|
+
readonly inputs: readonly [{
|
|
248
|
+
readonly name: "pendingOwner";
|
|
249
|
+
readonly internalType: "address";
|
|
250
|
+
readonly type: "address";
|
|
251
|
+
readonly indexed: true;
|
|
252
|
+
}];
|
|
253
|
+
readonly name: "OwnershipHandoverRequested";
|
|
254
|
+
}, {
|
|
255
|
+
readonly type: "event";
|
|
256
|
+
readonly anonymous: false;
|
|
257
|
+
readonly inputs: readonly [{
|
|
258
|
+
readonly name: "oldOwner";
|
|
259
|
+
readonly internalType: "address";
|
|
260
|
+
readonly type: "address";
|
|
261
|
+
readonly indexed: true;
|
|
262
|
+
}, {
|
|
263
|
+
readonly name: "newOwner";
|
|
264
|
+
readonly internalType: "address";
|
|
265
|
+
readonly type: "address";
|
|
266
|
+
readonly indexed: true;
|
|
267
|
+
}];
|
|
268
|
+
readonly name: "OwnershipTransferred";
|
|
269
|
+
}, {
|
|
270
|
+
readonly type: "event";
|
|
271
|
+
readonly anonymous: false;
|
|
272
|
+
readonly inputs: readonly [{
|
|
273
|
+
readonly name: "user";
|
|
274
|
+
readonly internalType: "address";
|
|
275
|
+
readonly type: "address";
|
|
276
|
+
readonly indexed: true;
|
|
277
|
+
}, {
|
|
278
|
+
readonly name: "roles";
|
|
279
|
+
readonly internalType: "uint256";
|
|
280
|
+
readonly type: "uint256";
|
|
281
|
+
readonly indexed: true;
|
|
282
|
+
}];
|
|
283
|
+
readonly name: "RolesUpdated";
|
|
284
|
+
}, {
|
|
285
|
+
readonly type: "function";
|
|
286
|
+
readonly inputs: readonly [];
|
|
287
|
+
readonly name: "ADMIN_ROLE";
|
|
288
|
+
readonly outputs: readonly [{
|
|
289
|
+
readonly name: "";
|
|
290
|
+
readonly internalType: "uint256";
|
|
291
|
+
readonly type: "uint256";
|
|
292
|
+
}];
|
|
293
|
+
readonly stateMutability: "view";
|
|
294
|
+
}, {
|
|
295
|
+
readonly type: "function";
|
|
296
|
+
readonly inputs: readonly [];
|
|
297
|
+
readonly name: "MANAGER_ROLE";
|
|
298
|
+
readonly outputs: readonly [{
|
|
299
|
+
readonly name: "";
|
|
300
|
+
readonly internalType: "uint256";
|
|
301
|
+
readonly type: "uint256";
|
|
302
|
+
}];
|
|
303
|
+
readonly stateMutability: "view";
|
|
304
|
+
}, {
|
|
305
|
+
readonly type: "function";
|
|
306
|
+
readonly inputs: readonly [];
|
|
307
|
+
readonly name: "asset";
|
|
308
|
+
readonly outputs: readonly [{
|
|
309
|
+
readonly name: "";
|
|
310
|
+
readonly internalType: "address";
|
|
311
|
+
readonly type: "address";
|
|
312
|
+
}];
|
|
313
|
+
readonly stateMutability: "view";
|
|
314
|
+
}, {
|
|
315
|
+
readonly type: "function";
|
|
316
|
+
readonly inputs: readonly [];
|
|
317
|
+
readonly name: "cancelOwnershipHandover";
|
|
318
|
+
readonly outputs: readonly [];
|
|
319
|
+
readonly stateMutability: "payable";
|
|
320
|
+
}, {
|
|
321
|
+
readonly type: "function";
|
|
322
|
+
readonly inputs: readonly [{
|
|
323
|
+
readonly name: "claimTarget";
|
|
324
|
+
readonly internalType: "address";
|
|
325
|
+
readonly type: "address";
|
|
326
|
+
}, {
|
|
327
|
+
readonly name: "data_";
|
|
328
|
+
readonly internalType: "bytes";
|
|
329
|
+
readonly type: "bytes";
|
|
330
|
+
}];
|
|
331
|
+
readonly name: "claim";
|
|
332
|
+
readonly outputs: readonly [{
|
|
333
|
+
readonly name: "";
|
|
334
|
+
readonly internalType: "bool";
|
|
335
|
+
readonly type: "bool";
|
|
336
|
+
}];
|
|
337
|
+
readonly stateMutability: "nonpayable";
|
|
338
|
+
}, {
|
|
339
|
+
readonly type: "function";
|
|
340
|
+
readonly inputs: readonly [{
|
|
341
|
+
readonly name: "";
|
|
342
|
+
readonly internalType: "address";
|
|
343
|
+
readonly type: "address";
|
|
344
|
+
}];
|
|
345
|
+
readonly name: "claimed";
|
|
346
|
+
readonly outputs: readonly [{
|
|
347
|
+
readonly name: "";
|
|
348
|
+
readonly internalType: "bool";
|
|
349
|
+
readonly type: "bool";
|
|
350
|
+
}];
|
|
351
|
+
readonly stateMutability: "view";
|
|
352
|
+
}, {
|
|
353
|
+
readonly type: "function";
|
|
354
|
+
readonly inputs: readonly [];
|
|
355
|
+
readonly name: "claims";
|
|
356
|
+
readonly outputs: readonly [{
|
|
357
|
+
readonly name: "";
|
|
358
|
+
readonly internalType: "uint256";
|
|
359
|
+
readonly type: "uint256";
|
|
360
|
+
}];
|
|
361
|
+
readonly stateMutability: "view";
|
|
362
|
+
}, {
|
|
363
|
+
readonly type: "function";
|
|
364
|
+
readonly inputs: readonly [{
|
|
365
|
+
readonly name: "data_";
|
|
366
|
+
readonly internalType: "bytes";
|
|
367
|
+
readonly type: "bytes";
|
|
368
|
+
}];
|
|
369
|
+
readonly name: "clawback";
|
|
370
|
+
readonly outputs: readonly [{
|
|
371
|
+
readonly name: "";
|
|
372
|
+
readonly internalType: "uint256";
|
|
373
|
+
readonly type: "uint256";
|
|
374
|
+
}, {
|
|
375
|
+
readonly name: "";
|
|
376
|
+
readonly internalType: "address";
|
|
377
|
+
readonly type: "address";
|
|
378
|
+
}];
|
|
379
|
+
readonly stateMutability: "nonpayable";
|
|
380
|
+
}, {
|
|
381
|
+
readonly type: "function";
|
|
382
|
+
readonly inputs: readonly [{
|
|
383
|
+
readonly name: "pendingOwner";
|
|
384
|
+
readonly internalType: "address";
|
|
385
|
+
readonly type: "address";
|
|
386
|
+
}];
|
|
387
|
+
readonly name: "completeOwnershipHandover";
|
|
388
|
+
readonly outputs: readonly [];
|
|
389
|
+
readonly stateMutability: "payable";
|
|
390
|
+
}, {
|
|
391
|
+
readonly type: "function";
|
|
392
|
+
readonly inputs: readonly [];
|
|
393
|
+
readonly name: "currentReward";
|
|
394
|
+
readonly outputs: readonly [{
|
|
395
|
+
readonly name: "";
|
|
396
|
+
readonly internalType: "uint256";
|
|
397
|
+
readonly type: "uint256";
|
|
398
|
+
}];
|
|
399
|
+
readonly stateMutability: "view";
|
|
400
|
+
}, {
|
|
401
|
+
readonly type: "function";
|
|
402
|
+
readonly inputs: readonly [];
|
|
403
|
+
readonly name: "getComponentInterface";
|
|
404
|
+
readonly outputs: readonly [{
|
|
405
|
+
readonly name: "";
|
|
406
|
+
readonly internalType: "bytes4";
|
|
407
|
+
readonly type: "bytes4";
|
|
408
|
+
}];
|
|
409
|
+
readonly stateMutability: "pure";
|
|
410
|
+
}, {
|
|
411
|
+
readonly type: "function";
|
|
412
|
+
readonly inputs: readonly [];
|
|
413
|
+
readonly name: "getIncentiveCriteria";
|
|
414
|
+
readonly outputs: readonly [{
|
|
415
|
+
readonly name: "";
|
|
416
|
+
readonly internalType: "struct AERC20PeggedVariableCriteriaIncentive.IncentiveCriteria";
|
|
417
|
+
readonly type: "tuple";
|
|
418
|
+
readonly components: readonly [{
|
|
419
|
+
readonly name: "criteriaType";
|
|
420
|
+
readonly internalType: "enum SignatureType";
|
|
421
|
+
readonly type: "uint8";
|
|
422
|
+
}, {
|
|
423
|
+
readonly name: "signature";
|
|
424
|
+
readonly internalType: "bytes32";
|
|
425
|
+
readonly type: "bytes32";
|
|
426
|
+
}, {
|
|
427
|
+
readonly name: "fieldIndex";
|
|
428
|
+
readonly internalType: "uint8";
|
|
429
|
+
readonly type: "uint8";
|
|
430
|
+
}, {
|
|
431
|
+
readonly name: "targetContract";
|
|
432
|
+
readonly internalType: "address";
|
|
433
|
+
readonly type: "address";
|
|
434
|
+
}];
|
|
435
|
+
}];
|
|
436
|
+
readonly stateMutability: "view";
|
|
437
|
+
}, {
|
|
438
|
+
readonly type: "function";
|
|
439
|
+
readonly inputs: readonly [];
|
|
440
|
+
readonly name: "getMaxReward";
|
|
441
|
+
readonly outputs: readonly [{
|
|
442
|
+
readonly name: "";
|
|
443
|
+
readonly internalType: "uint256";
|
|
444
|
+
readonly type: "uint256";
|
|
445
|
+
}];
|
|
446
|
+
readonly stateMutability: "view";
|
|
447
|
+
}, {
|
|
448
|
+
readonly type: "function";
|
|
449
|
+
readonly inputs: readonly [];
|
|
450
|
+
readonly name: "getPeg";
|
|
451
|
+
readonly outputs: readonly [{
|
|
452
|
+
readonly name: "";
|
|
453
|
+
readonly internalType: "address";
|
|
454
|
+
readonly type: "address";
|
|
455
|
+
}];
|
|
456
|
+
readonly stateMutability: "view";
|
|
457
|
+
}, {
|
|
458
|
+
readonly type: "function";
|
|
459
|
+
readonly inputs: readonly [{
|
|
460
|
+
readonly name: "accounts_";
|
|
461
|
+
readonly internalType: "address[]";
|
|
462
|
+
readonly type: "address[]";
|
|
463
|
+
}, {
|
|
464
|
+
readonly name: "roles_";
|
|
465
|
+
readonly internalType: "uint256[]";
|
|
466
|
+
readonly type: "uint256[]";
|
|
467
|
+
}];
|
|
468
|
+
readonly name: "grantManyRoles";
|
|
469
|
+
readonly outputs: readonly [];
|
|
470
|
+
readonly stateMutability: "nonpayable";
|
|
471
|
+
}, {
|
|
472
|
+
readonly type: "function";
|
|
473
|
+
readonly inputs: readonly [{
|
|
474
|
+
readonly name: "user";
|
|
475
|
+
readonly internalType: "address";
|
|
476
|
+
readonly type: "address";
|
|
477
|
+
}, {
|
|
478
|
+
readonly name: "roles";
|
|
479
|
+
readonly internalType: "uint256";
|
|
480
|
+
readonly type: "uint256";
|
|
481
|
+
}];
|
|
482
|
+
readonly name: "grantRoles";
|
|
483
|
+
readonly outputs: readonly [];
|
|
484
|
+
readonly stateMutability: "payable";
|
|
485
|
+
}, {
|
|
486
|
+
readonly type: "function";
|
|
487
|
+
readonly inputs: readonly [{
|
|
488
|
+
readonly name: "user";
|
|
489
|
+
readonly internalType: "address";
|
|
490
|
+
readonly type: "address";
|
|
491
|
+
}, {
|
|
492
|
+
readonly name: "roles";
|
|
493
|
+
readonly internalType: "uint256";
|
|
494
|
+
readonly type: "uint256";
|
|
495
|
+
}];
|
|
496
|
+
readonly name: "hasAllRoles";
|
|
497
|
+
readonly outputs: readonly [{
|
|
498
|
+
readonly name: "";
|
|
499
|
+
readonly internalType: "bool";
|
|
500
|
+
readonly type: "bool";
|
|
501
|
+
}];
|
|
502
|
+
readonly stateMutability: "view";
|
|
503
|
+
}, {
|
|
504
|
+
readonly type: "function";
|
|
505
|
+
readonly inputs: readonly [{
|
|
506
|
+
readonly name: "user";
|
|
507
|
+
readonly internalType: "address";
|
|
508
|
+
readonly type: "address";
|
|
509
|
+
}, {
|
|
510
|
+
readonly name: "roles";
|
|
511
|
+
readonly internalType: "uint256";
|
|
512
|
+
readonly type: "uint256";
|
|
513
|
+
}];
|
|
514
|
+
readonly name: "hasAnyRole";
|
|
515
|
+
readonly outputs: readonly [{
|
|
516
|
+
readonly name: "";
|
|
517
|
+
readonly internalType: "bool";
|
|
518
|
+
readonly type: "bool";
|
|
519
|
+
}];
|
|
520
|
+
readonly stateMutability: "view";
|
|
521
|
+
}, {
|
|
522
|
+
readonly type: "function";
|
|
523
|
+
readonly inputs: readonly [];
|
|
524
|
+
readonly name: "incentiveCriteria";
|
|
525
|
+
readonly outputs: readonly [{
|
|
526
|
+
readonly name: "criteriaType";
|
|
527
|
+
readonly internalType: "enum SignatureType";
|
|
528
|
+
readonly type: "uint8";
|
|
529
|
+
}, {
|
|
530
|
+
readonly name: "signature";
|
|
531
|
+
readonly internalType: "bytes32";
|
|
532
|
+
readonly type: "bytes32";
|
|
533
|
+
}, {
|
|
534
|
+
readonly name: "fieldIndex";
|
|
535
|
+
readonly internalType: "uint8";
|
|
536
|
+
readonly type: "uint8";
|
|
537
|
+
}, {
|
|
538
|
+
readonly name: "targetContract";
|
|
539
|
+
readonly internalType: "address";
|
|
540
|
+
readonly type: "address";
|
|
541
|
+
}];
|
|
542
|
+
readonly stateMutability: "view";
|
|
543
|
+
}, {
|
|
544
|
+
readonly type: "function";
|
|
545
|
+
readonly inputs: readonly [{
|
|
546
|
+
readonly name: "data_";
|
|
547
|
+
readonly internalType: "bytes";
|
|
548
|
+
readonly type: "bytes";
|
|
549
|
+
}];
|
|
550
|
+
readonly name: "initialize";
|
|
551
|
+
readonly outputs: readonly [];
|
|
552
|
+
readonly stateMutability: "nonpayable";
|
|
553
|
+
}, {
|
|
554
|
+
readonly type: "function";
|
|
555
|
+
readonly inputs: readonly [{
|
|
556
|
+
readonly name: "account_";
|
|
557
|
+
readonly internalType: "address";
|
|
558
|
+
readonly type: "address";
|
|
559
|
+
}];
|
|
560
|
+
readonly name: "isAuthorized";
|
|
561
|
+
readonly outputs: readonly [{
|
|
562
|
+
readonly name: "";
|
|
563
|
+
readonly internalType: "bool";
|
|
564
|
+
readonly type: "bool";
|
|
565
|
+
}];
|
|
566
|
+
readonly stateMutability: "view";
|
|
567
|
+
}, {
|
|
568
|
+
readonly type: "function";
|
|
569
|
+
readonly inputs: readonly [{
|
|
570
|
+
readonly name: "claimTarget";
|
|
571
|
+
readonly internalType: "address";
|
|
572
|
+
readonly type: "address";
|
|
573
|
+
}, {
|
|
574
|
+
readonly name: "data_";
|
|
575
|
+
readonly internalType: "bytes";
|
|
576
|
+
readonly type: "bytes";
|
|
577
|
+
}];
|
|
578
|
+
readonly name: "isClaimable";
|
|
579
|
+
readonly outputs: readonly [{
|
|
580
|
+
readonly name: "";
|
|
581
|
+
readonly internalType: "bool";
|
|
582
|
+
readonly type: "bool";
|
|
583
|
+
}];
|
|
584
|
+
readonly stateMutability: "view";
|
|
585
|
+
}, {
|
|
586
|
+
readonly type: "function";
|
|
587
|
+
readonly inputs: readonly [];
|
|
588
|
+
readonly name: "limit";
|
|
589
|
+
readonly outputs: readonly [{
|
|
590
|
+
readonly name: "";
|
|
591
|
+
readonly internalType: "uint256";
|
|
592
|
+
readonly type: "uint256";
|
|
593
|
+
}];
|
|
594
|
+
readonly stateMutability: "view";
|
|
595
|
+
}, {
|
|
596
|
+
readonly type: "function";
|
|
597
|
+
readonly inputs: readonly [];
|
|
598
|
+
readonly name: "owner";
|
|
599
|
+
readonly outputs: readonly [{
|
|
600
|
+
readonly name: "result";
|
|
601
|
+
readonly internalType: "address";
|
|
602
|
+
readonly type: "address";
|
|
603
|
+
}];
|
|
604
|
+
readonly stateMutability: "view";
|
|
605
|
+
}, {
|
|
606
|
+
readonly type: "function";
|
|
607
|
+
readonly inputs: readonly [{
|
|
608
|
+
readonly name: "pendingOwner";
|
|
609
|
+
readonly internalType: "address";
|
|
610
|
+
readonly type: "address";
|
|
611
|
+
}];
|
|
612
|
+
readonly name: "ownershipHandoverExpiresAt";
|
|
613
|
+
readonly outputs: readonly [{
|
|
614
|
+
readonly name: "result";
|
|
615
|
+
readonly internalType: "uint256";
|
|
616
|
+
readonly type: "uint256";
|
|
617
|
+
}];
|
|
618
|
+
readonly stateMutability: "view";
|
|
619
|
+
}, {
|
|
620
|
+
readonly type: "function";
|
|
621
|
+
readonly inputs: readonly [];
|
|
622
|
+
readonly name: "peg";
|
|
623
|
+
readonly outputs: readonly [{
|
|
624
|
+
readonly name: "";
|
|
625
|
+
readonly internalType: "address";
|
|
626
|
+
readonly type: "address";
|
|
627
|
+
}];
|
|
628
|
+
readonly stateMutability: "view";
|
|
629
|
+
}, {
|
|
630
|
+
readonly type: "function";
|
|
631
|
+
readonly inputs: readonly [{
|
|
632
|
+
readonly name: "data_";
|
|
633
|
+
readonly internalType: "bytes";
|
|
634
|
+
readonly type: "bytes";
|
|
635
|
+
}];
|
|
636
|
+
readonly name: "preflight";
|
|
637
|
+
readonly outputs: readonly [{
|
|
638
|
+
readonly name: "budgetData";
|
|
639
|
+
readonly internalType: "bytes";
|
|
640
|
+
readonly type: "bytes";
|
|
641
|
+
}];
|
|
642
|
+
readonly stateMutability: "view";
|
|
643
|
+
}, {
|
|
644
|
+
readonly type: "function";
|
|
645
|
+
readonly inputs: readonly [];
|
|
646
|
+
readonly name: "renounceOwnership";
|
|
647
|
+
readonly outputs: readonly [];
|
|
648
|
+
readonly stateMutability: "payable";
|
|
649
|
+
}, {
|
|
650
|
+
readonly type: "function";
|
|
651
|
+
readonly inputs: readonly [{
|
|
652
|
+
readonly name: "roles";
|
|
653
|
+
readonly internalType: "uint256";
|
|
654
|
+
readonly type: "uint256";
|
|
655
|
+
}];
|
|
656
|
+
readonly name: "renounceRoles";
|
|
657
|
+
readonly outputs: readonly [];
|
|
658
|
+
readonly stateMutability: "payable";
|
|
659
|
+
}, {
|
|
660
|
+
readonly type: "function";
|
|
661
|
+
readonly inputs: readonly [];
|
|
662
|
+
readonly name: "requestOwnershipHandover";
|
|
663
|
+
readonly outputs: readonly [];
|
|
664
|
+
readonly stateMutability: "payable";
|
|
665
|
+
}, {
|
|
666
|
+
readonly type: "function";
|
|
667
|
+
readonly inputs: readonly [{
|
|
668
|
+
readonly name: "accounts_";
|
|
669
|
+
readonly internalType: "address[]";
|
|
670
|
+
readonly type: "address[]";
|
|
671
|
+
}, {
|
|
672
|
+
readonly name: "roles_";
|
|
673
|
+
readonly internalType: "uint256[]";
|
|
674
|
+
readonly type: "uint256[]";
|
|
675
|
+
}];
|
|
676
|
+
readonly name: "revokeManyRoles";
|
|
677
|
+
readonly outputs: readonly [];
|
|
678
|
+
readonly stateMutability: "nonpayable";
|
|
679
|
+
}, {
|
|
680
|
+
readonly type: "function";
|
|
681
|
+
readonly inputs: readonly [{
|
|
682
|
+
readonly name: "user";
|
|
683
|
+
readonly internalType: "address";
|
|
684
|
+
readonly type: "address";
|
|
685
|
+
}, {
|
|
686
|
+
readonly name: "roles";
|
|
687
|
+
readonly internalType: "uint256";
|
|
688
|
+
readonly type: "uint256";
|
|
689
|
+
}];
|
|
690
|
+
readonly name: "revokeRoles";
|
|
691
|
+
readonly outputs: readonly [];
|
|
692
|
+
readonly stateMutability: "payable";
|
|
693
|
+
}, {
|
|
694
|
+
readonly type: "function";
|
|
695
|
+
readonly inputs: readonly [];
|
|
696
|
+
readonly name: "reward";
|
|
697
|
+
readonly outputs: readonly [{
|
|
698
|
+
readonly name: "";
|
|
699
|
+
readonly internalType: "uint256";
|
|
700
|
+
readonly type: "uint256";
|
|
701
|
+
}];
|
|
702
|
+
readonly stateMutability: "view";
|
|
703
|
+
}, {
|
|
704
|
+
readonly type: "function";
|
|
705
|
+
readonly inputs: readonly [{
|
|
706
|
+
readonly name: "user";
|
|
707
|
+
readonly internalType: "address";
|
|
708
|
+
readonly type: "address";
|
|
709
|
+
}];
|
|
710
|
+
readonly name: "rolesOf";
|
|
711
|
+
readonly outputs: readonly [{
|
|
712
|
+
readonly name: "roles";
|
|
713
|
+
readonly internalType: "uint256";
|
|
714
|
+
readonly type: "uint256";
|
|
715
|
+
}];
|
|
716
|
+
readonly stateMutability: "view";
|
|
717
|
+
}, {
|
|
718
|
+
readonly type: "function";
|
|
719
|
+
readonly inputs: readonly [{
|
|
720
|
+
readonly name: "accounts_";
|
|
721
|
+
readonly internalType: "address[]";
|
|
722
|
+
readonly type: "address[]";
|
|
723
|
+
}, {
|
|
724
|
+
readonly name: "authorized_";
|
|
725
|
+
readonly internalType: "bool[]";
|
|
726
|
+
readonly type: "bool[]";
|
|
727
|
+
}];
|
|
728
|
+
readonly name: "setAuthorized";
|
|
729
|
+
readonly outputs: readonly [];
|
|
730
|
+
readonly stateMutability: "nonpayable";
|
|
731
|
+
}, {
|
|
732
|
+
readonly type: "function";
|
|
733
|
+
readonly inputs: readonly [{
|
|
734
|
+
readonly name: "interfaceId";
|
|
735
|
+
readonly internalType: "bytes4";
|
|
736
|
+
readonly type: "bytes4";
|
|
737
|
+
}];
|
|
738
|
+
readonly name: "supportsInterface";
|
|
739
|
+
readonly outputs: readonly [{
|
|
740
|
+
readonly name: "";
|
|
741
|
+
readonly internalType: "bool";
|
|
742
|
+
readonly type: "bool";
|
|
743
|
+
}];
|
|
744
|
+
readonly stateMutability: "view";
|
|
745
|
+
}, {
|
|
746
|
+
readonly type: "function";
|
|
747
|
+
readonly inputs: readonly [];
|
|
748
|
+
readonly name: "totalClaim";
|
|
749
|
+
readonly outputs: readonly [{
|
|
750
|
+
readonly name: "";
|
|
751
|
+
readonly internalType: "uint256";
|
|
752
|
+
readonly type: "uint256";
|
|
753
|
+
}];
|
|
754
|
+
readonly stateMutability: "view";
|
|
755
|
+
}, {
|
|
756
|
+
readonly type: "function";
|
|
757
|
+
readonly inputs: readonly [];
|
|
758
|
+
readonly name: "totalClaimed";
|
|
759
|
+
readonly outputs: readonly [{
|
|
760
|
+
readonly name: "";
|
|
761
|
+
readonly internalType: "uint256";
|
|
762
|
+
readonly type: "uint256";
|
|
763
|
+
}];
|
|
764
|
+
readonly stateMutability: "view";
|
|
765
|
+
}, {
|
|
766
|
+
readonly type: "function";
|
|
767
|
+
readonly inputs: readonly [{
|
|
768
|
+
readonly name: "newOwner";
|
|
769
|
+
readonly internalType: "address";
|
|
770
|
+
readonly type: "address";
|
|
771
|
+
}];
|
|
772
|
+
readonly name: "transferOwnership";
|
|
773
|
+
readonly outputs: readonly [];
|
|
774
|
+
readonly stateMutability: "payable";
|
|
775
|
+
}];
|
|
776
|
+
/**
|
|
777
|
+
* @inheritdoc
|
|
778
|
+
*
|
|
779
|
+
* @public
|
|
780
|
+
* @static
|
|
781
|
+
* @type {Record<number, Address>}
|
|
782
|
+
*/
|
|
783
|
+
static bases: Record<number, Address>;
|
|
784
|
+
/**
|
|
785
|
+
* @inheritdoc
|
|
786
|
+
*
|
|
787
|
+
* @public
|
|
788
|
+
* @static
|
|
789
|
+
* @type {RegistryType}
|
|
790
|
+
*/
|
|
791
|
+
static registryType: RegistryType;
|
|
792
|
+
/**
|
|
793
|
+
* The owner of the incentive
|
|
794
|
+
*
|
|
795
|
+
* @public
|
|
796
|
+
* @async
|
|
797
|
+
* @param {?ReadParams} [params]
|
|
798
|
+
* @returns {Promise<Address>}
|
|
799
|
+
*/
|
|
800
|
+
owner(params?: ReadParams): Promise<`0x${string}`>;
|
|
801
|
+
/**
|
|
802
|
+
* Calculates the current reward based on the time since the last claim. The reward is calculated based on the time since the last claim, the available budget, and the reward parameters. It increases linearly over time in the absence of claims, with each hour adding `rewardBoost` to the current reward, up to the available budget. For example, if there is one claim in the first hour, then no claims for three hours, the claimable reward would be `initialReward - rewardDecay + (rewardBoost * 3)`
|
|
803
|
+
*
|
|
804
|
+
* @public
|
|
805
|
+
* @async
|
|
806
|
+
* @param {?ReadParams} [params]
|
|
807
|
+
* @returns {Promise<bigint>} - The current reward
|
|
808
|
+
*/
|
|
809
|
+
currentReward(params?: ReadParams): Promise<bigint>;
|
|
810
|
+
/**
|
|
811
|
+
* Retrieves the maximum reward amount per claim.
|
|
812
|
+
*
|
|
813
|
+
* @public
|
|
814
|
+
* @async
|
|
815
|
+
* @param {?ReadParams} [params]
|
|
816
|
+
* @returns {Promise<bigint>} The maximum reward amount per claim
|
|
817
|
+
*/
|
|
818
|
+
getMaxReward(params?: ReadParams): Promise<bigint>;
|
|
819
|
+
/**
|
|
820
|
+
* Fetches the incentive scalar from a transaction hash
|
|
821
|
+
*
|
|
822
|
+
* @param {GetIncentiveScalarParams} params
|
|
823
|
+
* @param {?ReadParams} [params]
|
|
824
|
+
* @returns {Promise<bigint>}
|
|
825
|
+
* @throws {InvalidCriteriaTypeError | NoMatchingLogsError | DecodedArgsError}
|
|
826
|
+
*/
|
|
827
|
+
getIncentiveScalar({ chainId, hash, knownSignatures }: GetIncentiveScalarParams, params?: ReadParams): Promise<bigint>;
|
|
828
|
+
/**
|
|
829
|
+
* The number of claims that have been made
|
|
830
|
+
*
|
|
831
|
+
* @public
|
|
832
|
+
* @async
|
|
833
|
+
* @param {?ReadParams} [params]
|
|
834
|
+
* @returns {Promise<bigint>}
|
|
835
|
+
*/
|
|
836
|
+
claims(params?: ReadParams): Promise<bigint>;
|
|
837
|
+
/**
|
|
838
|
+
* The total amount of rewards claimed
|
|
839
|
+
*
|
|
840
|
+
* @public
|
|
841
|
+
* @async
|
|
842
|
+
* @param {?ReadParams} [params]
|
|
843
|
+
* @returns {Promise<bigint>}
|
|
844
|
+
*/
|
|
845
|
+
totalClaimed(params?: ReadParams): Promise<bigint>;
|
|
846
|
+
/**
|
|
847
|
+
* A mapping of address to claim status
|
|
848
|
+
*
|
|
849
|
+
* @public
|
|
850
|
+
* @async
|
|
851
|
+
* @param {Address} address
|
|
852
|
+
* @param {?ReadParams} [params]
|
|
853
|
+
* @returns {Promise<boolean>}
|
|
854
|
+
*/
|
|
855
|
+
claimed(address: Address, params?: ReadParams): Promise<boolean>;
|
|
856
|
+
/**
|
|
857
|
+
* The address of the ERC20-like token
|
|
858
|
+
*
|
|
859
|
+
* @public
|
|
860
|
+
* @async
|
|
861
|
+
* @param {?ReadParams} [params]
|
|
862
|
+
* @returns {Promise<Address>}
|
|
863
|
+
*/
|
|
864
|
+
asset(params?: ReadParams): Promise<`0x${string}`>;
|
|
865
|
+
/**
|
|
866
|
+
* The address of the pegged ERC20-like token
|
|
867
|
+
*
|
|
868
|
+
* @public
|
|
869
|
+
* @async
|
|
870
|
+
* @param {?ReadParams} [params]
|
|
871
|
+
* @returns {Promise<Address>}
|
|
872
|
+
*/
|
|
873
|
+
peg(params?: ReadParams): Promise<`0x${string}`>;
|
|
874
|
+
/**
|
|
875
|
+
* The reward amount issued for each claim
|
|
876
|
+
*
|
|
877
|
+
* @public
|
|
878
|
+
* @async
|
|
879
|
+
* @param {?ReadParams} [params]
|
|
880
|
+
* @returns {Promise<bigint>}
|
|
881
|
+
*/
|
|
882
|
+
reward(params?: ReadParams): Promise<bigint>;
|
|
883
|
+
/**
|
|
884
|
+
* The limit (max possible rewards payout in reward token)
|
|
885
|
+
*
|
|
886
|
+
* @public
|
|
887
|
+
* @async
|
|
888
|
+
* @param {?ReadParams} [params]
|
|
889
|
+
* @returns {Promise<bigint>}
|
|
890
|
+
*/
|
|
891
|
+
limit(params?: ReadParams): Promise<bigint>;
|
|
892
|
+
/**
|
|
893
|
+
* Claim the incentive
|
|
894
|
+
*
|
|
895
|
+
* @public
|
|
896
|
+
* @async
|
|
897
|
+
* @param {ClaimPayload} payload
|
|
898
|
+
* @param {?WriteParams} [params]
|
|
899
|
+
* @returns {Promise<boolean>} - Returns true if successfully claimed
|
|
900
|
+
*/
|
|
901
|
+
protected claim(payload: ClaimPayload, params?: WriteParams): Promise<boolean>;
|
|
902
|
+
/**
|
|
903
|
+
* Claim the incentive
|
|
904
|
+
*
|
|
905
|
+
* @public
|
|
906
|
+
* @async
|
|
907
|
+
* @param {ClaimPayload} payload
|
|
908
|
+
* @param {?WriteParams} [params]
|
|
909
|
+
* @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - Returns true if successfully claimed
|
|
910
|
+
*/
|
|
911
|
+
protected claimRaw(payload: ClaimPayload, params?: WriteParams): Promise<{
|
|
912
|
+
hash: `0x${string}`;
|
|
913
|
+
result: boolean;
|
|
914
|
+
}>;
|
|
915
|
+
/**
|
|
916
|
+
* Clawback assets from the incentive
|
|
917
|
+
*
|
|
918
|
+
* @public
|
|
919
|
+
* @async
|
|
920
|
+
* @param {ClaimPayload} payload
|
|
921
|
+
* @param {?WriteParams} [params]
|
|
922
|
+
* @returns {Promise<boolean>} - True if the assets were successfully clawbacked
|
|
923
|
+
*/
|
|
924
|
+
clawback(payload: ClaimPayload, params?: WriteParams): Promise<readonly [bigint, `0x${string}`]>;
|
|
925
|
+
/**
|
|
926
|
+
* Clawback assets from the incentive
|
|
927
|
+
*
|
|
928
|
+
* @public
|
|
929
|
+
* @async
|
|
930
|
+
* @param {ClaimPayload} payload
|
|
931
|
+
* @param {?WriteParams} [params]
|
|
932
|
+
* @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the assets were successfully clawbacked
|
|
933
|
+
*/
|
|
934
|
+
clawbackRaw(payload: ClaimPayload, params?: WriteParams): Promise<{
|
|
935
|
+
hash: `0x${string}`;
|
|
936
|
+
result: readonly [bigint, `0x${string}`];
|
|
937
|
+
}>;
|
|
938
|
+
/**
|
|
939
|
+
* Check if an incentive is claimable.
|
|
940
|
+
*
|
|
941
|
+
* @public
|
|
942
|
+
* @async
|
|
943
|
+
* @param {ClaimPayload} payload
|
|
944
|
+
* @param {?ReadParams} [params]
|
|
945
|
+
* @returns {Promise<boolean>} = True if the incentive is claimable based on the data payload
|
|
946
|
+
*/
|
|
947
|
+
isClaimable(payload: ClaimPayload, params?: ReadParams): Promise<boolean>;
|
|
948
|
+
/**
|
|
949
|
+
* read the peg token for the incentive.
|
|
950
|
+
*
|
|
951
|
+
* @public
|
|
952
|
+
* @async
|
|
953
|
+
* @param {?ReadParams} [params]
|
|
954
|
+
* @returns {Promise<Address>} = The address of the token the reward is pegged to
|
|
955
|
+
*/
|
|
956
|
+
getPeg(params?: ReadParams): Promise<`0x${string}`>;
|
|
957
|
+
/**
|
|
958
|
+
* Get the maximum amount that can be claimed by this incentive. Useful when used in conjunction with `BoostCore.calculateProtocolFee`
|
|
959
|
+
*
|
|
960
|
+
* @public
|
|
961
|
+
* @async
|
|
962
|
+
* @param {?ReadParams} [params]
|
|
963
|
+
* @returns {Promise<bigint>} = Return a bigint representing that maximum amount that can be distributed by this incentive.
|
|
964
|
+
*/
|
|
965
|
+
getTotalBudget(params?: ReadParams): Promise<bigint>;
|
|
966
|
+
/**
|
|
967
|
+
* Check if any claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.
|
|
968
|
+
*
|
|
969
|
+
* @public
|
|
970
|
+
* @async
|
|
971
|
+
* @param {?ReadParams} [params]
|
|
972
|
+
* @returns {Promise<boolean>} - True if total claims is less than limit
|
|
973
|
+
*/
|
|
974
|
+
canBeClaimed(params?: ReadParams): Promise<boolean>;
|
|
975
|
+
/**
|
|
976
|
+
* Check how many claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.
|
|
977
|
+
*
|
|
978
|
+
* @public
|
|
979
|
+
* @async
|
|
980
|
+
* @param {?ReadParams} [params]
|
|
981
|
+
* @returns {Promise<bigint>} - True if total claims is less than limit
|
|
982
|
+
*/
|
|
983
|
+
getRemainingClaimPotential(params?: ReadParams): Promise<bigint>;
|
|
984
|
+
/**
|
|
985
|
+
*Functions from the ERC20VariableIncentive contract
|
|
986
|
+
*/
|
|
987
|
+
/**
|
|
988
|
+
* Fetches the IncentiveCriteria struct from the contract
|
|
989
|
+
*
|
|
990
|
+
* @param {?ReadParams} [params]
|
|
991
|
+
* @returns {Promise<IncentiveCriteria>} Incentive criteria structure
|
|
992
|
+
* @throws {IncentiveCriteriaNotFoundError}
|
|
993
|
+
*/
|
|
994
|
+
getIncentiveCriteria(params?: ReadParams): Promise<IncentiveCriteria>;
|
|
995
|
+
/**
|
|
996
|
+
* @inheritdoc
|
|
997
|
+
*
|
|
998
|
+
* @public
|
|
999
|
+
* @param {?ERC20PeggedVariableCriteriaIncentivePayload} [_payload]
|
|
1000
|
+
* @param {?DeployableOptions} [_options]
|
|
1001
|
+
* @returns {GenericDeployableParams}
|
|
1002
|
+
*/
|
|
1003
|
+
buildParameters(_payload?: ERC20PeggedVariableCriteriaIncentivePayload, _options?: DeployableOptions): GenericDeployableParams;
|
|
1004
|
+
/**
|
|
1005
|
+
* Encodes an amount to clawback from the incentive
|
|
1006
|
+
*
|
|
1007
|
+
* @public
|
|
1008
|
+
* @param {bigint} amount - How much of the asset to clawback
|
|
1009
|
+
* @returns {Hex} - Returns an encoded uint256
|
|
1010
|
+
*/
|
|
1011
|
+
buildClawbackData(amount: bigint): `0x${string}`;
|
|
1012
|
+
/**
|
|
1013
|
+
* Builds the claim data for the ERC20PeggedVariableCriteriaIncentivePayload.
|
|
1014
|
+
*
|
|
1015
|
+
* @public
|
|
1016
|
+
* @param {bigint} rewardAmount
|
|
1017
|
+
* @returns {Hash} Returns the encoded claim data
|
|
1018
|
+
* @description This function returns the encoded claim data for the ERC20PeggedVariableCriteriaIncentivePayload.
|
|
1019
|
+
*/
|
|
1020
|
+
buildClaimData(rewardAmount: bigint): `0x${string}`;
|
|
1021
|
+
}
|
|
1022
|
+
/**
|
|
1023
|
+
* Given a {@link ERC20PeggedVariableCriteriaIncentivePayload}, properly encode a `ERC20PeggedVariableCriteriaIncentivePayload.InitPayload` for use with {@link ERC20PeggedVariableCriteriaIncentivePayload} initialization.
|
|
1024
|
+
*
|
|
1025
|
+
* @param {ERC20PeggedVariableCriteriaIncentivePayload} param0
|
|
1026
|
+
* @param {Address} param0.asset - The address of the incentivized asset.
|
|
1027
|
+
* @param {Address} param0.peg - The peg to normalize to.
|
|
1028
|
+
* @param {bigint} param0.reward - The amount of the asset to distribute.
|
|
1029
|
+
* @param {bigint} param0.limit - How many times can this incentive be claimed.
|
|
1030
|
+
* @param {Address} [param0.manager=zeroAddress] - The entity that can manage the incentive.
|
|
1031
|
+
* @param {IncentiveCriteria} param0.criteria - The incentive criteria for reward distribution.
|
|
1032
|
+
* @returns {Hex}
|
|
1033
|
+
*/
|
|
1034
|
+
export declare function prepareERC20PeggedVariableCriteriaIncentivePayload({ asset, peg, reward, limit, maxReward, manager, criteria, }: ERC20PeggedVariableCriteriaIncentivePayload): `0x${string}`;
|
|
1035
|
+
//# sourceMappingURL=ERC20PeggedVariableCriteriaIncentive.d.ts.map
|