@boostxyz/sdk 0.0.0-alpha.16 → 0.0.0-alpha.18
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.cjs.map +1 -1
- package/dist/Actions/Action.js +7 -7
- package/dist/Actions/ContractAction.d.ts +9 -9
- package/dist/Actions/ContractAction.d.ts.map +1 -1
- package/dist/Actions/ERC721MintAction.d.ts +12 -12
- package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.cjs.map +1 -1
- package/dist/Actions/EventAction.d.ts +32 -49
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +13 -779
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.cjs.map +1 -1
- package/dist/AllowLists/AllowList.js +3 -3
- package/dist/AllowLists/OpenAllowList.d.ts +183 -0
- package/dist/AllowLists/OpenAllowList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
- package/dist/AllowLists/SimpleAllowList.d.ts +82 -36
- package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleAllowList.js +44 -80
- package/dist/AllowLists/SimpleAllowList.js.map +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- package/dist/AllowLists/SimpleDenyList.d.ts +192 -9
- package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleDenyList.js +5 -5
- package/dist/Auth/PassthroughAuth.cjs +1 -1
- package/dist/Auth/PassthroughAuth.js +1 -1
- package/dist/Boost.cjs.map +1 -1
- package/dist/Boost.d.ts +18 -0
- package/dist/Boost.d.ts.map +1 -1
- package/dist/Boost.js.map +1 -1
- package/dist/BoostCore-BiPwp6SR.cjs +3 -0
- package/dist/BoostCore-BiPwp6SR.cjs.map +1 -0
- package/dist/BoostCore-C00iqvks.js +1477 -0
- package/dist/BoostCore-C00iqvks.js.map +1 -0
- package/dist/BoostCore.cjs +1 -2
- package/dist/BoostCore.cjs.map +1 -1
- package/dist/BoostCore.d.ts +80 -35
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +29 -1273
- package/dist/BoostCore.js.map +1 -1
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.cjs.map +1 -1
- package/dist/BoostRegistry.d.ts +18 -18
- package/dist/BoostRegistry.js +36 -36
- package/dist/BoostRegistry.js.map +1 -1
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.cjs.map +1 -1
- package/dist/Budgets/Budget.d.ts.map +1 -1
- package/dist/Budgets/Budget.js +2 -2
- package/dist/Budgets/Budget.js.map +1 -1
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.cjs.map +1 -1
- package/dist/Budgets/ManagedBudget.d.ts +24 -174
- package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
- package/dist/Budgets/ManagedBudget.js +76 -298
- package/dist/Budgets/ManagedBudget.js.map +1 -1
- package/dist/Budgets/VestingBudget.d.ts +181 -77
- package/dist/Budgets/VestingBudget.d.ts.map +1 -1
- package/dist/Deployable/Contract.cjs +1 -1
- package/dist/Deployable/Contract.cjs.map +1 -1
- package/dist/Deployable/Contract.d.ts +4 -5
- package/dist/Deployable/Contract.d.ts.map +1 -1
- package/dist/Deployable/Contract.js +4 -5
- package/dist/Deployable/Contract.js.map +1 -1
- package/dist/Deployable/Deployable.cjs.map +1 -1
- package/dist/Deployable/Deployable.d.ts +1 -1
- package/dist/Deployable/Deployable.js +1 -1
- package/dist/Deployable/Deployable.js.map +1 -1
- package/dist/Deployable/DeployableTarget.cjs +1 -1
- package/dist/Deployable/DeployableTarget.cjs.map +1 -1
- package/dist/Deployable/DeployableTarget.d.ts +5 -5
- package/dist/Deployable/DeployableTarget.js +10 -10
- package/dist/Deployable/DeployableTarget.js.map +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.cjs +2 -0
- package/dist/Deployable/DeployableTargetWithRBAC.cjs.map +1 -0
- package/dist/Deployable/DeployableTargetWithRBAC.d.ts +179 -0
- package/dist/Deployable/DeployableTargetWithRBAC.d.ts.map +1 -0
- package/dist/Deployable/DeployableTargetWithRBAC.js +222 -0
- package/dist/Deployable/DeployableTargetWithRBAC.js.map +1 -0
- package/dist/EventAction-BO5WI_5s.js +1355 -0
- package/dist/EventAction-BO5WI_5s.js.map +1 -0
- package/dist/EventAction-DBDRaG4A.cjs +2 -0
- package/dist/EventAction-DBDRaG4A.cjs.map +1 -0
- package/dist/{Incentive-CtuAJAjG.js → Incentive-CF7kaz_9.js} +67 -68
- package/dist/Incentive-CF7kaz_9.js.map +1 -0
- package/dist/{Incentive-CqX3fYEd.cjs → Incentive-Djnzseoj.cjs} +2 -2
- package/dist/Incentive-Djnzseoj.cjs.map +1 -0
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
- package/dist/Incentives/AllowListIncentive.d.ts +12 -12
- package/dist/Incentives/AllowListIncentive.js +26 -26
- 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.d.ts +15 -15
- package/dist/Incentives/CGDAIncentive.js +25 -25
- package/dist/Incentives/CGDAIncentive.js.map +1 -1
- package/dist/Incentives/ERC1155Incentive.d.ts +30 -30
- package/dist/Incentives/ERC20Incentive.cjs +1 -1
- package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
- package/dist/Incentives/ERC20Incentive.d.ts +23 -23
- package/dist/Incentives/ERC20Incentive.js +45 -45
- package/dist/Incentives/ERC20Incentive.js.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts +523 -0
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -0
- package/dist/Incentives/ERC20VariableIncentive.d.ts +19 -19
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.d.ts +3 -3
- package/dist/Incentives/Incentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.js +3 -3
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.cjs.map +1 -1
- package/dist/Incentives/PointsIncentive.d.ts +14 -14
- package/dist/Incentives/PointsIncentive.js +20 -20
- package/dist/Incentives/PointsIncentive.js.map +1 -1
- package/dist/SimpleDenyList-BwfNjRsg.cjs +2 -0
- package/dist/SimpleDenyList-BwfNjRsg.cjs.map +1 -0
- package/dist/SimpleDenyList-D9i4rw_F.js +132 -0
- package/dist/SimpleDenyList-D9i4rw_F.js.map +1 -0
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.cjs.map +1 -1
- package/dist/Validators/SignerValidator.d.ts +14 -14
- package/dist/Validators/SignerValidator.js +25 -25
- package/dist/Validators/SignerValidator.js.map +1 -1
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.cjs.map +1 -1
- package/dist/Validators/Validator.d.ts +1 -1
- package/dist/Validators/Validator.js +6 -6
- package/dist/Validators/Validator.js.map +1 -1
- package/dist/claiming.cjs.map +1 -1
- package/dist/claiming.d.ts +1 -1
- package/dist/claiming.js.map +1 -1
- package/dist/componentInterfaces-D09mhzxO.cjs +2 -0
- package/dist/componentInterfaces-D09mhzxO.cjs.map +1 -0
- package/dist/componentInterfaces-RXBMI5yH.js +14 -0
- package/dist/componentInterfaces-RXBMI5yH.js.map +1 -0
- package/dist/deployments-BM42vImE.js +43 -0
- package/dist/deployments-BM42vImE.js.map +1 -0
- package/dist/deployments-CMdF5uEC.cjs +2 -0
- package/dist/deployments-CMdF5uEC.cjs.map +1 -0
- package/dist/deployments.json +15 -12
- package/dist/errors.cjs +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +132 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +122 -36
- package/dist/errors.js.map +1 -1
- package/dist/generated-B0tk-c9b.cjs +3 -0
- package/dist/generated-B0tk-c9b.cjs.map +1 -0
- package/dist/{generated-DLMdMwD1.js → generated-B8VWObPa.js} +2350 -1290
- package/dist/generated-B8VWObPa.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +134 -122
- package/dist/index.js.map +1 -1
- package/dist/transfers.cjs.map +1 -1
- package/dist/transfers.d.ts +1 -1
- package/dist/transfers.js.map +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js.map +1 -1
- package/package.json +12 -5
- package/src/Actions/ContractAction.ts +9 -10
- package/src/Actions/ERC721MintAction.ts +12 -13
- package/src/Actions/EventAction.test.ts +182 -53
- package/src/Actions/EventAction.ts +128 -107
- package/src/AllowLists/SimpleAllowList.ts +14 -59
- package/src/AllowLists/SimpleDenyList.ts +12 -9
- package/src/Boost.ts +19 -0
- package/src/BoostCore.test.ts +117 -1
- package/src/BoostCore.ts +113 -54
- package/src/BoostRegistry.ts +18 -18
- package/src/Budgets/Budget.ts +1 -2
- package/src/Budgets/ManagedBudget.ts +21 -295
- package/src/Budgets/VestingBudget.ts +26 -97
- package/src/Deployable/Contract.ts +4 -5
- package/src/Deployable/Deployable.ts +1 -1
- package/src/Deployable/DeployableTarget.ts +5 -5
- package/src/Deployable/DeployableTargetWithRBAC.ts +323 -0
- package/src/Incentives/AllowListIncentive.ts +12 -12
- package/src/Incentives/CGDAIncentive.ts +15 -15
- package/src/Incentives/ERC1155Incentive.ts +26 -26
- package/src/Incentives/ERC20Incentive.ts +23 -23
- package/src/Incentives/ERC20VariableCriteriaIncentive.test.ts +184 -0
- package/src/Incentives/ERC20VariableCriteriaIncentive.ts +309 -0
- package/src/Incentives/ERC20VariableIncentive.ts +19 -19
- package/src/Incentives/Incentive.ts +6 -5
- package/src/Incentives/PointsIncentive.test.ts +21 -21
- package/src/Incentives/PointsIncentive.ts +14 -14
- package/src/Validators/SignerValidator.ts +14 -14
- package/src/Validators/Validator.ts +1 -1
- package/src/claiming.ts +1 -1
- package/src/errors.ts +165 -0
- package/src/index.test.ts +3 -4
- package/src/index.ts +2 -0
- package/src/transfers.ts +1 -1
- package/src/utils.ts +1 -1
- package/dist/Budgets/SimpleBudget.d.ts +0 -824
- package/dist/Budgets/SimpleBudget.d.ts.map +0 -1
- package/dist/Incentive-CqX3fYEd.cjs.map +0 -1
- package/dist/Incentive-CtuAJAjG.js.map +0 -1
- package/dist/SimpleDenyList-9UIxZZKP.cjs +0 -2
- package/dist/SimpleDenyList-9UIxZZKP.cjs.map +0 -1
- package/dist/SimpleDenyList-DGPNc7ov.js +0 -132
- package/dist/SimpleDenyList-DGPNc7ov.js.map +0 -1
- package/dist/componentInterfaces-CKCBwG16.cjs +0 -2
- package/dist/componentInterfaces-CKCBwG16.cjs.map +0 -1
- package/dist/componentInterfaces-Cmg8tUxq.js +0 -13
- package/dist/componentInterfaces-Cmg8tUxq.js.map +0 -1
- package/dist/deployments-BvFcK_eR.js +0 -40
- package/dist/deployments-BvFcK_eR.js.map +0 -1
- package/dist/deployments-Ho4PnGCS.cjs +0 -2
- package/dist/deployments-Ho4PnGCS.cjs.map +0 -1
- package/dist/generated-BLg7yPgI.cjs +0 -3
- package/dist/generated-BLg7yPgI.cjs.map +0 -1
- package/dist/generated-DLMdMwD1.js.map +0 -1
- package/src/Budgets/SimpleBudget.test.ts +0 -152
- package/src/Budgets/SimpleBudget.ts +0 -563
|
@@ -3,6 +3,7 @@ import type { DeployableOptions } from '../Deployable/Deployable';
|
|
|
3
3
|
import { AllowListIncentive } from './AllowListIncentive';
|
|
4
4
|
import { CGDAIncentive } from './CGDAIncentive';
|
|
5
5
|
import { ERC20Incentive } from './ERC20Incentive';
|
|
6
|
+
import type { ERC20VariableCriteriaIncentive } from './ERC20VariableCriteriaIncentive';
|
|
6
7
|
import { ERC20VariableIncentive } from './ERC20VariableIncentive';
|
|
7
8
|
import { PointsIncentive } from './PointsIncentive';
|
|
8
9
|
export { AllowListIncentive, CGDAIncentive, ERC20Incentive, PointsIncentive, ERC20VariableIncentive, };
|
|
@@ -12,7 +13,7 @@ export { AllowListIncentive, CGDAIncentive, ERC20Incentive, PointsIncentive, ERC
|
|
|
12
13
|
* @export
|
|
13
14
|
* @typedef {Incentive}
|
|
14
15
|
*/
|
|
15
|
-
export type Incentive = AllowListIncentive | CGDAIncentive | ERC20Incentive | PointsIncentive | ERC20VariableIncentive;
|
|
16
|
+
export type Incentive = AllowListIncentive | CGDAIncentive | ERC20Incentive | PointsIncentive | ERC20VariableIncentive | ERC20VariableCriteriaIncentive;
|
|
16
17
|
/**
|
|
17
18
|
* A map of Incentive component interfaces to their constructors.
|
|
18
19
|
*
|
|
@@ -20,7 +21,6 @@ export type Incentive = AllowListIncentive | CGDAIncentive | ERC20Incentive | Po
|
|
|
20
21
|
*/
|
|
21
22
|
export declare const IncentiveByComponentInterface: {
|
|
22
23
|
[x: string]: typeof AllowListIncentive | typeof CGDAIncentive | typeof ERC20Incentive | typeof ERC20VariableIncentive | typeof PointsIncentive;
|
|
23
|
-
"0x0a466e6f": typeof AllowListIncentive;
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
26
|
* A function that will read a contract's component interface using `getComponentInterface` and return the correct instantiated instance.
|
|
@@ -29,7 +29,7 @@ export declare const IncentiveByComponentInterface: {
|
|
|
29
29
|
* @async
|
|
30
30
|
* @param {DeployableOptions} options
|
|
31
31
|
* @param {Address} address
|
|
32
|
-
* @returns {
|
|
32
|
+
* @returns {Incentive}
|
|
33
33
|
* @throws {@link InvalidComponentInterfaceError}
|
|
34
34
|
*/
|
|
35
35
|
export declare function incentiveFromAddress(options: DeployableOptions, address: Address): Promise<AllowListIncentive | CGDAIncentive | ERC20Incentive | ERC20VariableIncentive | PointsIncentive>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Incentive.d.ts","sourceRoot":"","sources":["../../src/Incentives/Incentive.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,OAAO,EAAO,MAAM,MAAM,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EACL,kBAAkB,EAClB,aAAa,EAEb,cAAc,EACd,eAAe,EACf,sBAAsB,GACvB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GACjB,kBAAkB,GAClB,aAAa,GACb,cAAc,GAEd,eAAe,GACf,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"Incentive.d.ts","sourceRoot":"","sources":["../../src/Incentives/Incentive.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,OAAO,EAAO,MAAM,MAAM,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EACL,kBAAkB,EAClB,aAAa,EAEb,cAAc,EACd,eAAe,EACf,sBAAsB,GACvB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GACjB,kBAAkB,GAClB,aAAa,GACb,cAAc,GAEd,eAAe,GACf,sBAAsB,GACtB,8BAA8B,CAAC;AAEnC;;;;GAIG;AACH,eAAO,MAAM,6BAA6B;;CAOzC,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,OAAO,2GAejB"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "../generated-
|
|
2
|
-
import "../componentInterfaces-
|
|
1
|
+
import "../generated-B8VWObPa.js";
|
|
2
|
+
import "../componentInterfaces-RXBMI5yH.js";
|
|
3
3
|
import "@wagmi/core";
|
|
4
4
|
import "../errors.js";
|
|
5
5
|
import { AllowListIncentive as m } from "./AllowListIncentive.js";
|
|
6
6
|
import { CGDAIncentive as c } from "./CGDAIncentive.js";
|
|
7
7
|
import { ERC20Incentive as s } from "./ERC20Incentive.js";
|
|
8
|
-
import { E as a, I as f, i as x } from "../Incentive-
|
|
8
|
+
import { E as a, I as f, i as x } from "../Incentive-CF7kaz_9.js";
|
|
9
9
|
import { PointsIncentive as l } from "./PointsIncentive.js";
|
|
10
10
|
export {
|
|
11
11
|
m as AllowListIncentive,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../generated-BLg7yPgI.cjs"),n=require("viem"),o=require("../deployments-Ho4PnGCS.cjs"),l=require("../Deployable/DeployableTarget.cjs"),t=require("../claiming.cjs"),u=require("../utils.cjs"),h="0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b611b05806100bd5f395ff3fe60806040526004361061019b575f3560e01c8063514e62fc116100eb578063c884ef8311610089578063ea3d508a11610063578063ea3d508a1461057b578063f04e283e146105a5578063f2fde38b146105c1578063fee81cf4146105dd5761019b565b8063c884ef83146104d9578063db09da1214610515578063dcc59b6f146105515761019b565b80638da5cb5b116100c55780638da5cb5b1461041f578063a270a73714610449578063a4d66daf14610473578063bb1757cf1461049d5761019b565b8063514e62fc146103cf57806354d1f13d1461040b578063715018a6146104155761019b565b80632569296211610158578063439fab9111610132578063439fab9114610313578063474f5a441461033b5780634a4ee7b1146103775780634e7165a2146103935761019b565b806325692962146102a357806328d6183b146102ad5780632de94807146102d75761019b565b806301ffc9a71461019f57806307621eca146101db578063183a4f6e146102055780631c10893f146102215780631cd64df41461023d578063228cb73314610279575b5f80fd5b3480156101aa575f80fd5b506101c560048036038101906101c0919061139a565b610619565b6040516101d291906113df565b60405180910390f35b3480156101e6575f80fd5b506101ef610692565b6040516101fc9190611410565b60405180910390f35b61021f600480360381019061021a9190611453565b61069b565b005b61023b600480360381019061023691906114d8565b6106a8565b005b348015610248575f80fd5b50610263600480360381019061025e91906114d8565b6106be565b60405161027091906113df565b60405180910390f35b348015610284575f80fd5b5061028d6106d4565b60405161029a9190611410565b60405180910390f35b6102ab6106da565b005b3480156102b8575f80fd5b506102c161072b565b6040516102ce9190611525565b60405180910390f35b3480156102e2575f80fd5b506102fd60048036038101906102f8919061153e565b610752565b60405161030a9190611410565b60405180910390f35b34801561031e575f80fd5b50610339600480360381019061033491906115ca565b61076b565b005b348015610346575f80fd5b50610361600480360381019061035c91906115ca565b6108c3565b60405161036e91906113df565b60405180910390f35b610391600480360381019061038c91906114d8565b6108f6565b005b34801561039e575f80fd5b506103b960048036038101906103b491906115ca565b61090c565b6040516103c69190611685565b60405180910390f35b3480156103da575f80fd5b506103f560048036038101906103f091906114d8565b610963565b60405161040291906113df565b60405180910390f35b61041361097a565b005b61041d6109b3565b005b34801561042a575f80fd5b506104336109c6565b60405161044091906116b4565b60405180910390f35b348015610454575f80fd5b5061045d6109ee565b60405161046a91906116b4565b60405180910390f35b34801561047e575f80fd5b50610487610a13565b6040516104949190611410565b60405180910390f35b3480156104a8575f80fd5b506104c360048036038101906104be91906116cd565b610a19565b6040516104d091906113df565b60405180910390f35b3480156104e4575f80fd5b506104ff60048036038101906104fa919061153e565b610e30565b60405161050c91906113df565b60405180910390f35b348015610520575f80fd5b5061053b600480360381019061053691906116cd565b610e4d565b60405161054891906113df565b60405180910390f35b34801561055c575f80fd5b50610565610e60565b6040516105729190611410565b60405180910390f35b348015610586575f80fd5b5061058f610e65565b60405161059c9190611525565b60405180910390f35b6105bf60048036038101906105ba919061153e565b610e77565b005b6105db60048036038101906105d6919061153e565b610eb5565b005b3480156105e8575f80fd5b5061060360048036038101906105fe919061153e565b610ede565b6040516106109190611410565b60405180910390f35b5f7fc5b24b8e000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061068b575061068a82610ef7565b5b9050919050565b5f600154905090565b6106a53382610f70565b50565b6106b0610f7f565b6106ba8282610fb6565b5050565b5f81826106ca85610752565b1614905092915050565b60015481565b5f6106e3610fc6565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7fc5b24b8e00000000000000000000000000000000000000000000000000000000905090565b5f638b78c6d8600c52815f526020600c20549050919050565b5f610774610fd0565b905080546003825580156107a65760018160011c14303b1061079d5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f83838101906107b7919061181b565b90505f816040015114806107ce57505f8160600151145b15610805576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f015160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806020015160055f6101000a81548163ffffffff021916908360e01c02179055508060400151600181905550806060015160048190555061088833610ff9565b5080156108be576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f6040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108fe610f7f565b6109088282610f70565b5050565b60605f67ffffffffffffffff8111156109285761092761172e565b5b6040519080825280601f01601f19166020018201604052801561095a5781602001600182028036833780820191505090505b50905092915050565b5f808261096f85610752565b161415905092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b6109bb610f7f565b6109c45f6110cf565b565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b5f610a22610f7f565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa7573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610acb919061185a565b73ffffffffffffffffffffffffffffffffffffffff1614158015610b6e5750600115158173ffffffffffffffffffffffffffffffffffffffff1663514e62fc3060026040518363ffffffff1660e01b8152600401610b2a9291906118c7565b602060405180830381865afa158015610b45573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b699190611918565b151514155b15610ba5576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610bae85611195565b610be4576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80815480929190610bf590611970565b9190505550600160025f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055505f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660055f9054906101000a900460e01b87600154604051602401610cac9291906119b7565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051610d169190611a18565b5f604051808303815f865af19150503d805f8114610d4f576040519150601f19603f3d011682016040523d82523d5f602084013e610d54565b606091505b5050905080610d8f576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff167f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d360035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1688600154604051602001610dff93929190611a93565b604051602081830303815290604052604051610e1b9190611685565b60405180910390a26001925050509392505050565b6002602052805f5260405f205f915054906101000a900460ff1681565b5f610e5784611195565b90509392505050565b5f5481565b60055f9054906101000a900460e01b81565b610e7f610f7f565b63389a75e1600c52805f526020600c208054421115610ea557636f5e88185f526004601cfd5b5f815550610eb2816110cf565b50565b610ebd610f7f565b8060601b610ed257637448fbae5f526004601cfd5b610edb816110cf565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7f5970a689000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610f695750610f68826111f6565b5b9050919050565b610f7b82825f61126f565b5050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610fb4576382b429005f526004601cfd5b565b610fc28282600161126f565b5050565b5f6202a300905090565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b6110016112c7565b15611079577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392780541561103b57630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3506110cc565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b6110d76112c7565b1561113c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550611192565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f60025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff161580156111ef57506004545f54105b9050919050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806112685750611267826112cb565b5b9050919050565b638b78c6d8600c52825f526020600c2080548381178361129157848216821890505b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61137981611345565b8114611383575f80fd5b50565b5f8135905061139481611370565b92915050565b5f602082840312156113af576113ae61133d565b5b5f6113bc84828501611386565b91505092915050565b5f8115159050919050565b6113d9816113c5565b82525050565b5f6020820190506113f25f8301846113d0565b92915050565b5f819050919050565b61140a816113f8565b82525050565b5f6020820190506114235f830184611401565b92915050565b611432816113f8565b811461143c575f80fd5b50565b5f8135905061144d81611429565b92915050565b5f602082840312156114685761146761133d565b5b5f6114758482850161143f565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6114a78261147e565b9050919050565b6114b78161149d565b81146114c1575f80fd5b50565b5f813590506114d2816114ae565b92915050565b5f80604083850312156114ee576114ed61133d565b5b5f6114fb858286016114c4565b925050602061150c8582860161143f565b9150509250929050565b61151f81611345565b82525050565b5f6020820190506115385f830184611516565b92915050565b5f602082840312156115535761155261133d565b5b5f611560848285016114c4565b91505092915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261158a57611589611569565b5b8235905067ffffffffffffffff8111156115a7576115a661156d565b5b6020830191508360018202830111156115c3576115c2611571565b5b9250929050565b5f80602083850312156115e0576115df61133d565b5b5f83013567ffffffffffffffff8111156115fd576115fc611341565b5b61160985828601611575565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61165782611615565b611661818561161f565b935061167181856020860161162f565b61167a8161163d565b840191505092915050565b5f6020820190508181035f83015261169d818461164d565b905092915050565b6116ae8161149d565b82525050565b5f6020820190506116c75f8301846116a5565b92915050565b5f805f604084860312156116e4576116e361133d565b5b5f6116f1868287016114c4565b935050602084013567ffffffffffffffff81111561171257611711611341565b5b61171e86828701611575565b92509250509250925092565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6117648261163d565b810181811067ffffffffffffffff821117156117835761178261172e565b5b80604052505050565b5f611795611334565b90506117a1828261175b565b919050565b5f608082840312156117bb576117ba61172a565b5b6117c5608061178c565b90505f6117d4848285016114c4565b5f8301525060206117e784828501611386565b60208301525060406117fb8482850161143f565b604083015250606061180f8482850161143f565b60608301525092915050565b5f608082840312156118305761182f61133d565b5b5f61183d848285016117a6565b91505092915050565b5f81519050611854816114ae565b92915050565b5f6020828403121561186f5761186e61133d565b5b5f61187c84828501611846565b91505092915050565b5f819050919050565b5f819050919050565b5f6118b16118ac6118a784611885565b61188e565b6113f8565b9050919050565b6118c181611897565b82525050565b5f6040820190506118da5f8301856116a5565b6118e760208301846118b8565b9392505050565b6118f7816113c5565b8114611901575f80fd5b50565b5f81519050611912816118ee565b92915050565b5f6020828403121561192d5761192c61133d565b5b5f61193a84828501611904565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61197a826113f8565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036119ac576119ab611943565b5b600182019050919050565b5f6040820190506119ca5f8301856116a5565b6119d76020830184611401565b9392505050565b5f81905092915050565b5f6119f282611615565b6119fc81856119de565b9350611a0c81856020860161162f565b80840191505092915050565b5f611a2382846119e8565b915081905092915050565b5f8160601b9050919050565b5f611a4482611a2e565b9050919050565b5f611a5582611a3a565b9050919050565b611a6d611a688261149d565b611a4b565b82525050565b5f819050919050565b611a8d611a88826113f8565b611a73565b82525050565b5f611a9e8286611a5c565b601482019150611aae8285611a5c565b601482019150611abe8284611a7c565b60208201915081905094935050505056fea264697066735822122088b34e24fbec910ced058a6b3dffdf327035d99da64bab74d2addc3e9026fe9864736f6c634300081a0033",d=class d extends l.DeployableTarget{constructor(){super(...arguments),this.abi=b.l}async claims(f){return await b.h5(this._config,{address:this.assertValidAddress(),args:[],...f})}async currentReward(f){return await b.M5(this._config,{address:this.assertValidAddress(),args:[],...f})}async reward(f){return await b.H5(this._config,{address:this.assertValidAddress(),args:[],...f})}async claimed(f,a){return await b.N5(this._config,{address:this.assertValidAddress(),args:[f],...a})}async venue(f){return await b.L5(this._config,{address:this.assertValidAddress(),...f})}async limit(f){return await b.z5(this._config,{address:this.assertValidAddress(),...f})}async selector(f){return await b._5(this._config,{address:this.assertValidAddress(),...f})}async claim(f,a){return await this.awaitResult(this.claimRaw(f,a))}async claimRaw(f,a){const{request:e,result:c}=await b.X5(this._config,{address:this.assertValidAddress(),args:[t.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...a});return{hash:await b.P5(this._config,e),result:c}}async isClaimable(f,a){return await b.R5(this._config,{address:this.assertValidAddress(),args:[t.prepareClaimPayload(f)],...a})}buildParameters(f,a){const[e,c]=this.validateDeploymentConfig(f,a);return{abi:b.l,bytecode:h,args:[r(e)],...this.optionallyAttachAccount(c.account)}}};d.bases={...o.PointsIncentive},d.registryType=u.RegistryType.INCENTIVE;let s=d;const r=({venue:i,selector:f,reward:a,limit:e})=>n.encodeAbiParameters([{type:"address",name:"venue"},{type:"bytes4",name:"selector"},{type:"uint256",name:"reward"},{type:"uint256",name:"limit"}],[i,f,a,e]);exports.pointsIncentiveAbi=b.l;exports.PointsIncentive=s;exports.preparePointsIncentivePayload=r;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../generated-B0tk-c9b.cjs"),n=require("viem"),o=require("../deployments-CMdF5uEC.cjs"),l=require("../Deployable/DeployableTarget.cjs"),t=require("../claiming.cjs"),u=require("../utils.cjs"),h="0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b611b05806100bd5f395ff3fe60806040526004361061019b575f3560e01c8063514e62fc116100eb578063c884ef8311610089578063ea3d508a11610063578063ea3d508a1461057b578063f04e283e146105a5578063f2fde38b146105c1578063fee81cf4146105dd5761019b565b8063c884ef83146104d9578063db09da1214610515578063dcc59b6f146105515761019b565b80638da5cb5b116100c55780638da5cb5b1461041f578063a270a73714610449578063a4d66daf14610473578063bb1757cf1461049d5761019b565b8063514e62fc146103cf57806354d1f13d1461040b578063715018a6146104155761019b565b80632569296211610158578063439fab9111610132578063439fab9114610313578063474f5a441461033b5780634a4ee7b1146103775780634e7165a2146103935761019b565b806325692962146102a357806328d6183b146102ad5780632de94807146102d75761019b565b806301ffc9a71461019f57806307621eca146101db578063183a4f6e146102055780631c10893f146102215780631cd64df41461023d578063228cb73314610279575b5f80fd5b3480156101aa575f80fd5b506101c560048036038101906101c0919061139a565b610619565b6040516101d291906113df565b60405180910390f35b3480156101e6575f80fd5b506101ef610692565b6040516101fc9190611410565b60405180910390f35b61021f600480360381019061021a9190611453565b61069b565b005b61023b600480360381019061023691906114d8565b6106a8565b005b348015610248575f80fd5b50610263600480360381019061025e91906114d8565b6106be565b60405161027091906113df565b60405180910390f35b348015610284575f80fd5b5061028d6106d4565b60405161029a9190611410565b60405180910390f35b6102ab6106da565b005b3480156102b8575f80fd5b506102c161072b565b6040516102ce9190611525565b60405180910390f35b3480156102e2575f80fd5b506102fd60048036038101906102f8919061153e565b610752565b60405161030a9190611410565b60405180910390f35b34801561031e575f80fd5b50610339600480360381019061033491906115ca565b61076b565b005b348015610346575f80fd5b50610361600480360381019061035c91906115ca565b6108c3565b60405161036e91906113df565b60405180910390f35b610391600480360381019061038c91906114d8565b6108f6565b005b34801561039e575f80fd5b506103b960048036038101906103b491906115ca565b61090c565b6040516103c69190611685565b60405180910390f35b3480156103da575f80fd5b506103f560048036038101906103f091906114d8565b610963565b60405161040291906113df565b60405180910390f35b61041361097a565b005b61041d6109b3565b005b34801561042a575f80fd5b506104336109c6565b60405161044091906116b4565b60405180910390f35b348015610454575f80fd5b5061045d6109ee565b60405161046a91906116b4565b60405180910390f35b34801561047e575f80fd5b50610487610a13565b6040516104949190611410565b60405180910390f35b3480156104a8575f80fd5b506104c360048036038101906104be91906116cd565b610a19565b6040516104d091906113df565b60405180910390f35b3480156104e4575f80fd5b506104ff60048036038101906104fa919061153e565b610e30565b60405161050c91906113df565b60405180910390f35b348015610520575f80fd5b5061053b600480360381019061053691906116cd565b610e4d565b60405161054891906113df565b60405180910390f35b34801561055c575f80fd5b50610565610e60565b6040516105729190611410565b60405180910390f35b348015610586575f80fd5b5061058f610e65565b60405161059c9190611525565b60405180910390f35b6105bf60048036038101906105ba919061153e565b610e77565b005b6105db60048036038101906105d6919061153e565b610eb5565b005b3480156105e8575f80fd5b5061060360048036038101906105fe919061153e565b610ede565b6040516106109190611410565b60405180910390f35b5f7f0d36a40d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061068b575061068a82610ef7565b5b9050919050565b5f600154905090565b6106a53382610f70565b50565b6106b0610f7f565b6106ba8282610fb6565b5050565b5f81826106ca85610752565b1614905092915050565b60015481565b5f6106e3610fc6565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7f0d36a40d00000000000000000000000000000000000000000000000000000000905090565b5f638b78c6d8600c52815f526020600c20549050919050565b5f610774610fd0565b905080546003825580156107a65760018160011c14303b1061079d5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f83838101906107b7919061181b565b90505f816040015114806107ce57505f8160600151145b15610805576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f015160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806020015160055f6101000a81548163ffffffff021916908360e01c02179055508060400151600181905550806060015160048190555061088833610ff9565b5080156108be576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f6040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108fe610f7f565b6109088282610f70565b5050565b60605f67ffffffffffffffff8111156109285761092761172e565b5b6040519080825280601f01601f19166020018201604052801561095a5781602001600182028036833780820191505090505b50905092915050565b5f808261096f85610752565b161415905092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b6109bb610f7f565b6109c45f6110cf565b565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b5f610a22610f7f565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa7573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610acb919061185a565b73ffffffffffffffffffffffffffffffffffffffff1614158015610b6e5750600115158173ffffffffffffffffffffffffffffffffffffffff1663514e62fc3060026040518363ffffffff1660e01b8152600401610b2a9291906118c7565b602060405180830381865afa158015610b45573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b699190611918565b151514155b15610ba5576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610bae85611195565b610be4576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80815480929190610bf590611970565b9190505550600160025f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055505f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660055f9054906101000a900460e01b87600154604051602401610cac9291906119b7565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051610d169190611a18565b5f604051808303815f865af19150503d805f8114610d4f576040519150601f19603f3d011682016040523d82523d5f602084013e610d54565b606091505b5050905080610d8f576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff167f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d360035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1688600154604051602001610dff93929190611a93565b604051602081830303815290604052604051610e1b9190611685565b60405180910390a26001925050509392505050565b6002602052805f5260405f205f915054906101000a900460ff1681565b5f610e5784611195565b90509392505050565b5f5481565b60055f9054906101000a900460e01b81565b610e7f610f7f565b63389a75e1600c52805f526020600c208054421115610ea557636f5e88185f526004601cfd5b5f815550610eb2816110cf565b50565b610ebd610f7f565b8060601b610ed257637448fbae5f526004601cfd5b610edb816110cf565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7f91f4490a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610f695750610f68826111f6565b5b9050919050565b610f7b82825f61126f565b5050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610fb4576382b429005f526004601cfd5b565b610fc28282600161126f565b5050565b5f6202a300905090565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b6110016112c7565b15611079577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392780541561103b57630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3506110cc565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b6110d76112c7565b1561113c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550611192565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f60025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff161580156111ef57506004545f54105b9050919050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806112685750611267826112cb565b5b9050919050565b638b78c6d8600c52825f526020600c2080548381178361129157848216821890505b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61137981611345565b8114611383575f80fd5b50565b5f8135905061139481611370565b92915050565b5f602082840312156113af576113ae61133d565b5b5f6113bc84828501611386565b91505092915050565b5f8115159050919050565b6113d9816113c5565b82525050565b5f6020820190506113f25f8301846113d0565b92915050565b5f819050919050565b61140a816113f8565b82525050565b5f6020820190506114235f830184611401565b92915050565b611432816113f8565b811461143c575f80fd5b50565b5f8135905061144d81611429565b92915050565b5f602082840312156114685761146761133d565b5b5f6114758482850161143f565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6114a78261147e565b9050919050565b6114b78161149d565b81146114c1575f80fd5b50565b5f813590506114d2816114ae565b92915050565b5f80604083850312156114ee576114ed61133d565b5b5f6114fb858286016114c4565b925050602061150c8582860161143f565b9150509250929050565b61151f81611345565b82525050565b5f6020820190506115385f830184611516565b92915050565b5f602082840312156115535761155261133d565b5b5f611560848285016114c4565b91505092915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261158a57611589611569565b5b8235905067ffffffffffffffff8111156115a7576115a661156d565b5b6020830191508360018202830111156115c3576115c2611571565b5b9250929050565b5f80602083850312156115e0576115df61133d565b5b5f83013567ffffffffffffffff8111156115fd576115fc611341565b5b61160985828601611575565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61165782611615565b611661818561161f565b935061167181856020860161162f565b61167a8161163d565b840191505092915050565b5f6020820190508181035f83015261169d818461164d565b905092915050565b6116ae8161149d565b82525050565b5f6020820190506116c75f8301846116a5565b92915050565b5f805f604084860312156116e4576116e361133d565b5b5f6116f1868287016114c4565b935050602084013567ffffffffffffffff81111561171257611711611341565b5b61171e86828701611575565b92509250509250925092565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6117648261163d565b810181811067ffffffffffffffff821117156117835761178261172e565b5b80604052505050565b5f611795611334565b90506117a1828261175b565b919050565b5f608082840312156117bb576117ba61172a565b5b6117c5608061178c565b90505f6117d4848285016114c4565b5f8301525060206117e784828501611386565b60208301525060406117fb8482850161143f565b604083015250606061180f8482850161143f565b60608301525092915050565b5f608082840312156118305761182f61133d565b5b5f61183d848285016117a6565b91505092915050565b5f81519050611854816114ae565b92915050565b5f6020828403121561186f5761186e61133d565b5b5f61187c84828501611846565b91505092915050565b5f819050919050565b5f819050919050565b5f6118b16118ac6118a784611885565b61188e565b6113f8565b9050919050565b6118c181611897565b82525050565b5f6040820190506118da5f8301856116a5565b6118e760208301846118b8565b9392505050565b6118f7816113c5565b8114611901575f80fd5b50565b5f81519050611912816118ee565b92915050565b5f6020828403121561192d5761192c61133d565b5b5f61193a84828501611904565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61197a826113f8565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036119ac576119ab611943565b5b600182019050919050565b5f6040820190506119ca5f8301856116a5565b6119d76020830184611401565b9392505050565b5f81905092915050565b5f6119f282611615565b6119fc81856119de565b9350611a0c81856020860161162f565b80840191505092915050565b5f611a2382846119e8565b915081905092915050565b5f8160601b9050919050565b5f611a4482611a2e565b9050919050565b5f611a5582611a3a565b9050919050565b611a6d611a688261149d565b611a4b565b82525050565b5f819050919050565b611a8d611a88826113f8565b611a73565b82525050565b5f611a9e8286611a5c565b601482019150611aae8285611a5c565b601482019150611abe8284611a7c565b60208201915081905094935050505056fea264697066735822122044c719f170d4383804c6f6cff866bd17bd6edb98848e416c2764faa392fd874164736f6c634300081a0033",d=class d extends l.DeployableTarget{constructor(){super(...arguments),this.abi=b.c}async claims(f){return await b.p2(this._config,{address:this.assertValidAddress(),args:[],...f})}async currentReward(f){return await b.l2(this._config,{address:this.assertValidAddress(),args:[],...f})}async reward(f){return await b.T2(this._config,{address:this.assertValidAddress(),args:[],...f})}async claimed(f,a){return await b.o2(this._config,{address:this.assertValidAddress(),args:[f],...a})}async venue(f){return await b.N2(this._config,{address:this.assertValidAddress(),...f})}async limit(f){return await b.b2(this._config,{address:this.assertValidAddress(),...f})}async selector(f){return await b.I2(this._config,{address:this.assertValidAddress(),...f})}async claim(f,a){return await this.awaitResult(this.claimRaw(f,a))}async claimRaw(f,a){const{request:e,result:c}=await b._2(this._config,{address:this.assertValidAddress(),args:[t.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...a});return{hash:await b.M2(this._config,e),result:c}}async isClaimable(f,a){return await b.m2(this._config,{address:this.assertValidAddress(),args:[t.prepareClaimPayload(f)],...a})}buildParameters(f,a){const[e,c]=this.validateDeploymentConfig(f,a);return{abi:b.c,bytecode:h,args:[r(e)],...this.optionallyAttachAccount(c.account)}}};d.bases={...o.PointsIncentive},d.registryType=u.RegistryType.INCENTIVE;let s=d;const r=({venue:i,selector:f,reward:a,limit:e})=>n.encodeAbiParameters([{type:"address",name:"venue"},{type:"bytes4",name:"selector"},{type:"uint256",name:"reward"},{type:"uint256",name:"limit"}],[i,f,a,e]);exports.pointsIncentiveAbi=b.c;exports.PointsIncentive=s;exports.preparePointsIncentivePayload=r;
|
|
2
2
|
//# sourceMappingURL=PointsIncentive.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PointsIncentive.cjs","sources":["../../src/Incentives/PointsIncentive.ts"],"sourcesContent":["import {\n pointsIncentiveAbi,\n readPointsIncentiveClaimed,\n readPointsIncentiveClaims,\n readPointsIncentiveCurrentReward,\n readPointsIncentiveIsClaimable,\n readPointsIncentiveLimit,\n readPointsIncentiveReward,\n readPointsIncentiveSelector,\n readPointsIncentiveVenue,\n simulatePointsIncentiveClaim,\n writePointsIncentiveClaim,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/PointsIncentive.sol/PointsIncentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n} from 'viem';\nimport { PointsIncentive as PointsIncentiveBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport { type ClaimPayload, prepareClaimPayload } from '../claiming';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { pointsIncentiveAbi };\n\n/**\n * The object representation of a `PointsIncentive.InitPayload`\n *\n * @export\n * @interface PointsIncentivePayload\n * @typedef {PointsIncentivePayload}\n */\nexport interface PointsIncentivePayload {\n /**\n * The address of the points contract\n *\n * @type {Address}\n */\n venue: Address;\n /**\n * The selector for the issuance function on the points contract\n *\n * @type {Hex}\n */\n selector: Hex;\n /**\n * The reward amount issued for each claim\n *\n * @type {bigint}\n */\n reward: bigint;\n /**\n * The maximum number of claims that can be made (one per address)\n *\n * @type {bigint}\n */\n limit: bigint;\n}\n\n/**\n * A generic `viem.Log` event with support for `PointsIncentive` event types.\n *\n * @export\n * @typedef {PointsIncentiveLog}\n * @template {ContractEventName<\n * typeof pointsIncentiveAbi\n * >} [event=ContractEventName<typeof pointsIncentiveAbi>]\n */\nexport type PointsIncentiveLog<\n event extends ContractEventName<\n typeof pointsIncentiveAbi\n > = ContractEventName<typeof pointsIncentiveAbi>,\n> = GenericLog<typeof pointsIncentiveAbi, event>;\n\n/**\n * A simple on-chain points incentive implementation that allows claiming of soulbound tokens.\n *\n * In order for any claim to be successful:\n * - The claimer must not have already claimed the incentive; and\n * - The maximum number of claims must not have been reached; and\n * - This contract must be authorized to operate the points contract's issuance function\n *\n * @export\n * @class PointsIncentive\n * @typedef {PointsIncentive}\n * @extends {DeployableTarget<PointsIncentivePayload>}\n */\nexport class PointsIncentive extends DeployableTarget<\n PointsIncentivePayload,\n typeof pointsIncentiveAbi\n> {\n public override readonly abi = pointsIncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(PointsIncentiveBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.INCENTIVE;\n\n /**\n * The number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams<typeof erc20IncentiveAbi, 'claims'>} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(\n params?: ReadParams<typeof pointsIncentiveAbi, 'claims'>,\n ) {\n return await readPointsIncentiveClaims(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The current reward\n *\n * @public\n * @async\n * @param {?ReadParams<typeof erc20IncentiveAbi, 'currentReward'>} [params]\n * @returns {Promise<bigint>} - The current reward\n */\n public async currentReward(\n params?: ReadParams<typeof pointsIncentiveAbi, 'currentReward'>,\n ) {\n return await readPointsIncentiveCurrentReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The reward amount issued for each claim\n *\n * @public\n * @async\n * @param {?ReadParams<typeof pointsIncentiveAbi, 'reward'>} [params]\n * @returns {unknown}\n */\n public async reward(\n params?: ReadParams<typeof pointsIncentiveAbi, 'reward'>,\n ) {\n return await readPointsIncentiveReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * A mapping of address to claim status\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams<typeof pointsIncentiveAbi, 'claimed'>} [params]\n * @returns {unknown}\n */\n public async claimed(\n address: Address,\n params?: ReadParams<typeof pointsIncentiveAbi, 'claimed'>,\n ) {\n return await readPointsIncentiveClaimed(this._config, {\n address: this.assertValidAddress(),\n args: [address],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The address of the points contract\n *\n * @public\n * @async\n * @param {?ReadParams<typeof pointsIncentiveAbi, 'venue'>} [params]\n * @returns {unknown}\n */\n public async venue(params?: ReadParams<typeof pointsIncentiveAbi, 'venue'>) {\n return await readPointsIncentiveVenue(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The maximum number of claims that can be made (one per address)\n *\n * @public\n * @async\n * @param {?ReadParams<typeof pointsIncentiveAbi, 'limit'>} [params]\n * @returns {Promise<bigint>}\n */\n public async limit(params?: ReadParams<typeof pointsIncentiveAbi, 'limit'>) {\n return await readPointsIncentiveLimit(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The selector for the issuance function on the points contract\n *\n * @public\n * @async\n * @param {?ReadParams<typeof pointsIncentiveAbi, 'selector'>} [params]\n * @returns {Promise<Hex>}\n */\n public async selector(\n params?: ReadParams<typeof pointsIncentiveAbi, 'selector'>,\n ) {\n return await readPointsIncentiveSelector(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams<typeof pointsIncentiveAbi, 'claim'>} [params]\n * @returns {Promise<boolean>} - True if the incentive was successfully claimed\n */\n protected async claim(\n payload: ClaimPayload,\n params?: WriteParams<typeof pointsIncentiveAbi, 'claim'>,\n ) {\n return await this.awaitResult(this.claimRaw(payload, params));\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams<typeof pointsIncentiveAbi, 'claim'>} [params]\n * @returns {Promise<boolean>} - True if the incentive was successfully claimed\n */\n protected async claimRaw(\n payload: ClaimPayload,\n params?: WriteParams<typeof pointsIncentiveAbi, 'claim'>,\n ) {\n const { request, result } = await simulatePointsIncentiveClaim(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writePointsIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable.\n * For the POOL strategy, the `bytes data` portion of the payload ignored.\n * The recipient must not have already claimed the incentive.\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?ReadParams<typeof pointsIncentiveAbi, 'isClaimable'>} [params]\n * @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload\n */\n public async isClaimable(\n payload: ClaimPayload,\n params?: ReadParams<typeof pointsIncentiveAbi, 'isClaimable'>,\n ) {\n return await readPointsIncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?PointsIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: PointsIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: pointsIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [preparePointsIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Given a {@link PointsIncentivePayload}, properly encode a `PointsIncentive.InitPayload` for use with {@link PointsIncentive} initialization.\n *\n * @param {PointsIncentivePayload} param0\n * @param {Address} param0.venue - The address of the points contract\n * @param {Hex} param0.selector - The selector for the issuance function on the points contract\n * @param {bigint} param0.reward - The reward amount issued for each claim\n * @param {bigint} param0.limit - The maximum number of claims that can be made (one per address)\n * @returns {*}\n */\nexport const preparePointsIncentivePayload = ({\n venue,\n selector,\n reward,\n limit,\n}: PointsIncentivePayload) => {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'venue' },\n { type: 'bytes4', name: 'selector' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\n ],\n [venue, selector, reward, limit],\n );\n};\n"],"names":["_PointsIncentive","DeployableTarget","pointsIncentiveAbi","params","readPointsIncentiveClaims","readPointsIncentiveCurrentReward","readPointsIncentiveReward","address","readPointsIncentiveClaimed","readPointsIncentiveVenue","readPointsIncentiveLimit","readPointsIncentiveSelector","payload","request","result","simulatePointsIncentiveClaim","prepareClaimPayload","writePointsIncentiveClaim","readPointsIncentiveIsClaimable","_payload","_options","options","bytecode","preparePointsIncentivePayload","PointsIncentiveBases","RegistryType","PointsIncentive","venue","selector","reward","limit","encodeAbiParameters"],"mappings":"0qcAkGaA,EAAN,MAAMA,UAAwBC,EAAAA,gBAGnC,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAIL,KAAyB,IAAMC,GAAA,CA4B/B,MAAa,OACXC,EACA,CACO,OAAA,MAAMC,EAAAA,GAA0B,KAAK,QAAS,CACnD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAID,CAAA,CACL,CACH,CAUA,MAAa,cACXA,EACA,CACO,OAAA,MAAME,EAAAA,GAAiC,KAAK,QAAS,CAC1D,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIF,CAAA,CACL,CACH,CAUA,MAAa,OACXA,EACA,CACO,OAAA,MAAMG,EAAAA,GAA0B,KAAK,QAAS,CACnD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIH,CAAA,CACL,CACH,CAWA,MAAa,QACXI,EACAJ,EACA,CACO,OAAA,MAAMK,EAAAA,GAA2B,KAAK,QAAS,CACpD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACD,CAAO,EAEd,GAAIJ,CAAA,CACL,CACH,CAUA,MAAa,MAAMA,EAAyD,CACnE,OAAA,MAAMM,EAAAA,GAAyB,KAAK,QAAS,CAClD,QAAS,KAAK,mBAAmB,EAEjC,GAAIN,CAAA,CACL,CACH,CAUA,MAAa,MAAMA,EAAyD,CACnE,OAAA,MAAMO,EAAAA,GAAyB,KAAK,QAAS,CAClD,QAAS,KAAK,mBAAmB,EAEjC,GAAIP,CAAA,CACL,CACH,CAUA,MAAa,SACXA,EACA,CACO,OAAA,MAAMQ,EAAAA,GAA4B,KAAK,QAAS,CACrD,QAAS,KAAK,mBAAmB,EAEjC,GAAIR,CAAA,CACL,CACH,CAWA,MAAgB,MACdS,EACAT,EACA,CACA,OAAO,MAAM,KAAK,YAAY,KAAK,SAASS,EAAST,CAAM,CAAC,CAC9D,CAWA,MAAgB,SACdS,EACAT,EACA,CACA,KAAM,CAAE,QAAAU,EAAS,OAAAC,CAAO,EAAI,MAAMC,EAAA,GAChC,KAAK,QACL,CACE,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACC,sBAAoBJ,CAAO,CAAC,EACnC,GAAG,KAAK,wBAAwB,EAEhC,GAAIT,CACN,CAAA,EAGK,MAAA,CAAE,KADI,MAAMc,EAA0B,GAAA,KAAK,QAASJ,CAAO,EACnD,OAAAC,EACjB,CAaA,MAAa,YACXF,EACAT,EACA,CACO,OAAA,MAAMe,EAAAA,GAA+B,KAAK,QAAS,CACxD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACF,sBAAoBJ,CAAO,CAAC,EAEnC,GAAIT,CAAA,CACL,CACH,CAUgB,gBACdgB,EACAC,EACyB,CACzB,KAAM,CAACR,EAASS,CAAO,EAAI,KAAK,yBAC9BF,EACAC,CAAA,EAEK,MAAA,CACL,IAAKlB,EAAA,EACL,SAAAoB,EACA,KAAM,CAACC,EAA8BX,CAAO,CAAC,EAC7C,GAAG,KAAK,wBAAwBS,EAAQ,OAAO,CAAA,CAEnD,CACF,EArOErB,EAAuB,MAAiC,CACtD,GAAIwB,EAAA,eAAA,EASNxB,EAAuB,aAA6ByB,EAAa,aAAA,UAtB5D,IAAMC,EAAN1B,EA6PA,MAAMuB,EAAgC,CAAC,CAC5C,MAAAI,EACA,SAAAC,EACA,OAAAC,EACA,MAAAC,CACF,IACSC,EAAA,oBACL,CACE,CAAE,KAAM,UAAW,KAAM,OAAQ,EACjC,CAAE,KAAM,SAAU,KAAM,UAAW,EACnC,CAAE,KAAM,UAAW,KAAM,QAAS,EAClC,CAAE,KAAM,UAAW,KAAM,OAAQ,CACnC,EACA,CAACJ,EAAOC,EAAUC,EAAQC,CAAK,CAAA"}
|
|
1
|
+
{"version":3,"file":"PointsIncentive.cjs","sources":["../../src/Incentives/PointsIncentive.ts"],"sourcesContent":["import {\n pointsIncentiveAbi,\n readPointsIncentiveClaimed,\n readPointsIncentiveClaims,\n readPointsIncentiveCurrentReward,\n readPointsIncentiveIsClaimable,\n readPointsIncentiveLimit,\n readPointsIncentiveReward,\n readPointsIncentiveSelector,\n readPointsIncentiveVenue,\n simulatePointsIncentiveClaim,\n writePointsIncentiveClaim,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/PointsIncentive.sol/PointsIncentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n} from 'viem';\nimport { PointsIncentive as PointsIncentiveBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport { type ClaimPayload, prepareClaimPayload } from '../claiming';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { pointsIncentiveAbi };\n\n/**\n * The object representation of a `PointsIncentive.InitPayload`\n *\n * @export\n * @interface PointsIncentivePayload\n * @typedef {PointsIncentivePayload}\n */\nexport interface PointsIncentivePayload {\n /**\n * The address of the points contract\n *\n * @type {Address}\n */\n venue: Address;\n /**\n * The selector for the issuance function on the points contract\n *\n * @type {Hex}\n */\n selector: Hex;\n /**\n * The reward amount issued for each claim\n *\n * @type {bigint}\n */\n reward: bigint;\n /**\n * The maximum number of claims that can be made (one per address)\n *\n * @type {bigint}\n */\n limit: bigint;\n}\n\n/**\n * A generic `viem.Log` event with support for `PointsIncentive` event types.\n *\n * @export\n * @typedef {PointsIncentiveLog}\n * @template {ContractEventName<\n * typeof pointsIncentiveAbi\n * >} [event=ContractEventName<typeof pointsIncentiveAbi>]\n */\nexport type PointsIncentiveLog<\n event extends ContractEventName<\n typeof pointsIncentiveAbi\n > = ContractEventName<typeof pointsIncentiveAbi>,\n> = GenericLog<typeof pointsIncentiveAbi, event>;\n\n/**\n * A simple on-chain points incentive implementation that allows claiming of soulbound tokens.\n *\n * In order for any claim to be successful:\n * - The claimer must not have already claimed the incentive; and\n * - The maximum number of claims must not have been reached; and\n * - This contract must be authorized to operate the points contract's issuance function\n *\n * @export\n * @class PointsIncentive\n * @typedef {PointsIncentive}\n * @extends {DeployableTarget<PointsIncentivePayload>}\n */\nexport class PointsIncentive extends DeployableTarget<\n PointsIncentivePayload,\n typeof pointsIncentiveAbi\n> {\n public override readonly abi = pointsIncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(PointsIncentiveBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.INCENTIVE;\n\n /**\n * The number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(\n params?: ReadParams<typeof pointsIncentiveAbi, 'claims'>,\n ) {\n return await readPointsIncentiveClaims(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The current reward\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - The current reward\n */\n public async currentReward(\n params?: ReadParams<typeof pointsIncentiveAbi, 'currentReward'>,\n ) {\n return await readPointsIncentiveCurrentReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The reward amount issued for each claim\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} The reward amount issued for each claim\n */\n public async reward(\n params?: ReadParams<typeof pointsIncentiveAbi, 'reward'>,\n ) {\n return await readPointsIncentiveReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * A mapping of address to claim status\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>}\n */\n public async claimed(\n address: Address,\n params?: ReadParams<typeof pointsIncentiveAbi, 'claimed'>,\n ) {\n return await readPointsIncentiveClaimed(this._config, {\n address: this.assertValidAddress(),\n args: [address],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The address of the points contract\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async venue(params?: ReadParams<typeof pointsIncentiveAbi, 'venue'>) {\n return await readPointsIncentiveVenue(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The maximum number of claims that can be made (one per address)\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async limit(params?: ReadParams<typeof pointsIncentiveAbi, 'limit'>) {\n return await readPointsIncentiveLimit(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The selector for the issuance function on the points contract\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex>}\n */\n public async selector(\n params?: ReadParams<typeof pointsIncentiveAbi, 'selector'>,\n ) {\n return await readPointsIncentiveSelector(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the incentive was successfully claimed\n */\n protected async claim(\n payload: ClaimPayload,\n params?: WriteParams<typeof pointsIncentiveAbi, 'claim'>,\n ) {\n return await this.awaitResult(this.claimRaw(payload, params));\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the incentive was successfully claimed\n */\n protected async claimRaw(\n payload: ClaimPayload,\n params?: WriteParams<typeof pointsIncentiveAbi, 'claim'>,\n ) {\n const { request, result } = await simulatePointsIncentiveClaim(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writePointsIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable.\n * For the POOL strategy, the `bytes data` portion of the payload ignored.\n * The recipient must not have already claimed the incentive.\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload\n */\n public async isClaimable(\n payload: ClaimPayload,\n params?: ReadParams<typeof pointsIncentiveAbi, 'isClaimable'>,\n ) {\n return await readPointsIncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?PointsIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: PointsIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: pointsIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [preparePointsIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Given a {@link PointsIncentivePayload}, properly encode a `PointsIncentive.InitPayload` for use with {@link PointsIncentive} initialization.\n *\n * @param {PointsIncentivePayload} param0\n * @param {Address} param0.venue - The address of the points contract\n * @param {Hex} param0.selector - The selector for the issuance function on the points contract\n * @param {bigint} param0.reward - The reward amount issued for each claim\n * @param {bigint} param0.limit - The maximum number of claims that can be made (one per address)\n * @returns {*}\n */\nexport const preparePointsIncentivePayload = ({\n venue,\n selector,\n reward,\n limit,\n}: PointsIncentivePayload) => {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'venue' },\n { type: 'bytes4', name: 'selector' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\n ],\n [venue, selector, reward, limit],\n );\n};\n"],"names":["_PointsIncentive","DeployableTarget","pointsIncentiveAbi","params","readPointsIncentiveClaims","readPointsIncentiveCurrentReward","readPointsIncentiveReward","address","readPointsIncentiveClaimed","readPointsIncentiveVenue","readPointsIncentiveLimit","readPointsIncentiveSelector","payload","request","result","simulatePointsIncentiveClaim","prepareClaimPayload","writePointsIncentiveClaim","readPointsIncentiveIsClaimable","_payload","_options","options","bytecode","preparePointsIncentivePayload","PointsIncentiveBases","RegistryType","PointsIncentive","venue","selector","reward","limit","encodeAbiParameters"],"mappings":"0qcAkGaA,EAAN,MAAMA,UAAwBC,EAAAA,gBAGnC,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAIL,KAAyB,IAAMC,GAAA,CA4B/B,MAAa,OACXC,EACA,CACO,OAAA,MAAMC,EAAAA,GAA0B,KAAK,QAAS,CACnD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAID,CAAA,CACL,CACH,CAUA,MAAa,cACXA,EACA,CACO,OAAA,MAAME,EAAAA,GAAiC,KAAK,QAAS,CAC1D,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIF,CAAA,CACL,CACH,CAUA,MAAa,OACXA,EACA,CACO,OAAA,MAAMG,EAAAA,GAA0B,KAAK,QAAS,CACnD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIH,CAAA,CACL,CACH,CAWA,MAAa,QACXI,EACAJ,EACA,CACO,OAAA,MAAMK,EAAAA,GAA2B,KAAK,QAAS,CACpD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACD,CAAO,EAEd,GAAIJ,CAAA,CACL,CACH,CAUA,MAAa,MAAMA,EAAyD,CACnE,OAAA,MAAMM,EAAAA,GAAyB,KAAK,QAAS,CAClD,QAAS,KAAK,mBAAmB,EAEjC,GAAIN,CAAA,CACL,CACH,CAUA,MAAa,MAAMA,EAAyD,CACnE,OAAA,MAAMO,EAAAA,GAAyB,KAAK,QAAS,CAClD,QAAS,KAAK,mBAAmB,EAEjC,GAAIP,CAAA,CACL,CACH,CAUA,MAAa,SACXA,EACA,CACO,OAAA,MAAMQ,EAAAA,GAA4B,KAAK,QAAS,CACrD,QAAS,KAAK,mBAAmB,EAEjC,GAAIR,CAAA,CACL,CACH,CAWA,MAAgB,MACdS,EACAT,EACA,CACA,OAAO,MAAM,KAAK,YAAY,KAAK,SAASS,EAAST,CAAM,CAAC,CAC9D,CAWA,MAAgB,SACdS,EACAT,EACA,CACA,KAAM,CAAE,QAAAU,EAAS,OAAAC,CAAO,EAAI,MAAMC,EAAA,GAChC,KAAK,QACL,CACE,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACC,sBAAoBJ,CAAO,CAAC,EACnC,GAAG,KAAK,wBAAwB,EAEhC,GAAIT,CACN,CAAA,EAGK,MAAA,CAAE,KADI,MAAMc,EAA0B,GAAA,KAAK,QAASJ,CAAO,EACnD,OAAAC,EACjB,CAaA,MAAa,YACXF,EACAT,EACA,CACO,OAAA,MAAMe,EAAAA,GAA+B,KAAK,QAAS,CACxD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACF,sBAAoBJ,CAAO,CAAC,EAEnC,GAAIT,CAAA,CACL,CACH,CAUgB,gBACdgB,EACAC,EACyB,CACzB,KAAM,CAACR,EAASS,CAAO,EAAI,KAAK,yBAC9BF,EACAC,CAAA,EAEK,MAAA,CACL,IAAKlB,EAAA,EACL,SAAAoB,EACA,KAAM,CAACC,EAA8BX,CAAO,CAAC,EAC7C,GAAG,KAAK,wBAAwBS,EAAQ,OAAO,CAAA,CAEnD,CACF,EArOErB,EAAuB,MAAiC,CACtD,GAAIwB,EAAA,eAAA,EASNxB,EAAuB,aAA6ByB,EAAa,aAAA,UAtB5D,IAAMC,EAAN1B,EA6PA,MAAMuB,EAAgC,CAAC,CAC5C,MAAAI,EACA,SAAAC,EACA,OAAAC,EACA,MAAAC,CACF,IACSC,EAAA,oBACL,CACE,CAAE,KAAM,UAAW,KAAM,OAAQ,EACjC,CAAE,KAAM,SAAU,KAAM,UAAW,EACnC,CAAE,KAAM,UAAW,KAAM,QAAS,EAClC,CAAE,KAAM,UAAW,KAAM,OAAQ,CACnC,EACA,CAACJ,EAAOC,EAAUC,EAAQC,CAAK,CAAA"}
|
|
@@ -541,7 +541,7 @@ export declare class PointsIncentive extends DeployableTarget<PointsIncentivePay
|
|
|
541
541
|
*
|
|
542
542
|
* @public
|
|
543
543
|
* @async
|
|
544
|
-
* @param {?ReadParams
|
|
544
|
+
* @param {?ReadParams} [params]
|
|
545
545
|
* @returns {Promise<bigint>}
|
|
546
546
|
*/
|
|
547
547
|
claims(params?: ReadParams<typeof pointsIncentiveAbi, 'claims'>): Promise<bigint>;
|
|
@@ -550,7 +550,7 @@ export declare class PointsIncentive extends DeployableTarget<PointsIncentivePay
|
|
|
550
550
|
*
|
|
551
551
|
* @public
|
|
552
552
|
* @async
|
|
553
|
-
* @param {?ReadParams
|
|
553
|
+
* @param {?ReadParams} [params]
|
|
554
554
|
* @returns {Promise<bigint>} - The current reward
|
|
555
555
|
*/
|
|
556
556
|
currentReward(params?: ReadParams<typeof pointsIncentiveAbi, 'currentReward'>): Promise<bigint>;
|
|
@@ -559,8 +559,8 @@ export declare class PointsIncentive extends DeployableTarget<PointsIncentivePay
|
|
|
559
559
|
*
|
|
560
560
|
* @public
|
|
561
561
|
* @async
|
|
562
|
-
* @param {?ReadParams
|
|
563
|
-
* @returns {
|
|
562
|
+
* @param {?ReadParams} [params]
|
|
563
|
+
* @returns {Promise<bigint>} The reward amount issued for each claim
|
|
564
564
|
*/
|
|
565
565
|
reward(params?: ReadParams<typeof pointsIncentiveAbi, 'reward'>): Promise<bigint>;
|
|
566
566
|
/**
|
|
@@ -569,8 +569,8 @@ export declare class PointsIncentive extends DeployableTarget<PointsIncentivePay
|
|
|
569
569
|
* @public
|
|
570
570
|
* @async
|
|
571
571
|
* @param {Address} address
|
|
572
|
-
* @param {?ReadParams
|
|
573
|
-
* @returns {
|
|
572
|
+
* @param {?ReadParams} [params]
|
|
573
|
+
* @returns {Promise<boolean>}
|
|
574
574
|
*/
|
|
575
575
|
claimed(address: Address, params?: ReadParams<typeof pointsIncentiveAbi, 'claimed'>): Promise<boolean>;
|
|
576
576
|
/**
|
|
@@ -578,8 +578,8 @@ export declare class PointsIncentive extends DeployableTarget<PointsIncentivePay
|
|
|
578
578
|
*
|
|
579
579
|
* @public
|
|
580
580
|
* @async
|
|
581
|
-
* @param {?ReadParams
|
|
582
|
-
* @returns {
|
|
581
|
+
* @param {?ReadParams} [params]
|
|
582
|
+
* @returns {Promise<Address>}
|
|
583
583
|
*/
|
|
584
584
|
venue(params?: ReadParams<typeof pointsIncentiveAbi, 'venue'>): Promise<`0x${string}`>;
|
|
585
585
|
/**
|
|
@@ -587,7 +587,7 @@ export declare class PointsIncentive extends DeployableTarget<PointsIncentivePay
|
|
|
587
587
|
*
|
|
588
588
|
* @public
|
|
589
589
|
* @async
|
|
590
|
-
* @param {?ReadParams
|
|
590
|
+
* @param {?ReadParams} [params]
|
|
591
591
|
* @returns {Promise<bigint>}
|
|
592
592
|
*/
|
|
593
593
|
limit(params?: ReadParams<typeof pointsIncentiveAbi, 'limit'>): Promise<bigint>;
|
|
@@ -596,7 +596,7 @@ export declare class PointsIncentive extends DeployableTarget<PointsIncentivePay
|
|
|
596
596
|
*
|
|
597
597
|
* @public
|
|
598
598
|
* @async
|
|
599
|
-
* @param {?ReadParams
|
|
599
|
+
* @param {?ReadParams} [params]
|
|
600
600
|
* @returns {Promise<Hex>}
|
|
601
601
|
*/
|
|
602
602
|
selector(params?: ReadParams<typeof pointsIncentiveAbi, 'selector'>): Promise<`0x${string}`>;
|
|
@@ -606,7 +606,7 @@ export declare class PointsIncentive extends DeployableTarget<PointsIncentivePay
|
|
|
606
606
|
* @public
|
|
607
607
|
* @async
|
|
608
608
|
* @param {ClaimPayload} payload
|
|
609
|
-
* @param {?WriteParams
|
|
609
|
+
* @param {?WriteParams} [params]
|
|
610
610
|
* @returns {Promise<boolean>} - True if the incentive was successfully claimed
|
|
611
611
|
*/
|
|
612
612
|
protected claim(payload: ClaimPayload, params?: WriteParams<typeof pointsIncentiveAbi, 'claim'>): Promise<boolean>;
|
|
@@ -616,8 +616,8 @@ export declare class PointsIncentive extends DeployableTarget<PointsIncentivePay
|
|
|
616
616
|
* @public
|
|
617
617
|
* @async
|
|
618
618
|
* @param {ClaimPayload} payload
|
|
619
|
-
* @param {?WriteParams
|
|
620
|
-
* @returns {Promise<boolean>} - True if the incentive was successfully claimed
|
|
619
|
+
* @param {?WriteParams} [params]
|
|
620
|
+
* @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the incentive was successfully claimed
|
|
621
621
|
*/
|
|
622
622
|
protected claimRaw(payload: ClaimPayload, params?: WriteParams<typeof pointsIncentiveAbi, 'claim'>): Promise<{
|
|
623
623
|
hash: `0x${string}`;
|
|
@@ -631,7 +631,7 @@ export declare class PointsIncentive extends DeployableTarget<PointsIncentivePay
|
|
|
631
631
|
* @public
|
|
632
632
|
* @async
|
|
633
633
|
* @param {ClaimPayload} payload
|
|
634
|
-
* @param {?ReadParams
|
|
634
|
+
* @param {?ReadParams} [params]
|
|
635
635
|
* @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload
|
|
636
636
|
*/
|
|
637
637
|
isClaimable(payload: ClaimPayload, params?: ReadParams<typeof pointsIncentiveAbi, 'isClaimable'>): Promise<boolean>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c, aE as i, aF as n, aG as o, aH as l, aI as h, aJ as m, aK as u, aL as y, aM as p, aN as g } from "../generated-B8VWObPa.js";
|
|
2
2
|
import { encodeAbiParameters as w } from "viem";
|
|
3
|
-
import { P as A } from "../deployments-
|
|
3
|
+
import { P as A } from "../deployments-BM42vImE.js";
|
|
4
4
|
import { DeployableTarget as V } from "../Deployable/DeployableTarget.js";
|
|
5
5
|
import { prepareClaimPayload as s } from "../claiming.js";
|
|
6
6
|
import { RegistryType as _ } from "../utils.js";
|
|
7
|
-
const R = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b611b05806100bd5f395ff3fe60806040526004361061019b575f3560e01c8063514e62fc116100eb578063c884ef8311610089578063ea3d508a11610063578063ea3d508a1461057b578063f04e283e146105a5578063f2fde38b146105c1578063fee81cf4146105dd5761019b565b8063c884ef83146104d9578063db09da1214610515578063dcc59b6f146105515761019b565b80638da5cb5b116100c55780638da5cb5b1461041f578063a270a73714610449578063a4d66daf14610473578063bb1757cf1461049d5761019b565b8063514e62fc146103cf57806354d1f13d1461040b578063715018a6146104155761019b565b80632569296211610158578063439fab9111610132578063439fab9114610313578063474f5a441461033b5780634a4ee7b1146103775780634e7165a2146103935761019b565b806325692962146102a357806328d6183b146102ad5780632de94807146102d75761019b565b806301ffc9a71461019f57806307621eca146101db578063183a4f6e146102055780631c10893f146102215780631cd64df41461023d578063228cb73314610279575b5f80fd5b3480156101aa575f80fd5b506101c560048036038101906101c0919061139a565b610619565b6040516101d291906113df565b60405180910390f35b3480156101e6575f80fd5b506101ef610692565b6040516101fc9190611410565b60405180910390f35b61021f600480360381019061021a9190611453565b61069b565b005b61023b600480360381019061023691906114d8565b6106a8565b005b348015610248575f80fd5b50610263600480360381019061025e91906114d8565b6106be565b60405161027091906113df565b60405180910390f35b348015610284575f80fd5b5061028d6106d4565b60405161029a9190611410565b60405180910390f35b6102ab6106da565b005b3480156102b8575f80fd5b506102c161072b565b6040516102ce9190611525565b60405180910390f35b3480156102e2575f80fd5b506102fd60048036038101906102f8919061153e565b610752565b60405161030a9190611410565b60405180910390f35b34801561031e575f80fd5b50610339600480360381019061033491906115ca565b61076b565b005b348015610346575f80fd5b50610361600480360381019061035c91906115ca565b6108c3565b60405161036e91906113df565b60405180910390f35b610391600480360381019061038c91906114d8565b6108f6565b005b34801561039e575f80fd5b506103b960048036038101906103b491906115ca565b61090c565b6040516103c69190611685565b60405180910390f35b3480156103da575f80fd5b506103f560048036038101906103f091906114d8565b610963565b60405161040291906113df565b60405180910390f35b61041361097a565b005b61041d6109b3565b005b34801561042a575f80fd5b506104336109c6565b60405161044091906116b4565b60405180910390f35b348015610454575f80fd5b5061045d6109ee565b60405161046a91906116b4565b60405180910390f35b34801561047e575f80fd5b50610487610a13565b6040516104949190611410565b60405180910390f35b3480156104a8575f80fd5b506104c360048036038101906104be91906116cd565b610a19565b6040516104d091906113df565b60405180910390f35b3480156104e4575f80fd5b506104ff60048036038101906104fa919061153e565b610e30565b60405161050c91906113df565b60405180910390f35b348015610520575f80fd5b5061053b600480360381019061053691906116cd565b610e4d565b60405161054891906113df565b60405180910390f35b34801561055c575f80fd5b50610565610e60565b6040516105729190611410565b60405180910390f35b348015610586575f80fd5b5061058f610e65565b60405161059c9190611525565b60405180910390f35b6105bf60048036038101906105ba919061153e565b610e77565b005b6105db60048036038101906105d6919061153e565b610eb5565b005b3480156105e8575f80fd5b5061060360048036038101906105fe919061153e565b610ede565b6040516106109190611410565b60405180910390f35b5f7fc5b24b8e000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061068b575061068a82610ef7565b5b9050919050565b5f600154905090565b6106a53382610f70565b50565b6106b0610f7f565b6106ba8282610fb6565b5050565b5f81826106ca85610752565b1614905092915050565b60015481565b5f6106e3610fc6565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7fc5b24b8e00000000000000000000000000000000000000000000000000000000905090565b5f638b78c6d8600c52815f526020600c20549050919050565b5f610774610fd0565b905080546003825580156107a65760018160011c14303b1061079d5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f83838101906107b7919061181b565b90505f816040015114806107ce57505f8160600151145b15610805576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f015160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806020015160055f6101000a81548163ffffffff021916908360e01c02179055508060400151600181905550806060015160048190555061088833610ff9565b5080156108be576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f6040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108fe610f7f565b6109088282610f70565b5050565b60605f67ffffffffffffffff8111156109285761092761172e565b5b6040519080825280601f01601f19166020018201604052801561095a5781602001600182028036833780820191505090505b50905092915050565b5f808261096f85610752565b161415905092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b6109bb610f7f565b6109c45f6110cf565b565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b5f610a22610f7f565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa7573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610acb919061185a565b73ffffffffffffffffffffffffffffffffffffffff1614158015610b6e5750600115158173ffffffffffffffffffffffffffffffffffffffff1663514e62fc3060026040518363ffffffff1660e01b8152600401610b2a9291906118c7565b602060405180830381865afa158015610b45573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b699190611918565b151514155b15610ba5576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610bae85611195565b610be4576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80815480929190610bf590611970565b9190505550600160025f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055505f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660055f9054906101000a900460e01b87600154604051602401610cac9291906119b7565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051610d169190611a18565b5f604051808303815f865af19150503d805f8114610d4f576040519150601f19603f3d011682016040523d82523d5f602084013e610d54565b606091505b5050905080610d8f576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff167f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d360035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1688600154604051602001610dff93929190611a93565b604051602081830303815290604052604051610e1b9190611685565b60405180910390a26001925050509392505050565b6002602052805f5260405f205f915054906101000a900460ff1681565b5f610e5784611195565b90509392505050565b5f5481565b60055f9054906101000a900460e01b81565b610e7f610f7f565b63389a75e1600c52805f526020600c208054421115610ea557636f5e88185f526004601cfd5b5f815550610eb2816110cf565b50565b610ebd610f7f565b8060601b610ed257637448fbae5f526004601cfd5b610edb816110cf565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7f5970a689000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610f695750610f68826111f6565b5b9050919050565b610f7b82825f61126f565b5050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610fb4576382b429005f526004601cfd5b565b610fc28282600161126f565b5050565b5f6202a300905090565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b6110016112c7565b15611079577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392780541561103b57630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3506110cc565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b6110d76112c7565b1561113c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550611192565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f60025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff161580156111ef57506004545f54105b9050919050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806112685750611267826112cb565b5b9050919050565b638b78c6d8600c52825f526020600c2080548381178361129157848216821890505b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61137981611345565b8114611383575f80fd5b50565b5f8135905061139481611370565b92915050565b5f602082840312156113af576113ae61133d565b5b5f6113bc84828501611386565b91505092915050565b5f8115159050919050565b6113d9816113c5565b82525050565b5f6020820190506113f25f8301846113d0565b92915050565b5f819050919050565b61140a816113f8565b82525050565b5f6020820190506114235f830184611401565b92915050565b611432816113f8565b811461143c575f80fd5b50565b5f8135905061144d81611429565b92915050565b5f602082840312156114685761146761133d565b5b5f6114758482850161143f565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6114a78261147e565b9050919050565b6114b78161149d565b81146114c1575f80fd5b50565b5f813590506114d2816114ae565b92915050565b5f80604083850312156114ee576114ed61133d565b5b5f6114fb858286016114c4565b925050602061150c8582860161143f565b9150509250929050565b61151f81611345565b82525050565b5f6020820190506115385f830184611516565b92915050565b5f602082840312156115535761155261133d565b5b5f611560848285016114c4565b91505092915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261158a57611589611569565b5b8235905067ffffffffffffffff8111156115a7576115a661156d565b5b6020830191508360018202830111156115c3576115c2611571565b5b9250929050565b5f80602083850312156115e0576115df61133d565b5b5f83013567ffffffffffffffff8111156115fd576115fc611341565b5b61160985828601611575565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61165782611615565b611661818561161f565b935061167181856020860161162f565b61167a8161163d565b840191505092915050565b5f6020820190508181035f83015261169d818461164d565b905092915050565b6116ae8161149d565b82525050565b5f6020820190506116c75f8301846116a5565b92915050565b5f805f604084860312156116e4576116e361133d565b5b5f6116f1868287016114c4565b935050602084013567ffffffffffffffff81111561171257611711611341565b5b61171e86828701611575565b92509250509250925092565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6117648261163d565b810181811067ffffffffffffffff821117156117835761178261172e565b5b80604052505050565b5f611795611334565b90506117a1828261175b565b919050565b5f608082840312156117bb576117ba61172a565b5b6117c5608061178c565b90505f6117d4848285016114c4565b5f8301525060206117e784828501611386565b60208301525060406117fb8482850161143f565b604083015250606061180f8482850161143f565b60608301525092915050565b5f608082840312156118305761182f61133d565b5b5f61183d848285016117a6565b91505092915050565b5f81519050611854816114ae565b92915050565b5f6020828403121561186f5761186e61133d565b5b5f61187c84828501611846565b91505092915050565b5f819050919050565b5f819050919050565b5f6118b16118ac6118a784611885565b61188e565b6113f8565b9050919050565b6118c181611897565b82525050565b5f6040820190506118da5f8301856116a5565b6118e760208301846118b8565b9392505050565b6118f7816113c5565b8114611901575f80fd5b50565b5f81519050611912816118ee565b92915050565b5f6020828403121561192d5761192c61133d565b5b5f61193a84828501611904565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61197a826113f8565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036119ac576119ab611943565b5b600182019050919050565b5f6040820190506119ca5f8301856116a5565b6119d76020830184611401565b9392505050565b5f81905092915050565b5f6119f282611615565b6119fc81856119de565b9350611a0c81856020860161162f565b80840191505092915050565b5f611a2382846119e8565b915081905092915050565b5f8160601b9050919050565b5f611a4482611a2e565b9050919050565b5f611a5582611a3a565b9050919050565b611a6d611a688261149d565b611a4b565b82525050565b5f819050919050565b611a8d611a88826113f8565b611a73565b82525050565b5f611a9e8286611a5c565b601482019150611aae8285611a5c565b601482019150611abe8284611a7c565b60208201915081905094935050505056fea264697066735822122088b34e24fbec910ced058a6b3dffdf327035d99da64bab74d2addc3e9026fe9864736f6c634300081a0033", e = class e extends V {
|
|
7
|
+
const R = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b611b05806100bd5f395ff3fe60806040526004361061019b575f3560e01c8063514e62fc116100eb578063c884ef8311610089578063ea3d508a11610063578063ea3d508a1461057b578063f04e283e146105a5578063f2fde38b146105c1578063fee81cf4146105dd5761019b565b8063c884ef83146104d9578063db09da1214610515578063dcc59b6f146105515761019b565b80638da5cb5b116100c55780638da5cb5b1461041f578063a270a73714610449578063a4d66daf14610473578063bb1757cf1461049d5761019b565b8063514e62fc146103cf57806354d1f13d1461040b578063715018a6146104155761019b565b80632569296211610158578063439fab9111610132578063439fab9114610313578063474f5a441461033b5780634a4ee7b1146103775780634e7165a2146103935761019b565b806325692962146102a357806328d6183b146102ad5780632de94807146102d75761019b565b806301ffc9a71461019f57806307621eca146101db578063183a4f6e146102055780631c10893f146102215780631cd64df41461023d578063228cb73314610279575b5f80fd5b3480156101aa575f80fd5b506101c560048036038101906101c0919061139a565b610619565b6040516101d291906113df565b60405180910390f35b3480156101e6575f80fd5b506101ef610692565b6040516101fc9190611410565b60405180910390f35b61021f600480360381019061021a9190611453565b61069b565b005b61023b600480360381019061023691906114d8565b6106a8565b005b348015610248575f80fd5b50610263600480360381019061025e91906114d8565b6106be565b60405161027091906113df565b60405180910390f35b348015610284575f80fd5b5061028d6106d4565b60405161029a9190611410565b60405180910390f35b6102ab6106da565b005b3480156102b8575f80fd5b506102c161072b565b6040516102ce9190611525565b60405180910390f35b3480156102e2575f80fd5b506102fd60048036038101906102f8919061153e565b610752565b60405161030a9190611410565b60405180910390f35b34801561031e575f80fd5b50610339600480360381019061033491906115ca565b61076b565b005b348015610346575f80fd5b50610361600480360381019061035c91906115ca565b6108c3565b60405161036e91906113df565b60405180910390f35b610391600480360381019061038c91906114d8565b6108f6565b005b34801561039e575f80fd5b506103b960048036038101906103b491906115ca565b61090c565b6040516103c69190611685565b60405180910390f35b3480156103da575f80fd5b506103f560048036038101906103f091906114d8565b610963565b60405161040291906113df565b60405180910390f35b61041361097a565b005b61041d6109b3565b005b34801561042a575f80fd5b506104336109c6565b60405161044091906116b4565b60405180910390f35b348015610454575f80fd5b5061045d6109ee565b60405161046a91906116b4565b60405180910390f35b34801561047e575f80fd5b50610487610a13565b6040516104949190611410565b60405180910390f35b3480156104a8575f80fd5b506104c360048036038101906104be91906116cd565b610a19565b6040516104d091906113df565b60405180910390f35b3480156104e4575f80fd5b506104ff60048036038101906104fa919061153e565b610e30565b60405161050c91906113df565b60405180910390f35b348015610520575f80fd5b5061053b600480360381019061053691906116cd565b610e4d565b60405161054891906113df565b60405180910390f35b34801561055c575f80fd5b50610565610e60565b6040516105729190611410565b60405180910390f35b348015610586575f80fd5b5061058f610e65565b60405161059c9190611525565b60405180910390f35b6105bf60048036038101906105ba919061153e565b610e77565b005b6105db60048036038101906105d6919061153e565b610eb5565b005b3480156105e8575f80fd5b5061060360048036038101906105fe919061153e565b610ede565b6040516106109190611410565b60405180910390f35b5f7f0d36a40d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061068b575061068a82610ef7565b5b9050919050565b5f600154905090565b6106a53382610f70565b50565b6106b0610f7f565b6106ba8282610fb6565b5050565b5f81826106ca85610752565b1614905092915050565b60015481565b5f6106e3610fc6565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7f0d36a40d00000000000000000000000000000000000000000000000000000000905090565b5f638b78c6d8600c52815f526020600c20549050919050565b5f610774610fd0565b905080546003825580156107a65760018160011c14303b1061079d5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f83838101906107b7919061181b565b90505f816040015114806107ce57505f8160600151145b15610805576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f015160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806020015160055f6101000a81548163ffffffff021916908360e01c02179055508060400151600181905550806060015160048190555061088833610ff9565b5080156108be576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f6040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108fe610f7f565b6109088282610f70565b5050565b60605f67ffffffffffffffff8111156109285761092761172e565b5b6040519080825280601f01601f19166020018201604052801561095a5781602001600182028036833780820191505090505b50905092915050565b5f808261096f85610752565b161415905092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b6109bb610f7f565b6109c45f6110cf565b565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b5f610a22610f7f565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa7573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610acb919061185a565b73ffffffffffffffffffffffffffffffffffffffff1614158015610b6e5750600115158173ffffffffffffffffffffffffffffffffffffffff1663514e62fc3060026040518363ffffffff1660e01b8152600401610b2a9291906118c7565b602060405180830381865afa158015610b45573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b699190611918565b151514155b15610ba5576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610bae85611195565b610be4576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80815480929190610bf590611970565b9190505550600160025f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055505f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660055f9054906101000a900460e01b87600154604051602401610cac9291906119b7565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051610d169190611a18565b5f604051808303815f865af19150503d805f8114610d4f576040519150601f19603f3d011682016040523d82523d5f602084013e610d54565b606091505b5050905080610d8f576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff167f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d360035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1688600154604051602001610dff93929190611a93565b604051602081830303815290604052604051610e1b9190611685565b60405180910390a26001925050509392505050565b6002602052805f5260405f205f915054906101000a900460ff1681565b5f610e5784611195565b90509392505050565b5f5481565b60055f9054906101000a900460e01b81565b610e7f610f7f565b63389a75e1600c52805f526020600c208054421115610ea557636f5e88185f526004601cfd5b5f815550610eb2816110cf565b50565b610ebd610f7f565b8060601b610ed257637448fbae5f526004601cfd5b610edb816110cf565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7f91f4490a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610f695750610f68826111f6565b5b9050919050565b610f7b82825f61126f565b5050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610fb4576382b429005f526004601cfd5b565b610fc28282600161126f565b5050565b5f6202a300905090565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b6110016112c7565b15611079577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392780541561103b57630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3506110cc565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b6110d76112c7565b1561113c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550611192565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f60025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff161580156111ef57506004545f54105b9050919050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806112685750611267826112cb565b5b9050919050565b638b78c6d8600c52825f526020600c2080548381178361129157848216821890505b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61137981611345565b8114611383575f80fd5b50565b5f8135905061139481611370565b92915050565b5f602082840312156113af576113ae61133d565b5b5f6113bc84828501611386565b91505092915050565b5f8115159050919050565b6113d9816113c5565b82525050565b5f6020820190506113f25f8301846113d0565b92915050565b5f819050919050565b61140a816113f8565b82525050565b5f6020820190506114235f830184611401565b92915050565b611432816113f8565b811461143c575f80fd5b50565b5f8135905061144d81611429565b92915050565b5f602082840312156114685761146761133d565b5b5f6114758482850161143f565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6114a78261147e565b9050919050565b6114b78161149d565b81146114c1575f80fd5b50565b5f813590506114d2816114ae565b92915050565b5f80604083850312156114ee576114ed61133d565b5b5f6114fb858286016114c4565b925050602061150c8582860161143f565b9150509250929050565b61151f81611345565b82525050565b5f6020820190506115385f830184611516565b92915050565b5f602082840312156115535761155261133d565b5b5f611560848285016114c4565b91505092915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261158a57611589611569565b5b8235905067ffffffffffffffff8111156115a7576115a661156d565b5b6020830191508360018202830111156115c3576115c2611571565b5b9250929050565b5f80602083850312156115e0576115df61133d565b5b5f83013567ffffffffffffffff8111156115fd576115fc611341565b5b61160985828601611575565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61165782611615565b611661818561161f565b935061167181856020860161162f565b61167a8161163d565b840191505092915050565b5f6020820190508181035f83015261169d818461164d565b905092915050565b6116ae8161149d565b82525050565b5f6020820190506116c75f8301846116a5565b92915050565b5f805f604084860312156116e4576116e361133d565b5b5f6116f1868287016114c4565b935050602084013567ffffffffffffffff81111561171257611711611341565b5b61171e86828701611575565b92509250509250925092565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6117648261163d565b810181811067ffffffffffffffff821117156117835761178261172e565b5b80604052505050565b5f611795611334565b90506117a1828261175b565b919050565b5f608082840312156117bb576117ba61172a565b5b6117c5608061178c565b90505f6117d4848285016114c4565b5f8301525060206117e784828501611386565b60208301525060406117fb8482850161143f565b604083015250606061180f8482850161143f565b60608301525092915050565b5f608082840312156118305761182f61133d565b5b5f61183d848285016117a6565b91505092915050565b5f81519050611854816114ae565b92915050565b5f6020828403121561186f5761186e61133d565b5b5f61187c84828501611846565b91505092915050565b5f819050919050565b5f819050919050565b5f6118b16118ac6118a784611885565b61188e565b6113f8565b9050919050565b6118c181611897565b82525050565b5f6040820190506118da5f8301856116a5565b6118e760208301846118b8565b9392505050565b6118f7816113c5565b8114611901575f80fd5b50565b5f81519050611912816118ee565b92915050565b5f6020828403121561192d5761192c61133d565b5b5f61193a84828501611904565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61197a826113f8565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036119ac576119ab611943565b5b600182019050919050565b5f6040820190506119ca5f8301856116a5565b6119d76020830184611401565b9392505050565b5f81905092915050565b5f6119f282611615565b6119fc81856119de565b9350611a0c81856020860161162f565b80840191505092915050565b5f611a2382846119e8565b915081905092915050565b5f8160601b9050919050565b5f611a4482611a2e565b9050919050565b5f611a5582611a3a565b9050919050565b611a6d611a688261149d565b611a4b565b82525050565b5f819050919050565b611a8d611a88826113f8565b611a73565b82525050565b5f611a9e8286611a5c565b601482019150611aae8285611a5c565b601482019150611abe8284611a7c565b60208201915081905094935050505056fea264697066735822122044c719f170d4383804c6f6cff866bd17bd6edb98848e416c2764faa392fd874164736f6c634300081a0033", e = class e extends V {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments), this.abi = c;
|
|
10
10
|
}
|
|
@@ -13,7 +13,7 @@ const R = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
13
13
|
*
|
|
14
14
|
* @public
|
|
15
15
|
* @async
|
|
16
|
-
* @param {?ReadParams
|
|
16
|
+
* @param {?ReadParams} [params]
|
|
17
17
|
* @returns {Promise<bigint>}
|
|
18
18
|
*/
|
|
19
19
|
async claims(f) {
|
|
@@ -29,7 +29,7 @@ const R = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
29
29
|
*
|
|
30
30
|
* @public
|
|
31
31
|
* @async
|
|
32
|
-
* @param {?ReadParams
|
|
32
|
+
* @param {?ReadParams} [params]
|
|
33
33
|
* @returns {Promise<bigint>} - The current reward
|
|
34
34
|
*/
|
|
35
35
|
async currentReward(f) {
|
|
@@ -45,8 +45,8 @@ const R = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
45
45
|
*
|
|
46
46
|
* @public
|
|
47
47
|
* @async
|
|
48
|
-
* @param {?ReadParams
|
|
49
|
-
* @returns {
|
|
48
|
+
* @param {?ReadParams} [params]
|
|
49
|
+
* @returns {Promise<bigint>} The reward amount issued for each claim
|
|
50
50
|
*/
|
|
51
51
|
async reward(f) {
|
|
52
52
|
return await o(this._config, {
|
|
@@ -62,8 +62,8 @@ const R = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
62
62
|
* @public
|
|
63
63
|
* @async
|
|
64
64
|
* @param {Address} address
|
|
65
|
-
* @param {?ReadParams
|
|
66
|
-
* @returns {
|
|
65
|
+
* @param {?ReadParams} [params]
|
|
66
|
+
* @returns {Promise<boolean>}
|
|
67
67
|
*/
|
|
68
68
|
async claimed(f, b) {
|
|
69
69
|
return await l(this._config, {
|
|
@@ -78,8 +78,8 @@ const R = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
78
78
|
*
|
|
79
79
|
* @public
|
|
80
80
|
* @async
|
|
81
|
-
* @param {?ReadParams
|
|
82
|
-
* @returns {
|
|
81
|
+
* @param {?ReadParams} [params]
|
|
82
|
+
* @returns {Promise<Address>}
|
|
83
83
|
*/
|
|
84
84
|
async venue(f) {
|
|
85
85
|
return await h(this._config, {
|
|
@@ -93,7 +93,7 @@ const R = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
93
93
|
*
|
|
94
94
|
* @public
|
|
95
95
|
* @async
|
|
96
|
-
* @param {?ReadParams
|
|
96
|
+
* @param {?ReadParams} [params]
|
|
97
97
|
* @returns {Promise<bigint>}
|
|
98
98
|
*/
|
|
99
99
|
async limit(f) {
|
|
@@ -108,7 +108,7 @@ const R = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
108
108
|
*
|
|
109
109
|
* @public
|
|
110
110
|
* @async
|
|
111
|
-
* @param {?ReadParams
|
|
111
|
+
* @param {?ReadParams} [params]
|
|
112
112
|
* @returns {Promise<Hex>}
|
|
113
113
|
*/
|
|
114
114
|
async selector(f) {
|
|
@@ -124,7 +124,7 @@ const R = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
124
124
|
* @public
|
|
125
125
|
* @async
|
|
126
126
|
* @param {ClaimPayload} payload
|
|
127
|
-
* @param {?WriteParams
|
|
127
|
+
* @param {?WriteParams} [params]
|
|
128
128
|
* @returns {Promise<boolean>} - True if the incentive was successfully claimed
|
|
129
129
|
*/
|
|
130
130
|
async claim(f, b) {
|
|
@@ -136,8 +136,8 @@ const R = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
136
136
|
* @public
|
|
137
137
|
* @async
|
|
138
138
|
* @param {ClaimPayload} payload
|
|
139
|
-
* @param {?WriteParams
|
|
140
|
-
* @returns {Promise<boolean>} - True if the incentive was successfully claimed
|
|
139
|
+
* @param {?WriteParams} [params]
|
|
140
|
+
* @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the incentive was successfully claimed
|
|
141
141
|
*/
|
|
142
142
|
async claimRaw(f, b) {
|
|
143
143
|
const { request: a, result: d } = await y(
|
|
@@ -160,7 +160,7 @@ const R = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
160
160
|
* @public
|
|
161
161
|
* @async
|
|
162
162
|
* @param {ClaimPayload} payload
|
|
163
|
-
* @param {?ReadParams
|
|
163
|
+
* @param {?ReadParams} [params]
|
|
164
164
|
* @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload
|
|
165
165
|
*/
|
|
166
166
|
async isClaimable(f, b) {
|
|
@@ -187,7 +187,7 @@ const R = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
187
187
|
return {
|
|
188
188
|
abi: c,
|
|
189
189
|
bytecode: R,
|
|
190
|
-
args: [
|
|
190
|
+
args: [T(a)],
|
|
191
191
|
...this.optionallyAttachAccount(d.account)
|
|
192
192
|
};
|
|
193
193
|
}
|
|
@@ -196,7 +196,7 @@ e.bases = {
|
|
|
196
196
|
...A
|
|
197
197
|
}, e.registryType = _.INCENTIVE;
|
|
198
198
|
let t = e;
|
|
199
|
-
const
|
|
199
|
+
const T = ({
|
|
200
200
|
venue: r,
|
|
201
201
|
selector: f,
|
|
202
202
|
reward: b,
|
|
@@ -213,6 +213,6 @@ const P = ({
|
|
|
213
213
|
export {
|
|
214
214
|
t as PointsIncentive,
|
|
215
215
|
c as pointsIncentiveAbi,
|
|
216
|
-
|
|
216
|
+
T as preparePointsIncentivePayload
|
|
217
217
|
};
|
|
218
218
|
//# sourceMappingURL=PointsIncentive.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PointsIncentive.js","sources":["../../src/Incentives/PointsIncentive.ts"],"sourcesContent":["import {\n pointsIncentiveAbi,\n readPointsIncentiveClaimed,\n readPointsIncentiveClaims,\n readPointsIncentiveCurrentReward,\n readPointsIncentiveIsClaimable,\n readPointsIncentiveLimit,\n readPointsIncentiveReward,\n readPointsIncentiveSelector,\n readPointsIncentiveVenue,\n simulatePointsIncentiveClaim,\n writePointsIncentiveClaim,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/PointsIncentive.sol/PointsIncentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n} from 'viem';\nimport { PointsIncentive as PointsIncentiveBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport { type ClaimPayload, prepareClaimPayload } from '../claiming';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { pointsIncentiveAbi };\n\n/**\n * The object representation of a `PointsIncentive.InitPayload`\n *\n * @export\n * @interface PointsIncentivePayload\n * @typedef {PointsIncentivePayload}\n */\nexport interface PointsIncentivePayload {\n /**\n * The address of the points contract\n *\n * @type {Address}\n */\n venue: Address;\n /**\n * The selector for the issuance function on the points contract\n *\n * @type {Hex}\n */\n selector: Hex;\n /**\n * The reward amount issued for each claim\n *\n * @type {bigint}\n */\n reward: bigint;\n /**\n * The maximum number of claims that can be made (one per address)\n *\n * @type {bigint}\n */\n limit: bigint;\n}\n\n/**\n * A generic `viem.Log` event with support for `PointsIncentive` event types.\n *\n * @export\n * @typedef {PointsIncentiveLog}\n * @template {ContractEventName<\n * typeof pointsIncentiveAbi\n * >} [event=ContractEventName<typeof pointsIncentiveAbi>]\n */\nexport type PointsIncentiveLog<\n event extends ContractEventName<\n typeof pointsIncentiveAbi\n > = ContractEventName<typeof pointsIncentiveAbi>,\n> = GenericLog<typeof pointsIncentiveAbi, event>;\n\n/**\n * A simple on-chain points incentive implementation that allows claiming of soulbound tokens.\n *\n * In order for any claim to be successful:\n * - The claimer must not have already claimed the incentive; and\n * - The maximum number of claims must not have been reached; and\n * - This contract must be authorized to operate the points contract's issuance function\n *\n * @export\n * @class PointsIncentive\n * @typedef {PointsIncentive}\n * @extends {DeployableTarget<PointsIncentivePayload>}\n */\nexport class PointsIncentive extends DeployableTarget<\n PointsIncentivePayload,\n typeof pointsIncentiveAbi\n> {\n public override readonly abi = pointsIncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(PointsIncentiveBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.INCENTIVE;\n\n /**\n * The number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams<typeof erc20IncentiveAbi, 'claims'>} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(\n params?: ReadParams<typeof pointsIncentiveAbi, 'claims'>,\n ) {\n return await readPointsIncentiveClaims(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The current reward\n *\n * @public\n * @async\n * @param {?ReadParams<typeof erc20IncentiveAbi, 'currentReward'>} [params]\n * @returns {Promise<bigint>} - The current reward\n */\n public async currentReward(\n params?: ReadParams<typeof pointsIncentiveAbi, 'currentReward'>,\n ) {\n return await readPointsIncentiveCurrentReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The reward amount issued for each claim\n *\n * @public\n * @async\n * @param {?ReadParams<typeof pointsIncentiveAbi, 'reward'>} [params]\n * @returns {unknown}\n */\n public async reward(\n params?: ReadParams<typeof pointsIncentiveAbi, 'reward'>,\n ) {\n return await readPointsIncentiveReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * A mapping of address to claim status\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams<typeof pointsIncentiveAbi, 'claimed'>} [params]\n * @returns {unknown}\n */\n public async claimed(\n address: Address,\n params?: ReadParams<typeof pointsIncentiveAbi, 'claimed'>,\n ) {\n return await readPointsIncentiveClaimed(this._config, {\n address: this.assertValidAddress(),\n args: [address],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The address of the points contract\n *\n * @public\n * @async\n * @param {?ReadParams<typeof pointsIncentiveAbi, 'venue'>} [params]\n * @returns {unknown}\n */\n public async venue(params?: ReadParams<typeof pointsIncentiveAbi, 'venue'>) {\n return await readPointsIncentiveVenue(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The maximum number of claims that can be made (one per address)\n *\n * @public\n * @async\n * @param {?ReadParams<typeof pointsIncentiveAbi, 'limit'>} [params]\n * @returns {Promise<bigint>}\n */\n public async limit(params?: ReadParams<typeof pointsIncentiveAbi, 'limit'>) {\n return await readPointsIncentiveLimit(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The selector for the issuance function on the points contract\n *\n * @public\n * @async\n * @param {?ReadParams<typeof pointsIncentiveAbi, 'selector'>} [params]\n * @returns {Promise<Hex>}\n */\n public async selector(\n params?: ReadParams<typeof pointsIncentiveAbi, 'selector'>,\n ) {\n return await readPointsIncentiveSelector(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams<typeof pointsIncentiveAbi, 'claim'>} [params]\n * @returns {Promise<boolean>} - True if the incentive was successfully claimed\n */\n protected async claim(\n payload: ClaimPayload,\n params?: WriteParams<typeof pointsIncentiveAbi, 'claim'>,\n ) {\n return await this.awaitResult(this.claimRaw(payload, params));\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams<typeof pointsIncentiveAbi, 'claim'>} [params]\n * @returns {Promise<boolean>} - True if the incentive was successfully claimed\n */\n protected async claimRaw(\n payload: ClaimPayload,\n params?: WriteParams<typeof pointsIncentiveAbi, 'claim'>,\n ) {\n const { request, result } = await simulatePointsIncentiveClaim(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writePointsIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable.\n * For the POOL strategy, the `bytes data` portion of the payload ignored.\n * The recipient must not have already claimed the incentive.\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?ReadParams<typeof pointsIncentiveAbi, 'isClaimable'>} [params]\n * @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload\n */\n public async isClaimable(\n payload: ClaimPayload,\n params?: ReadParams<typeof pointsIncentiveAbi, 'isClaimable'>,\n ) {\n return await readPointsIncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?PointsIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: PointsIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: pointsIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [preparePointsIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Given a {@link PointsIncentivePayload}, properly encode a `PointsIncentive.InitPayload` for use with {@link PointsIncentive} initialization.\n *\n * @param {PointsIncentivePayload} param0\n * @param {Address} param0.venue - The address of the points contract\n * @param {Hex} param0.selector - The selector for the issuance function on the points contract\n * @param {bigint} param0.reward - The reward amount issued for each claim\n * @param {bigint} param0.limit - The maximum number of claims that can be made (one per address)\n * @returns {*}\n */\nexport const preparePointsIncentivePayload = ({\n venue,\n selector,\n reward,\n limit,\n}: PointsIncentivePayload) => {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'venue' },\n { type: 'bytes4', name: 'selector' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\n ],\n [venue, selector, reward, limit],\n );\n};\n"],"names":["_PointsIncentive","DeployableTarget","pointsIncentiveAbi","params","readPointsIncentiveClaims","readPointsIncentiveCurrentReward","readPointsIncentiveReward","address","readPointsIncentiveClaimed","readPointsIncentiveVenue","readPointsIncentiveLimit","readPointsIncentiveSelector","payload","request","result","simulatePointsIncentiveClaim","prepareClaimPayload","writePointsIncentiveClaim","readPointsIncentiveIsClaimable","_payload","_options","options","bytecode","preparePointsIncentivePayload","PointsIncentiveBases","RegistryType","PointsIncentive","venue","selector","reward","limit","encodeAbiParameters"],"mappings":";;;;;;o5bAkGaA,IAAN,MAAMA,UAAwBC,EAGnC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAIL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA4B/B,MAAa,OACXC,GACA;AACO,WAAA,MAAMC,EAA0B,KAAK,SAAS;AAAA,MACnD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAID;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAa,cACXA,GACA;AACO,WAAA,MAAME,EAAiC,KAAK,SAAS;AAAA,MAC1D,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAIF;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAa,OACXA,GACA;AACO,WAAA,MAAMG,EAA0B,KAAK,SAAS;AAAA,MACnD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAIH;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAa,QACXI,GACAJ,GACA;AACO,WAAA,MAAMK,EAA2B,KAAK,SAAS;AAAA,MACpD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAACD,CAAO;AAAA;AAAA,MAEd,GAAIJ;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAa,MAAMA,GAAyD;AACnE,WAAA,MAAMM,EAAyB,KAAK,SAAS;AAAA,MAClD,SAAS,KAAK,mBAAmB;AAAA;AAAA,MAEjC,GAAIN;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAa,MAAMA,GAAyD;AACnE,WAAA,MAAMO,EAAyB,KAAK,SAAS;AAAA,MAClD,SAAS,KAAK,mBAAmB;AAAA;AAAA,MAEjC,GAAIP;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAa,SACXA,GACA;AACO,WAAA,MAAMQ,EAA4B,KAAK,SAAS;AAAA,MACrD,SAAS,KAAK,mBAAmB;AAAA;AAAA,MAEjC,GAAIR;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAgB,MACdS,GACAT,GACA;AACA,WAAO,MAAM,KAAK,YAAY,KAAK,SAASS,GAAST,CAAM,CAAC;AAAA,EAC9D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAgB,SACdS,GACAT,GACA;AACA,UAAM,EAAE,SAAAU,GAAS,QAAAC,EAAO,IAAI,MAAMC;AAAAA,MAChC,KAAK;AAAA,MACL;AAAA,QACE,SAAS,KAAK,mBAAmB;AAAA,QACjC,MAAM,CAACC,EAAoBJ,CAAO,CAAC;AAAA,QACnC,GAAG,KAAK,wBAAwB;AAAA;AAAA,QAEhC,GAAIT;AAAA,MACN;AAAA,IAAA;AAGK,WAAA,EAAE,MADI,MAAMc,EAA0B,KAAK,SAASJ,CAAO,GACnD,QAAAC;EACjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaA,MAAa,YACXF,GACAT,GACA;AACO,WAAA,MAAMe,EAA+B,KAAK,SAAS;AAAA,MACxD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAACF,EAAoBJ,CAAO,CAAC;AAAA;AAAA,MAEnC,GAAIT;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUgB,gBACdgB,GACAC,GACyB;AACzB,UAAM,CAACR,GAASS,CAAO,IAAI,KAAK;AAAA,MAC9BF;AAAA,MACAC;AAAA,IAAA;AAEK,WAAA;AAAA,MACL,KAAKlB;AAAAA,MACL,UAAAoB;AAAA,MACA,MAAM,CAACC,EAA8BX,CAAO,CAAC;AAAA,MAC7C,GAAG,KAAK,wBAAwBS,EAAQ,OAAO;AAAA,IAAA;AAAA,EAEnD;AACF;AArOErB,EAAuB,QAAiC;AAAA,EACtD,GAAIwB;AAAA,GASNxB,EAAuB,eAA6ByB,EAAa;AAtB5D,IAAMC,IAAN1B;AA6PA,MAAMuB,IAAgC,CAAC;AAAA,EAC5C,OAAAI;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AACF,MACSC;AAAA,EACL;AAAA,IACE,EAAE,MAAM,WAAW,MAAM,QAAQ;AAAA,IACjC,EAAE,MAAM,UAAU,MAAM,WAAW;AAAA,IACnC,EAAE,MAAM,WAAW,MAAM,SAAS;AAAA,IAClC,EAAE,MAAM,WAAW,MAAM,QAAQ;AAAA,EACnC;AAAA,EACA,CAACJ,GAAOC,GAAUC,GAAQC,CAAK;AAAA;"}
|
|
1
|
+
{"version":3,"file":"PointsIncentive.js","sources":["../../src/Incentives/PointsIncentive.ts"],"sourcesContent":["import {\n pointsIncentiveAbi,\n readPointsIncentiveClaimed,\n readPointsIncentiveClaims,\n readPointsIncentiveCurrentReward,\n readPointsIncentiveIsClaimable,\n readPointsIncentiveLimit,\n readPointsIncentiveReward,\n readPointsIncentiveSelector,\n readPointsIncentiveVenue,\n simulatePointsIncentiveClaim,\n writePointsIncentiveClaim,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/PointsIncentive.sol/PointsIncentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n} from 'viem';\nimport { PointsIncentive as PointsIncentiveBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport { type ClaimPayload, prepareClaimPayload } from '../claiming';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { pointsIncentiveAbi };\n\n/**\n * The object representation of a `PointsIncentive.InitPayload`\n *\n * @export\n * @interface PointsIncentivePayload\n * @typedef {PointsIncentivePayload}\n */\nexport interface PointsIncentivePayload {\n /**\n * The address of the points contract\n *\n * @type {Address}\n */\n venue: Address;\n /**\n * The selector for the issuance function on the points contract\n *\n * @type {Hex}\n */\n selector: Hex;\n /**\n * The reward amount issued for each claim\n *\n * @type {bigint}\n */\n reward: bigint;\n /**\n * The maximum number of claims that can be made (one per address)\n *\n * @type {bigint}\n */\n limit: bigint;\n}\n\n/**\n * A generic `viem.Log` event with support for `PointsIncentive` event types.\n *\n * @export\n * @typedef {PointsIncentiveLog}\n * @template {ContractEventName<\n * typeof pointsIncentiveAbi\n * >} [event=ContractEventName<typeof pointsIncentiveAbi>]\n */\nexport type PointsIncentiveLog<\n event extends ContractEventName<\n typeof pointsIncentiveAbi\n > = ContractEventName<typeof pointsIncentiveAbi>,\n> = GenericLog<typeof pointsIncentiveAbi, event>;\n\n/**\n * A simple on-chain points incentive implementation that allows claiming of soulbound tokens.\n *\n * In order for any claim to be successful:\n * - The claimer must not have already claimed the incentive; and\n * - The maximum number of claims must not have been reached; and\n * - This contract must be authorized to operate the points contract's issuance function\n *\n * @export\n * @class PointsIncentive\n * @typedef {PointsIncentive}\n * @extends {DeployableTarget<PointsIncentivePayload>}\n */\nexport class PointsIncentive extends DeployableTarget<\n PointsIncentivePayload,\n typeof pointsIncentiveAbi\n> {\n public override readonly abi = pointsIncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(PointsIncentiveBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.INCENTIVE;\n\n /**\n * The number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(\n params?: ReadParams<typeof pointsIncentiveAbi, 'claims'>,\n ) {\n return await readPointsIncentiveClaims(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The current reward\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - The current reward\n */\n public async currentReward(\n params?: ReadParams<typeof pointsIncentiveAbi, 'currentReward'>,\n ) {\n return await readPointsIncentiveCurrentReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The reward amount issued for each claim\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} The reward amount issued for each claim\n */\n public async reward(\n params?: ReadParams<typeof pointsIncentiveAbi, 'reward'>,\n ) {\n return await readPointsIncentiveReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * A mapping of address to claim status\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>}\n */\n public async claimed(\n address: Address,\n params?: ReadParams<typeof pointsIncentiveAbi, 'claimed'>,\n ) {\n return await readPointsIncentiveClaimed(this._config, {\n address: this.assertValidAddress(),\n args: [address],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The address of the points contract\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async venue(params?: ReadParams<typeof pointsIncentiveAbi, 'venue'>) {\n return await readPointsIncentiveVenue(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The maximum number of claims that can be made (one per address)\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async limit(params?: ReadParams<typeof pointsIncentiveAbi, 'limit'>) {\n return await readPointsIncentiveLimit(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The selector for the issuance function on the points contract\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex>}\n */\n public async selector(\n params?: ReadParams<typeof pointsIncentiveAbi, 'selector'>,\n ) {\n return await readPointsIncentiveSelector(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the incentive was successfully claimed\n */\n protected async claim(\n payload: ClaimPayload,\n params?: WriteParams<typeof pointsIncentiveAbi, 'claim'>,\n ) {\n return await this.awaitResult(this.claimRaw(payload, params));\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the incentive was successfully claimed\n */\n protected async claimRaw(\n payload: ClaimPayload,\n params?: WriteParams<typeof pointsIncentiveAbi, 'claim'>,\n ) {\n const { request, result } = await simulatePointsIncentiveClaim(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writePointsIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable.\n * For the POOL strategy, the `bytes data` portion of the payload ignored.\n * The recipient must not have already claimed the incentive.\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload\n */\n public async isClaimable(\n payload: ClaimPayload,\n params?: ReadParams<typeof pointsIncentiveAbi, 'isClaimable'>,\n ) {\n return await readPointsIncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?PointsIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: PointsIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: pointsIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [preparePointsIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Given a {@link PointsIncentivePayload}, properly encode a `PointsIncentive.InitPayload` for use with {@link PointsIncentive} initialization.\n *\n * @param {PointsIncentivePayload} param0\n * @param {Address} param0.venue - The address of the points contract\n * @param {Hex} param0.selector - The selector for the issuance function on the points contract\n * @param {bigint} param0.reward - The reward amount issued for each claim\n * @param {bigint} param0.limit - The maximum number of claims that can be made (one per address)\n * @returns {*}\n */\nexport const preparePointsIncentivePayload = ({\n venue,\n selector,\n reward,\n limit,\n}: PointsIncentivePayload) => {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'venue' },\n { type: 'bytes4', name: 'selector' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\n ],\n [venue, selector, reward, limit],\n );\n};\n"],"names":["_PointsIncentive","DeployableTarget","pointsIncentiveAbi","params","readPointsIncentiveClaims","readPointsIncentiveCurrentReward","readPointsIncentiveReward","address","readPointsIncentiveClaimed","readPointsIncentiveVenue","readPointsIncentiveLimit","readPointsIncentiveSelector","payload","request","result","simulatePointsIncentiveClaim","prepareClaimPayload","writePointsIncentiveClaim","readPointsIncentiveIsClaimable","_payload","_options","options","bytecode","preparePointsIncentivePayload","PointsIncentiveBases","RegistryType","PointsIncentive","venue","selector","reward","limit","encodeAbiParameters"],"mappings":";;;;;;o5bAkGaA,IAAN,MAAMA,UAAwBC,EAGnC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAIL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA4B/B,MAAa,OACXC,GACA;AACO,WAAA,MAAMC,EAA0B,KAAK,SAAS;AAAA,MACnD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAID;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAa,cACXA,GACA;AACO,WAAA,MAAME,EAAiC,KAAK,SAAS;AAAA,MAC1D,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAIF;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAa,OACXA,GACA;AACO,WAAA,MAAMG,EAA0B,KAAK,SAAS;AAAA,MACnD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAIH;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAa,QACXI,GACAJ,GACA;AACO,WAAA,MAAMK,EAA2B,KAAK,SAAS;AAAA,MACpD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAACD,CAAO;AAAA;AAAA,MAEd,GAAIJ;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAa,MAAMA,GAAyD;AACnE,WAAA,MAAMM,EAAyB,KAAK,SAAS;AAAA,MAClD,SAAS,KAAK,mBAAmB;AAAA;AAAA,MAEjC,GAAIN;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAa,MAAMA,GAAyD;AACnE,WAAA,MAAMO,EAAyB,KAAK,SAAS;AAAA,MAClD,SAAS,KAAK,mBAAmB;AAAA;AAAA,MAEjC,GAAIP;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAa,SACXA,GACA;AACO,WAAA,MAAMQ,EAA4B,KAAK,SAAS;AAAA,MACrD,SAAS,KAAK,mBAAmB;AAAA;AAAA,MAEjC,GAAIR;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAgB,MACdS,GACAT,GACA;AACA,WAAO,MAAM,KAAK,YAAY,KAAK,SAASS,GAAST,CAAM,CAAC;AAAA,EAC9D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAgB,SACdS,GACAT,GACA;AACA,UAAM,EAAE,SAAAU,GAAS,QAAAC,EAAO,IAAI,MAAMC;AAAAA,MAChC,KAAK;AAAA,MACL;AAAA,QACE,SAAS,KAAK,mBAAmB;AAAA,QACjC,MAAM,CAACC,EAAoBJ,CAAO,CAAC;AAAA,QACnC,GAAG,KAAK,wBAAwB;AAAA;AAAA,QAEhC,GAAIT;AAAA,MACN;AAAA,IAAA;AAGK,WAAA,EAAE,MADI,MAAMc,EAA0B,KAAK,SAASJ,CAAO,GACnD,QAAAC;EACjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaA,MAAa,YACXF,GACAT,GACA;AACO,WAAA,MAAMe,EAA+B,KAAK,SAAS;AAAA,MACxD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAACF,EAAoBJ,CAAO,CAAC;AAAA;AAAA,MAEnC,GAAIT;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUgB,gBACdgB,GACAC,GACyB;AACzB,UAAM,CAACR,GAASS,CAAO,IAAI,KAAK;AAAA,MAC9BF;AAAA,MACAC;AAAA,IAAA;AAEK,WAAA;AAAA,MACL,KAAKlB;AAAAA,MACL,UAAAoB;AAAA,MACA,MAAM,CAACC,EAA8BX,CAAO,CAAC;AAAA,MAC7C,GAAG,KAAK,wBAAwBS,EAAQ,OAAO;AAAA,IAAA;AAAA,EAEnD;AACF;AArOErB,EAAuB,QAAiC;AAAA,EACtD,GAAIwB;AAAA,GASNxB,EAAuB,eAA6ByB,EAAa;AAtB5D,IAAMC,IAAN1B;AA6PA,MAAMuB,IAAgC,CAAC;AAAA,EAC5C,OAAAI;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AACF,MACSC;AAAA,EACL;AAAA,IACE,EAAE,MAAM,WAAW,MAAM,QAAQ;AAAA,IACjC,EAAE,MAAM,UAAU,MAAM,WAAW;AAAA,IACnC,EAAE,MAAM,WAAW,MAAM,SAAS;AAAA,IAClC,EAAE,MAAM,WAAW,MAAM,QAAQ;AAAA,EACnC;AAAA,EACA,CAACJ,GAAOC,GAAUC,GAAQC,CAAK;AAAA;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const d=require("./generated-B0tk-c9b.cjs"),h=require("@wagmi/core"),r=require("viem"),y=require("./deployments-CMdF5uEC.cjs"),p=require("./Deployable/DeployableTargetWithRBAC.cjs"),w=require("./errors.cjs"),A=require("./utils.cjs"),o="0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b6118ff806100bd5f395ff3fe60806040526004361061014a575f3560e01c806354d1f13d116100b5578063e66708291161006e578063e66708291461040a578063ec87621c14610432578063f04e283e1461045c578063f2fde38b14610478578063fe9fbb8014610494578063fee81cf4146104d05761014a565b806354d1f13d1461033e578063715018a61461034857806375b238fc1461035257806380fd60051461037c5780638da5cb5b146103a4578063e3f756de146103ce5761014a565b806328d6183b1161010757806328d6183b146102305780632de948071461025a5780634359d28a14610296578063439fab91146102be5780634a4ee7b1146102e6578063514e62fc146103025761014a565b806301ffc9a71461014e578063141973b01461018a578063183a4f6e146101b25780631c10893f146101ce5780631cd64df4146101ea5780632569296214610226575b5f80fd5b348015610159575f80fd5b50610174600480360381019061016f919061116f565b61050c565b60405161018191906111b4565b60405180910390f35b348015610195575f80fd5b506101b060048036038101906101ab9190611283565b610585565b005b6101cc60048036038101906101c79190611334565b6106c5565b005b6101e860048036038101906101e391906113b9565b6106d2565b005b3480156101f5575f80fd5b50610210600480360381019061020b91906113b9565b6106e8565b60405161021d91906111b4565b60405180910390f35b61022e6106fe565b005b34801561023b575f80fd5b5061024461074f565b6040516102519190611406565b60405180910390f35b348015610265575f80fd5b50610280600480360381019061027b919061141f565b610776565b60405161028d9190611459565b60405180910390f35b3480156102a1575f80fd5b506102bc60048036038101906102b79190611283565b61078f565b005b3480156102c9575f80fd5b506102e460048036038101906102df91906114c7565b61089d565b005b61030060048036038101906102fb91906113b9565b6109ba565b005b34801561030d575f80fd5b50610328600480360381019061032391906113b9565b6109d0565b60405161033591906111b4565b60405180910390f35b6103466109e7565b005b610350610a20565b005b34801561035d575f80fd5b50610366610a33565b6040516103739190611459565b60405180910390f35b348015610387575f80fd5b506103a2600480360381019061039d9190611567565b610a38565b005b3480156103af575f80fd5b506103b8610aee565b6040516103c591906115f4565b60405180910390f35b3480156103d9575f80fd5b506103f460048036038101906103ef919061160d565b610b16565b60405161040191906111b4565b60405180910390f35b348015610415575f80fd5b50610430600480360381019061042b9190611567565b610b6a565b005b34801561043d575f80fd5b50610446610c20565b6040516104539190611459565b60405180910390f35b6104766004803603810190610471919061141f565b610c25565b005b610492600480360381019061048d919061141f565b610c63565b005b34801561049f575f80fd5b506104ba60048036038101906104b5919061141f565b610c8c565b6040516104c791906111b4565b60405180910390f35b3480156104db575f80fd5b506104f660048036038101906104f1919061141f565b610cdf565b6040516105039190611459565b60405180910390f35b5f7f3d30a22c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061057e575061057d82610cf8565b5b9050919050565b61058e33610c8c565b6105c4576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818190508484905014610603576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b848490508110156106be578282828181106106235761062261166a565b5b905060200201602081019061063891906116c1565b5f8087878581811061064d5761064c61166a565b5b9050602002016020810190610662919061141f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508080600101915050610605565b5050505050565b6106cf3382610d71565b50565b6106da610d80565b6106e48282610db7565b5050565b5f81826106f485610776565b1614905092915050565b5f610707610dc7565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7f3d30a22c00000000000000000000000000000000000000000000000000000000905090565b5f638b78c6d8600c52815f526020600c20549050919050565b600261079a81610dd1565b8282905085859050146107d9576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85859050811015610895575f8484838181106107fa576107f961166a565b5b905060200201602081019061080f91906116c1565b905060011515811515036108545761084f8787848181106108335761083261166a565b5b9050602002016020810190610848919061141f565b6001610db7565b610887565b61088687878481811061086a5761086961166a565b5b905060200201602081019061087f919061141f565b6001610d71565b5b5080806001019150506107db565b505050505050565b5f6108a6610e06565b905080546003825580156108d85760018160011c14303b106108cf5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f8084848101906108ea919061186f565b915091506108f782610e2f565b5f5b815181101561097d5760015f808484815181106109195761091861166a565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555080806001019150506108f9565b50505080156109b5576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6109c2610d80565b6109cc8282610d71565b5050565b5f80826109dc85610776565b161415905092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610a28610d80565b610a315f610f05565b565b600281565b6002610a4381610dd1565b828290508585905014610a82576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85859050811015610ae657610ad9868683818110610aa557610aa461166a565b5b9050602002016020810190610aba919061141f565b858584818110610acd57610acc61166a565b5b90506020020135610d71565b8080600101915050610a84565b505050505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b5f805f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff161590509392505050565b6002610b7581610dd1565b828290508585905014610bb4576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85859050811015610c1857610c0b868683818110610bd757610bd661166a565b5b9050602002016020810190610bec919061141f565b858584818110610bff57610bfe61166a565b5b90506020020135610db7565b8080600101915050610bb6565b505050505050565b600181565b610c2d610d80565b63389a75e1600c52805f526020600c208054421115610c5357636f5e88185f526004601cfd5b5f815550610c6081610f05565b50565b610c6b610d80565b8060601b610c8057637448fbae5f526004601cfd5b610c8981610f05565b50565b5f8173ffffffffffffffffffffffffffffffffffffffff16610cac610aee565b73ffffffffffffffffffffffffffffffffffffffff161480610cd85750610cd78260026001176109d0565b5b9050919050565b5f63389a75e1600c52815f526020600c20549050919050565b5f7fe2089f79000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610d6a5750610d6982610fcb565b5b9050919050565b610d7c82825f611044565b5050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610db5576382b429005f526004601cfd5b565b610dc382826001611044565b5050565b5f6202a300905090565b638b78c6d819543314610e0357638b78c6d8600c52335f52806020600c205416610e02576382b429005f526004601cfd5b5b50565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610e3761109c565b15610eaf577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610e7157630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610f02565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b610f0d61109c565b15610f72577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550610fc8565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061103d575061103c826110a0565b5b9050919050565b638b78c6d8600c52825f526020600c2080548381178361106657848216821890505b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61114e8161111a565b8114611158575f80fd5b50565b5f8135905061116981611145565b92915050565b5f6020828403121561118457611183611112565b5b5f6111918482850161115b565b91505092915050565b5f8115159050919050565b6111ae8161119a565b82525050565b5f6020820190506111c75f8301846111a5565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126111ee576111ed6111cd565b5b8235905067ffffffffffffffff81111561120b5761120a6111d1565b5b602083019150836020820283011115611227576112266111d5565b5b9250929050565b5f8083601f840112611243576112426111cd565b5b8235905067ffffffffffffffff8111156112605761125f6111d1565b5b60208301915083602082028301111561127c5761127b6111d5565b5b9250929050565b5f805f806040858703121561129b5761129a611112565b5b5f85013567ffffffffffffffff8111156112b8576112b7611116565b5b6112c4878288016111d9565b9450945050602085013567ffffffffffffffff8111156112e7576112e6611116565b5b6112f38782880161122e565b925092505092959194509250565b5f819050919050565b61131381611301565b811461131d575f80fd5b50565b5f8135905061132e8161130a565b92915050565b5f6020828403121561134957611348611112565b5b5f61135684828501611320565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6113888261135f565b9050919050565b6113988161137e565b81146113a2575f80fd5b50565b5f813590506113b38161138f565b92915050565b5f80604083850312156113cf576113ce611112565b5b5f6113dc858286016113a5565b92505060206113ed85828601611320565b9150509250929050565b6114008161111a565b82525050565b5f6020820190506114195f8301846113f7565b92915050565b5f6020828403121561143457611433611112565b5b5f611441848285016113a5565b91505092915050565b61145381611301565b82525050565b5f60208201905061146c5f83018461144a565b92915050565b5f8083601f840112611487576114866111cd565b5b8235905067ffffffffffffffff8111156114a4576114a36111d1565b5b6020830191508360018202830111156114c0576114bf6111d5565b5b9250929050565b5f80602083850312156114dd576114dc611112565b5b5f83013567ffffffffffffffff8111156114fa576114f9611116565b5b61150685828601611472565b92509250509250929050565b5f8083601f840112611527576115266111cd565b5b8235905067ffffffffffffffff811115611544576115436111d1565b5b6020830191508360208202830111156115605761155f6111d5565b5b9250929050565b5f805f806040858703121561157f5761157e611112565b5b5f85013567ffffffffffffffff81111561159c5761159b611116565b5b6115a8878288016111d9565b9450945050602085013567ffffffffffffffff8111156115cb576115ca611116565b5b6115d787828801611512565b925092505092959194509250565b6115ee8161137e565b82525050565b5f6020820190506116075f8301846115e5565b92915050565b5f805f6040848603121561162457611623611112565b5b5f611631868287016113a5565b935050602084013567ffffffffffffffff81111561165257611651611116565b5b61165e86828701611472565b92509250509250925092565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b6116a08161119a565b81146116aa575f80fd5b50565b5f813590506116bb81611697565b92915050565b5f602082840312156116d6576116d5611112565b5b5f6116e3848285016116ad565b91505092915050565b5f6116f68261135f565b9050919050565b611706816116ec565b8114611710575f80fd5b50565b5f81359050611721816116fd565b92915050565b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61176d82611727565b810181811067ffffffffffffffff8211171561178c5761178b611737565b5b80604052505050565b5f61179e611109565b90506117aa8282611764565b919050565b5f67ffffffffffffffff8211156117c9576117c8611737565b5b602082029050602081019050919050565b5f6117ec6117e7846117af565b611795565b9050808382526020820190506020840283018581111561180f5761180e6111d5565b5b835b81811015611838578061182488826113a5565b845260208401935050602081019050611811565b5050509392505050565b5f82601f830112611856576118556111cd565b5b81356118668482602086016117da565b91505092915050565b5f806040838503121561188557611884611112565b5b5f61189285828601611713565b925050602083013567ffffffffffffffff8111156118b3576118b2611116565b5b6118bf85828601611842565b915050925092905056fea2646970667358221220fd609c06ff9cd293684eb4eec8e0aa68d6f6029c7edd4b9b212b807f76fa1d1464736f6c634300081a0033",t=class t extends p.DeployableTargetWithRBAC{constructor(){super(...arguments),this.abi=d.I}async owner(f){return await d.AO(this._config,{...this.optionallyAttachAccount(),...f,address:this.assertValidAddress(),args:[]})}async isAllowed(f,b){return await d.rM(this._config,{address:this.assertValidAddress(),args:[f,r.zeroHash],...this.optionallyAttachAccount(),...b})}async setDenied(f,b,c){return await this.awaitResult(this.setDeniedRaw(f,b,c))}async setDeniedRaw(f,b,c){const{request:e,result:a}=await d.SM(this._config,{address:this.assertValidAddress(),args:[f,b],...this.optionallyAttachAccount(),...c});return{hash:await d.hM(this._config,e),result:a}}buildParameters(f,b){var s;const[c,e]=this.validateDeploymentConfig(f,b),a=c;if(!a.owner||a.owner===r.zeroAddress){const n=e.account?e.account.address:e.config?h.getAccount(e.config).address:(s=this._account)==null?void 0:s.address;if(n)a.owner=n;else throw new w.DeployableUnknownOwnerProvidedError}return{abi:d.I,bytecode:o,args:[l(a)],...this.optionallyAttachAccount(e.account)}}};t.bases={...y.SimpleDenyList},t.registryType=A.RegistryType.ALLOW_LIST;let i=t;function l({owner:u,denied:f}){return r.encodeAbiParameters([{type:"address",name:"owner"},{type:"address[]",name:"denied"}],[u,f])}exports.SimpleDenyList=i;exports.bytecode=o;exports.prepareSimpleDenyListPayload=l;
|
|
2
|
+
//# sourceMappingURL=SimpleDenyList-BwfNjRsg.cjs.map
|