@boostxyz/sdk 6.0.3 → 6.1.1
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/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.js +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.js +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.js +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- package/dist/AllowLists/SimpleDenyList.js +2 -2
- package/dist/BoostCore.cjs +2 -2
- package/dist/BoostCore.cjs.map +1 -1
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +86 -85
- package/dist/BoostCore.js.map +1 -1
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.js +1 -1
- package/dist/{Budget-CsqSI4NH.cjs → Budget-Dm6h8giH.cjs} +2 -2
- package/dist/{Budget-CsqSI4NH.cjs.map → Budget-Dm6h8giH.cjs.map} +1 -1
- package/dist/{Budget-bMiAGF8s.js → Budget-JjYzHgRx.js} +2 -2
- package/dist/{Budget-bMiAGF8s.js.map → Budget-JjYzHgRx.js.map} +1 -1
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.js +1 -1
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.js +1 -1
- package/dist/{Incentive-Bkq1kdns.cjs → Incentive-BHOurMJr.cjs} +2 -2
- package/dist/{Incentive-Bkq1kdns.cjs.map → Incentive-BHOurMJr.cjs.map} +1 -1
- package/dist/{Incentive-D_NHLasu.js → Incentive-DCOhfsid.js} +2 -2
- package/dist/{Incentive-D_NHLasu.js.map → Incentive-DCOhfsid.js.map} +1 -1
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.js +2 -2
- package/dist/Incentives/CGDAIncentive.cjs +1 -1
- package/dist/Incentives/CGDAIncentive.js +1 -1
- package/dist/Incentives/ERC20Incentive.cjs +1 -1
- package/dist/Incentives/ERC20Incentive.js +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.js +1 -1
- package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
- package/dist/Incentives/ERC20VariableIncentive.js +1 -1
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.js +1 -1
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.js +1 -1
- package/dist/{SimpleDenyList-C734XLxt.js → SimpleDenyList-BKfPoTo1.js} +2 -2
- package/dist/{SimpleDenyList-C734XLxt.js.map → SimpleDenyList-BKfPoTo1.js.map} +1 -1
- package/dist/{SimpleDenyList-BAIrFBAW.cjs → SimpleDenyList-DgjVf7FK.cjs} +2 -2
- package/dist/{SimpleDenyList-BAIrFBAW.cjs.map → SimpleDenyList-DgjVf7FK.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 +1 -1
- package/dist/Validators/LimitedSignerValidator.js.map +1 -1
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.js +1 -1
- package/dist/{deployments-CIXw_WKk.cjs → deployments-CwTZr-cK.cjs} +2 -2
- package/dist/deployments-CwTZr-cK.cjs.map +1 -0
- package/dist/{deployments-3RHH-eW7.js → deployments-W_LUj833.js} +24 -19
- package/dist/{deployments-3RHH-eW7.js.map → deployments-W_LUj833.js.map} +1 -1
- package/dist/deployments.json +5 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/package.json +1 -1
- package/src/BoostCore.test.ts +82 -1
- package/src/BoostCore.ts +15 -6
- package/src/Validators/LimitedSignerValidator.ts +1 -3
- package/dist/deployments-CIXw_WKk.cjs.map +0 -1
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a = {
|
|
2
2
|
10: "0xE79Cc2063A470087604F7690F3Ff5e0759addA06",
|
|
3
3
|
8453: "0xCB74EdD24917238c98e7c6d20B047C6D7e0feDdc",
|
|
4
4
|
42161: "0xE79Cc2063A470087604F7690F3Ff5e0759addA06",
|
|
5
5
|
84532: "0xCB74EdD24917238c98e7c6d20B047C6D7e0feDdc",
|
|
6
6
|
11155111: "0xCB74EdD24917238c98e7c6d20B047C6D7e0feDdc"
|
|
7
|
-
},
|
|
7
|
+
}, e = {
|
|
8
8
|
10: "0xa017d8DBeB026a80b3E99F8e118bfFC3efd842BC",
|
|
9
9
|
8453: "0x378632819F39C74c4F56B1429E760739c5fb51b7",
|
|
10
10
|
42161: "0xa017d8DBeB026a80b3E99F8e118bfFC3efd842BC",
|
|
11
11
|
84532: "0x378632819F39C74c4F56B1429E760739c5fb51b7",
|
|
12
12
|
11155111: "0x378632819F39C74c4F56B1429E760739c5fb51b7"
|
|
13
|
-
},
|
|
13
|
+
}, c = {
|
|
14
14
|
10: "0xCF9A795Fed701aa214598998a2D4566413D906Ce",
|
|
15
15
|
8453: "0x54aBB00F12755Be99729E50dade1BA62c75F8879",
|
|
16
16
|
42161: "0xCF9A795Fed701aa214598998a2D4566413D906Ce",
|
|
17
17
|
84532: "0x54aBB00F12755Be99729E50dade1BA62c75F8879",
|
|
18
18
|
11155111: "0x54aBB00F12755Be99729E50dade1BA62c75F8879"
|
|
19
|
-
},
|
|
19
|
+
}, d = {
|
|
20
20
|
10: "0x7Df4b5625567AA946d93118Fe8e81Fa4d6b10Cfd",
|
|
21
21
|
8453: "0x9Ed41B9834d6865092520D34ee75292242d3fA56",
|
|
22
22
|
42161: "0x7Df4b5625567AA946d93118Fe8e81Fa4d6b10Cfd",
|
|
23
23
|
84532: "0x9Ed41B9834d6865092520D34ee75292242d3fA56",
|
|
24
24
|
11155111: "0x9Ed41B9834d6865092520D34ee75292242d3fA56"
|
|
25
|
-
},
|
|
25
|
+
}, B = {
|
|
26
26
|
10: "0x67f6185EB855aCd514fAC9d9e6Bd83b01040Ce33",
|
|
27
27
|
8453: "0x4b62424bbEbcF33Ab25d109E68AC1E8F0832dd8A",
|
|
28
28
|
42161: "0x67f6185EB855aCd514fAC9d9e6Bd83b01040Ce33",
|
|
@@ -34,13 +34,13 @@ const c = {
|
|
|
34
34
|
42161: "0xB58d3bA94d16305bf35F8D2055faB44b01063F9B",
|
|
35
35
|
84532: "0x7F1f7A55db96BDc2CBF9Dc96cBb25A8f98e8C30c",
|
|
36
36
|
11155111: "0x7F1f7A55db96BDc2CBF9Dc96cBb25A8f98e8C30c"
|
|
37
|
-
},
|
|
37
|
+
}, A = {
|
|
38
38
|
10: "0x3647EF9212033976204D9d3df3Ed46832888F7fB",
|
|
39
39
|
8453: "0xB6705B489bcE045137f0ca7283d5b75297f34cF7",
|
|
40
40
|
42161: "0x3647EF9212033976204D9d3df3Ed46832888F7fB",
|
|
41
41
|
84532: "0xB6705B489bcE045137f0ca7283d5b75297f34cF7",
|
|
42
42
|
11155111: "0xB6705B489bcE045137f0ca7283d5b75297f34cF7"
|
|
43
|
-
},
|
|
43
|
+
}, b = {
|
|
44
44
|
10: "0xa4b9E4278Fc1C2Cd7f298D6Ab77fE5ed0BAEFa09",
|
|
45
45
|
8453: "0xa50b6F908a48c9486Bc10801fEC187cfc8ad4224",
|
|
46
46
|
42161: "0xa4b9E4278Fc1C2Cd7f298D6Ab77fE5ed0BAEFa09",
|
|
@@ -76,13 +76,13 @@ const c = {
|
|
|
76
76
|
42161: "0x6dA00E864f55ceA64d0d24968fb8bb02Cd8C43E8",
|
|
77
77
|
84532: "0xa75E05550D6D3A7C6E960Ac8f8c4155fC64c12eF",
|
|
78
78
|
11155111: "0xa75E05550D6D3A7C6E960Ac8f8c4155fC64c12eF"
|
|
79
|
-
},
|
|
79
|
+
}, t = {
|
|
80
80
|
10: "0x2399DAB7d25bE315C2074BEcd50f243f4982D655",
|
|
81
81
|
8453: "0x01B1dB35a5f91080c7518d917aE124E863abB0EB",
|
|
82
82
|
42161: "0x2399DAB7d25bE315C2074BEcd50f243f4982D655",
|
|
83
83
|
84532: "0x01B1dB35a5f91080c7518d917aE124E863abB0EB",
|
|
84
84
|
11155111: "0x01B1dB35a5f91080c7518d917aE124E863abB0EB"
|
|
85
|
-
},
|
|
85
|
+
}, s = {
|
|
86
86
|
8453: "0xCc167F40c9802817d1De42152913553816BFb776",
|
|
87
87
|
84532: "0xCc167F40c9802817d1De42152913553816BFb776",
|
|
88
88
|
11155111: "0xCc167F40c9802817d1De42152913553816BFb776"
|
|
@@ -90,23 +90,28 @@ const c = {
|
|
|
90
90
|
8453: "0x6D28feD9181533a9A638949f12958686baAA886a",
|
|
91
91
|
84532: "0x6D28feD9181533a9A638949f12958686baAA886a",
|
|
92
92
|
11155111: "0x6D28feD9181533a9A638949f12958686baAA886a"
|
|
93
|
+
}, i = {
|
|
94
|
+
8453: "0x283A297C21D32Ff8e8BA616E5e32De5e05e03aa4",
|
|
95
|
+
84532: "0x283A297C21D32Ff8e8BA616E5e32De5e05e03aa4",
|
|
96
|
+
11155111: "0x283A297C21D32Ff8e8BA616E5e32De5e05e03aa4"
|
|
93
97
|
};
|
|
94
98
|
export {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
+
a as A,
|
|
100
|
+
c as B,
|
|
101
|
+
d as C,
|
|
102
|
+
B as E,
|
|
103
|
+
i as L,
|
|
99
104
|
F as M,
|
|
100
105
|
E as P,
|
|
101
106
|
x as S,
|
|
102
|
-
|
|
107
|
+
t as a,
|
|
103
108
|
f as b,
|
|
104
|
-
|
|
109
|
+
A as c,
|
|
105
110
|
D as d,
|
|
106
|
-
|
|
111
|
+
b as e,
|
|
107
112
|
C as f,
|
|
108
|
-
|
|
113
|
+
s as g,
|
|
109
114
|
n as h,
|
|
110
|
-
|
|
115
|
+
e as i
|
|
111
116
|
};
|
|
112
|
-
//# sourceMappingURL=deployments-
|
|
117
|
+
//# sourceMappingURL=deployments-W_LUj833.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployments-
|
|
1
|
+
{"version":3,"file":"deployments-W_LUj833.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/deployments.json
CHANGED
|
@@ -113,5 +113,10 @@
|
|
|
113
113
|
"8453": "0x6D28feD9181533a9A638949f12958686baAA886a",
|
|
114
114
|
"84532": "0x6D28feD9181533a9A638949f12958686baAA886a",
|
|
115
115
|
"11155111": "0x6D28feD9181533a9A638949f12958686baAA886a"
|
|
116
|
+
},
|
|
117
|
+
"LimitedSignerValidator": {
|
|
118
|
+
"8453": "0x283A297C21D32Ff8e8BA616E5e32De5e05e03aa4",
|
|
119
|
+
"84532": "0x283A297C21D32Ff8e8BA616E5e32De5e05e03aa4",
|
|
120
|
+
"11155111": "0x283A297C21D32Ff8e8BA616E5e32De5e05e03aa4"
|
|
116
121
|
}
|
|
117
122
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./BoostRegistry.cjs"),l=require("./BoostCore.cjs"),u=require("./Boost.cjs"),C=require("./Actions/Action.cjs"),a=require("./Actions/EventAction.cjs"),E=require("./AllowLists/AllowList.cjs"),y=require("./AllowLists/SimpleAllowList.cjs"),I=require("./SimpleDenyList-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./BoostRegistry.cjs"),l=require("./BoostCore.cjs"),u=require("./Boost.cjs"),C=require("./Actions/Action.cjs"),a=require("./Actions/EventAction.cjs"),E=require("./AllowLists/AllowList.cjs"),y=require("./AllowLists/SimpleAllowList.cjs"),I=require("./SimpleDenyList-DgjVf7FK.cjs"),t=require("./Budget-Dm6h8giH.cjs"),o=require("./Budgets/ManagedBudget.cjs"),D=require("./Deployable/Deployable.cjs"),T=require("./Deployable/Contract.cjs"),V=require("./Deployable/DeployableTarget.cjs"),P=require("./Deployable/DeployableTargetWithRBAC.cjs"),v=require("./Incentives/AllowListIncentive.cjs"),R=require("./Incentives/CGDAIncentive.cjs"),S=require("./Incentives/ERC20Incentive.cjs"),n=require("./Incentive-BHOurMJr.cjs"),m=require("./Incentives/ERC20VariableIncentive.cjs"),A=require("./Incentives/ERC20VariableCriteriaIncentive.cjs"),b=require("./Incentives/PointsIncentive.cjs"),s=require("./Validators/SignerValidator.cjs"),p=require("./Validators/LimitedSignerValidator.cjs"),c=require("./Validators/Validator.cjs"),e=require("./errors.cjs"),i=require("./utils.cjs"),B=require("./claiming.cjs"),d=require("./transfers.cjs"),F=require("./Auth/PassthroughAuth.cjs"),r=require("./generated-BPiHi7W2.cjs");exports.BOOST_REGISTRY_ADDRESS=g.BOOST_REGISTRY_ADDRESS;exports.BOOST_REGISTRY_ADDRESSES=g.BOOST_REGISTRY_ADDRESSES;exports.BoostRegistry=g.BoostRegistry;exports.BOOST_CORE_ADDRESS=l.BOOST_CORE_ADDRESS;exports.BOOST_CORE_ADDRESSES=l.BOOST_CORE_ADDRESSES;exports.BoostCore=l.BoostCore;exports.FEE_DENOMINATOR=l.FEE_DENOMINATOR;exports.Boost=u.Boost;exports.prepareBoostPayload=u.prepareBoostPayload;exports.ActionByComponentInterface=C.ActionByComponentInterface;exports.actionFromAddress=C.actionFromAddress;exports.EventAction=a.EventAction;exports.FilterType=a.FilterType;exports.PrimitiveType=a.PrimitiveType;exports.SignatureType=a.SignatureType;exports.anyActionParameter=a.anyActionParameter;exports.decodeAndReorderLogArgs=a.decodeAndReorderLogArgs;exports.detectSignatureType=a.detectSignatureType;exports.isEventActionPayloadSimple=a.isEventActionPayloadSimple;exports.packFieldIndexes=a.packFieldIndexes;exports.prepareEventActionPayload=a.prepareEventActionPayload;exports.transactionSenderClaimant=a.transactionSenderClaimant;exports.unpackFieldIndexes=a.unpackFieldIndexes;exports.AllowListByComponentInterface=E.AllowListByComponentInterface;exports.OpenAllowList=E.OpenAllowList;exports.allowListFromAddress=E.allowListFromAddress;exports.LIST_MANAGER_ROLE=y.LIST_MANAGER_ROLE;exports.SimpleAllowList=y.SimpleAllowList;exports.prepareSimpleAllowListPayload=y.prepareSimpleAllowListPayload;exports.SimpleDenyList=I.SimpleDenyList;exports.prepareSimpleDenyListPayload=I.prepareSimpleDenyListPayload;exports.BudgetByComponentInterface=t.BudgetByComponentInterface;exports.ManagedBudgetWithFees=t.ManagedBudgetWithFees;exports.ManagedBudgetWithFeesV2=t.ManagedBudgetWithFeesV2;exports.budgetFromAddress=t.budgetFromAddress;exports.prepareManagedBudgetWithFeesPayload=t.prepareManagedBudgetWithFeesPayload;exports.prepareManagedBudgetWithFeesV2Payload=t.prepareManagedBudgetWithFeesV2Payload;exports.ManagedBudget=o.ManagedBudget;exports.ManagedBudgetRoles=o.ManagedBudgetRoles;exports.isERC1155TransferPayload=o.isERC1155TransferPayload;exports.isFungibleTransfer=o.isFungibleTransfer;exports.prepareManagedBudgetPayload=o.prepareManagedBudgetPayload;exports.prepareTransfer=o.prepareTransfer;exports.Deployable=D.Deployable;exports.Contract=T.Contract;exports.DeployableTarget=V.DeployableTarget;exports.DeployableTargetWithRBAC=P.DeployableTargetWithRBAC;exports.Roles=P.Roles;exports.AllowListIncentive=v.AllowListIncentive;exports.prepareAllowListIncentivePayload=v.prepareAllowListIncentivePayload;exports.CGDAIncentive=R.CGDAIncentive;exports.prepareCGDAIncentivePayload=R.prepareCGDAIncentivePayload;exports.ERC20Incentive=S.ERC20Incentive;exports.prepareERC20IncentivePayload=S.prepareERC20IncentivePayload;exports.ERC20PeggedIncentive=n.ERC20PeggedIncentive;exports.ERC20PeggedVariableCriteriaIncentive=n.ERC20PeggedVariableCriteriaIncentive;exports.IncentiveByComponentInterface=n.IncentiveByComponentInterface;exports.incentiveFromAddress=n.incentiveFromAddress;exports.prepareERC20PeggedIncentivePayload=n.prepareERC20PeggedIncentivePayload;exports.prepareERC20PeggedVariableCriteriaIncentivePayload=n.prepareERC20PeggedVariableCriteriaIncentivePayload;exports.ERC20VariableIncentive=m.ERC20VariableIncentive;exports.prepareERC20VariableIncentivePayload=m.prepareERC20VariableIncentivePayload;exports.ERC20VariableCriteriaIncentive=A.ERC20VariableCriteriaIncentive;exports.gasRebateIncentiveCriteria=A.gasRebateIncentiveCriteria;exports.prepareERC20VariableCriteriaIncentivePayload=A.prepareERC20VariableCriteriaIncentivePayload;exports.PointsIncentive=b.PointsIncentive;exports.preparePointsIncentivePayload=b.preparePointsIncentivePayload;exports.SignerValidator=s.SignerValidator;exports.prepareSignerValidatorClaimDataPayload=s.prepareSignerValidatorClaimDataPayload;exports.prepareSignerValidatorInputParams=s.prepareSignerValidatorInputParams;exports.prepareSignerValidatorPayload=s.prepareSignerValidatorPayload;exports.LimitedSignerValidator=p.LimitedSignerValidator;exports.prepareLimitedSignerValidatorClaimDataPayload=p.prepareLimitedSignerValidatorClaimDataPayload;exports.prepareLimitedSignerValidatorInputParams=p.prepareLimitedSignerValidatorInputParams;exports.prepareLimitedSignerValidatorPayload=p.prepareLimitedSignerValidatorPayload;exports.BoostValidatorEOA=c.BoostValidatorEOA;exports.ValidatorByComponentInterface=c.ValidatorByComponentInterface;exports.decodeClaimData=c.decodeClaimData;exports.validatorFromAddress=c.validatorFromAddress;exports.BoostCoreNoIdentifierEmitted=e.BoostCoreNoIdentifierEmitted;exports.BoostNotFoundError=e.BoostNotFoundError;exports.BudgetMustAuthorizeBoostCore=e.BudgetMustAuthorizeBoostCore;exports.ContractAddressRequiredError=e.ContractAddressRequiredError;exports.DecodedArgsError=e.DecodedArgsError;exports.DecodedArgsMalformedError=e.DecodedArgsMalformedError;exports.DeployableAlreadyDeployedError=e.DeployableAlreadyDeployedError;exports.DeployableBuildParametersUnspecifiedError=e.DeployableBuildParametersUnspecifiedError;exports.DeployableMissingPayloadError=e.DeployableMissingPayloadError;exports.DeployableUnknownOwnerProvidedError=e.DeployableUnknownOwnerProvidedError;exports.DeployableWagmiConfigurationRequiredError=e.DeployableWagmiConfigurationRequiredError;exports.FieldActionValidationError=e.FieldActionValidationError;exports.FieldValueNotComparableError=e.FieldValueNotComparableError;exports.FieldValueUndefinedError=e.FieldValueUndefinedError;exports.FunctionDataDecodeError=e.FunctionDataDecodeError;exports.IncentiveCriteriaNotFoundError=e.IncentiveCriteriaNotFoundError;exports.IncentiveNotCloneableError=e.IncentiveNotCloneableError;exports.InvalidComponentInterfaceError=e.InvalidComponentInterfaceError;exports.InvalidCriteriaTypeError=e.InvalidCriteriaTypeError;exports.InvalidNumericalCriteriaError=e.InvalidNumericalCriteriaError;exports.InvalidProtocolChainIdError=e.InvalidProtocolChainIdError;exports.InvalidTupleDecodingError=e.InvalidTupleDecodingError;exports.InvalidTupleEncodingError=e.InvalidTupleEncodingError;exports.MustInitializeBudgetError=e.MustInitializeBudgetError;exports.NoConnectedChainIdError=e.NoConnectedChainIdError;exports.NoContractAddressUponReceiptError=e.NoContractAddressUponReceiptError;exports.NoEventActionStepsProvidedError=e.NoEventActionStepsProvidedError;exports.NoMatchingLogsError=e.NoMatchingLogsError;exports.TooManyEventActionStepsProvidedError=e.TooManyEventActionStepsProvidedError;exports.UnknownTransferPayloadSupplied=e.UnknownTransferPayloadSupplied;exports.UnparseableAbiParamError=e.UnparseableAbiParamError;exports.UnrecognizedFilterTypeError=e.UnrecognizedFilterTypeError;exports.ValidationAbiMissingError=e.ValidationAbiMissingError;exports.CheatCodes=i.CheatCodes;exports.RegistryType=i.RegistryType;exports.TRANSFER_SIGNATURE=i.TRANSFER_SIGNATURE;exports.assertValidAddressByChainId=i.assertValidAddressByChainId;exports.awaitResult=i.awaitResult;exports.bytes4=i.bytes4;exports.getDeployedContractAddress=i.getDeployedContractAddress;exports.getErc20Balance=i.getErc20Balance;exports.StrategyType=B.StrategyType;exports.prepareClaimPayload=B.prepareClaimPayload;exports.AssetType=d.AssetType;exports.prepareERC1155Payload=d.prepareERC1155Payload;exports.prepareERC1155Transfer=d.prepareERC1155Transfer;exports.prepareFungiblePayload=d.prepareFungiblePayload;exports.prepareFungibleTransfer=d.prepareFungibleTransfer;exports.prepareTransferPayload=d.prepareTransferPayload;exports.PassthroughAuth=F.PassthroughAuth;exports.allowListIncentiveAbi=r.H;exports.boostCoreAbi=r.g;exports.boostRegistryAbi=r.be;exports.cgdaIncentiveAbi=r.N;exports.erc20IncentiveAbi=r.m;exports.erc20PeggedIncentiveAbi=r.f;exports.erc20PeggedVariableCriteriaIncentiveAbi=r.y;exports.erc20VariableCriteriaIncentiveAbi=r.d;exports.erc20VariableIncentiveAbi=r.A;exports.limitedSignerValidatorAbi=r.S;exports.managedBudgetAbi=r.h;exports.managedBudgetWithFeesAbi=r.p;exports.managedBudgetWithFeesV2Abi=r.r;exports.passthroughAuthAbi=r.$e;exports.pointsIncentiveAbi=r.R;exports.rbacAbi=r.V;exports.signerValidatorAbi=r._;exports.simpleAllowListAbi=r.z;exports.simpleDenyListAbi=r.B;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -5,8 +5,8 @@ import { ActionByComponentInterface as E, actionFromAddress as A } from "./Actio
|
|
|
5
5
|
import { EventAction as C, FilterType as I, PrimitiveType as b, SignatureType as f, anyActionParameter as P, decodeAndReorderLogArgs as v, detectSignatureType as u, isEventActionPayloadSimple as R, packFieldIndexes as S, prepareEventActionPayload as B, transactionSenderClaimant as x, unpackFieldIndexes as D } from "./Actions/EventAction.js";
|
|
6
6
|
import { AllowListByComponentInterface as V, OpenAllowList as F, allowListFromAddress as h } from "./AllowLists/AllowList.js";
|
|
7
7
|
import { LIST_MANAGER_ROLE as M, SimpleAllowList as N, prepareSimpleAllowListPayload as O } from "./AllowLists/SimpleAllowList.js";
|
|
8
|
-
import { S as _, p as U } from "./SimpleDenyList-
|
|
9
|
-
import { B as G, M as k, a as z, b as q, p as Y, c as H } from "./Budget-
|
|
8
|
+
import { S as _, p as U } from "./SimpleDenyList-BKfPoTo1.js";
|
|
9
|
+
import { B as G, M as k, a as z, b as q, p as Y, c as H } from "./Budget-JjYzHgRx.js";
|
|
10
10
|
import { ManagedBudget as j, ManagedBudgetRoles as J, isERC1155TransferPayload as K, isFungibleTransfer as Q, prepareManagedBudgetPayload as X, prepareTransfer as Z } from "./Budgets/ManagedBudget.js";
|
|
11
11
|
import { Deployable as re } from "./Deployable/Deployable.js";
|
|
12
12
|
import { Contract as oe } from "./Deployable/Contract.js";
|
|
@@ -15,7 +15,7 @@ import { DeployableTargetWithRBAC as de, Roles as pe } from "./Deployable/Deploy
|
|
|
15
15
|
import { AllowListIncentive as se, prepareAllowListIncentivePayload as ce } from "./Incentives/AllowListIncentive.js";
|
|
16
16
|
import { CGDAIncentive as me, prepareCGDAIncentivePayload as Ee } from "./Incentives/CGDAIncentive.js";
|
|
17
17
|
import { ERC20Incentive as ye, prepareERC20IncentivePayload as Ce } from "./Incentives/ERC20Incentive.js";
|
|
18
|
-
import { E as be, a as fe, I as Pe, i as ve, p as ue, b as Re } from "./Incentive-
|
|
18
|
+
import { E as be, a as fe, I as Pe, i as ve, p as ue, b as Re } from "./Incentive-DCOhfsid.js";
|
|
19
19
|
import { ERC20VariableIncentive as Be, prepareERC20VariableIncentivePayload as xe } from "./Incentives/ERC20VariableIncentive.js";
|
|
20
20
|
import { ERC20VariableCriteriaIncentive as Te, gasRebateIncentiveCriteria as Ve, prepareERC20VariableCriteriaIncentivePayload as Fe } from "./Incentives/ERC20VariableCriteriaIncentive.js";
|
|
21
21
|
import { PointsIncentive as Le, preparePointsIncentivePayload as Me } from "./Incentives/PointsIncentive.js";
|
package/package.json
CHANGED
package/src/BoostCore.test.ts
CHANGED
|
@@ -17,7 +17,7 @@ import { StrategyType } from "./claiming";
|
|
|
17
17
|
import { BoostNotFoundError, IncentiveNotCloneableError } from "./errors";
|
|
18
18
|
import type { ERC20Incentive } from "./Incentives/ERC20Incentive";
|
|
19
19
|
import { bytes4 } from "./utils";
|
|
20
|
-
import { BoostValidatorEOA } from
|
|
20
|
+
import { BoostValidatorEOA } from './Validators/Validator';
|
|
21
21
|
import { AssetType } from "./transfers";
|
|
22
22
|
import { waitForTransactionReceipt } from "@wagmi/core";
|
|
23
23
|
import { SignatureType } from "./Actions/EventAction";
|
|
@@ -1279,3 +1279,84 @@ describe("ERC20PeggedVariableCriteriaIncentive Top-Ups", () => {
|
|
|
1279
1279
|
expect(newLimit).toBe(originalLimit + expectedNetTopup);
|
|
1280
1280
|
});
|
|
1281
1281
|
});
|
|
1282
|
+
|
|
1283
|
+
describe("ERC20PeggedVariableCriteriaIncentive with LimitedSignerValidator", () => {
|
|
1284
|
+
test("enforces validator claim limit", async () => {
|
|
1285
|
+
const referrer = accounts[1].account!;
|
|
1286
|
+
const signer = accounts[0];
|
|
1287
|
+
const { core } = fixtures;
|
|
1288
|
+
const { budget, erc20 } = budgets;
|
|
1289
|
+
|
|
1290
|
+
const erc721 = await loadFixture(fundErc721(defaultOptions));
|
|
1291
|
+
const incentive = core.ERC20PeggedVariableCriteriaIncentive({
|
|
1292
|
+
asset: erc20.assertValidAddress(),
|
|
1293
|
+
peg: erc20.assertValidAddress(),
|
|
1294
|
+
reward: parseEther("1"),
|
|
1295
|
+
limit: parseEther("10"),
|
|
1296
|
+
maxReward: parseEther("2"),
|
|
1297
|
+
manager: budget.assertValidAddress(),
|
|
1298
|
+
criteria: {
|
|
1299
|
+
criteriaType: SignatureType.FUNC,
|
|
1300
|
+
signature: pad(bytes4("transferFrom(address,address,uint256)")),
|
|
1301
|
+
fieldIndex: 2,
|
|
1302
|
+
targetContract: erc721.assertValidAddress(),
|
|
1303
|
+
},
|
|
1304
|
+
});
|
|
1305
|
+
await erc20.mint(defaultOptions.account.address, parseEther("110"));
|
|
1306
|
+
await erc20.approve(budget.assertValidAddress(), parseEther("110"));
|
|
1307
|
+
await budget.allocate({
|
|
1308
|
+
amount: parseEther("110"),
|
|
1309
|
+
asset: erc20.assertValidAddress(),
|
|
1310
|
+
target: defaultOptions.account.address,
|
|
1311
|
+
});
|
|
1312
|
+
|
|
1313
|
+
const boost = await core.createBoost({
|
|
1314
|
+
protocolFee: 0n,
|
|
1315
|
+
maxParticipants: 5n,
|
|
1316
|
+
budget,
|
|
1317
|
+
action: core.EventAction(
|
|
1318
|
+
makeMockEventActionPayload(
|
|
1319
|
+
core.assertValidAddress(),
|
|
1320
|
+
erc20.assertValidAddress(),
|
|
1321
|
+
),
|
|
1322
|
+
),
|
|
1323
|
+
allowList: core.SimpleAllowList({
|
|
1324
|
+
owner: defaultOptions.account.address,
|
|
1325
|
+
allowed: [defaultOptions.account.address],
|
|
1326
|
+
}),
|
|
1327
|
+
incentives: [incentive],
|
|
1328
|
+
});
|
|
1329
|
+
|
|
1330
|
+
const claimant = defaultOptions.account.address;
|
|
1331
|
+
const signedAmount = parseEther("1");
|
|
1332
|
+
const incentiveData = incentive.buildClaimData(signedAmount);
|
|
1333
|
+
|
|
1334
|
+
// First claim
|
|
1335
|
+
const firstClaimPayload = await boost.validator.encodeClaimData({
|
|
1336
|
+
signer: signer,
|
|
1337
|
+
incentiveData,
|
|
1338
|
+
chainId: defaultOptions.config.chains[0].id,
|
|
1339
|
+
incentiveQuantity: boost.incentives.length,
|
|
1340
|
+
claimant,
|
|
1341
|
+
boostId: boost.id,
|
|
1342
|
+
});
|
|
1343
|
+
|
|
1344
|
+
// First claim should succeed
|
|
1345
|
+
await core.claimIncentive(boost.id, 0n, referrer, firstClaimPayload);
|
|
1346
|
+
|
|
1347
|
+
// Generate new signature for second claim
|
|
1348
|
+
const secondClaimPayload = await boost.validator.encodeClaimData({
|
|
1349
|
+
signer: signer,
|
|
1350
|
+
incentiveData,
|
|
1351
|
+
chainId: defaultOptions.config.chains[0].id,
|
|
1352
|
+
incentiveQuantity: boost.incentives.length,
|
|
1353
|
+
claimant,
|
|
1354
|
+
boostId: boost.id,
|
|
1355
|
+
});
|
|
1356
|
+
|
|
1357
|
+
// Second claim should fail due to validator limit (specific error code)
|
|
1358
|
+
await expect(
|
|
1359
|
+
core.claimIncentive(boost.id, 0n, referrer, secondClaimPayload)
|
|
1360
|
+
).rejects.toThrow("0x059b7045"); // BoostError.MaximumClaimed
|
|
1361
|
+
});
|
|
1362
|
+
});
|
package/src/BoostCore.ts
CHANGED
|
@@ -527,13 +527,22 @@ export class BoostCore extends Deployable<
|
|
|
527
527
|
Object.keys(this.addresses).map(Number),
|
|
528
528
|
);
|
|
529
529
|
const testnet = chain.testnet || chain.id === 31337;
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
530
|
+
const signers = [
|
|
531
|
+
(testnet
|
|
532
|
+
? BoostValidatorEOA.TESTNET
|
|
533
|
+
: BoostValidatorEOA.MAINNET) as unknown as Address,
|
|
534
|
+
];
|
|
535
|
+
|
|
536
|
+
// This seemed like the best approach - I didn't want to use the testnet PK even in local testing
|
|
537
|
+
// May be another approach but this works for now and is pretty well isolated
|
|
538
|
+
if (chain.id === 31337) {
|
|
539
|
+
signers.push('0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266');
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
payload.validator = this.LimitedSignerValidator({
|
|
543
|
+
signers,
|
|
536
544
|
validatorCaller: coreAddress,
|
|
545
|
+
maxClaimCount: 1,
|
|
537
546
|
});
|
|
538
547
|
}
|
|
539
548
|
|
|
@@ -18,9 +18,7 @@ import {
|
|
|
18
18
|
encodeAbiParameters,
|
|
19
19
|
} from 'viem';
|
|
20
20
|
import { signTypedData } from 'viem/accounts';
|
|
21
|
-
|
|
22
|
-
//import { LimitedSignerValidator as SignerValidatorBases } from '../../dist/deployments.json';
|
|
23
|
-
import { SignerValidator as SignerValidatorBases } from '../../dist/deployments.json';
|
|
21
|
+
import { LimitedSignerValidator as SignerValidatorBases } from '../../dist/deployments.json';
|
|
24
22
|
import type {
|
|
25
23
|
DeployableOptions,
|
|
26
24
|
GenericDeployableParams,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deployments-CIXw_WKk.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|