@poa-box/core 0.1.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/abis/AuthorityRouter.d.ts +448 -0
- package/dist/abis/AuthorityRouter.js +584 -0
- package/dist/abis/CutoverVerifier.d.ts +194 -0
- package/dist/abis/CutoverVerifier.js +259 -0
- package/dist/abis/DirectDemocracyVotingNew.d.ts +168 -30
- package/dist/abis/DirectDemocracyVotingNew.js +214 -35
- package/dist/abis/EducationHubNew.d.ts +32 -75
- package/dist/abis/EducationHubNew.js +38 -94
- package/dist/abis/Executor.d.ts +56 -86
- package/dist/abis/Executor.js +68 -104
- package/dist/abis/HybridVotingNew.d.ts +279 -35
- package/dist/abis/HybridVotingNew.js +357 -40
- package/dist/abis/{EligibilityModuleNew.d.ts → MembershipAuthority.d.ts} +1437 -718
- package/dist/abis/{EligibilityModuleNew.js → MembershipAuthority.js} +1821 -899
- package/dist/abis/OrgDeployerNew.d.ts +193 -127
- package/dist/abis/OrgDeployerNew.js +244 -160
- package/dist/abis/OrgRegistry.d.ts +40 -0
- package/dist/abis/OrgRegistry.js +51 -0
- package/dist/abis/ParticipationToken.d.ts +32 -75
- package/dist/abis/ParticipationToken.js +38 -94
- package/dist/abis/PasskeyAccount.d.ts +28 -0
- package/dist/abis/PasskeyAccount.js +35 -0
- package/dist/abis/PaymasterHub.d.ts +527 -47
- package/dist/abis/PaymasterHub.js +750 -135
- package/dist/abis/QuickJoinNew.d.ts +59 -170
- package/dist/abis/QuickJoinNew.js +71 -215
- package/dist/abis/TaskManagerNew.d.ts +27 -44
- package/dist/abis/TaskManagerNew.js +31 -52
- package/dist/abis/UniversalAccountRegistry.d.ts +24 -0
- package/dist/abis/UniversalAccountRegistry.js +30 -0
- package/dist/abis/ZkEmailInvites.d.ts +44 -0
- package/dist/abis/ZkEmailInvites.js +55 -0
- package/dist/abis/index.d.ts +6 -4
- package/dist/abis/index.js +10 -7
- package/dist/chains.js +3 -3
- package/dist/error-catalog.js +125 -7
- package/dist/graph/documents/activity.d.ts +3 -1
- package/dist/graph/documents/activity.js +19 -14
- package/dist/graph/documents/org.d.ts +4 -4
- package/dist/graph/documents/org.js +10 -4
- package/dist/graph/documents/task.d.ts +10 -1
- package/dist/graph/documents/task.js +157 -3
- package/dist/graph/documents/user.d.ts +5 -30
- package/dist/graph/documents/user.js +2 -42
- package/dist/graph/documents/voting-classes.d.ts +23 -2
- package/dist/graph/documents/voting-classes.js +119 -10
- package/dist/metadata/index.d.ts +0 -1
- package/dist/metadata/index.js +1 -2
- package/dist/perms.d.ts +0 -15
- package/dist/perms.js +1 -21
- package/dist/preflight.d.ts +2 -2
- package/dist/preflight.js +14 -22
- package/dist/reads/authority.d.ts +33 -0
- package/dist/reads/authority.js +196 -0
- package/dist/reads/index.d.ts +1 -1
- package/dist/reads/index.js +2 -2
- package/dist/reads/org.d.ts +20 -20
- package/dist/reads/org.js +94 -28
- package/dist/reads/project.js +3 -3
- package/dist/reads/resolve.d.ts +1 -1
- package/dist/reads/resolve.js +12 -3
- package/dist/reads/task.d.ts +44 -22
- package/dist/reads/task.js +126 -67
- package/dist/reads/user.d.ts +8 -43
- package/dist/reads/user.js +27 -44
- package/dist/reads/vote.d.ts +26 -2
- package/dist/reads/vote.js +104 -23
- package/dist/tx/authority.d.ts +33 -0
- package/dist/tx/authority.js +62 -0
- package/dist/tx/governance.d.ts +6 -0
- package/dist/tx/governance.js +20 -2
- package/dist/tx/index.d.ts +1 -1
- package/dist/tx/index.js +2 -2
- package/dist/tx/org.d.ts +23 -18
- package/dist/tx/org.js +203 -67
- package/dist/tx/project.d.ts +3 -2
- package/dist/tx/project.js +28 -10
- package/dist/tx/task.d.ts +13 -24
- package/dist/tx/task.js +45 -85
- package/dist/tx/user.d.ts +2 -40
- package/dist/tx/user.js +2 -76
- package/dist/tx/vote.d.ts +5 -0
- package/dist/tx/vote.js +54 -43
- package/dist/version.d.ts +0 -5
- package/dist/version.js +1 -13
- package/package.json +1 -1
- package/dist/abis/ToggleModule.d.ts +0 -193
- package/dist/abis/ToggleModule.js +0 -255
- package/dist/metadata/role.d.ts +0 -38
- package/dist/metadata/role.js +0 -35
- package/dist/reads/eligibility.d.ts +0 -377
- package/dist/reads/eligibility.js +0 -687
- package/dist/tx/eligibility.d.ts +0 -511
- package/dist/tx/eligibility.js +0 -818
package/dist/tx/vote.js
CHANGED
|
@@ -145,7 +145,7 @@ exports.MODULE_LABELS = [
|
|
|
145
145
|
{ key: 'educationHubAddress', label: 'EducationHub', abi: 'EducationHubNew' },
|
|
146
146
|
{ key: 'executorAddress', label: 'Executor', abi: 'Executor' },
|
|
147
147
|
{ key: 'quickJoinAddress', label: 'QuickJoin', abi: 'QuickJoinNew' },
|
|
148
|
-
{ key: '
|
|
148
|
+
{ key: 'membershipAuthorityAddress', label: 'MembershipAuthority', abi: 'MembershipAuthority' },
|
|
149
149
|
{ key: 'paymentManagerAddress', label: 'PaymentManager', abi: 'PaymentManager' },
|
|
150
150
|
{ key: 'zkEmailInvitesAddress', label: 'ZkEmailInvites', abi: 'ZkEmailInvites' },
|
|
151
151
|
];
|
|
@@ -257,7 +257,9 @@ async function createProposalIntent(ctx, params) {
|
|
|
257
257
|
if (numOptions < 2) {
|
|
258
258
|
throw new errors_1.CliError('At least 2 options are required', exit_codes_1.EXIT.USAGE);
|
|
259
259
|
}
|
|
260
|
-
|
|
260
|
+
if (params.subjectIds !== undefined && params.hatIds !== undefined)
|
|
261
|
+
throw new errors_1.CliError('Specify subjectIds or hatIds, not both.', exit_codes_1.EXIT.USAGE);
|
|
262
|
+
const hatIds = (params.subjectIds ?? params.hatIds ?? []).map(h => ethers_1.ethers.BigNumber.from(typeof h === 'string' ? h.trim() : h));
|
|
261
263
|
// Hat-restriction cap: both voting contracts reject more than MAX_POLL_HATS
|
|
262
264
|
// restricted hats. Read the live constant — an older contract has no getter
|
|
263
265
|
// and no cap, so the check simply does not apply there.
|
|
@@ -297,7 +299,6 @@ async function createProposalIntent(ctx, params) {
|
|
|
297
299
|
optionNames,
|
|
298
300
|
createdAt: params.createdAt,
|
|
299
301
|
});
|
|
300
|
-
const { cid, descriptionHash } = await pinProposalMetadata(ctx, metadata);
|
|
301
302
|
const summary = {
|
|
302
303
|
type: params.type,
|
|
303
304
|
title: params.name,
|
|
@@ -309,20 +310,26 @@ async function createProposalIntent(ctx, params) {
|
|
|
309
310
|
summary[`call ${i + 1}/${params.calls.length}`] = line;
|
|
310
311
|
});
|
|
311
312
|
}
|
|
312
|
-
|
|
313
|
+
// Build and validate before publishing proposal metadata.
|
|
314
|
+
const intent = (0, governance_1.buildGovernanceProposal)({
|
|
313
315
|
votingAddress,
|
|
314
316
|
votingAbiName,
|
|
315
317
|
title: params.name,
|
|
316
|
-
descriptionHash,
|
|
318
|
+
descriptionHash: ethers_1.ethers.constants.HashZero,
|
|
317
319
|
durationMinutes: params.durationMinutes,
|
|
318
320
|
numOptions,
|
|
319
321
|
batches,
|
|
320
322
|
hatIds,
|
|
323
|
+
quorumOverride: params.quorumOverride,
|
|
324
|
+
equalWeight: params.equalWeight,
|
|
321
325
|
orgId: modules.orgId,
|
|
322
326
|
action: 'create',
|
|
323
327
|
summary,
|
|
324
|
-
ipfs: { cid, metadata },
|
|
325
328
|
});
|
|
329
|
+
const { cid, descriptionHash } = await pinProposalMetadata(ctx, metadata);
|
|
330
|
+
intent.args[1] = descriptionHash;
|
|
331
|
+
intent.meta.ipfs = { cid, metadata };
|
|
332
|
+
return intent;
|
|
326
333
|
}
|
|
327
334
|
/**
|
|
328
335
|
* Port of `pop vote cast` — src/commands/vote/cast.ts.
|
|
@@ -419,8 +426,8 @@ exports.DD_QUORUM_KEY = 4;
|
|
|
419
426
|
async function proposeQuorumIntent(ctx, params) {
|
|
420
427
|
const newQuorum = params.quorum;
|
|
421
428
|
const durationMinutes = params.durationMinutes ?? 60;
|
|
422
|
-
if (newQuorum <
|
|
423
|
-
throw new errors_1.CliError('Quorum must be
|
|
429
|
+
if (!Number.isInteger(newQuorum) || newQuorum < 0 || newQuorum > 4294967295)
|
|
430
|
+
throw new errors_1.CliError('Quorum must be a uint32 voter count (0 disables)', exit_codes_1.EXIT.USAGE);
|
|
424
431
|
const modules = await (0, resolve_1.resolveOrgModules)(ctx.client, params.org, ctx.chainId);
|
|
425
432
|
if (!modules.hybridVotingAddress)
|
|
426
433
|
throw new errors_1.CliError('HybridVoting not deployed', exit_codes_1.EXIT.USAGE);
|
|
@@ -465,10 +472,10 @@ exports.CONFIG_PARAMS = {
|
|
|
465
472
|
ddKey: 0,
|
|
466
473
|
valueType: 'uint8',
|
|
467
474
|
description: 'Support threshold percentage (1-100)',
|
|
468
|
-
encode: (v) => ethers_1.ethers.utils.defaultAbiCoder.encode(['uint8'], [
|
|
475
|
+
encode: (v) => ethers_1.ethers.utils.defaultAbiCoder.encode(['uint8'], [Number(v)]),
|
|
469
476
|
validate: (v) => {
|
|
470
|
-
const n =
|
|
471
|
-
if (
|
|
477
|
+
const n = Number(v);
|
|
478
|
+
if (!Number.isInteger(n) || n < 1 || n > 100)
|
|
472
479
|
throw new Error('Threshold must be 1-100');
|
|
473
480
|
},
|
|
474
481
|
},
|
|
@@ -478,7 +485,7 @@ exports.CONFIG_PARAMS = {
|
|
|
478
485
|
ddKey: 4,
|
|
479
486
|
valueType: 'uint32',
|
|
480
487
|
description: 'Minimum voter count for validity (0 disables)',
|
|
481
|
-
encode: (v) => ethers_1.ethers.utils.defaultAbiCoder.encode(['uint32'], [
|
|
488
|
+
encode: (v) => ethers_1.ethers.utils.defaultAbiCoder.encode(['uint32'], [Number(v)]),
|
|
482
489
|
validate: (v) => {
|
|
483
490
|
const n = Number(v);
|
|
484
491
|
if (!Number.isInteger(n) || n < 0 || n > 4294967295) {
|
|
@@ -521,25 +528,6 @@ exports.CONFIG_PARAMS = {
|
|
|
521
528
|
throw new Error('Cannot set executor to zero address');
|
|
522
529
|
},
|
|
523
530
|
},
|
|
524
|
-
'hat-allowed': {
|
|
525
|
-
name: 'hat-allowed',
|
|
526
|
-
hybridKey: -1, // not available on Hybrid
|
|
527
|
-
ddKey: 3,
|
|
528
|
-
hybridUnavailableReason: 'HAT_ALLOWED is not a HybridVoting config key; this key only applies to DirectDemocracyVoting',
|
|
529
|
-
valueType: 'uint256,bool',
|
|
530
|
-
description: 'Allow/disallow a hat ID for DD voting (format: hatId,true/false)',
|
|
531
|
-
encode: (v) => {
|
|
532
|
-
const [hatId, allowed] = v.split(',');
|
|
533
|
-
return ethers_1.ethers.utils.defaultAbiCoder.encode(['uint256', 'bool'], [hatId.trim(), allowed.trim() === 'true']);
|
|
534
|
-
},
|
|
535
|
-
validate: (v) => {
|
|
536
|
-
const parts = v.split(',');
|
|
537
|
-
if (parts.length !== 2)
|
|
538
|
-
throw new Error('Format: hatId,true/false');
|
|
539
|
-
if (!['true', 'false'].includes(parts[1].trim()))
|
|
540
|
-
throw new Error('Second value must be true or false');
|
|
541
|
-
},
|
|
542
|
-
},
|
|
543
531
|
};
|
|
544
532
|
/**
|
|
545
533
|
* Port of `pop vote propose-config` — src/commands/vote/propose-config.ts.
|
|
@@ -652,6 +640,10 @@ function parseClassConfigs(doc) {
|
|
|
652
640
|
let minBalance;
|
|
653
641
|
try {
|
|
654
642
|
minBalance = ethers_1.ethers.BigNumber.from(String(entry.minBalance ?? 0));
|
|
643
|
+
if (minBalance.lt(0) || minBalance.gt(ethers_1.ethers.constants.MaxUint256))
|
|
644
|
+
throw new Error('uint256 overflow');
|
|
645
|
+
if (typeof entry.minBalance === 'number' && !Number.isSafeInteger(entry.minBalance))
|
|
646
|
+
throw new Error('unsafe integer');
|
|
655
647
|
}
|
|
656
648
|
catch {
|
|
657
649
|
throw usageError(`Class ${i}: invalid minBalance ${JSON.stringify(entry.minBalance)} — pass a base-unit integer string.`);
|
|
@@ -663,18 +655,38 @@ function parseClassConfigs(doc) {
|
|
|
663
655
|
if (strategy === exports.CLASS_STRATEGY.ERC20_BAL && asset === ethers_1.ethers.constants.AddressZero) {
|
|
664
656
|
throw usageError(`Class ${i}: ERC20_BAL strategy requires a non-zero asset address (the contract reverts ZeroAddress).`);
|
|
665
657
|
}
|
|
666
|
-
|
|
658
|
+
if (entry.subjectIds !== undefined && entry.hatIds !== undefined)
|
|
659
|
+
throw usageError(`Class ${i}: specify subjectIds or hatIds, not both.`);
|
|
660
|
+
const rawHatIds = entry.subjectIds ?? entry.hatIds ?? [];
|
|
667
661
|
if (!Array.isArray(rawHatIds))
|
|
668
|
-
throw usageError(`Class ${i}: hatIds must be an array.`);
|
|
662
|
+
throw usageError(`Class ${i}: subjectIds (hatIds) must be an array.`);
|
|
669
663
|
const hatIds = rawHatIds.map((h) => {
|
|
670
664
|
try {
|
|
671
|
-
|
|
665
|
+
if (typeof h === 'number' && !Number.isSafeInteger(h))
|
|
666
|
+
throw new Error('unsafe integer');
|
|
667
|
+
const id = ethers_1.ethers.BigNumber.from(String(h).trim());
|
|
668
|
+
if (id.lt(0) || id.gt(ethers_1.ethers.constants.MaxUint256))
|
|
669
|
+
throw new Error('uint256 overflow');
|
|
670
|
+
return id;
|
|
672
671
|
}
|
|
673
672
|
catch {
|
|
674
673
|
throw usageError(`Class ${i}: invalid hat ID ${JSON.stringify(h)}.`);
|
|
675
674
|
}
|
|
676
675
|
});
|
|
677
|
-
|
|
676
|
+
let subjectId;
|
|
677
|
+
if (entry.subjectId !== undefined) {
|
|
678
|
+
try {
|
|
679
|
+
subjectId = ethers_1.ethers.BigNumber.from(entry.subjectId);
|
|
680
|
+
if (subjectId.lt(0) || subjectId.gt(ethers_1.ethers.constants.MaxUint256))
|
|
681
|
+
throw new Error('uint256 overflow');
|
|
682
|
+
}
|
|
683
|
+
catch {
|
|
684
|
+
throw usageError(`Class ${i}: subjectId must be a uint256 integer string (0 clears the binding).`);
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
if (entry.quadratic !== undefined && typeof entry.quadratic !== 'boolean')
|
|
688
|
+
throw usageError(`Class ${i}: quadratic must be a boolean.`);
|
|
689
|
+
return { strategy, slicePct, quadratic: entry.quadratic ?? false, minBalance, asset, hatIds, ...(subjectId !== undefined ? { subjectId } : {}) };
|
|
678
690
|
});
|
|
679
691
|
const sliceSum = classes.reduce((sum, c) => sum + c.slicePct, 0);
|
|
680
692
|
if (sliceSum !== 100) {
|
|
@@ -696,13 +708,12 @@ function describeClass(c) {
|
|
|
696
708
|
parts.push(`min balance ${(0, format_1.formatToken)(c.minBalance)}`);
|
|
697
709
|
if (c.asset !== ethers_1.ethers.constants.AddressZero)
|
|
698
710
|
parts.push(`asset ${(0, encoding_1.formatAddress)(c.asset)}`);
|
|
711
|
+
if (c.subjectId !== undefined)
|
|
712
|
+
parts.push(c.subjectId.isZero() ? 'clear subject binding' : `subject binding ${c.subjectId.toString()}`);
|
|
699
713
|
if (c.hatIds.length > 0)
|
|
700
|
-
parts.push(`
|
|
714
|
+
parts.push(`subjects ${c.hatIds.map(h => h.toString()).join(',')}`);
|
|
701
715
|
return parts.join(', ');
|
|
702
716
|
}
|
|
703
|
-
function isParsedClassConfigs(value) {
|
|
704
|
-
return Array.isArray(value) && value.every((c) => c && typeof c === 'object' && ethers_1.ethers.BigNumber.isBigNumber(c.minBalance));
|
|
705
|
-
}
|
|
706
717
|
/**
|
|
707
718
|
* Port of `pop vote classes propose` — src/commands/vote/classes.ts
|
|
708
719
|
* (classesProposeHandler).
|
|
@@ -715,9 +726,7 @@ function isParsedClassConfigs(value) {
|
|
|
715
726
|
*/
|
|
716
727
|
async function proposeClassesIntent(ctx, params) {
|
|
717
728
|
const durationMinutes = params.durationMinutes ?? 60;
|
|
718
|
-
const classes =
|
|
719
|
-
? params.classes
|
|
720
|
-
: parseClassConfigs(params.classes);
|
|
729
|
+
const classes = parseClassConfigs(params.classes);
|
|
721
730
|
const modules = await (0, resolve_1.resolveOrgModules)(ctx.client, params.org, ctx.chainId);
|
|
722
731
|
const hybridVotingAddress = modules.hybridVotingAddress;
|
|
723
732
|
if (!hybridVotingAddress) {
|
|
@@ -727,7 +736,9 @@ async function proposeClassesIntent(ctx, params) {
|
|
|
727
736
|
classes.map(c => [c.strategy, c.slicePct, c.quadratic, c.minBalance, c.asset, c.hatIds]),
|
|
728
737
|
]);
|
|
729
738
|
const batches = [
|
|
730
|
-
[setClassesCall
|
|
739
|
+
[setClassesCall, ...classes.flatMap((c, index) => c.subjectId === undefined ? [] : [
|
|
740
|
+
(0, governance_1.encodeExecutorCall)('HybridVotingNew', hybridVotingAddress, 'setClassSubject', [index, c.subjectId]),
|
|
741
|
+
])], // option 0: update classes and explicitly requested stable bindings
|
|
731
742
|
[], // option 1: keep current
|
|
732
743
|
];
|
|
733
744
|
const classLines = classes.map(describeClass);
|
package/dist/version.d.ts
CHANGED
|
@@ -58,11 +58,6 @@ export interface TaskManagerFeatures {
|
|
|
58
58
|
* requiresApplication, absoluteDeadline, completionWindow).
|
|
59
59
|
*/
|
|
60
60
|
export declare const TM_FEATURE_FRAGMENTS: Record<keyof TaskManagerFeatures, string>;
|
|
61
|
-
/**
|
|
62
|
-
* Legacy (pre-v6) TaskManager write fragments, for building a fallback
|
|
63
|
-
* Interface when the org's implementation predates the deadline fields.
|
|
64
|
-
*/
|
|
65
|
-
export declare const LEGACY_TM_FRAGMENTS: string[];
|
|
66
61
|
/**
|
|
67
62
|
* Compute the 4-byte selector for a human-readable function fragment at
|
|
68
63
|
* runtime (never hardcode selector hex — signatures drift, keccak does not).
|
package/dist/version.js
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
* table can only ever remove work — never invent a feature.
|
|
32
32
|
*/
|
|
33
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
-
exports.KNOWN_TM_IMPLEMENTATION_FEATURES = exports.TASK_MANAGER_TYPE_ID = exports.
|
|
34
|
+
exports.KNOWN_TM_IMPLEMENTATION_FEATURES = exports.TASK_MANAGER_TYPE_ID = exports.TM_FEATURE_FRAGMENTS = exports.EIP1967_IMPLEMENTATION_SLOT = exports.EIP1967_BEACON_SLOT = void 0;
|
|
35
35
|
exports.computeSelector = computeSelector;
|
|
36
36
|
exports.getImplementation = getImplementation;
|
|
37
37
|
exports.featuresFromBytecode = featuresFromBytecode;
|
|
@@ -62,18 +62,6 @@ exports.TM_FEATURE_FRAGMENTS = {
|
|
|
62
62
|
legacyCreate7: 'function createTask(uint256 payout, bytes title, bytes32 metadataHash, bytes32 pid, address bountyToken, uint256 bountyPayout, bool requiresApplication)',
|
|
63
63
|
unclaim: 'function unclaimTask(uint256 id)',
|
|
64
64
|
};
|
|
65
|
-
/**
|
|
66
|
-
* Legacy (pre-v6) TaskManager write fragments, for building a fallback
|
|
67
|
-
* Interface when the org's implementation predates the deadline fields.
|
|
68
|
-
*/
|
|
69
|
-
exports.LEGACY_TM_FRAGMENTS = [
|
|
70
|
-
exports.TM_FEATURE_FRAGMENTS.legacyCreate7,
|
|
71
|
-
'function updateTask(uint256 id, uint256 newPayout, bytes newTitle, bytes32 newMetadataHash, address newBountyToken, uint256 newBountyPayout)',
|
|
72
|
-
// TaskCreated event (identical shape pre-v6 and v6 — verified against the
|
|
73
|
-
// pre-sync ABI at f3b7216~1) so executeTx's receipt log parsing can still
|
|
74
|
-
// extract the created task id on the legacy path.
|
|
75
|
-
'event TaskCreated(uint256 indexed id, bytes32 indexed project, uint256 payout, address bountyToken, uint256 bountyPayout, bool requiresApplication, bytes title, bytes32 metadataHash)',
|
|
76
|
-
];
|
|
77
65
|
const selectorCache = new Map();
|
|
78
66
|
/**
|
|
79
67
|
* Compute the 4-byte selector for a human-readable function fragment at
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@poa-box/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Browser-and-Node core for the POP (Proof of Participation) protocol: transaction intent builders, subgraph reads, canonical metadata, ABIs, and chain config. The stable layer the CLI, frontends, and integrators share.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
export declare const ToggleModuleAbi: readonly [{
|
|
2
|
-
readonly type: "constructor";
|
|
3
|
-
readonly inputs: readonly [];
|
|
4
|
-
readonly stateMutability: "nonpayable";
|
|
5
|
-
}, {
|
|
6
|
-
readonly type: "function";
|
|
7
|
-
readonly name: "admin";
|
|
8
|
-
readonly inputs: readonly [];
|
|
9
|
-
readonly outputs: readonly [{
|
|
10
|
-
readonly name: "";
|
|
11
|
-
readonly type: "address";
|
|
12
|
-
readonly internalType: "address";
|
|
13
|
-
}];
|
|
14
|
-
readonly stateMutability: "view";
|
|
15
|
-
}, {
|
|
16
|
-
readonly type: "function";
|
|
17
|
-
readonly name: "batchSetHatStatus";
|
|
18
|
-
readonly inputs: readonly [{
|
|
19
|
-
readonly name: "hatIds";
|
|
20
|
-
readonly type: "uint256[]";
|
|
21
|
-
readonly internalType: "uint256[]";
|
|
22
|
-
}, {
|
|
23
|
-
readonly name: "actives";
|
|
24
|
-
readonly type: "bool[]";
|
|
25
|
-
readonly internalType: "bool[]";
|
|
26
|
-
}];
|
|
27
|
-
readonly outputs: readonly [];
|
|
28
|
-
readonly stateMutability: "nonpayable";
|
|
29
|
-
}, {
|
|
30
|
-
readonly type: "function";
|
|
31
|
-
readonly name: "eligibilityModule";
|
|
32
|
-
readonly inputs: readonly [];
|
|
33
|
-
readonly outputs: readonly [{
|
|
34
|
-
readonly name: "";
|
|
35
|
-
readonly type: "address";
|
|
36
|
-
readonly internalType: "address";
|
|
37
|
-
}];
|
|
38
|
-
readonly stateMutability: "view";
|
|
39
|
-
}, {
|
|
40
|
-
readonly type: "function";
|
|
41
|
-
readonly name: "getHatStatus";
|
|
42
|
-
readonly inputs: readonly [{
|
|
43
|
-
readonly name: "hatId";
|
|
44
|
-
readonly type: "uint256";
|
|
45
|
-
readonly internalType: "uint256";
|
|
46
|
-
}];
|
|
47
|
-
readonly outputs: readonly [{
|
|
48
|
-
readonly name: "status";
|
|
49
|
-
readonly type: "uint256";
|
|
50
|
-
readonly internalType: "uint256";
|
|
51
|
-
}];
|
|
52
|
-
readonly stateMutability: "view";
|
|
53
|
-
}, {
|
|
54
|
-
readonly type: "function";
|
|
55
|
-
readonly name: "hatActive";
|
|
56
|
-
readonly inputs: readonly [{
|
|
57
|
-
readonly name: "hatId";
|
|
58
|
-
readonly type: "uint256";
|
|
59
|
-
readonly internalType: "uint256";
|
|
60
|
-
}];
|
|
61
|
-
readonly outputs: readonly [{
|
|
62
|
-
readonly name: "";
|
|
63
|
-
readonly type: "bool";
|
|
64
|
-
readonly internalType: "bool";
|
|
65
|
-
}];
|
|
66
|
-
readonly stateMutability: "view";
|
|
67
|
-
}, {
|
|
68
|
-
readonly type: "function";
|
|
69
|
-
readonly name: "initialize";
|
|
70
|
-
readonly inputs: readonly [{
|
|
71
|
-
readonly name: "_admin";
|
|
72
|
-
readonly type: "address";
|
|
73
|
-
readonly internalType: "address";
|
|
74
|
-
}];
|
|
75
|
-
readonly outputs: readonly [];
|
|
76
|
-
readonly stateMutability: "nonpayable";
|
|
77
|
-
}, {
|
|
78
|
-
readonly type: "function";
|
|
79
|
-
readonly name: "setEligibilityModule";
|
|
80
|
-
readonly inputs: readonly [{
|
|
81
|
-
readonly name: "_eligibilityModule";
|
|
82
|
-
readonly type: "address";
|
|
83
|
-
readonly internalType: "address";
|
|
84
|
-
}];
|
|
85
|
-
readonly outputs: readonly [];
|
|
86
|
-
readonly stateMutability: "nonpayable";
|
|
87
|
-
}, {
|
|
88
|
-
readonly type: "function";
|
|
89
|
-
readonly name: "setHatStatus";
|
|
90
|
-
readonly inputs: readonly [{
|
|
91
|
-
readonly name: "hatId";
|
|
92
|
-
readonly type: "uint256";
|
|
93
|
-
readonly internalType: "uint256";
|
|
94
|
-
}, {
|
|
95
|
-
readonly name: "_active";
|
|
96
|
-
readonly type: "bool";
|
|
97
|
-
readonly internalType: "bool";
|
|
98
|
-
}];
|
|
99
|
-
readonly outputs: readonly [];
|
|
100
|
-
readonly stateMutability: "nonpayable";
|
|
101
|
-
}, {
|
|
102
|
-
readonly type: "function";
|
|
103
|
-
readonly name: "transferAdmin";
|
|
104
|
-
readonly inputs: readonly [{
|
|
105
|
-
readonly name: "newAdmin";
|
|
106
|
-
readonly type: "address";
|
|
107
|
-
readonly internalType: "address";
|
|
108
|
-
}];
|
|
109
|
-
readonly outputs: readonly [];
|
|
110
|
-
readonly stateMutability: "nonpayable";
|
|
111
|
-
}, {
|
|
112
|
-
readonly type: "event";
|
|
113
|
-
readonly name: "AdminTransferred";
|
|
114
|
-
readonly inputs: readonly [{
|
|
115
|
-
readonly name: "oldAdmin";
|
|
116
|
-
readonly type: "address";
|
|
117
|
-
readonly indexed: true;
|
|
118
|
-
readonly internalType: "address";
|
|
119
|
-
}, {
|
|
120
|
-
readonly name: "newAdmin";
|
|
121
|
-
readonly type: "address";
|
|
122
|
-
readonly indexed: true;
|
|
123
|
-
readonly internalType: "address";
|
|
124
|
-
}];
|
|
125
|
-
readonly anonymous: false;
|
|
126
|
-
}, {
|
|
127
|
-
readonly type: "event";
|
|
128
|
-
readonly name: "EligibilityModuleSet";
|
|
129
|
-
readonly inputs: readonly [{
|
|
130
|
-
readonly name: "oldModule";
|
|
131
|
-
readonly type: "address";
|
|
132
|
-
readonly indexed: true;
|
|
133
|
-
readonly internalType: "address";
|
|
134
|
-
}, {
|
|
135
|
-
readonly name: "newModule";
|
|
136
|
-
readonly type: "address";
|
|
137
|
-
readonly indexed: true;
|
|
138
|
-
readonly internalType: "address";
|
|
139
|
-
}];
|
|
140
|
-
readonly anonymous: false;
|
|
141
|
-
}, {
|
|
142
|
-
readonly type: "event";
|
|
143
|
-
readonly name: "HatToggled";
|
|
144
|
-
readonly inputs: readonly [{
|
|
145
|
-
readonly name: "hatId";
|
|
146
|
-
readonly type: "uint256";
|
|
147
|
-
readonly indexed: true;
|
|
148
|
-
readonly internalType: "uint256";
|
|
149
|
-
}, {
|
|
150
|
-
readonly name: "newStatus";
|
|
151
|
-
readonly type: "bool";
|
|
152
|
-
readonly indexed: false;
|
|
153
|
-
readonly internalType: "bool";
|
|
154
|
-
}];
|
|
155
|
-
readonly anonymous: false;
|
|
156
|
-
}, {
|
|
157
|
-
readonly type: "event";
|
|
158
|
-
readonly name: "Initialized";
|
|
159
|
-
readonly inputs: readonly [{
|
|
160
|
-
readonly name: "version";
|
|
161
|
-
readonly type: "uint64";
|
|
162
|
-
readonly indexed: false;
|
|
163
|
-
readonly internalType: "uint64";
|
|
164
|
-
}];
|
|
165
|
-
readonly anonymous: false;
|
|
166
|
-
}, {
|
|
167
|
-
readonly type: "event";
|
|
168
|
-
readonly name: "ToggleModuleInitialized";
|
|
169
|
-
readonly inputs: readonly [{
|
|
170
|
-
readonly name: "admin";
|
|
171
|
-
readonly type: "address";
|
|
172
|
-
readonly indexed: true;
|
|
173
|
-
readonly internalType: "address";
|
|
174
|
-
}];
|
|
175
|
-
readonly anonymous: false;
|
|
176
|
-
}, {
|
|
177
|
-
readonly type: "error";
|
|
178
|
-
readonly name: "InvalidInitialization";
|
|
179
|
-
readonly inputs: readonly [];
|
|
180
|
-
}, {
|
|
181
|
-
readonly type: "error";
|
|
182
|
-
readonly name: "NotInitializing";
|
|
183
|
-
readonly inputs: readonly [];
|
|
184
|
-
}, {
|
|
185
|
-
readonly type: "error";
|
|
186
|
-
readonly name: "NotToggleAdmin";
|
|
187
|
-
readonly inputs: readonly [];
|
|
188
|
-
}, {
|
|
189
|
-
readonly type: "error";
|
|
190
|
-
readonly name: "ZeroAddress";
|
|
191
|
-
readonly inputs: readonly [];
|
|
192
|
-
}];
|
|
193
|
-
export default ToggleModuleAbi;
|