@boostxyz/sdk 6.1.2 → 7.0.0-canary.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/README.md +1 -1
- package/dist/Actions/Action.cjs +1 -1
- package/dist/Actions/Action.js +4 -4
- package/dist/Actions/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.cjs.map +1 -1
- package/dist/Actions/EventAction.d.ts +10 -0
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +84 -83
- 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.cjs.map +1 -1
- package/dist/AllowLists/SimpleAllowList.js +14 -14
- package/dist/AllowLists/SimpleAllowList.js.map +1 -1
- 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 +1894 -267
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +808 -497
- package/dist/BoostCore.js.map +1 -1
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.js +47 -47
- package/dist/Budget-B_kgJGDu.cjs +2 -0
- package/dist/Budget-B_kgJGDu.cjs.map +1 -0
- package/dist/Budget-Bvi5Qjqp.js +1124 -0
- package/dist/Budget-Bvi5Qjqp.js.map +1 -0
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.d.ts +5 -4
- package/dist/Budgets/Budget.d.ts.map +1 -1
- package/dist/Budgets/Budget.js +9 -6
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.cjs.map +1 -1
- package/dist/Budgets/ManagedBudget.d.ts +4 -0
- package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
- package/dist/Budgets/ManagedBudget.js +25 -25
- package/dist/Budgets/ManagedBudgetWithFees.d.ts +4 -0
- package/dist/Budgets/ManagedBudgetWithFees.d.ts.map +1 -1
- package/dist/Budgets/ManagedBudgetWithFeesV2.d.ts +4 -0
- package/dist/Budgets/ManagedBudgetWithFeesV2.d.ts.map +1 -1
- package/dist/Budgets/TransparentBudget.d.ts +944 -0
- package/dist/Budgets/TransparentBudget.d.ts.map +1 -0
- package/dist/Budgets/VestingBudget.d.ts +4 -0
- package/dist/Budgets/VestingBudget.d.ts.map +1 -1
- package/dist/Deployable/Deployable.cjs.map +1 -1
- package/dist/Deployable/Deployable.d.ts +1 -1
- package/dist/Deployable/Deployable.d.ts.map +1 -1
- package/dist/Deployable/Deployable.js.map +1 -1
- 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 +19 -19
- package/dist/Incentive-CLKutfnD.js +445 -0
- package/dist/Incentive-CLKutfnD.js.map +1 -0
- package/dist/Incentive-CLSVNxDz.cjs +2 -0
- package/dist/Incentive-CLSVNxDz.cjs.map +1 -0
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
- package/dist/Incentives/AllowListIncentive.js +9 -9
- package/dist/Incentives/AllowListIncentive.js.map +1 -1
- package/dist/Incentives/CGDAIncentive.cjs +1 -1
- package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
- package/dist/Incentives/CGDAIncentive.js +5 -5
- 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/ERC20PeggedIncentive.d.ts +1 -1
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.cjs +2 -0
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.cjs.map +1 -0
- package/dist/Incentives/{ERC20PeggedVariableCriteriaIncentive.d.ts → ERC20PeggedVariableCriteriaIncentiveV2.d.ts} +39 -27
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.d.ts.map +1 -0
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js +625 -0
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js.map +1 -0
- package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.cjs +2 -0
- package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.cjs.map +1 -0
- package/dist/Incentives/{ERC20VariableCriteriaIncentive.d.ts → ERC20VariableCriteriaIncentiveV2.d.ts} +42 -13
- package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.d.ts.map +1 -0
- package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.js +242 -0
- package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.js.map +1 -0
- package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
- package/dist/Incentives/ERC20VariableIncentive.cjs.map +1 -1
- package/dist/Incentives/ERC20VariableIncentive.d.ts +3 -3
- package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20VariableIncentive.js +22 -22
- package/dist/Incentives/ERC20VariableIncentive.js.map +1 -1
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.d.ts +8 -8
- package/dist/Incentives/Incentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.js +13 -12
- package/dist/Incentives/Incentive.js.map +1 -1
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.cjs.map +1 -1
- package/dist/Incentives/PointsIncentive.js +13 -13
- package/dist/Incentives/PointsIncentive.js.map +1 -1
- package/dist/SimpleDenyList-C1C_BHkY.js +133 -0
- package/dist/{SimpleDenyList-BKfPoTo1.js.map → SimpleDenyList-C1C_BHkY.js.map} +1 -1
- package/dist/SimpleDenyList-CWthbyj7.cjs +2 -0
- package/dist/{SimpleDenyList-DgjVf7FK.cjs.map → SimpleDenyList-CWthbyj7.cjs.map} +1 -1
- package/dist/Validators/LimitedSignerValidator.cjs +1 -1
- package/dist/Validators/LimitedSignerValidator.cjs.map +1 -1
- package/dist/Validators/LimitedSignerValidator.d.ts.map +1 -1
- package/dist/Validators/LimitedSignerValidator.js +48 -52
- package/dist/Validators/LimitedSignerValidator.js.map +1 -1
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.cjs.map +1 -1
- package/dist/Validators/SignerValidator.js +54 -54
- package/dist/Validators/SignerValidator.js.map +1 -1
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.js +2 -2
- package/dist/componentInterfaces-BVHB4Fjw.js +21 -0
- package/dist/componentInterfaces-BVHB4Fjw.js.map +1 -0
- package/dist/componentInterfaces-BqhL-meV.cjs +2 -0
- package/dist/componentInterfaces-BqhL-meV.cjs.map +1 -0
- package/dist/deployments-D9QxJGrC.cjs +2 -0
- package/dist/deployments-D9QxJGrC.cjs.map +1 -0
- package/dist/deployments-De8_J7SS.js +120 -0
- package/dist/{deployments-W_LUj833.js.map → deployments-De8_J7SS.js.map} +1 -1
- package/dist/deployments.json +63 -48
- package/dist/{generated-CElkFqkY.js → generated-BJfQ-EBO.js} +1268 -737
- package/dist/generated-BJfQ-EBO.js.map +1 -0
- package/dist/generated-mJJNq-xb.cjs +3 -0
- package/dist/generated-mJJNq-xb.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +162 -158
- package/dist/index.js.map +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.js.map +1 -1
- package/package.json +13 -7
- package/src/Actions/EventAction.ts +11 -0
- package/src/BoostCore.test.ts +14 -9
- package/src/BoostCore.ts +428 -26
- package/src/Budgets/Budget.ts +8 -1
- package/src/Budgets/TransparentBudget.test.ts +70 -0
- package/src/Budgets/TransparentBudget.ts +334 -0
- package/src/Deployable/Deployable.ts +1 -1
- package/src/Incentives/ERC20PeggedIncentive.ts +1 -1
- package/src/Incentives/{ERC20PeggedVariableCriteriaIncentive.test.ts → ERC20PeggedVariableCriteriaIncentiveV2.test.ts} +14 -10
- package/src/Incentives/{ERC20PeggedVariableCriteriaIncentive.ts → ERC20PeggedVariableCriteriaIncentiveV2.ts} +122 -100
- package/src/Incentives/{ERC20VariableCriteriaIncentive.test.ts → ERC20VariableCriteriaIncentiveV2.test.ts} +18 -13
- package/src/Incentives/{ERC20VariableCriteriaIncentive.ts → ERC20VariableCriteriaIncentiveV2.ts} +83 -24
- package/src/Incentives/ERC20VariableIncentive.ts +4 -2
- package/src/Incentives/Incentive.ts +12 -12
- package/src/Validators/LimitedSignerValidator.ts +1 -4
- package/src/index.test.ts +2 -2
- package/src/index.ts +3 -2
- package/src/utils.ts +1 -1
- package/dist/Budget-BjfL8dVX.cjs +0 -2
- package/dist/Budget-BjfL8dVX.cjs.map +0 -1
- package/dist/Budget-DD7IPuDx.js +0 -922
- package/dist/Budget-DD7IPuDx.js.map +0 -1
- package/dist/Incentive-V1RjH38L.js +0 -1036
- package/dist/Incentive-V1RjH38L.js.map +0 -1
- package/dist/Incentive-gVTfsnMB.cjs +0 -2
- package/dist/Incentive-gVTfsnMB.cjs.map +0 -1
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.d.ts.map +0 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +0 -2
- package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs.map +0 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +0 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.js +0 -207
- package/dist/Incentives/ERC20VariableCriteriaIncentive.js.map +0 -1
- package/dist/SimpleDenyList-BKfPoTo1.js +0 -133
- package/dist/SimpleDenyList-DgjVf7FK.cjs +0 -2
- package/dist/componentInterfaces-CA1UIqWL.js +0 -20
- package/dist/componentInterfaces-CA1UIqWL.js.map +0 -1
- package/dist/componentInterfaces-aBgBbB7r.cjs +0 -2
- package/dist/componentInterfaces-aBgBbB7r.cjs.map +0 -1
- package/dist/deployments-CwTZr-cK.cjs +0 -2
- package/dist/deployments-CwTZr-cK.cjs.map +0 -1
- package/dist/deployments-W_LUj833.js +0 -117
- package/dist/generated-BPiHi7W2.cjs +0 -3
- package/dist/generated-BPiHi7W2.cjs.map +0 -1
- package/dist/generated-CElkFqkY.js.map +0 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
2
|
+
erc20PeggedVariableCriteriaIncentiveV2Abi,
|
|
3
|
+
readErc20PeggedVariableCriteriaIncentiveV2Asset,
|
|
4
|
+
readErc20PeggedVariableCriteriaIncentiveV2Claimed,
|
|
5
|
+
readErc20PeggedVariableCriteriaIncentiveV2Claims,
|
|
6
|
+
readErc20PeggedVariableCriteriaIncentiveV2CurrentReward,
|
|
7
|
+
readErc20PeggedVariableCriteriaIncentiveV2GetIncentiveCriteria,
|
|
8
|
+
readErc20PeggedVariableCriteriaIncentiveV2GetMaxReward,
|
|
9
|
+
readErc20PeggedVariableCriteriaIncentiveV2GetPeg,
|
|
10
|
+
readErc20PeggedVariableCriteriaIncentiveV2IsClaimable,
|
|
11
|
+
readErc20PeggedVariableCriteriaIncentiveV2Limit,
|
|
12
|
+
readErc20PeggedVariableCriteriaIncentiveV2Owner,
|
|
13
|
+
readErc20PeggedVariableCriteriaIncentiveV2Peg,
|
|
14
|
+
readErc20PeggedVariableCriteriaIncentiveV2Reward,
|
|
15
|
+
readErc20PeggedVariableCriteriaIncentiveV2TotalClaimed,
|
|
16
|
+
simulateErc20PeggedVariableCriteriaIncentiveV2Claim,
|
|
17
|
+
simulateErc20PeggedVariableCriteriaIncentiveV2Clawback,
|
|
18
|
+
writeErc20PeggedVariableCriteriaIncentiveV2Claim,
|
|
19
|
+
writeErc20PeggedVariableCriteriaIncentiveV2Clawback,
|
|
20
20
|
} from '@boostxyz/evm';
|
|
21
|
-
import { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/
|
|
21
|
+
import { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/ERC20PeggedVariableCriteriaIncentiveV2.sol/ERC20PeggedVariableCriteriaIncentiveV2.json';
|
|
22
22
|
import { getTransaction, getTransactionReceipt } from '@wagmi/core';
|
|
23
23
|
import type { AbiEvent } from 'abitype';
|
|
24
24
|
import {
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
zeroAddress,
|
|
35
35
|
zeroHash,
|
|
36
36
|
} from 'viem';
|
|
37
|
-
import {
|
|
37
|
+
import { ERC20PeggedVariableCriteriaIncentiveV2 as ERC20PeggedVariableCriteriaIncentiveV2Bases } from '../../dist/deployments.json';
|
|
38
38
|
import { SignatureType } from '../Actions/EventAction';
|
|
39
39
|
import type {
|
|
40
40
|
DeployableOptions,
|
|
@@ -58,18 +58,18 @@ import {
|
|
|
58
58
|
import type {
|
|
59
59
|
GetIncentiveScalarParams,
|
|
60
60
|
IncentiveCriteria,
|
|
61
|
-
} from './
|
|
61
|
+
} from './ERC20VariableCriteriaIncentiveV2';
|
|
62
62
|
|
|
63
|
-
export {
|
|
63
|
+
export { erc20PeggedVariableCriteriaIncentiveV2Abi };
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
|
-
* The object representation of a `
|
|
66
|
+
* The object representation of a `Erc20PeggedVariableCriteriaIncentiveV2.InitPayload`
|
|
67
67
|
*
|
|
68
68
|
* @export
|
|
69
|
-
* @interface
|
|
70
|
-
* @typedef {
|
|
69
|
+
* @interface Erc20PeggedVariableCriteriaIncentiveV2
|
|
70
|
+
* @typedef {Erc20PeggedVariableCriteriaIncentiveV2}
|
|
71
71
|
*/
|
|
72
|
-
export interface
|
|
72
|
+
export interface ERC20PeggedVariableCriteriaIncentiveV2Payload {
|
|
73
73
|
/**
|
|
74
74
|
* The address of the incentivized asset.
|
|
75
75
|
*
|
|
@@ -116,33 +116,33 @@ export interface ERC20PeggedVariableCriteriaIncentivePayload {
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
/**
|
|
119
|
-
* A generic `viem.Log` event with support for `
|
|
119
|
+
* A generic `viem.Log` event with support for `Erc20PeggedVariableCriteriaIncentiveV2` event types.
|
|
120
120
|
*
|
|
121
121
|
* @export
|
|
122
|
-
* @typedef {
|
|
123
|
-
* @template {ContractEventName<typeof
|
|
124
|
-
* typeof
|
|
122
|
+
* @typedef {Erc20PeggedVariableCriteriaIncentiveV2Log}
|
|
123
|
+
* @template {ContractEventName<typeof erc20PeggedVariableCriteriaIncentiveV2Abi>} [event=ContractEventName<
|
|
124
|
+
* typeof erc20PeggedVariableCriteriaIncentiveV2Abi
|
|
125
125
|
* >]
|
|
126
126
|
*/
|
|
127
|
-
export type
|
|
127
|
+
export type Erc20PeggedVariableCriteriaIncentiveV2Log<
|
|
128
128
|
event extends ContractEventName<
|
|
129
|
-
typeof
|
|
130
|
-
> = ContractEventName<typeof
|
|
131
|
-
> = GenericLog<typeof
|
|
129
|
+
typeof erc20PeggedVariableCriteriaIncentiveV2Abi
|
|
130
|
+
> = ContractEventName<typeof erc20PeggedVariableCriteriaIncentiveV2Abi>,
|
|
131
|
+
> = GenericLog<typeof erc20PeggedVariableCriteriaIncentiveV2Abi, event>;
|
|
132
132
|
|
|
133
133
|
/**
|
|
134
134
|
* A simple ERC20 incentive implementation that allows claiming of tokens
|
|
135
135
|
*
|
|
136
136
|
* @export
|
|
137
137
|
* @class Erc20PeggedVariableCriteriaIncentive
|
|
138
|
-
* @typedef {
|
|
139
|
-
* @extends {DeployableTarget<
|
|
138
|
+
* @typedef {ERC20PeggedVariableCriteriaIncentiveV2}
|
|
139
|
+
* @extends {DeployableTarget<ERC20PeggedVariableCriteriaIncentiveV2>}
|
|
140
140
|
*/
|
|
141
|
-
export class
|
|
142
|
-
|
|
143
|
-
typeof
|
|
141
|
+
export class ERC20PeggedVariableCriteriaIncentiveV2 extends DeployableTarget<
|
|
142
|
+
ERC20PeggedVariableCriteriaIncentiveV2Payload,
|
|
143
|
+
typeof erc20PeggedVariableCriteriaIncentiveV2Abi
|
|
144
144
|
> {
|
|
145
|
-
public override readonly abi =
|
|
145
|
+
public override readonly abi = erc20PeggedVariableCriteriaIncentiveV2Abi;
|
|
146
146
|
/**
|
|
147
147
|
* @inheritdoc
|
|
148
148
|
*
|
|
@@ -151,8 +151,9 @@ export class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<
|
|
|
151
151
|
* @type {Record<number, Address>}
|
|
152
152
|
*/
|
|
153
153
|
public static override bases: Record<number, Address> = {
|
|
154
|
-
31337: import.meta.env
|
|
155
|
-
|
|
154
|
+
31337: import.meta.env
|
|
155
|
+
.VITE_ERC20_PEGGED_VARIABLE_CRITERIA_INCENTIVE_V2_BASE,
|
|
156
|
+
...(ERC20PeggedVariableCriteriaIncentiveV2Bases as Record<number, Address>),
|
|
156
157
|
};
|
|
157
158
|
/**
|
|
158
159
|
* @inheritdoc
|
|
@@ -172,7 +173,7 @@ export class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<
|
|
|
172
173
|
* @returns {Promise<Address>}
|
|
173
174
|
*/
|
|
174
175
|
public async owner(params?: ReadParams) {
|
|
175
|
-
return await
|
|
176
|
+
return await readErc20PeggedVariableCriteriaIncentiveV2Owner(this._config, {
|
|
176
177
|
address: this.assertValidAddress(),
|
|
177
178
|
args: [],
|
|
178
179
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
@@ -189,7 +190,7 @@ export class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<
|
|
|
189
190
|
* @returns {Promise<bigint>} - The current reward
|
|
190
191
|
*/
|
|
191
192
|
public async currentReward(params?: ReadParams) {
|
|
192
|
-
return await
|
|
193
|
+
return await readErc20PeggedVariableCriteriaIncentiveV2CurrentReward(
|
|
193
194
|
this._config,
|
|
194
195
|
{
|
|
195
196
|
address: this.assertValidAddress(),
|
|
@@ -210,10 +211,13 @@ export class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<
|
|
|
210
211
|
*/
|
|
211
212
|
public async getMaxReward(params?: ReadParams): Promise<bigint> {
|
|
212
213
|
const maxReward =
|
|
213
|
-
await
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
214
|
+
await readErc20PeggedVariableCriteriaIncentiveV2GetMaxReward(
|
|
215
|
+
this._config,
|
|
216
|
+
{
|
|
217
|
+
...params,
|
|
218
|
+
address: this.assertValidAddress(),
|
|
219
|
+
},
|
|
220
|
+
);
|
|
217
221
|
|
|
218
222
|
return maxReward;
|
|
219
223
|
}
|
|
@@ -320,12 +324,15 @@ export class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<
|
|
|
320
324
|
* @returns {Promise<bigint>}
|
|
321
325
|
*/
|
|
322
326
|
public async claims(params?: ReadParams) {
|
|
323
|
-
return await
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
327
|
+
return await readErc20PeggedVariableCriteriaIncentiveV2Claims(
|
|
328
|
+
this._config,
|
|
329
|
+
{
|
|
330
|
+
address: this.assertValidAddress(),
|
|
331
|
+
args: [],
|
|
332
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
333
|
+
...(params as any),
|
|
334
|
+
},
|
|
335
|
+
);
|
|
329
336
|
}
|
|
330
337
|
|
|
331
338
|
/**
|
|
@@ -337,7 +344,7 @@ export class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<
|
|
|
337
344
|
* @returns {Promise<bigint>}
|
|
338
345
|
*/
|
|
339
346
|
public async totalClaimed(params?: ReadParams) {
|
|
340
|
-
return await
|
|
347
|
+
return await readErc20PeggedVariableCriteriaIncentiveV2TotalClaimed(
|
|
341
348
|
this._config,
|
|
342
349
|
{
|
|
343
350
|
address: this.assertValidAddress(),
|
|
@@ -358,12 +365,15 @@ export class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<
|
|
|
358
365
|
* @returns {Promise<boolean>}
|
|
359
366
|
*/
|
|
360
367
|
public async claimed(address: Address, params?: ReadParams) {
|
|
361
|
-
return await
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
368
|
+
return await readErc20PeggedVariableCriteriaIncentiveV2Claimed(
|
|
369
|
+
this._config,
|
|
370
|
+
{
|
|
371
|
+
address: this.assertValidAddress(),
|
|
372
|
+
args: [address],
|
|
373
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
374
|
+
...(params as any),
|
|
375
|
+
},
|
|
376
|
+
);
|
|
367
377
|
}
|
|
368
378
|
|
|
369
379
|
/**
|
|
@@ -375,7 +385,7 @@ export class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<
|
|
|
375
385
|
* @returns {Promise<Address>}
|
|
376
386
|
*/
|
|
377
387
|
public async asset(params?: ReadParams) {
|
|
378
|
-
return await
|
|
388
|
+
return await readErc20PeggedVariableCriteriaIncentiveV2Asset(this._config, {
|
|
379
389
|
address: this.assertValidAddress(),
|
|
380
390
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
381
391
|
...(params as any),
|
|
@@ -391,7 +401,7 @@ export class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<
|
|
|
391
401
|
* @returns {Promise<Address>}
|
|
392
402
|
*/
|
|
393
403
|
public async peg(params?: ReadParams) {
|
|
394
|
-
return await
|
|
404
|
+
return await readErc20PeggedVariableCriteriaIncentiveV2Peg(this._config, {
|
|
395
405
|
address: this.assertValidAddress(),
|
|
396
406
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
397
407
|
...(params as any),
|
|
@@ -407,11 +417,14 @@ export class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<
|
|
|
407
417
|
* @returns {Promise<bigint>}
|
|
408
418
|
*/
|
|
409
419
|
public async reward(params?: ReadParams) {
|
|
410
|
-
return await
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
420
|
+
return await readErc20PeggedVariableCriteriaIncentiveV2Reward(
|
|
421
|
+
this._config,
|
|
422
|
+
{
|
|
423
|
+
address: this.assertValidAddress(),
|
|
424
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
425
|
+
...(params as any),
|
|
426
|
+
},
|
|
427
|
+
);
|
|
415
428
|
}
|
|
416
429
|
|
|
417
430
|
/**
|
|
@@ -423,7 +436,7 @@ export class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<
|
|
|
423
436
|
* @returns {Promise<bigint>}
|
|
424
437
|
*/
|
|
425
438
|
public async limit(params?: ReadParams) {
|
|
426
|
-
return await
|
|
439
|
+
return await readErc20PeggedVariableCriteriaIncentiveV2Limit(this._config, {
|
|
427
440
|
address: this.assertValidAddress(),
|
|
428
441
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
429
442
|
...(params as any),
|
|
@@ -454,14 +467,14 @@ export class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<
|
|
|
454
467
|
*/
|
|
455
468
|
protected async claimRaw(payload: ClaimPayload, params?: WriteParams) {
|
|
456
469
|
const { request, result } =
|
|
457
|
-
await
|
|
470
|
+
await simulateErc20PeggedVariableCriteriaIncentiveV2Claim(this._config, {
|
|
458
471
|
address: this.assertValidAddress(),
|
|
459
472
|
args: [prepareClaimPayload(payload)],
|
|
460
473
|
...this.optionallyAttachAccount(),
|
|
461
474
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
462
475
|
...(params as any),
|
|
463
476
|
});
|
|
464
|
-
const hash = await
|
|
477
|
+
const hash = await writeErc20PeggedVariableCriteriaIncentiveV2Claim(
|
|
465
478
|
this._config,
|
|
466
479
|
request,
|
|
467
480
|
);
|
|
@@ -492,14 +505,17 @@ export class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<
|
|
|
492
505
|
*/
|
|
493
506
|
public async clawbackRaw(payload: ClaimPayload, params?: WriteParams) {
|
|
494
507
|
const { request, result } =
|
|
495
|
-
await
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
508
|
+
await simulateErc20PeggedVariableCriteriaIncentiveV2Clawback(
|
|
509
|
+
this._config,
|
|
510
|
+
{
|
|
511
|
+
address: this.assertValidAddress(),
|
|
512
|
+
args: [prepareClaimPayload(payload)],
|
|
513
|
+
...this.optionallyAttachAccount(),
|
|
514
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
515
|
+
...(params as any),
|
|
516
|
+
},
|
|
517
|
+
);
|
|
518
|
+
const hash = await writeErc20PeggedVariableCriteriaIncentiveV2Clawback(
|
|
503
519
|
this._config,
|
|
504
520
|
request,
|
|
505
521
|
);
|
|
@@ -516,7 +532,7 @@ export class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<
|
|
|
516
532
|
* @returns {Promise<boolean>} = True if the incentive is claimable based on the data payload
|
|
517
533
|
*/
|
|
518
534
|
public async isClaimable(payload: ClaimPayload, params?: ReadParams) {
|
|
519
|
-
return await
|
|
535
|
+
return await readErc20PeggedVariableCriteriaIncentiveV2IsClaimable(
|
|
520
536
|
this._config,
|
|
521
537
|
{
|
|
522
538
|
address: this.assertValidAddress(),
|
|
@@ -536,12 +552,15 @@ export class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<
|
|
|
536
552
|
* @returns {Promise<Address>} = The address of the token the reward is pegged to
|
|
537
553
|
*/
|
|
538
554
|
public async getPeg(params?: ReadParams) {
|
|
539
|
-
return await
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
555
|
+
return await readErc20PeggedVariableCriteriaIncentiveV2GetPeg(
|
|
556
|
+
this._config,
|
|
557
|
+
{
|
|
558
|
+
address: this.assertValidAddress(),
|
|
559
|
+
args: [],
|
|
560
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
561
|
+
...(params as any),
|
|
562
|
+
},
|
|
563
|
+
);
|
|
545
564
|
}
|
|
546
565
|
|
|
547
566
|
/**
|
|
@@ -600,7 +619,7 @@ export class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<
|
|
|
600
619
|
): Promise<IncentiveCriteria> {
|
|
601
620
|
try {
|
|
602
621
|
const criteria =
|
|
603
|
-
await
|
|
622
|
+
await readErc20PeggedVariableCriteriaIncentiveV2GetIncentiveCriteria(
|
|
604
623
|
this._config,
|
|
605
624
|
{
|
|
606
625
|
...params,
|
|
@@ -624,7 +643,7 @@ export class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<
|
|
|
624
643
|
* @returns {Hex} The ABI-encoded payload with the updated `limit`.
|
|
625
644
|
*/
|
|
626
645
|
public async getTopupPayload(netAmount: bigint): Promise<Hex> {
|
|
627
|
-
return
|
|
646
|
+
return prepareERC20PeggedVariableCriteriaIncentiveV2Payload({
|
|
628
647
|
asset: (await this.asset()) ?? zeroAddress,
|
|
629
648
|
peg: this.payload?.peg ?? zeroAddress,
|
|
630
649
|
reward: this.payload?.reward ?? 0n,
|
|
@@ -636,6 +655,7 @@ export class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<
|
|
|
636
655
|
signature: zeroHash,
|
|
637
656
|
fieldIndex: 0,
|
|
638
657
|
targetContract: zeroAddress,
|
|
658
|
+
valueType: 0,
|
|
639
659
|
},
|
|
640
660
|
});
|
|
641
661
|
}
|
|
@@ -644,12 +664,12 @@ export class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<
|
|
|
644
664
|
* @inheritdoc
|
|
645
665
|
*
|
|
646
666
|
* @public
|
|
647
|
-
* @param {?
|
|
667
|
+
* @param {?ERC20PeggedVariableCriteriaIncentiveV2Payload} [_payload]
|
|
648
668
|
* @param {?DeployableOptions} [_options]
|
|
649
669
|
* @returns {GenericDeployableParams}
|
|
650
670
|
*/
|
|
651
671
|
public override buildParameters(
|
|
652
|
-
_payload?:
|
|
672
|
+
_payload?: ERC20PeggedVariableCriteriaIncentiveV2Payload,
|
|
653
673
|
_options?: DeployableOptions,
|
|
654
674
|
): GenericDeployableParams {
|
|
655
675
|
const [payload, options] = this.validateDeploymentConfig(
|
|
@@ -657,9 +677,9 @@ export class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<
|
|
|
657
677
|
_options,
|
|
658
678
|
);
|
|
659
679
|
return {
|
|
660
|
-
abi:
|
|
680
|
+
abi: erc20PeggedVariableCriteriaIncentiveV2Abi,
|
|
661
681
|
bytecode: bytecode as Hex,
|
|
662
|
-
args: [
|
|
682
|
+
args: [prepareERC20PeggedVariableCriteriaIncentiveV2Payload(payload)],
|
|
663
683
|
...this.optionallyAttachAccount(options.account),
|
|
664
684
|
};
|
|
665
685
|
}
|
|
@@ -681,7 +701,7 @@ export class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<
|
|
|
681
701
|
* @public
|
|
682
702
|
* @param {bigint} signedAmount
|
|
683
703
|
* @returns {Hash} Returns the encoded claim data
|
|
684
|
-
* @description This function returns the encoded claim data for the
|
|
704
|
+
* @description This function returns the encoded claim data for the ERC20PeggedVariableCriteriaIncentiveV2Payload.
|
|
685
705
|
*/
|
|
686
706
|
public buildClaimData(signedAmount: bigint) {
|
|
687
707
|
return encodeAbiParameters(
|
|
@@ -691,12 +711,12 @@ export class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<
|
|
|
691
711
|
}
|
|
692
712
|
|
|
693
713
|
/**
|
|
694
|
-
* Decodes claim data for the
|
|
714
|
+
* Decodes claim data for the ERC20PeggedVariableCriteriaIncentiveV2, returning the claim amount.
|
|
695
715
|
* Useful when deriving amount claimed from logs.
|
|
696
716
|
*
|
|
697
717
|
* @public
|
|
698
718
|
* @param {Hex} claimData
|
|
699
|
-
* @returns {
|
|
719
|
+
* @returns {Promise<bigint>} Returns the reward amount from a claim data payload
|
|
700
720
|
*/
|
|
701
721
|
public async decodeClaimData(claimData: Hex) {
|
|
702
722
|
const boostClaimData = decodeAbiParameters(
|
|
@@ -736,7 +756,7 @@ export class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<
|
|
|
736
756
|
}
|
|
737
757
|
|
|
738
758
|
/**
|
|
739
|
-
* Decodes claim data for the
|
|
759
|
+
* Decodes claim data for the ERC20PeggedVariableCriteriaIncentiveV2, returning the claim amount.
|
|
740
760
|
* Useful when deriving amount claimed from logs.
|
|
741
761
|
* Use this function instead of `decodeClaimData` if you have reward details.
|
|
742
762
|
*
|
|
@@ -785,9 +805,9 @@ export class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<
|
|
|
785
805
|
}
|
|
786
806
|
|
|
787
807
|
/**
|
|
788
|
-
* Given a {@link
|
|
808
|
+
* Given a {@link ERC20PeggedVariableCriteriaIncentiveV2Payload}, properly encode a `ERC20PeggedVariableCriteriaIncentiveV2Payload.InitPayload` for use with {@link ERC20PeggedVariableCriteriaIncentiveV2Payload} initialization.
|
|
789
809
|
*
|
|
790
|
-
* @param {
|
|
810
|
+
* @param {ERC20PeggedVariableCriteriaIncentiveV2Payload} param0
|
|
791
811
|
* @param {Address} param0.asset - The address of the incentivized asset.
|
|
792
812
|
* @param {Address} param0.peg - The peg to normalize to.
|
|
793
813
|
* @param {bigint} param0.reward - The amount of the asset to distribute.
|
|
@@ -796,7 +816,7 @@ export class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<
|
|
|
796
816
|
* @param {IncentiveCriteria} param0.criteria - The incentive criteria for reward distribution.
|
|
797
817
|
* @returns {Hex}
|
|
798
818
|
*/
|
|
799
|
-
export function
|
|
819
|
+
export function prepareERC20PeggedVariableCriteriaIncentiveV2Payload({
|
|
800
820
|
asset,
|
|
801
821
|
peg,
|
|
802
822
|
reward,
|
|
@@ -804,7 +824,7 @@ export function prepareERC20PeggedVariableCriteriaIncentivePayload({
|
|
|
804
824
|
maxReward = 0n,
|
|
805
825
|
manager = zeroAddress,
|
|
806
826
|
criteria,
|
|
807
|
-
}:
|
|
827
|
+
}: ERC20PeggedVariableCriteriaIncentiveV2Payload) {
|
|
808
828
|
return encodeAbiParameters(
|
|
809
829
|
[
|
|
810
830
|
{
|
|
@@ -825,6 +845,7 @@ export function prepareERC20PeggedVariableCriteriaIncentivePayload({
|
|
|
825
845
|
{ type: 'bytes32', name: 'signature' },
|
|
826
846
|
{ type: 'uint8', name: 'fieldIndex' },
|
|
827
847
|
{ type: 'address', name: 'targetContract' },
|
|
848
|
+
{ type: 'uint8', name: 'valueType' },
|
|
828
849
|
],
|
|
829
850
|
},
|
|
830
851
|
],
|
|
@@ -843,6 +864,7 @@ export function prepareERC20PeggedVariableCriteriaIncentivePayload({
|
|
|
843
864
|
signature: criteria.signature,
|
|
844
865
|
fieldIndex: criteria.fieldIndex,
|
|
845
866
|
targetContract: criteria.targetContract,
|
|
867
|
+
valueType: criteria.valueType,
|
|
846
868
|
},
|
|
847
869
|
},
|
|
848
870
|
],
|
|
@@ -23,14 +23,14 @@ import {
|
|
|
23
23
|
zeroHash,
|
|
24
24
|
} from "viem";
|
|
25
25
|
import { beforeAll, beforeEach, describe, expect, test } from "vitest";
|
|
26
|
-
import { SignatureType } from "../Actions/EventAction";
|
|
26
|
+
import { SignatureType, ValueType } from "../Actions/EventAction";
|
|
27
27
|
import type { Boost } from "../Boost";
|
|
28
28
|
import {
|
|
29
|
-
type
|
|
30
|
-
type
|
|
29
|
+
type ERC20VariableCriteriaIncentiveV2,
|
|
30
|
+
type ERC20VariableCriteriaIncentiveV2Payload,
|
|
31
31
|
type IncentiveCriteria,
|
|
32
32
|
gasRebateIncentiveCriteria,
|
|
33
|
-
} from "./
|
|
33
|
+
} from "./ERC20VariableCriteriaIncentiveV2";
|
|
34
34
|
import { allKnownSignatures } from "@boostxyz/test/allKnownSignatures";
|
|
35
35
|
|
|
36
36
|
/**
|
|
@@ -47,6 +47,7 @@ export function basicErc721TransferScalarCriteria(
|
|
|
47
47
|
signature: funcSelectors["transferFrom(address,address,uint256)"] as Hex, // Function selector for mint
|
|
48
48
|
fieldIndex: 2, // Field where the scalar value resides
|
|
49
49
|
targetContract: erc721.assertValidAddress(),
|
|
50
|
+
valueType: ValueType.WAD,
|
|
50
51
|
};
|
|
51
52
|
}
|
|
52
53
|
|
|
@@ -66,6 +67,7 @@ export function basicErc721MintScalarCriteria(
|
|
|
66
67
|
] as Hex, // Function selector for mint
|
|
67
68
|
fieldIndex: 2, // Field where the scalar value resides
|
|
68
69
|
targetContract: erc721.assertValidAddress(),
|
|
70
|
+
valueType: ValueType.WAD,
|
|
69
71
|
};
|
|
70
72
|
}
|
|
71
73
|
|
|
@@ -77,7 +79,7 @@ export function basicErc721MintScalarCriteria(
|
|
|
77
79
|
*/
|
|
78
80
|
export function basicErc721TransferScalarPayload(
|
|
79
81
|
erc721: MockERC721,
|
|
80
|
-
):
|
|
82
|
+
): ERC20VariableCriteriaIncentiveV2Payload {
|
|
81
83
|
return {
|
|
82
84
|
asset: erc721.assertValidAddress(),
|
|
83
85
|
reward: 1n,
|
|
@@ -90,11 +92,11 @@ export function basicErc721TransferScalarPayload(
|
|
|
90
92
|
let fixtures: Fixtures,
|
|
91
93
|
erc20: MockERC20,
|
|
92
94
|
erc721: MockERC721,
|
|
93
|
-
erc20Incentive:
|
|
95
|
+
erc20Incentive: ERC20VariableCriteriaIncentiveV2,
|
|
94
96
|
budgets: BudgetFixtures,
|
|
95
97
|
boost: Boost;
|
|
96
98
|
|
|
97
|
-
describe("
|
|
99
|
+
describe("ERC20VariableCriteriaIncentiveV2", () => {
|
|
98
100
|
beforeAll(async () => {
|
|
99
101
|
fixtures = await loadFixture(deployFixtures(defaultOptions));
|
|
100
102
|
});
|
|
@@ -103,7 +105,7 @@ describe("ERC20VariableCriteriaIncentive", () => {
|
|
|
103
105
|
budgets = await loadFixture(fundBudget(defaultOptions, fixtures));
|
|
104
106
|
erc20 = await loadFixture(fundErc20(defaultOptions));
|
|
105
107
|
erc721 = await loadFixture(fundErc721(defaultOptions));
|
|
106
|
-
erc20Incentive = fixtures.core.
|
|
108
|
+
erc20Incentive = fixtures.core.ERC20VariableCriteriaIncentiveV2({
|
|
107
109
|
asset: budgets.erc20.assertValidAddress(),
|
|
108
110
|
reward: 1n,
|
|
109
111
|
limit: 1n,
|
|
@@ -119,13 +121,14 @@ describe("ERC20VariableCriteriaIncentive", () => {
|
|
|
119
121
|
|
|
120
122
|
describe("getIncentiveCriteria", () => {
|
|
121
123
|
test("should fetch incentive criteria successfully", async () => {
|
|
122
|
-
const incentive = boost.incentives[0] as
|
|
124
|
+
const incentive = boost.incentives[0] as ERC20VariableCriteriaIncentiveV2;
|
|
123
125
|
const criteria = await incentive.getIncentiveCriteria();
|
|
124
126
|
expect(criteria).toMatchObject({
|
|
125
127
|
criteriaType: SignatureType.FUNC,
|
|
126
128
|
signature: expect.any(String),
|
|
127
129
|
fieldIndex: expect.any(Number),
|
|
128
130
|
targetContract: expect.any(String),
|
|
131
|
+
valueType: expect.any(Number),
|
|
129
132
|
});
|
|
130
133
|
});
|
|
131
134
|
});
|
|
@@ -149,7 +152,7 @@ describe("ERC20VariableCriteriaIncentive", () => {
|
|
|
149
152
|
});
|
|
150
153
|
|
|
151
154
|
test("should return a valid scalar for event-based criteria", async () => {
|
|
152
|
-
erc20Incentive = fixtures.core.
|
|
155
|
+
erc20Incentive = fixtures.core.ERC20VariableCriteriaIncentiveV2({
|
|
153
156
|
asset: budgets.erc20.assertValidAddress(),
|
|
154
157
|
reward: 1n,
|
|
155
158
|
limit: 1n,
|
|
@@ -180,7 +183,7 @@ describe("ERC20VariableCriteriaIncentive", () => {
|
|
|
180
183
|
// Ensure that the gasRebateIncentiveCriteria returns the correct structure
|
|
181
184
|
const gasRebateCriteria = gasRebateIncentiveCriteria();
|
|
182
185
|
|
|
183
|
-
erc20Incentive = fixtures.core.
|
|
186
|
+
erc20Incentive = fixtures.core.ERC20VariableCriteriaIncentiveV2({
|
|
184
187
|
asset: budgets.erc20.assertValidAddress(),
|
|
185
188
|
reward: 1n,
|
|
186
189
|
limit: 1n,
|
|
@@ -194,6 +197,7 @@ describe("ERC20VariableCriteriaIncentive", () => {
|
|
|
194
197
|
signature: zeroHash,
|
|
195
198
|
fieldIndex: 255,
|
|
196
199
|
targetContract: zeroAddress,
|
|
200
|
+
valueType: ValueType.WAD,
|
|
197
201
|
});
|
|
198
202
|
|
|
199
203
|
boost = await freshBoost(fixtures, {
|
|
@@ -203,12 +207,13 @@ describe("ERC20VariableCriteriaIncentive", () => {
|
|
|
203
207
|
|
|
204
208
|
// Validate that the deployed incentive has the correct criteria set up
|
|
205
209
|
const deployedIncentive = (await boost
|
|
206
|
-
.incentives[0]) as
|
|
210
|
+
.incentives[0]) as ERC20VariableCriteriaIncentiveV2;
|
|
207
211
|
const deployedCriteria = await deployedIncentive.getIncentiveCriteria();
|
|
208
212
|
expect(deployedCriteria.criteriaType).toBe(SignatureType.EVENT);
|
|
209
213
|
expect(deployedCriteria.signature).toBe(zeroHash);
|
|
210
214
|
expect(deployedCriteria.fieldIndex).toBe(255);
|
|
211
215
|
expect(deployedCriteria.targetContract).toBe(zeroAddress);
|
|
216
|
+
expect(deployedCriteria.valueType).toBe(ValueType.WAD);
|
|
212
217
|
});
|
|
213
218
|
|
|
214
219
|
test("should throw NoMatchingLogsError for event criteria with no matching logs", async () => {
|
|
@@ -245,7 +250,7 @@ describe("ERC20VariableCriteriaIncentive", () => {
|
|
|
245
250
|
|
|
246
251
|
test("can properly encode a uint256", () => {
|
|
247
252
|
//@ts-ignore
|
|
248
|
-
const incentive = fixtures.core.
|
|
253
|
+
const incentive = fixtures.core.ERC20VariableCriteriaIncentiveV2();
|
|
249
254
|
expect(incentive.buildClawbackData(1n)).toBe(
|
|
250
255
|
"0x0000000000000000000000000000000000000000000000000000000000000001",
|
|
251
256
|
);
|