@boostxyz/sdk 0.0.0-alpha.2 → 0.0.0-alpha.20
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 +2 -1
- package/dist/Actions/Action.cjs.map +1 -0
- package/dist/Actions/Action.d.ts +1 -1
- package/dist/Actions/Action.d.ts.map +1 -1
- package/dist/Actions/Action.js +14 -12
- package/dist/Actions/Action.js.map +1 -0
- package/dist/Actions/ContractAction.d.ts +57 -14
- package/dist/Actions/ContractAction.d.ts.map +1 -1
- package/dist/Actions/ERC721MintAction.d.ts +50 -23
- package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.cjs +2 -1
- package/dist/Actions/EventAction.cjs.map +1 -0
- package/dist/Actions/EventAction.d.ts +405 -36
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +15 -209
- package/dist/Actions/EventAction.js.map +1 -0
- package/dist/AllowLists/AllowList.cjs +2 -1
- package/dist/AllowLists/AllowList.cjs.map +1 -0
- package/dist/AllowLists/AllowList.d.ts +6 -5
- package/dist/AllowLists/AllowList.d.ts.map +1 -1
- package/dist/AllowLists/AllowList.js +46 -22
- package/dist/AllowLists/AllowList.js.map +1 -0
- package/dist/AllowLists/OpenAllowList.d.ts +423 -0
- package/dist/AllowLists/OpenAllowList.d.ts.map +1 -0
- package/dist/AllowLists/SimpleAllowList.cjs +2 -1
- package/dist/AllowLists/SimpleAllowList.cjs.map +1 -0
- package/dist/AllowLists/SimpleAllowList.d.ts +124 -40
- package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleAllowList.js +77 -77
- package/dist/AllowLists/SimpleAllowList.js.map +1 -0
- package/dist/AllowLists/SimpleDenyList.cjs +2 -1
- package/dist/AllowLists/SimpleDenyList.cjs.map +1 -0
- package/dist/AllowLists/SimpleDenyList.d.ts +234 -13
- package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleDenyList.js +12 -200
- package/dist/AllowLists/SimpleDenyList.js.map +1 -0
- package/dist/Auth/Auth.cjs +1 -0
- package/dist/Auth/Auth.cjs.map +1 -0
- package/dist/Auth/Auth.js +1 -0
- package/dist/Auth/Auth.js.map +1 -0
- package/dist/Auth/PassthroughAuth.cjs +2 -1
- package/dist/Auth/PassthroughAuth.cjs.map +1 -0
- package/dist/Auth/PassthroughAuth.js +5 -4
- package/dist/Auth/PassthroughAuth.js.map +1 -0
- package/dist/Boost.cjs +2 -1
- package/dist/Boost.cjs.map +1 -0
- package/dist/Boost.d.ts +111 -1
- package/dist/Boost.d.ts.map +1 -1
- package/dist/Boost.js +140 -5
- package/dist/Boost.js.map +1 -0
- package/dist/BoostCore-3-U1xTQN.cjs +3 -0
- package/dist/BoostCore-3-U1xTQN.cjs.map +1 -0
- package/dist/BoostCore-DVGBUr2y.js +1477 -0
- package/dist/BoostCore-DVGBUr2y.js.map +1 -0
- package/dist/BoostCore.cjs +2 -2
- package/dist/BoostCore.cjs.map +1 -0
- package/dist/BoostCore.d.ts +166 -43
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +30 -1103
- package/dist/BoostCore.js.map +1 -0
- package/dist/BoostRegistry.cjs +2 -1
- package/dist/BoostRegistry.cjs.map +1 -0
- package/dist/BoostRegistry.d.ts +64 -23
- package/dist/BoostRegistry.d.ts.map +1 -1
- package/dist/BoostRegistry.js +162 -88
- package/dist/BoostRegistry.js.map +1 -0
- package/dist/Budgets/Budget.cjs +2 -1
- package/dist/Budgets/Budget.cjs.map +1 -0
- package/dist/Budgets/Budget.d.ts +1 -1
- package/dist/Budgets/Budget.d.ts.map +1 -1
- package/dist/Budgets/Budget.js +15 -13
- package/dist/Budgets/Budget.js.map +1 -0
- package/dist/Budgets/ManagedBudget.cjs +2 -1
- package/dist/Budgets/ManagedBudget.cjs.map +1 -0
- package/dist/Budgets/ManagedBudget.d.ts +78 -188
- package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
- package/dist/Budgets/ManagedBudget.js +86 -286
- package/dist/Budgets/ManagedBudget.js.map +1 -0
- package/dist/Budgets/VestingBudget.d.ts +243 -87
- package/dist/Budgets/VestingBudget.d.ts.map +1 -1
- package/dist/Deployable/Contract.cjs +2 -1
- package/dist/Deployable/Contract.cjs.map +1 -0
- package/dist/Deployable/Contract.d.ts +4 -5
- package/dist/Deployable/Contract.d.ts.map +1 -1
- package/dist/Deployable/Contract.js +7 -8
- package/dist/Deployable/Contract.js.map +1 -0
- package/dist/Deployable/Deployable.cjs +1 -0
- package/dist/Deployable/Deployable.cjs.map +1 -0
- package/dist/Deployable/Deployable.d.ts +9 -3
- package/dist/Deployable/Deployable.d.ts.map +1 -1
- package/dist/Deployable/Deployable.js +10 -5
- package/dist/Deployable/Deployable.js.map +1 -0
- package/dist/Deployable/DeployableTarget.cjs +2 -1
- package/dist/Deployable/DeployableTarget.cjs.map +1 -0
- package/dist/Deployable/DeployableTarget.d.ts +16 -15
- package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
- package/dist/Deployable/DeployableTarget.js +49 -42
- package/dist/Deployable/DeployableTarget.js.map +1 -0
- 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-CIPqmAoP.js +1450 -0
- package/dist/EventAction-CIPqmAoP.js.map +1 -0
- package/dist/EventAction-d-oeqZQs.cjs +2 -0
- package/dist/EventAction-d-oeqZQs.cjs.map +1 -0
- package/dist/Incentive-Bp8Sez7M.js +298 -0
- package/dist/Incentive-Bp8Sez7M.js.map +1 -0
- package/dist/Incentive-Djnzseoj.cjs +2 -0
- package/dist/Incentive-Djnzseoj.cjs.map +1 -0
- package/dist/Incentives/AllowListIncentive.cjs +2 -1
- package/dist/Incentives/AllowListIncentive.cjs.map +1 -0
- package/dist/Incentives/AllowListIncentive.d.ts +49 -19
- package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
- package/dist/Incentives/AllowListIncentive.js +50 -34
- package/dist/Incentives/AllowListIncentive.js.map +1 -0
- package/dist/Incentives/CGDAIncentive.cjs +2 -1
- package/dist/Incentives/CGDAIncentive.cjs.map +1 -0
- package/dist/Incentives/CGDAIncentive.d.ts +118 -22
- package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
- package/dist/Incentives/CGDAIncentive.js +67 -42
- package/dist/Incentives/CGDAIncentive.js.map +1 -0
- package/dist/Incentives/ERC1155Incentive.d.ts +99 -38
- package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.cjs +2 -1
- package/dist/Incentives/ERC20Incentive.cjs.map +1 -0
- package/dist/Incentives/ERC20Incentive.d.ts +73 -29
- package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.js +71 -48
- package/dist/Incentives/ERC20Incentive.js.map +1 -0
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts +523 -0
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -0
- package/dist/Incentives/ERC20VariableIncentive.d.ts +65 -28
- package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.cjs +2 -1
- package/dist/Incentives/Incentive.cjs.map +1 -0
- package/dist/Incentives/Incentive.d.ts +4 -7
- package/dist/Incentives/Incentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.js +17 -278
- package/dist/Incentives/Incentive.js.map +1 -0
- package/dist/Incentives/PointsIncentive.cjs +2 -1
- package/dist/Incentives/PointsIncentive.cjs.map +1 -0
- package/dist/Incentives/PointsIncentive.d.ts +65 -21
- package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
- package/dist/Incentives/PointsIncentive.js +57 -36
- package/dist/Incentives/PointsIncentive.js.map +1 -0
- package/dist/SimpleDenyList-BwfNjRsg.cjs +2 -0
- package/dist/SimpleDenyList-BwfNjRsg.cjs.map +1 -0
- package/dist/SimpleDenyList-Cn5WpNn0.js +132 -0
- package/dist/SimpleDenyList-Cn5WpNn0.js.map +1 -0
- package/dist/Validators/SignerValidator.cjs +2 -1
- package/dist/Validators/SignerValidator.cjs.map +1 -0
- package/dist/Validators/SignerValidator.d.ts +310 -17
- package/dist/Validators/SignerValidator.d.ts.map +1 -1
- package/dist/Validators/SignerValidator.js +165 -36
- package/dist/Validators/SignerValidator.js.map +1 -0
- package/dist/Validators/Validator.cjs +2 -1
- package/dist/Validators/Validator.cjs.map +1 -0
- package/dist/Validators/Validator.d.ts +2 -2
- package/dist/Validators/Validator.d.ts.map +1 -1
- package/dist/Validators/Validator.js +12 -10
- package/dist/Validators/Validator.js.map +1 -0
- package/dist/claiming.cjs +2 -0
- package/dist/claiming.cjs.map +1 -0
- package/dist/claiming.d.ts +43 -0
- package/dist/claiming.d.ts.map +1 -0
- package/dist/claiming.js +17 -0
- package/dist/claiming.js.map +1 -0
- 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 +41 -0
- package/dist/errors.cjs +2 -1
- package/dist/errors.cjs.map +1 -0
- package/dist/errors.d.ts +403 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +285 -39
- package/dist/errors.js.map +1 -0
- package/dist/generated-B0tk-c9b.cjs +3 -0
- package/dist/generated-B0tk-c9b.cjs.map +1 -0
- package/dist/{generated-x_abr3Yv.js → generated-B7VaSah4.js} +2058 -2541
- package/dist/generated-B7VaSah4.js.map +1 -0
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +10 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +143 -1353
- package/dist/index.js.map +1 -0
- package/dist/transfers.cjs +2 -0
- package/dist/transfers.cjs.map +1 -0
- package/dist/transfers.d.ts +198 -0
- package/dist/transfers.d.ts.map +1 -0
- package/dist/transfers.js +84 -0
- package/dist/transfers.js.map +1 -0
- package/dist/utils.cjs +2 -1
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.d.ts +26 -1350
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +38 -636
- package/dist/utils.js.map +1 -0
- package/package.json +37 -11
- package/src/Actions/Action.test.ts +79 -0
- package/src/Actions/Action.ts +61 -0
- package/src/Actions/ContractAction.test.ts +197 -0
- package/src/Actions/ContractAction.ts +300 -0
- package/src/Actions/ERC721MintAction.test.ts +112 -0
- package/src/Actions/ERC721MintAction.ts +291 -0
- package/src/Actions/EventAction.test.ts +787 -0
- package/src/Actions/EventAction.ts +1214 -0
- package/src/AllowLists/AllowList.test.ts +64 -0
- package/src/AllowLists/AllowList.ts +62 -0
- package/src/AllowLists/OpenAllowList.test.ts +40 -0
- package/src/AllowLists/OpenAllowList.ts +45 -0
- package/src/AllowLists/SimpleAllowList.test.ts +52 -0
- package/src/AllowLists/SimpleAllowList.ts +262 -0
- package/src/AllowLists/SimpleDenyList.test.ts +52 -0
- package/src/AllowLists/SimpleDenyList.ts +250 -0
- package/src/Auth/Auth.ts +11 -0
- package/src/Auth/PassthroughAuth.test.ts +12 -0
- package/src/Auth/PassthroughAuth.ts +80 -0
- package/src/Boost.ts +309 -0
- package/src/BoostCore.test.ts +827 -0
- package/src/BoostCore.ts +1447 -0
- package/src/BoostRegistry.ts +543 -0
- package/src/Budgets/Budget.test.ts +27 -0
- package/src/Budgets/Budget.ts +60 -0
- package/src/Budgets/ManagedBudget.test.ts +217 -0
- package/src/Budgets/ManagedBudget.ts +534 -0
- package/src/Budgets/VestingBudget.test.ts +123 -0
- package/src/Budgets/VestingBudget.ts +530 -0
- package/src/Deployable/Contract.ts +228 -0
- package/src/Deployable/Deployable.ts +250 -0
- package/src/Deployable/DeployableTarget.ts +234 -0
- package/src/Deployable/DeployableTargetWithRBAC.ts +323 -0
- package/src/Incentives/AllowListIncentive.test.ts +143 -0
- package/src/Incentives/AllowListIncentive.ts +336 -0
- package/src/Incentives/CGDAIncentive.test.ts +132 -0
- package/src/Incentives/CGDAIncentive.ts +470 -0
- package/src/Incentives/ERC1155Incentive.test.ts +87 -0
- package/src/Incentives/ERC1155Incentive.ts +465 -0
- package/src/Incentives/ERC20Incentive.test.ts +130 -0
- package/src/Incentives/ERC20Incentive.ts +484 -0
- package/src/Incentives/ERC20VariableCriteriaIncentive.test.ts +184 -0
- package/src/Incentives/ERC20VariableCriteriaIncentive.ts +309 -0
- package/src/Incentives/ERC20VariableIncentive.test.ts +136 -0
- package/src/Incentives/ERC20VariableIncentive.ts +422 -0
- package/src/Incentives/Incentive.test.ts +92 -0
- package/src/Incentives/Incentive.ts +86 -0
- package/src/Incentives/PointsIncentive.test.ts +139 -0
- package/src/Incentives/PointsIncentive.ts +367 -0
- package/src/Validators/SignerValidator.test.ts +159 -0
- package/src/Validators/SignerValidator.ts +683 -0
- package/src/Validators/Validator.test.ts +21 -0
- package/src/Validators/Validator.ts +55 -0
- package/src/claiming.ts +56 -0
- package/src/errors.ts +844 -0
- package/src/index.test.ts +122 -0
- package/src/index.ts +58 -0
- package/src/transfers.ts +284 -0
- package/src/utils.test.ts +44 -0
- package/src/utils.ts +247 -0
- package/dist/Budgets/SimpleBudget.d.ts +0 -793
- package/dist/Budgets/SimpleBudget.d.ts.map +0 -1
- package/dist/generated-BaaleHW-.cjs +0 -2
|
@@ -1,10 +1,30 @@
|
|
|
1
1
|
import { simpleDenyListAbi } from '@boostxyz/evm';
|
|
2
2
|
import { type Address, type ContractEventName } from 'viem';
|
|
3
3
|
import type { DeployableOptions, GenericDeployableParams } from '../Deployable/Deployable';
|
|
4
|
-
import {
|
|
5
|
-
import { type GenericLog, type ReadParams, RegistryType, type
|
|
4
|
+
import { DeployableTargetWithRBAC } from '../Deployable/DeployableTargetWithRBAC';
|
|
5
|
+
import { type GenericLog, type ReadParams, RegistryType, type WriteParams } from '../utils';
|
|
6
6
|
export { simpleDenyListAbi };
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Object representation of a {@link SimpleDenyList} initialization payload.
|
|
9
|
+
*
|
|
10
|
+
* @export
|
|
11
|
+
* @interface SimpleDenyListPayload
|
|
12
|
+
* @typedef {SimpleDenyListPayload}
|
|
13
|
+
*/
|
|
14
|
+
export interface SimpleDenyListPayload {
|
|
15
|
+
/**
|
|
16
|
+
* The allow list's owner
|
|
17
|
+
*
|
|
18
|
+
* @type {Address}
|
|
19
|
+
*/
|
|
20
|
+
owner: Address;
|
|
21
|
+
/**
|
|
22
|
+
* List of denied addresses.
|
|
23
|
+
*
|
|
24
|
+
* @type {Address[]}
|
|
25
|
+
*/
|
|
26
|
+
denied: Address[];
|
|
27
|
+
}
|
|
8
28
|
/**
|
|
9
29
|
* A generic `viem.Log` event with support for `SimpleDenyList` event types.
|
|
10
30
|
*
|
|
@@ -21,9 +41,9 @@ export type SimpleDenyListLog<event extends ContractEventName<typeof simpleDenyL
|
|
|
21
41
|
* @export
|
|
22
42
|
* @class SimpleDenyList
|
|
23
43
|
* @typedef {SimpleDenyList}
|
|
24
|
-
* @extends {
|
|
44
|
+
* @extends {DeployableTargetWithRBAC<SimpleDenyListPayload>}
|
|
25
45
|
*/
|
|
26
|
-
export declare class SimpleDenyList extends
|
|
46
|
+
export declare class SimpleDenyList<Payload = SimpleDenyListPayload> extends DeployableTargetWithRBAC<Payload | undefined, typeof simpleDenyListAbi> {
|
|
27
47
|
readonly abi: readonly [{
|
|
28
48
|
readonly type: "constructor";
|
|
29
49
|
readonly inputs: readonly [];
|
|
@@ -68,6 +88,10 @@ export declare class SimpleDenyList extends DeployableTarget<SimpleDenyListPaylo
|
|
|
68
88
|
readonly type: "error";
|
|
69
89
|
readonly inputs: readonly [];
|
|
70
90
|
readonly name: "Unauthorized";
|
|
91
|
+
}, {
|
|
92
|
+
readonly type: "error";
|
|
93
|
+
readonly inputs: readonly [];
|
|
94
|
+
readonly name: "Unauthorized";
|
|
71
95
|
}, {
|
|
72
96
|
readonly type: "event";
|
|
73
97
|
readonly anonymous: false;
|
|
@@ -113,6 +137,41 @@ export declare class SimpleDenyList extends DeployableTarget<SimpleDenyListPaylo
|
|
|
113
137
|
readonly indexed: true;
|
|
114
138
|
}];
|
|
115
139
|
readonly name: "OwnershipTransferred";
|
|
140
|
+
}, {
|
|
141
|
+
readonly type: "event";
|
|
142
|
+
readonly anonymous: false;
|
|
143
|
+
readonly inputs: readonly [{
|
|
144
|
+
readonly name: "user";
|
|
145
|
+
readonly internalType: "address";
|
|
146
|
+
readonly type: "address";
|
|
147
|
+
readonly indexed: true;
|
|
148
|
+
}, {
|
|
149
|
+
readonly name: "roles";
|
|
150
|
+
readonly internalType: "uint256";
|
|
151
|
+
readonly type: "uint256";
|
|
152
|
+
readonly indexed: true;
|
|
153
|
+
}];
|
|
154
|
+
readonly name: "RolesUpdated";
|
|
155
|
+
}, {
|
|
156
|
+
readonly type: "function";
|
|
157
|
+
readonly inputs: readonly [];
|
|
158
|
+
readonly name: "ADMIN_ROLE";
|
|
159
|
+
readonly outputs: readonly [{
|
|
160
|
+
readonly name: "";
|
|
161
|
+
readonly internalType: "uint256";
|
|
162
|
+
readonly type: "uint256";
|
|
163
|
+
}];
|
|
164
|
+
readonly stateMutability: "view";
|
|
165
|
+
}, {
|
|
166
|
+
readonly type: "function";
|
|
167
|
+
readonly inputs: readonly [];
|
|
168
|
+
readonly name: "MANAGER_ROLE";
|
|
169
|
+
readonly outputs: readonly [{
|
|
170
|
+
readonly name: "";
|
|
171
|
+
readonly internalType: "uint256";
|
|
172
|
+
readonly type: "uint256";
|
|
173
|
+
}];
|
|
174
|
+
readonly stateMutability: "view";
|
|
116
175
|
}, {
|
|
117
176
|
readonly type: "function";
|
|
118
177
|
readonly inputs: readonly [];
|
|
@@ -139,6 +198,70 @@ export declare class SimpleDenyList extends DeployableTarget<SimpleDenyListPaylo
|
|
|
139
198
|
readonly type: "bytes4";
|
|
140
199
|
}];
|
|
141
200
|
readonly stateMutability: "pure";
|
|
201
|
+
}, {
|
|
202
|
+
readonly type: "function";
|
|
203
|
+
readonly inputs: readonly [{
|
|
204
|
+
readonly name: "user";
|
|
205
|
+
readonly internalType: "address";
|
|
206
|
+
readonly type: "address";
|
|
207
|
+
}, {
|
|
208
|
+
readonly name: "roles";
|
|
209
|
+
readonly internalType: "uint256";
|
|
210
|
+
readonly type: "uint256";
|
|
211
|
+
}];
|
|
212
|
+
readonly name: "grantRoles";
|
|
213
|
+
readonly outputs: readonly [];
|
|
214
|
+
readonly stateMutability: "payable";
|
|
215
|
+
}, {
|
|
216
|
+
readonly type: "function";
|
|
217
|
+
readonly inputs: readonly [{
|
|
218
|
+
readonly name: "accounts_";
|
|
219
|
+
readonly internalType: "address[]";
|
|
220
|
+
readonly type: "address[]";
|
|
221
|
+
}, {
|
|
222
|
+
readonly name: "roles_";
|
|
223
|
+
readonly internalType: "uint256[]";
|
|
224
|
+
readonly type: "uint256[]";
|
|
225
|
+
}];
|
|
226
|
+
readonly name: "grantRoles";
|
|
227
|
+
readonly outputs: readonly [];
|
|
228
|
+
readonly stateMutability: "nonpayable";
|
|
229
|
+
}, {
|
|
230
|
+
readonly type: "function";
|
|
231
|
+
readonly inputs: readonly [{
|
|
232
|
+
readonly name: "user";
|
|
233
|
+
readonly internalType: "address";
|
|
234
|
+
readonly type: "address";
|
|
235
|
+
}, {
|
|
236
|
+
readonly name: "roles";
|
|
237
|
+
readonly internalType: "uint256";
|
|
238
|
+
readonly type: "uint256";
|
|
239
|
+
}];
|
|
240
|
+
readonly name: "hasAllRoles";
|
|
241
|
+
readonly outputs: readonly [{
|
|
242
|
+
readonly name: "";
|
|
243
|
+
readonly internalType: "bool";
|
|
244
|
+
readonly type: "bool";
|
|
245
|
+
}];
|
|
246
|
+
readonly stateMutability: "view";
|
|
247
|
+
}, {
|
|
248
|
+
readonly type: "function";
|
|
249
|
+
readonly inputs: readonly [{
|
|
250
|
+
readonly name: "user";
|
|
251
|
+
readonly internalType: "address";
|
|
252
|
+
readonly type: "address";
|
|
253
|
+
}, {
|
|
254
|
+
readonly name: "roles";
|
|
255
|
+
readonly internalType: "uint256";
|
|
256
|
+
readonly type: "uint256";
|
|
257
|
+
}];
|
|
258
|
+
readonly name: "hasAnyRole";
|
|
259
|
+
readonly outputs: readonly [{
|
|
260
|
+
readonly name: "";
|
|
261
|
+
readonly internalType: "bool";
|
|
262
|
+
readonly type: "bool";
|
|
263
|
+
}];
|
|
264
|
+
readonly stateMutability: "view";
|
|
142
265
|
}, {
|
|
143
266
|
readonly type: "function";
|
|
144
267
|
readonly inputs: readonly [{
|
|
@@ -167,6 +290,20 @@ export declare class SimpleDenyList extends DeployableTarget<SimpleDenyListPaylo
|
|
|
167
290
|
readonly type: "bool";
|
|
168
291
|
}];
|
|
169
292
|
readonly stateMutability: "view";
|
|
293
|
+
}, {
|
|
294
|
+
readonly type: "function";
|
|
295
|
+
readonly inputs: readonly [{
|
|
296
|
+
readonly name: "account_";
|
|
297
|
+
readonly internalType: "address";
|
|
298
|
+
readonly type: "address";
|
|
299
|
+
}];
|
|
300
|
+
readonly name: "isAuthorized";
|
|
301
|
+
readonly outputs: readonly [{
|
|
302
|
+
readonly name: "";
|
|
303
|
+
readonly internalType: "bool";
|
|
304
|
+
readonly type: "bool";
|
|
305
|
+
}];
|
|
306
|
+
readonly stateMutability: "view";
|
|
170
307
|
}, {
|
|
171
308
|
readonly type: "function";
|
|
172
309
|
readonly inputs: readonly [];
|
|
@@ -197,12 +334,78 @@ export declare class SimpleDenyList extends DeployableTarget<SimpleDenyListPaylo
|
|
|
197
334
|
readonly name: "renounceOwnership";
|
|
198
335
|
readonly outputs: readonly [];
|
|
199
336
|
readonly stateMutability: "payable";
|
|
337
|
+
}, {
|
|
338
|
+
readonly type: "function";
|
|
339
|
+
readonly inputs: readonly [{
|
|
340
|
+
readonly name: "roles";
|
|
341
|
+
readonly internalType: "uint256";
|
|
342
|
+
readonly type: "uint256";
|
|
343
|
+
}];
|
|
344
|
+
readonly name: "renounceRoles";
|
|
345
|
+
readonly outputs: readonly [];
|
|
346
|
+
readonly stateMutability: "payable";
|
|
200
347
|
}, {
|
|
201
348
|
readonly type: "function";
|
|
202
349
|
readonly inputs: readonly [];
|
|
203
350
|
readonly name: "requestOwnershipHandover";
|
|
204
351
|
readonly outputs: readonly [];
|
|
205
352
|
readonly stateMutability: "payable";
|
|
353
|
+
}, {
|
|
354
|
+
readonly type: "function";
|
|
355
|
+
readonly inputs: readonly [{
|
|
356
|
+
readonly name: "user";
|
|
357
|
+
readonly internalType: "address";
|
|
358
|
+
readonly type: "address";
|
|
359
|
+
}, {
|
|
360
|
+
readonly name: "roles";
|
|
361
|
+
readonly internalType: "uint256";
|
|
362
|
+
readonly type: "uint256";
|
|
363
|
+
}];
|
|
364
|
+
readonly name: "revokeRoles";
|
|
365
|
+
readonly outputs: readonly [];
|
|
366
|
+
readonly stateMutability: "payable";
|
|
367
|
+
}, {
|
|
368
|
+
readonly type: "function";
|
|
369
|
+
readonly inputs: readonly [{
|
|
370
|
+
readonly name: "accounts_";
|
|
371
|
+
readonly internalType: "address[]";
|
|
372
|
+
readonly type: "address[]";
|
|
373
|
+
}, {
|
|
374
|
+
readonly name: "roles_";
|
|
375
|
+
readonly internalType: "uint256[]";
|
|
376
|
+
readonly type: "uint256[]";
|
|
377
|
+
}];
|
|
378
|
+
readonly name: "revokeRoles";
|
|
379
|
+
readonly outputs: readonly [];
|
|
380
|
+
readonly stateMutability: "nonpayable";
|
|
381
|
+
}, {
|
|
382
|
+
readonly type: "function";
|
|
383
|
+
readonly inputs: readonly [{
|
|
384
|
+
readonly name: "user";
|
|
385
|
+
readonly internalType: "address";
|
|
386
|
+
readonly type: "address";
|
|
387
|
+
}];
|
|
388
|
+
readonly name: "rolesOf";
|
|
389
|
+
readonly outputs: readonly [{
|
|
390
|
+
readonly name: "roles";
|
|
391
|
+
readonly internalType: "uint256";
|
|
392
|
+
readonly type: "uint256";
|
|
393
|
+
}];
|
|
394
|
+
readonly stateMutability: "view";
|
|
395
|
+
}, {
|
|
396
|
+
readonly type: "function";
|
|
397
|
+
readonly inputs: readonly [{
|
|
398
|
+
readonly name: "accounts_";
|
|
399
|
+
readonly internalType: "address[]";
|
|
400
|
+
readonly type: "address[]";
|
|
401
|
+
}, {
|
|
402
|
+
readonly name: "authorized_";
|
|
403
|
+
readonly internalType: "bool[]";
|
|
404
|
+
readonly type: "bool[]";
|
|
405
|
+
}];
|
|
406
|
+
readonly name: "setAuthorized";
|
|
407
|
+
readonly outputs: readonly [];
|
|
408
|
+
readonly stateMutability: "nonpayable";
|
|
206
409
|
}, {
|
|
207
410
|
readonly type: "function";
|
|
208
411
|
readonly inputs: readonly [{
|
|
@@ -247,9 +450,9 @@ export declare class SimpleDenyList extends DeployableTarget<SimpleDenyListPaylo
|
|
|
247
450
|
*
|
|
248
451
|
* @public
|
|
249
452
|
* @static
|
|
250
|
-
* @type {Address}
|
|
453
|
+
* @type {Record<number, Address>}
|
|
251
454
|
*/
|
|
252
|
-
static
|
|
455
|
+
static bases: Record<number, Address>;
|
|
253
456
|
/**
|
|
254
457
|
* @inheritdoc
|
|
255
458
|
*
|
|
@@ -258,13 +461,22 @@ export declare class SimpleDenyList extends DeployableTarget<SimpleDenyListPaylo
|
|
|
258
461
|
* @type {RegistryType}
|
|
259
462
|
*/
|
|
260
463
|
static registryType: RegistryType;
|
|
464
|
+
/**
|
|
465
|
+
* Retrieves the owner
|
|
466
|
+
*
|
|
467
|
+
* @public
|
|
468
|
+
* @async
|
|
469
|
+
* @param {?ReadParams} [params]
|
|
470
|
+
* @returns {Promise<Address>} - The address of the owner
|
|
471
|
+
*/
|
|
472
|
+
owner(params?: ReadParams<typeof simpleDenyListAbi, 'owner'>): Promise<Address>;
|
|
261
473
|
/**
|
|
262
474
|
* Check if a user is authorized (i.e. not denied)
|
|
263
475
|
*
|
|
264
476
|
* @public
|
|
265
477
|
* @async
|
|
266
478
|
* @param {Address} address - The address of the user
|
|
267
|
-
* @param {?ReadParams
|
|
479
|
+
* @param {?ReadParams} [params]
|
|
268
480
|
* @returns {Promise<boolean>} - True if the user is authorized
|
|
269
481
|
*/
|
|
270
482
|
isAllowed(address: Address, params?: ReadParams<typeof simpleDenyListAbi, 'isAllowed'>): Promise<boolean>;
|
|
@@ -275,8 +487,8 @@ export declare class SimpleDenyList extends DeployableTarget<SimpleDenyListPaylo
|
|
|
275
487
|
* @async
|
|
276
488
|
* @param {Address[]} addresses - The list of users to update
|
|
277
489
|
* @param {boolean[]} allowed - The denied status of each user
|
|
278
|
-
* @param {?WriteParams
|
|
279
|
-
* @returns {
|
|
490
|
+
* @param {?WriteParams} [params]
|
|
491
|
+
* @returns {Promise<void>}
|
|
280
492
|
*/
|
|
281
493
|
setDenied(addresses: Address[], allowed: boolean[], params?: WriteParams<typeof simpleDenyListAbi, 'setDenied'>): Promise<void>;
|
|
282
494
|
/**
|
|
@@ -286,8 +498,8 @@ export declare class SimpleDenyList extends DeployableTarget<SimpleDenyListPaylo
|
|
|
286
498
|
* @async
|
|
287
499
|
* @param {Address[]} addresses - The list of users to update
|
|
288
500
|
* @param {boolean[]} allowed - The denied status of each user
|
|
289
|
-
* @param {?WriteParams
|
|
290
|
-
* @returns {
|
|
501
|
+
* @param {?WriteParams} [params]
|
|
502
|
+
* @returns {Promise<{ hash: `0x${string}`; result: void; }>}
|
|
291
503
|
*/
|
|
292
504
|
setDeniedRaw(addresses: Address[], allowed: boolean[], params?: WriteParams<typeof simpleDenyListAbi, 'setDenied'>): Promise<{
|
|
293
505
|
hash: `0x${string}`;
|
|
@@ -301,6 +513,15 @@ export declare class SimpleDenyList extends DeployableTarget<SimpleDenyListPaylo
|
|
|
301
513
|
* @param {?DeployableOptions} [_options]
|
|
302
514
|
* @returns {GenericDeployableParams}
|
|
303
515
|
*/
|
|
304
|
-
buildParameters(_payload?:
|
|
516
|
+
buildParameters(_payload?: Payload, _options?: DeployableOptions): GenericDeployableParams;
|
|
305
517
|
}
|
|
518
|
+
/**
|
|
519
|
+
* Given a {@link SimpleDenyListPayload}, properly encode the initialization payload.
|
|
520
|
+
*
|
|
521
|
+
* @param {SimpleDenyListPayload} param0
|
|
522
|
+
* @param {Address} param0.owner - The allow list's owner
|
|
523
|
+
* @param {Address[]} param0.denied - List of denied addresses.
|
|
524
|
+
* @returns {Hex}
|
|
525
|
+
*/
|
|
526
|
+
export declare function prepareSimpleDenyListPayload({ owner, denied, }: SimpleDenyListPayload): `0x${string}`;
|
|
306
527
|
//# sourceMappingURL=SimpleDenyList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleDenyList.d.ts","sourceRoot":"","sources":["../../src/AllowLists/SimpleDenyList.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"SimpleDenyList.d.ts","sourceRoot":"","sources":["../../src/AllowLists/SimpleDenyList.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,EAGlB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,iBAAiB,EAKvB,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAElF,OAAO,EACL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,YAAY,EACZ,KAAK,WAAW,EACjB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAE7B;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,MAAM,EAAE,OAAO,EAAE,CAAC;CACnB;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,CAC3B,KAAK,SAAS,iBAAiB,CAAC,OAAO,iBAAiB,CAAC,GAAG,iBAAiB,CAC3E,OAAO,iBAAiB,CACzB,IACC,UAAU,CAAC,OAAO,iBAAiB,EAAE,KAAK,CAAC,CAAC;AAEhD;;;;;;;GAOG;AACH,qBAAa,cAAc,CACzB,OAAO,GAAG,qBAAqB,CAC/B,SAAQ,wBAAwB,CAChC,OAAO,GAAG,SAAS,EACnB,OAAO,iBAAiB,CACzB;IACC,SAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAqB;IACjD;;;;;;OAMG;IACH,OAAuB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEnD;IACF;;;;;;OAMG;IACH,OAAuB,YAAY,EAAE,YAAY,CAA2B;IAE5E;;;;;;;OAOG;IACU,KAAK,CAChB,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,iBAAiB,EAAE,OAAO,CAAC,GACrD,OAAO,CAAC,OAAO,CAAC;IAUnB;;;;;;;;OAQG;IACU,SAAS,CACpB,OAAO,EAAE,OAAO,EAChB,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,iBAAiB,EAAE,WAAW,CAAC,GACzD,OAAO,CAAC,OAAO,CAAC;IAUnB;;;;;;;;;OASG;IACU,SAAS,CACpB,SAAS,EAAE,OAAO,EAAE,EACpB,OAAO,EAAE,OAAO,EAAE,EAClB,MAAM,CAAC,EAAE,WAAW,CAAC,OAAO,iBAAiB,EAAE,WAAW,CAAC;IAO7D;;;;;;;;;OASG;IACU,YAAY,CACvB,SAAS,EAAE,OAAO,EAAE,EACpB,OAAO,EAAE,OAAO,EAAE,EAClB,MAAM,CAAC,EAAE,WAAW,CAAC,OAAO,iBAAiB,EAAE,WAAW,CAAC;;;;IAgB7D;;;;;;;OAOG;IACa,eAAe,CAC7B,QAAQ,CAAC,EAAE,OAAO,EAClB,QAAQ,CAAC,EAAE,iBAAiB,GAC3B,uBAAuB;CAsB3B;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,KAAK,EACL,MAAM,GACP,EAAE,qBAAqB,iBAQvB"}
|
|
@@ -1,202 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
super(...arguments), this.abi = s;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Check if a user is authorized (i.e. not denied)
|
|
13
|
-
*
|
|
14
|
-
* @public
|
|
15
|
-
* @async
|
|
16
|
-
* @param {Address} address - The address of the user
|
|
17
|
-
* @param {?ReadParams<typeof simpleDenyListAbi, 'isAllowed'>} [params]
|
|
18
|
-
* @returns {Promise<boolean>} - True if the user is authorized
|
|
19
|
-
*/
|
|
20
|
-
async isAllowed(b, a) {
|
|
21
|
-
return await o(this._config, {
|
|
22
|
-
address: this.assertValidAddress(),
|
|
23
|
-
args: [b, l],
|
|
24
|
-
...this.optionallyAttachAccount(),
|
|
25
|
-
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
26
|
-
...a
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Set the denied status of a user. The length of the `users_` and `denied_` arrays must be the same. This function can only be called by the owner
|
|
31
|
-
*
|
|
32
|
-
* @public
|
|
33
|
-
* @async
|
|
34
|
-
* @param {Address[]} addresses - The list of users to update
|
|
35
|
-
* @param {boolean[]} allowed - The denied status of each user
|
|
36
|
-
* @param {?WriteParams<typeof simpleDenyListAbi, 'setDenied'>} [params]
|
|
37
|
-
* @returns {unknown}
|
|
38
|
-
*/
|
|
39
|
-
async setDenied(b, a, f) {
|
|
40
|
-
return this.awaitResult(this.setDeniedRaw(b, a, f));
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Set the denied status of a user. The length of the `users_` and `denied_` arrays must be the same. This function can only be called by the owner
|
|
44
|
-
*
|
|
45
|
-
* @public
|
|
46
|
-
* @async
|
|
47
|
-
* @param {Address[]} addresses - The list of users to update
|
|
48
|
-
* @param {boolean[]} allowed - The denied status of each user
|
|
49
|
-
* @param {?WriteParams<typeof simpleDenyListAbi, 'setDenied'>} [params]
|
|
50
|
-
* @returns {unknown}
|
|
51
|
-
*/
|
|
52
|
-
async setDeniedRaw(b, a, f) {
|
|
53
|
-
const { request: e, result: d } = await i(
|
|
54
|
-
this._config,
|
|
55
|
-
{
|
|
56
|
-
address: this.assertValidAddress(),
|
|
57
|
-
args: [b, a],
|
|
58
|
-
...this.optionallyAttachAccount(),
|
|
59
|
-
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
60
|
-
...f
|
|
61
|
-
}
|
|
62
|
-
);
|
|
63
|
-
return { hash: await n(this._config, e), result: d };
|
|
64
|
-
}
|
|
65
|
-
// /**
|
|
66
|
-
// * A typed wrapper for (viem.getLogs)[https://viem.sh/docs/actions/public/getLogs#getlogs].
|
|
67
|
-
// * Accepts `eventName` and `eventNames` as optional parameters to narrow the returned log types.
|
|
68
|
-
// * @example
|
|
69
|
-
// * ```ts
|
|
70
|
-
// * const logs = contract.getLogs({ eventName: 'EventName' })
|
|
71
|
-
// * const logs = contract.getLogs({ eventNames: ['EventName'] })
|
|
72
|
-
// * ```
|
|
73
|
-
// * @public
|
|
74
|
-
// * @async
|
|
75
|
-
// * @template {ContractEventName<typeof simpleDenyListAbi>} event
|
|
76
|
-
// * @template {ExtractAbiEvent<
|
|
77
|
-
// * typeof simpleDenyListAbi,
|
|
78
|
-
// * event
|
|
79
|
-
// * >} [abiEvent=ExtractAbiEvent<typeof simpleDenyListAbi, event>]
|
|
80
|
-
// * @param {?Omit<
|
|
81
|
-
// * GetLogsParams<typeof simpleDenyListAbi, event, abiEvent, abiEvent[]>,
|
|
82
|
-
// * 'event' | 'events'
|
|
83
|
-
// * > & {
|
|
84
|
-
// * eventName?: event;
|
|
85
|
-
// * eventNames?: event[];
|
|
86
|
-
// * }} [params]
|
|
87
|
-
// * @returns {Promise<GetLogsReturnType<abiEvent, abiEvent[]>>}
|
|
88
|
-
// */
|
|
89
|
-
// public async getLogs<
|
|
90
|
-
// event extends ContractEventName<typeof simpleDenyListAbi>,
|
|
91
|
-
// const abiEvent extends ExtractAbiEvent<
|
|
92
|
-
// typeof simpleDenyListAbi,
|
|
93
|
-
// event
|
|
94
|
-
// > = ExtractAbiEvent<typeof simpleDenyListAbi, event>,
|
|
95
|
-
// >(
|
|
96
|
-
// params?: Omit<
|
|
97
|
-
// GetLogsParams<typeof simpleDenyListAbi, event, abiEvent, abiEvent[]>,
|
|
98
|
-
// 'event' | 'events'
|
|
99
|
-
// > & {
|
|
100
|
-
// eventName?: event;
|
|
101
|
-
// eventNames?: event[];
|
|
102
|
-
// },
|
|
103
|
-
// ): Promise<GetLogsReturnType<abiEvent, abiEvent[]>> {
|
|
104
|
-
// return getLogs(this._config.getClient({ chainId: params?.chainId }), {
|
|
105
|
-
// // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wag
|
|
106
|
-
// ...(params as any),
|
|
107
|
-
// ...(params?.eventName
|
|
108
|
-
// ? {
|
|
109
|
-
// event: getAbiItem({
|
|
110
|
-
// abi: simpleDenyListAbi,
|
|
111
|
-
// name: params.eventName,
|
|
112
|
-
// // biome-ignore lint/suspicious/noExplicitAny: awkward abi intersection issue
|
|
113
|
-
// } as any),
|
|
114
|
-
// }
|
|
115
|
-
// : {}),
|
|
116
|
-
// ...(params?.eventNames
|
|
117
|
-
// ? {
|
|
118
|
-
// events: params.eventNames.map((name) =>
|
|
119
|
-
// getAbiItem({
|
|
120
|
-
// abi: simpleDenyListAbi,
|
|
121
|
-
// name,
|
|
122
|
-
// // biome-ignore lint/suspicious/noExplicitAny: awkward abi intersection issue
|
|
123
|
-
// } as any),
|
|
124
|
-
// ),
|
|
125
|
-
// }
|
|
126
|
-
// : {}),
|
|
127
|
-
// address: this.assertValidAddress(),
|
|
128
|
-
// });
|
|
129
|
-
// }
|
|
130
|
-
// /**
|
|
131
|
-
// * A typed wrapper for `wagmi.watchContractEvent`
|
|
132
|
-
// *
|
|
133
|
-
// * @public
|
|
134
|
-
// * @async
|
|
135
|
-
// * @template {ContractEventName<typeof simpleDenyListAbi>} event
|
|
136
|
-
// * @param {(log: SimpleDenyListLog<event>) => unknown} cb
|
|
137
|
-
// * @param {?WatchParams<typeof simpleDenyListAbi, event> & {
|
|
138
|
-
// * eventName?: event;
|
|
139
|
-
// * }} [params]
|
|
140
|
-
// * @returns {unknown, params?: any) => unknown} Unsubscribe function
|
|
141
|
-
// */
|
|
142
|
-
// public async subscribe<
|
|
143
|
-
// event extends ContractEventName<typeof simpleDenyListAbi>,
|
|
144
|
-
// >(
|
|
145
|
-
// cb: (log: SimpleDenyListLog<event>) => unknown,
|
|
146
|
-
// params?: WatchParams<typeof simpleDenyListAbi, event> & {
|
|
147
|
-
// eventName?: event;
|
|
148
|
-
// },
|
|
149
|
-
// ) {
|
|
150
|
-
// return watchContractEvent<
|
|
151
|
-
// typeof this._config,
|
|
152
|
-
// (typeof this._config)['chains'][number]['id'],
|
|
153
|
-
// typeof simpleDenyListAbi,
|
|
154
|
-
// event
|
|
155
|
-
// >(this._config, {
|
|
156
|
-
// // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
157
|
-
// ...(params as any),
|
|
158
|
-
// eventName: params?.eventName,
|
|
159
|
-
// abi: simpleDenyListAbi,
|
|
160
|
-
// address: this.assertValidAddress(),
|
|
161
|
-
// onLogs: (logs) => {
|
|
162
|
-
// for (let l of logs) {
|
|
163
|
-
// cb(l as unknown as SimpleDenyListLog<event>);
|
|
164
|
-
// }
|
|
165
|
-
// },
|
|
166
|
-
// });
|
|
167
|
-
// }
|
|
168
|
-
/**
|
|
169
|
-
* @inheritdoc
|
|
170
|
-
*
|
|
171
|
-
* @public
|
|
172
|
-
* @param {?SimpleDenyListPayload} [_payload]
|
|
173
|
-
* @param {?DeployableOptions} [_options]
|
|
174
|
-
* @returns {GenericDeployableParams}
|
|
175
|
-
*/
|
|
176
|
-
buildParameters(b, a) {
|
|
177
|
-
var d;
|
|
178
|
-
const [f, e] = this.validateDeploymentConfig(
|
|
179
|
-
b,
|
|
180
|
-
a
|
|
181
|
-
);
|
|
182
|
-
if (!f.owner || f.owner === p) {
|
|
183
|
-
const t = e.account ? e.account.address : e.config ? h(e.config).address : (d = this._account) == null ? void 0 : d.address;
|
|
184
|
-
if (t)
|
|
185
|
-
f.owner = t;
|
|
186
|
-
else
|
|
187
|
-
throw new w();
|
|
188
|
-
}
|
|
189
|
-
return {
|
|
190
|
-
abi: s,
|
|
191
|
-
bytecode: g,
|
|
192
|
-
args: [A(f)],
|
|
193
|
-
...this.optionallyAttachAccount(e.account)
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
c.base = "0x41A7c1aCC75BEccD11B8F586510759883092460F", c.registryType = y.ALLOW_LIST;
|
|
198
|
-
let r = c;
|
|
1
|
+
import { I as a } from "../generated-B7VaSah4.js";
|
|
2
|
+
import { S as y, p as n } from "../SimpleDenyList-Cn5WpNn0.js";
|
|
3
|
+
import "@wagmi/core";
|
|
4
|
+
import "viem";
|
|
5
|
+
import "../deployments-BM42vImE.js";
|
|
6
|
+
import "../Deployable/DeployableTargetWithRBAC.js";
|
|
7
|
+
import "../errors.js";
|
|
8
|
+
import "../utils.js";
|
|
199
9
|
export {
|
|
200
|
-
|
|
201
|
-
|
|
10
|
+
y as SimpleDenyList,
|
|
11
|
+
n as prepareSimpleDenyListPayload,
|
|
12
|
+
a as simpleDenyListAbi
|
|
202
13
|
};
|
|
14
|
+
//# sourceMappingURL=SimpleDenyList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SimpleDenyList.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/dist/Auth/Auth.cjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Auth.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/Auth/Auth.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Auth.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../generated-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../generated-B0tk-c9b.cjs"),a=require("../Deployable/Deployable.cjs"),s="0x6080604052348015600e575f80fd5b506101598061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063fe9fbb801461002d575b5f80fd5b610047600480360381019061004291906100c5565b61005d565b604051610054919061010a565b60405180910390f35b5f60019050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100948261006b565b9050919050565b6100a48161008a565b81146100ae575f80fd5b50565b5f813590506100bf8161009b565b92915050565b5f602082840312156100da576100d9610067565b5b5f6100e7848285016100b1565b91505092915050565b5f8115159050919050565b610104816100f0565b82525050565b5f60208201905061011d5f8301846100fb565b9291505056fea2646970667358221220d69fb5c3af806c7aa7833655670f5929f23f7d101298880775d4b9c7c8d0e62f64736f6c634300081a0033";class r extends a.Deployable{constructor(){super(...arguments),this.abi=f.ze}async isAuthorized(b,e){return await f.r5(this._config,{address:this.assertValidAddress(),args:[b],...e})}buildParameters(b,e){const[o,t]=this.validateDeploymentConfig({},e);return{abi:f.ze,bytecode:s,args:[],...this.optionallyAttachAccount(t.account)}}}exports.passthroughAuthAbi=f.ze;exports.PassthroughAuth=r;
|
|
2
|
+
//# sourceMappingURL=PassthroughAuth.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PassthroughAuth.cjs","sources":["../../src/Auth/PassthroughAuth.ts"],"sourcesContent":["import {\n passthroughAuthAbi,\n readPassthroughAuthIsAuthorized,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/auth/PassthroughAuth.sol/PassthroughAuth.json';\nimport type { Address, ContractEventName, Hex } from 'viem';\nimport {\n Deployable,\n type DeployableOptions,\n type GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport type { GenericLog, ReadParams } from '../utils';\n\nexport { passthroughAuthAbi };\n\n/**\n * A generic `viem.Log` event with support for `PassthroughAuth` event types.\n *\n * @export\n * @typedef {PassthroughAuthLog}\n * @template {ContractEventName<\n * typeof passthroughAuthAbi\n * >} [event=ContractEventName<typeof passthroughAuthAbi>]\n */\nexport type PassthroughAuthLog<\n event extends ContractEventName<\n typeof passthroughAuthAbi\n > = ContractEventName<typeof passthroughAuthAbi>,\n> = GenericLog<typeof passthroughAuthAbi, event>;\n\n/**\n * A simple implementation of a Validator that verifies a given signature and checks the recovered address against a set of authorized signers\n *\n * @export\n * @class PassthroughAuth\n * @typedef {PassthroughAuth}\n * @extends {DeployableTarget<PassthroughAuthPayload>}\n */\nexport class PassthroughAuth extends Deployable<\n // biome-ignore lint/suspicious/noExplicitAny: takes no parameters\n any,\n typeof passthroughAuthAbi\n> {\n public override readonly abi = passthroughAuthAbi;\n\n public async isAuthorized(\n address: Address,\n params?: ReadParams<typeof passthroughAuthAbi, 'isAuthorized'>,\n ) {\n return await readPassthroughAuthIsAuthorized(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 * @inheritdoc\n *\n * @public\n * @param {?PassthroughAuthPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: never,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [_, options] = this.validateDeploymentConfig({}, _options);\n return {\n abi: passthroughAuthAbi,\n bytecode: bytecode as Hex,\n // biome-ignore lint/suspicious/noExplicitAny: <takes no payload>\n args: [] as any,\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n"],"names":["PassthroughAuth","Deployable","passthroughAuthAbi","address","params","readPassthroughAuthIsAuthorized","_payload","_options","_","options","bytecode"],"mappings":"w5BAuCO,MAAMA,UAAwBC,EAAAA,UAInC,CAJK,aAAA,CAAA,MAAA,GAAA,SAAA,EAKL,KAAyB,IAAMC,IAAA,CAE/B,MAAa,aACXC,EACAC,EACA,CACO,OAAA,MAAMC,EAAAA,GAAgC,KAAK,QAAS,CACzD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACF,CAAO,EAEd,GAAIC,CAAA,CACL,CACH,CAUgB,gBACdE,EACAC,EACyB,CACnB,KAAA,CAACC,EAAGC,CAAO,EAAI,KAAK,yBAAyB,CAAA,EAAIF,CAAQ,EACxD,MAAA,CACL,IAAKL,EAAA,GACL,SAAAQ,EAEA,KAAM,CAAC,EACP,GAAG,KAAK,wBAAwBD,EAAQ,OAAO,CAAA,CAEnD,CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as a, E as s } from "../generated-B7VaSah4.js";
|
|
2
2
|
import { Deployable as e } from "../Deployable/Deployable.js";
|
|
3
3
|
const d = "0x6080604052348015600e575f80fd5b506101598061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063fe9fbb801461002d575b5f80fd5b610047600480360381019061004291906100c5565b61005d565b604051610054919061010a565b60405180910390f35b5f60019050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100948261006b565b9050919050565b6100a48161008a565b81146100ae575f80fd5b50565b5f813590506100bf8161009b565b92915050565b5f602082840312156100da576100d9610067565b5b5f6100e7848285016100b1565b91505092915050565b5f8115159050919050565b610104816100f0565b82525050565b5f60208201905061011d5f8301846100fb565b9291505056fea2646970667358221220d69fb5c3af806c7aa7833655670f5929f23f7d101298880775d4b9c7c8d0e62f64736f6c634300081a0033";
|
|
4
4
|
class n extends e {
|
|
@@ -6,7 +6,7 @@ class n extends e {
|
|
|
6
6
|
super(...arguments), this.abi = a;
|
|
7
7
|
}
|
|
8
8
|
async isAuthorized(b, f) {
|
|
9
|
-
return
|
|
9
|
+
return await s(this._config, {
|
|
10
10
|
address: this.assertValidAddress(),
|
|
11
11
|
args: [b],
|
|
12
12
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
@@ -22,13 +22,13 @@ class n extends e {
|
|
|
22
22
|
* @returns {GenericDeployableParams}
|
|
23
23
|
*/
|
|
24
24
|
buildParameters(b, f) {
|
|
25
|
-
const [r,
|
|
25
|
+
const [r, t] = this.validateDeploymentConfig({}, f);
|
|
26
26
|
return {
|
|
27
27
|
abi: a,
|
|
28
28
|
bytecode: d,
|
|
29
29
|
// biome-ignore lint/suspicious/noExplicitAny: <takes no payload>
|
|
30
30
|
args: [],
|
|
31
|
-
...this.optionallyAttachAccount(
|
|
31
|
+
...this.optionallyAttachAccount(t.account)
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -36,3 +36,4 @@ export {
|
|
|
36
36
|
n as PassthroughAuth,
|
|
37
37
|
a as passthroughAuthAbi
|
|
38
38
|
};
|
|
39
|
+
//# sourceMappingURL=PassthroughAuth.js.map
|