@wandevs/governance-contracts-sdk 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +124 -94
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +124 -94
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -439,129 +439,88 @@ interface CanRequestProposalWithdrawalRetrunItem {
|
|
|
439
439
|
canRequestWithdrawal: boolean;
|
|
440
440
|
}
|
|
441
441
|
/**
|
|
442
|
-
*
|
|
442
|
+
* Type definition of return type for getBaseParameters.
|
|
443
|
+
* @interface BaseParametersReturnType
|
|
444
|
+
* @property {bigint} allProposalWanAmount - All reviewed proposal WAN amounts.
|
|
445
|
+
* @property {bigint} allProposalLockingWanAmount - All amount of WAN that locking into POS.
|
|
446
|
+
* @property {bigint} allProposalBurnedWanAmount - All burned WAN amounts.
|
|
447
|
+
* @property {bigint} ethTransferGasLimit - WAN transfer gaslimit.
|
|
448
|
+
* @property {bigint} minParticipationAmount - Minimum amount of WANs a participant can participate in for funding proposal.
|
|
449
|
+
* @property {bigint} requestWanMultiplier - Multiplier to request WANs from Wanchain Treasury.
|
|
450
|
+
* @property {bigint} succeedThreshold - Threshold to succeed proposal.
|
|
451
|
+
* @property {bigint} requireXpAmount - Proposal creation require amount of XP.
|
|
452
|
+
* @property {bigint} pledgeLockDuration - Proposer or partner pledge WAN by locking duration.
|
|
453
|
+
* @property {bigint} fundraisingDuration - Duration for partners to pledge their WAN to help a Prospective Proposal meet the pledge requirements.
|
|
454
|
+
* @property {bigint} voteDuration - Duration for voters to vote active proposal.
|
|
455
|
+
* @property {Address} xp - Address of XP token.
|
|
456
|
+
* @property {Address} stakingManager - Address for StakingManager.
|
|
457
|
+
* @property {Address} wanTreasury - Address for Wanchain community treasury.
|
|
458
|
+
* @property {Address} burnAddr - Address for WAN burned.
|
|
459
|
+
* @property {bigint} proposalCount - Count for total proposal: include reviewing proposals, canceled proposals, prospective proposals, active proposals, succeeded proposals and failed proposals.
|
|
460
|
+
* @property {bigint} reviewPendingProposalCount - Count for reviewing proposals.
|
|
461
|
+
* @property {bigint} prospectiveProposalCount - Count for prospective proposals.
|
|
462
|
+
* @property {bigint} votingProposalCount - Count for active(voting) proposals.
|
|
463
|
+
* @property {bigint} succeededProposalCount - Count for succeeded proposals.
|
|
464
|
+
* @property {bigint} failedProposalCount - Count for rejected proposals.
|
|
465
|
+
* @property {bigint} canceledProposalCount - Count for canceled proposals.
|
|
466
|
+
* @property {bigint} proposalWanMultiplierCount - Count of multipliers for proposer and partner .
|
|
467
|
+
* @property {bigint} votingWanMultiplierCount - Count of multipliers for voter.
|
|
443
468
|
*/
|
|
444
469
|
interface BaseParametersReturnType {
|
|
445
|
-
/**
|
|
446
|
-
* All reviewed proposal WAN amounts.
|
|
447
|
-
* @type {bigint}
|
|
448
|
-
*/
|
|
449
470
|
allProposalWanAmount: bigint;
|
|
450
|
-
/**
|
|
451
|
-
* All locking WAN amounts.
|
|
452
|
-
* @type {bigint}
|
|
453
|
-
*/
|
|
454
471
|
allProposalLockingWanAmount: bigint;
|
|
455
|
-
/**
|
|
456
|
-
* All burned WAN amounts.
|
|
457
|
-
* @type {bigint}
|
|
458
|
-
*/
|
|
459
472
|
allProposalBurnedWanAmount: bigint;
|
|
460
|
-
/**
|
|
461
|
-
* WAN transfer gaslimit
|
|
462
|
-
* @type {bigint}
|
|
463
|
-
*/
|
|
464
473
|
ethTransferGasLimit: bigint;
|
|
465
|
-
/**
|
|
466
|
-
* Minimum amount of WANs a participant can participate in for funding proposal
|
|
467
|
-
* @type {bigint}
|
|
468
|
-
*/
|
|
469
474
|
minParticipationAmount: bigint;
|
|
470
|
-
/**
|
|
471
|
-
* Multiplier to request WANs from Wanchain Treasury
|
|
472
|
-
* @type {bigint}
|
|
473
|
-
*/
|
|
474
475
|
requestWanMultiplier: bigint;
|
|
475
|
-
/**
|
|
476
|
-
* Threshold to succeed proposal
|
|
477
|
-
* @type {bigint}
|
|
478
|
-
*/
|
|
479
476
|
succeedThreshold: bigint;
|
|
480
|
-
/**
|
|
481
|
-
* Proposal creation require amount of XP
|
|
482
|
-
* @type {bigint}
|
|
483
|
-
*/
|
|
484
477
|
requireXpAmount: bigint;
|
|
485
|
-
/**
|
|
486
|
-
* Proposer or partner pledge WAN by locking duration
|
|
487
|
-
* @type {bigint}
|
|
488
|
-
*/
|
|
489
478
|
pledgeLockDuration: bigint;
|
|
490
|
-
/**
|
|
491
|
-
* Duration for partners to pledge their WAN to help a Prospective Proposal meet the pledge requirements.
|
|
492
|
-
* @type {bigint}
|
|
493
|
-
*/
|
|
494
479
|
fundraisingDuration: bigint;
|
|
495
|
-
/**
|
|
496
|
-
* Duration for voters to vote active proposal
|
|
497
|
-
* @type {bigint}
|
|
498
|
-
*/
|
|
499
480
|
voteDuration: bigint;
|
|
500
|
-
/**
|
|
501
|
-
* for XP token
|
|
502
|
-
* @type {bigint}
|
|
503
|
-
*/
|
|
504
481
|
xp: Address;
|
|
505
|
-
/**
|
|
506
|
-
* Address for StakingManager
|
|
507
|
-
* @type {bigint}
|
|
508
|
-
*/
|
|
509
482
|
stakingManager: Address;
|
|
510
|
-
/**
|
|
511
|
-
* Address for Wanchain community treasury
|
|
512
|
-
* @type {bigint}
|
|
513
|
-
*/
|
|
514
483
|
wanTreasury: Address;
|
|
515
|
-
/**
|
|
516
|
-
* Address for WAN burned
|
|
517
|
-
* @type {bigint}
|
|
518
|
-
*/
|
|
519
484
|
burnAddr: Address;
|
|
520
|
-
/**
|
|
521
|
-
* Count for total proposal: include reviewing proposals, canceled proposals, prospective proposals, active proposals, succeeded proposals and failed proposals
|
|
522
|
-
* @type {bigint}
|
|
523
|
-
*/
|
|
524
485
|
proposalCount: bigint;
|
|
525
|
-
/**
|
|
526
|
-
* Count for reviewing proposals
|
|
527
|
-
* @type {bigint}
|
|
528
|
-
*/
|
|
529
486
|
reviewPendingProposalCount: bigint;
|
|
530
|
-
/**
|
|
531
|
-
* Count for prospective proposals
|
|
532
|
-
* @type {bigint}
|
|
533
|
-
*/
|
|
534
487
|
prospectiveProposalCount: bigint;
|
|
535
|
-
/**
|
|
536
|
-
* Count for active(voting) proposals
|
|
537
|
-
* @type {bigint}
|
|
538
|
-
*/
|
|
539
488
|
votingProposalCount: bigint;
|
|
540
|
-
/**
|
|
541
|
-
* Count for succeeded proposals
|
|
542
|
-
* @type {bigint}
|
|
543
|
-
*/
|
|
544
489
|
succeededProposalCount: bigint;
|
|
490
|
+
failedProposalCount: bigint;
|
|
491
|
+
canceledProposalCount: bigint;
|
|
492
|
+
proposalWanMultiplierCount: bigint;
|
|
493
|
+
votingWanMultiplierCount: bigint;
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* RecentProposalsParam: Recent proposals parameter
|
|
497
|
+
*/
|
|
498
|
+
interface RecentProposalsParam {
|
|
545
499
|
/**
|
|
546
|
-
*
|
|
547
|
-
* @type {
|
|
500
|
+
* The start index to query recent proposals, it is the recent index
|
|
501
|
+
* @type {number}
|
|
548
502
|
*/
|
|
549
|
-
|
|
503
|
+
start: number;
|
|
550
504
|
/**
|
|
551
|
-
*
|
|
552
|
-
* @type {
|
|
505
|
+
* The max count of proposals
|
|
506
|
+
* @type {number}
|
|
553
507
|
*/
|
|
554
|
-
|
|
508
|
+
limit: number;
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* GetRecentProposalsResult: Return recent reviewed proposals: state shoud be in [Fundraising, VotingInProgress, Succeeded, Rejected]
|
|
512
|
+
*/
|
|
513
|
+
interface GetRecentProposalsResult {
|
|
555
514
|
/**
|
|
556
|
-
*
|
|
557
|
-
* @type {
|
|
515
|
+
* The proposal array obtained this time is sorted by index from large to small (that is, the latest first)
|
|
516
|
+
* @type {ProposalInfo[]}
|
|
558
517
|
*/
|
|
559
|
-
|
|
518
|
+
proposals: ProposalInfo[];
|
|
560
519
|
/**
|
|
561
|
-
*
|
|
562
|
-
* @type {
|
|
520
|
+
* The starting index of the next request
|
|
521
|
+
* @type {number}
|
|
563
522
|
*/
|
|
564
|
-
|
|
523
|
+
nextIndex: number;
|
|
565
524
|
}
|
|
566
525
|
//#endregion
|
|
567
526
|
//#region src/abis/WanGovernor.d.ts
|
|
@@ -3189,6 +3148,16 @@ declare class Governance<TAbi extends Abi = typeof ABI> {
|
|
|
3189
3148
|
* console.log(ret);
|
|
3190
3149
|
*/
|
|
3191
3150
|
getVoterInfo(voterAddr: Address, proposalIds: Hex[]): Promise<VoterInfo[]>;
|
|
3151
|
+
/**
|
|
3152
|
+
* Get recent reviewed proposals
|
|
3153
|
+
* @param {RecentProposalsParam} param - Recent proposal parameters
|
|
3154
|
+
* @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index
|
|
3155
|
+
* @example
|
|
3156
|
+
* const param = {start:5, limit: 6}; // index 5-0
|
|
3157
|
+
* const ret = await sdk.getRecentReviewedProposals(param);
|
|
3158
|
+
* console.log(ret);
|
|
3159
|
+
*/
|
|
3160
|
+
getRecentReviewedProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult>;
|
|
3192
3161
|
/**
|
|
3193
3162
|
* Get review pending proposals
|
|
3194
3163
|
* @param {IndexRange} indexRange - Range of index
|
|
@@ -3199,6 +3168,16 @@ declare class Governance<TAbi extends Abi = typeof ABI> {
|
|
|
3199
3168
|
* console.log(ret);
|
|
3200
3169
|
*/
|
|
3201
3170
|
getReviewPendingProposals(indexRange: IndexRange): Promise<ProposalInfo[]>;
|
|
3171
|
+
/**
|
|
3172
|
+
* Get recent review pending proposals
|
|
3173
|
+
* @param {RecentProposalsParam} param - Recent proposal parameters
|
|
3174
|
+
* @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index
|
|
3175
|
+
* @example
|
|
3176
|
+
* const param = {start:5, limit: 6}; // index 5-0
|
|
3177
|
+
* const ret = await sdk.getRecentReviewPendingProposals(param);
|
|
3178
|
+
* console.log(ret);
|
|
3179
|
+
*/
|
|
3180
|
+
getRecentReviewPendingProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult>;
|
|
3202
3181
|
/**
|
|
3203
3182
|
* Get prospective proposals
|
|
3204
3183
|
* @param {IndexRange} indexRange - Range of index
|
|
@@ -3209,6 +3188,16 @@ declare class Governance<TAbi extends Abi = typeof ABI> {
|
|
|
3209
3188
|
* console.log(ret);
|
|
3210
3189
|
*/
|
|
3211
3190
|
getProspectiveProposals(indexRange: IndexRange): Promise<ProposalInfo[]>;
|
|
3191
|
+
/**
|
|
3192
|
+
* Get recent prospective proposals
|
|
3193
|
+
* @param {RecentProposalsParam} param - Recent proposal parameters
|
|
3194
|
+
* @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index
|
|
3195
|
+
* @example
|
|
3196
|
+
* const param = {start:5, limit: 6}; // index 5-0
|
|
3197
|
+
* const ret = await sdk.getRecentProspectiveProposals(param);
|
|
3198
|
+
* console.log(ret);
|
|
3199
|
+
*/
|
|
3200
|
+
getRecentProspectiveProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult>;
|
|
3212
3201
|
/**
|
|
3213
3202
|
* Get active(voting) proposals
|
|
3214
3203
|
* @param {IndexRange} indexRange - Range of index
|
|
@@ -3219,6 +3208,16 @@ declare class Governance<TAbi extends Abi = typeof ABI> {
|
|
|
3219
3208
|
* console.log(ret);
|
|
3220
3209
|
*/
|
|
3221
3210
|
getVotingProposals(indexRange: IndexRange): Promise<ProposalInfo[]>;
|
|
3211
|
+
/**
|
|
3212
|
+
* Get recent active(voting) proposals
|
|
3213
|
+
* @param {RecentProposalsParam} param - Recent proposal parameters
|
|
3214
|
+
* @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index
|
|
3215
|
+
* @example
|
|
3216
|
+
* const param = {start:5, limit: 6}; // index 5-0
|
|
3217
|
+
* const ret = await sdk.getRecentVotingProposals(param);
|
|
3218
|
+
* console.log(ret);
|
|
3219
|
+
*/
|
|
3220
|
+
getRecentVotingProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult>;
|
|
3222
3221
|
/**
|
|
3223
3222
|
* Get succeed proposals
|
|
3224
3223
|
* @param {IndexRange} indexRange - Range of index
|
|
@@ -3229,6 +3228,16 @@ declare class Governance<TAbi extends Abi = typeof ABI> {
|
|
|
3229
3228
|
* console.log(ret);
|
|
3230
3229
|
*/
|
|
3231
3230
|
getSucceedProposals(indexRange: IndexRange): Promise<ProposalInfo[]>;
|
|
3231
|
+
/**
|
|
3232
|
+
* Get recent succeeded proposals
|
|
3233
|
+
* @param {RecentProposalsParam} param - Recent proposal parameters
|
|
3234
|
+
* @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index
|
|
3235
|
+
* @example
|
|
3236
|
+
* const param = {start:5, limit: 6}; // index 5-0
|
|
3237
|
+
* const ret = await sdk.getRecentSucceededProposals(param);
|
|
3238
|
+
* console.log(ret);
|
|
3239
|
+
*/
|
|
3240
|
+
getRecentSucceededProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult>;
|
|
3232
3241
|
/**
|
|
3233
3242
|
* Get failed proposals
|
|
3234
3243
|
* @param {IndexRange} indexRange - Range of index
|
|
@@ -3239,6 +3248,16 @@ declare class Governance<TAbi extends Abi = typeof ABI> {
|
|
|
3239
3248
|
* console.log(ret);
|
|
3240
3249
|
*/
|
|
3241
3250
|
getFailedProposals(indexRange: IndexRange): Promise<ProposalInfo[]>;
|
|
3251
|
+
/**
|
|
3252
|
+
* Get recent rejected proposals
|
|
3253
|
+
* @param {RecentProposalsParam} param - Recent proposal parameters
|
|
3254
|
+
* @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index
|
|
3255
|
+
* @example
|
|
3256
|
+
* const param = {start:5, limit: 6}; // index 5-0
|
|
3257
|
+
* const ret = await sdk.getRecentRejectedProposals(param);
|
|
3258
|
+
* console.log(ret);
|
|
3259
|
+
*/
|
|
3260
|
+
getRecentRejectedProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult>;
|
|
3242
3261
|
/**
|
|
3243
3262
|
* Get canceled proposals
|
|
3244
3263
|
* @param {IndexRange} indexRange - Range of index
|
|
@@ -3249,6 +3268,16 @@ declare class Governance<TAbi extends Abi = typeof ABI> {
|
|
|
3249
3268
|
* console.log(ret);
|
|
3250
3269
|
*/
|
|
3251
3270
|
getCanceledProposals(indexRange: IndexRange): Promise<ProposalInfo[]>;
|
|
3271
|
+
/**
|
|
3272
|
+
* Get recent canceled proposals
|
|
3273
|
+
* @param {RecentProposalsParam} param - Recent proposal parameters
|
|
3274
|
+
* @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index
|
|
3275
|
+
* @example
|
|
3276
|
+
* const param = {start:5, limit: 6}; // index 5-0
|
|
3277
|
+
* const ret = await sdk.getRecentCanceledProposals(param);
|
|
3278
|
+
* console.log(ret);
|
|
3279
|
+
*/
|
|
3280
|
+
getRecentCanceledProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult>;
|
|
3252
3281
|
/**
|
|
3253
3282
|
* Get specified proposal info
|
|
3254
3283
|
* @param {Hex} proposalId - ID of proposal
|
|
@@ -3534,7 +3563,8 @@ declare class Governance<TAbi extends Abi = typeof ABI> {
|
|
|
3534
3563
|
* console.log(ret);
|
|
3535
3564
|
*/
|
|
3536
3565
|
buildUpdateMinParticipationAmountTx(account: Address | Account, amount: bigint): Promise<PrepareTransactionRequestReturnType>;
|
|
3566
|
+
private _getRecentProposalsByState;
|
|
3537
3567
|
}
|
|
3538
3568
|
//#endregion
|
|
3539
|
-
export { type CanClaimProposalWithdrawalParam, type CanRequestProposalWithdrawalParam, type CanRequestProposalWithdrawalRetrunItem, type FundInfo, Governance, type IndexRange, type PartnerInfo, PledgeType, type PlegeMultiplierReturn, ProposalCategory, ProposalDescriptionData, type ProposalInfo, ProposalRole, ProposalState, type Tally, UnstakeStatus, ValidVersion, VoteType, type VoterInfo, decodeProposalDescriptionData, encodeProposalDescriptionData, getVersionFromData, supportedProposalDescriptionDataTypeSchema };
|
|
3569
|
+
export { type CanClaimProposalWithdrawalParam, type CanRequestProposalWithdrawalParam, type CanRequestProposalWithdrawalRetrunItem, type FundInfo, Governance, type IndexRange, type PartnerInfo, PledgeType, type PlegeMultiplierReturn, ProposalCategory, ProposalDescriptionData, ProposalDescriptionSchema, type ProposalInfo, ProposalRole, ProposalState, type Tally, UnstakeStatus, ValidVersion, VoteType, type VoterInfo, decodeProposalDescriptionData, encodeProposalDescriptionData, getVersionFromData, supportedProposalDescriptionDataTypeSchema };
|
|
3540
3570
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/util.ts","../src/types/index.ts","../src/abis/WanGovernor.ts","../src/governance.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/util.ts","../src/types/index.ts","../src/abis/WanGovernor.ts","../src/governance.ts"],"mappings":";;;;;AAYA;;;;UAAiB,yBAAA;EACf,KAAA,EAAO,KAAA;IAAQ,IAAA;EAAA;EACf,KAAA;AAAA;AAQF;;;;;AAAA,KAAY,uBAAA,GAA0B,MAAA;;;;;KAM1B,YAAA;;;;;;;;;;cAWC,0CAAA,EAA4C,MAAA,CAAO,YAAA,EAAc,yBAAA;;;AAqE9E;;;;;AA4BA;;;;;;iBA5BgB,6BAAA,CAAA,GAAiC,IAAA,wBAA4B,GAAA;;;AA6E7E;;;;;;;;;iBAjDgB,6BAAA,CAA8B,OAAA,EAAS,GAAA,GAAM,uBAAA;;;ACjI7D;;;;;;;;iBDkLgB,kBAAA,CAAmB,OAAA,EAAS,GAAA,GAAM,YAAA;;;;;AA7KlD;;aCLY,aAAA;EACR,SAAA;EAAA;EACA,OAAA;EAAA;EACA,UAAA;EAAA;E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,mCAAA;EAAA,QAQY,0BAAA;AAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -439,129 +439,88 @@ interface CanRequestProposalWithdrawalRetrunItem {
|
|
|
439
439
|
canRequestWithdrawal: boolean;
|
|
440
440
|
}
|
|
441
441
|
/**
|
|
442
|
-
*
|
|
442
|
+
* Type definition of return type for getBaseParameters.
|
|
443
|
+
* @interface BaseParametersReturnType
|
|
444
|
+
* @property {bigint} allProposalWanAmount - All reviewed proposal WAN amounts.
|
|
445
|
+
* @property {bigint} allProposalLockingWanAmount - All amount of WAN that locking into POS.
|
|
446
|
+
* @property {bigint} allProposalBurnedWanAmount - All burned WAN amounts.
|
|
447
|
+
* @property {bigint} ethTransferGasLimit - WAN transfer gaslimit.
|
|
448
|
+
* @property {bigint} minParticipationAmount - Minimum amount of WANs a participant can participate in for funding proposal.
|
|
449
|
+
* @property {bigint} requestWanMultiplier - Multiplier to request WANs from Wanchain Treasury.
|
|
450
|
+
* @property {bigint} succeedThreshold - Threshold to succeed proposal.
|
|
451
|
+
* @property {bigint} requireXpAmount - Proposal creation require amount of XP.
|
|
452
|
+
* @property {bigint} pledgeLockDuration - Proposer or partner pledge WAN by locking duration.
|
|
453
|
+
* @property {bigint} fundraisingDuration - Duration for partners to pledge their WAN to help a Prospective Proposal meet the pledge requirements.
|
|
454
|
+
* @property {bigint} voteDuration - Duration for voters to vote active proposal.
|
|
455
|
+
* @property {Address} xp - Address of XP token.
|
|
456
|
+
* @property {Address} stakingManager - Address for StakingManager.
|
|
457
|
+
* @property {Address} wanTreasury - Address for Wanchain community treasury.
|
|
458
|
+
* @property {Address} burnAddr - Address for WAN burned.
|
|
459
|
+
* @property {bigint} proposalCount - Count for total proposal: include reviewing proposals, canceled proposals, prospective proposals, active proposals, succeeded proposals and failed proposals.
|
|
460
|
+
* @property {bigint} reviewPendingProposalCount - Count for reviewing proposals.
|
|
461
|
+
* @property {bigint} prospectiveProposalCount - Count for prospective proposals.
|
|
462
|
+
* @property {bigint} votingProposalCount - Count for active(voting) proposals.
|
|
463
|
+
* @property {bigint} succeededProposalCount - Count for succeeded proposals.
|
|
464
|
+
* @property {bigint} failedProposalCount - Count for rejected proposals.
|
|
465
|
+
* @property {bigint} canceledProposalCount - Count for canceled proposals.
|
|
466
|
+
* @property {bigint} proposalWanMultiplierCount - Count of multipliers for proposer and partner .
|
|
467
|
+
* @property {bigint} votingWanMultiplierCount - Count of multipliers for voter.
|
|
443
468
|
*/
|
|
444
469
|
interface BaseParametersReturnType {
|
|
445
|
-
/**
|
|
446
|
-
* All reviewed proposal WAN amounts.
|
|
447
|
-
* @type {bigint}
|
|
448
|
-
*/
|
|
449
470
|
allProposalWanAmount: bigint;
|
|
450
|
-
/**
|
|
451
|
-
* All locking WAN amounts.
|
|
452
|
-
* @type {bigint}
|
|
453
|
-
*/
|
|
454
471
|
allProposalLockingWanAmount: bigint;
|
|
455
|
-
/**
|
|
456
|
-
* All burned WAN amounts.
|
|
457
|
-
* @type {bigint}
|
|
458
|
-
*/
|
|
459
472
|
allProposalBurnedWanAmount: bigint;
|
|
460
|
-
/**
|
|
461
|
-
* WAN transfer gaslimit
|
|
462
|
-
* @type {bigint}
|
|
463
|
-
*/
|
|
464
473
|
ethTransferGasLimit: bigint;
|
|
465
|
-
/**
|
|
466
|
-
* Minimum amount of WANs a participant can participate in for funding proposal
|
|
467
|
-
* @type {bigint}
|
|
468
|
-
*/
|
|
469
474
|
minParticipationAmount: bigint;
|
|
470
|
-
/**
|
|
471
|
-
* Multiplier to request WANs from Wanchain Treasury
|
|
472
|
-
* @type {bigint}
|
|
473
|
-
*/
|
|
474
475
|
requestWanMultiplier: bigint;
|
|
475
|
-
/**
|
|
476
|
-
* Threshold to succeed proposal
|
|
477
|
-
* @type {bigint}
|
|
478
|
-
*/
|
|
479
476
|
succeedThreshold: bigint;
|
|
480
|
-
/**
|
|
481
|
-
* Proposal creation require amount of XP
|
|
482
|
-
* @type {bigint}
|
|
483
|
-
*/
|
|
484
477
|
requireXpAmount: bigint;
|
|
485
|
-
/**
|
|
486
|
-
* Proposer or partner pledge WAN by locking duration
|
|
487
|
-
* @type {bigint}
|
|
488
|
-
*/
|
|
489
478
|
pledgeLockDuration: bigint;
|
|
490
|
-
/**
|
|
491
|
-
* Duration for partners to pledge their WAN to help a Prospective Proposal meet the pledge requirements.
|
|
492
|
-
* @type {bigint}
|
|
493
|
-
*/
|
|
494
479
|
fundraisingDuration: bigint;
|
|
495
|
-
/**
|
|
496
|
-
* Duration for voters to vote active proposal
|
|
497
|
-
* @type {bigint}
|
|
498
|
-
*/
|
|
499
480
|
voteDuration: bigint;
|
|
500
|
-
/**
|
|
501
|
-
* for XP token
|
|
502
|
-
* @type {bigint}
|
|
503
|
-
*/
|
|
504
481
|
xp: Address;
|
|
505
|
-
/**
|
|
506
|
-
* Address for StakingManager
|
|
507
|
-
* @type {bigint}
|
|
508
|
-
*/
|
|
509
482
|
stakingManager: Address;
|
|
510
|
-
/**
|
|
511
|
-
* Address for Wanchain community treasury
|
|
512
|
-
* @type {bigint}
|
|
513
|
-
*/
|
|
514
483
|
wanTreasury: Address;
|
|
515
|
-
/**
|
|
516
|
-
* Address for WAN burned
|
|
517
|
-
* @type {bigint}
|
|
518
|
-
*/
|
|
519
484
|
burnAddr: Address;
|
|
520
|
-
/**
|
|
521
|
-
* Count for total proposal: include reviewing proposals, canceled proposals, prospective proposals, active proposals, succeeded proposals and failed proposals
|
|
522
|
-
* @type {bigint}
|
|
523
|
-
*/
|
|
524
485
|
proposalCount: bigint;
|
|
525
|
-
/**
|
|
526
|
-
* Count for reviewing proposals
|
|
527
|
-
* @type {bigint}
|
|
528
|
-
*/
|
|
529
486
|
reviewPendingProposalCount: bigint;
|
|
530
|
-
/**
|
|
531
|
-
* Count for prospective proposals
|
|
532
|
-
* @type {bigint}
|
|
533
|
-
*/
|
|
534
487
|
prospectiveProposalCount: bigint;
|
|
535
|
-
/**
|
|
536
|
-
* Count for active(voting) proposals
|
|
537
|
-
* @type {bigint}
|
|
538
|
-
*/
|
|
539
488
|
votingProposalCount: bigint;
|
|
540
|
-
/**
|
|
541
|
-
* Count for succeeded proposals
|
|
542
|
-
* @type {bigint}
|
|
543
|
-
*/
|
|
544
489
|
succeededProposalCount: bigint;
|
|
490
|
+
failedProposalCount: bigint;
|
|
491
|
+
canceledProposalCount: bigint;
|
|
492
|
+
proposalWanMultiplierCount: bigint;
|
|
493
|
+
votingWanMultiplierCount: bigint;
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* RecentProposalsParam: Recent proposals parameter
|
|
497
|
+
*/
|
|
498
|
+
interface RecentProposalsParam {
|
|
545
499
|
/**
|
|
546
|
-
*
|
|
547
|
-
* @type {
|
|
500
|
+
* The start index to query recent proposals, it is the recent index
|
|
501
|
+
* @type {number}
|
|
548
502
|
*/
|
|
549
|
-
|
|
503
|
+
start: number;
|
|
550
504
|
/**
|
|
551
|
-
*
|
|
552
|
-
* @type {
|
|
505
|
+
* The max count of proposals
|
|
506
|
+
* @type {number}
|
|
553
507
|
*/
|
|
554
|
-
|
|
508
|
+
limit: number;
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* GetRecentProposalsResult: Return recent reviewed proposals: state shoud be in [Fundraising, VotingInProgress, Succeeded, Rejected]
|
|
512
|
+
*/
|
|
513
|
+
interface GetRecentProposalsResult {
|
|
555
514
|
/**
|
|
556
|
-
*
|
|
557
|
-
* @type {
|
|
515
|
+
* The proposal array obtained this time is sorted by index from large to small (that is, the latest first)
|
|
516
|
+
* @type {ProposalInfo[]}
|
|
558
517
|
*/
|
|
559
|
-
|
|
518
|
+
proposals: ProposalInfo[];
|
|
560
519
|
/**
|
|
561
|
-
*
|
|
562
|
-
* @type {
|
|
520
|
+
* The starting index of the next request
|
|
521
|
+
* @type {number}
|
|
563
522
|
*/
|
|
564
|
-
|
|
523
|
+
nextIndex: number;
|
|
565
524
|
}
|
|
566
525
|
//#endregion
|
|
567
526
|
//#region src/abis/WanGovernor.d.ts
|
|
@@ -3189,6 +3148,16 @@ declare class Governance<TAbi extends Abi = typeof ABI> {
|
|
|
3189
3148
|
* console.log(ret);
|
|
3190
3149
|
*/
|
|
3191
3150
|
getVoterInfo(voterAddr: Address, proposalIds: Hex[]): Promise<VoterInfo[]>;
|
|
3151
|
+
/**
|
|
3152
|
+
* Get recent reviewed proposals
|
|
3153
|
+
* @param {RecentProposalsParam} param - Recent proposal parameters
|
|
3154
|
+
* @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index
|
|
3155
|
+
* @example
|
|
3156
|
+
* const param = {start:5, limit: 6}; // index 5-0
|
|
3157
|
+
* const ret = await sdk.getRecentReviewedProposals(param);
|
|
3158
|
+
* console.log(ret);
|
|
3159
|
+
*/
|
|
3160
|
+
getRecentReviewedProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult>;
|
|
3192
3161
|
/**
|
|
3193
3162
|
* Get review pending proposals
|
|
3194
3163
|
* @param {IndexRange} indexRange - Range of index
|
|
@@ -3199,6 +3168,16 @@ declare class Governance<TAbi extends Abi = typeof ABI> {
|
|
|
3199
3168
|
* console.log(ret);
|
|
3200
3169
|
*/
|
|
3201
3170
|
getReviewPendingProposals(indexRange: IndexRange): Promise<ProposalInfo[]>;
|
|
3171
|
+
/**
|
|
3172
|
+
* Get recent review pending proposals
|
|
3173
|
+
* @param {RecentProposalsParam} param - Recent proposal parameters
|
|
3174
|
+
* @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index
|
|
3175
|
+
* @example
|
|
3176
|
+
* const param = {start:5, limit: 6}; // index 5-0
|
|
3177
|
+
* const ret = await sdk.getRecentReviewPendingProposals(param);
|
|
3178
|
+
* console.log(ret);
|
|
3179
|
+
*/
|
|
3180
|
+
getRecentReviewPendingProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult>;
|
|
3202
3181
|
/**
|
|
3203
3182
|
* Get prospective proposals
|
|
3204
3183
|
* @param {IndexRange} indexRange - Range of index
|
|
@@ -3209,6 +3188,16 @@ declare class Governance<TAbi extends Abi = typeof ABI> {
|
|
|
3209
3188
|
* console.log(ret);
|
|
3210
3189
|
*/
|
|
3211
3190
|
getProspectiveProposals(indexRange: IndexRange): Promise<ProposalInfo[]>;
|
|
3191
|
+
/**
|
|
3192
|
+
* Get recent prospective proposals
|
|
3193
|
+
* @param {RecentProposalsParam} param - Recent proposal parameters
|
|
3194
|
+
* @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index
|
|
3195
|
+
* @example
|
|
3196
|
+
* const param = {start:5, limit: 6}; // index 5-0
|
|
3197
|
+
* const ret = await sdk.getRecentProspectiveProposals(param);
|
|
3198
|
+
* console.log(ret);
|
|
3199
|
+
*/
|
|
3200
|
+
getRecentProspectiveProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult>;
|
|
3212
3201
|
/**
|
|
3213
3202
|
* Get active(voting) proposals
|
|
3214
3203
|
* @param {IndexRange} indexRange - Range of index
|
|
@@ -3219,6 +3208,16 @@ declare class Governance<TAbi extends Abi = typeof ABI> {
|
|
|
3219
3208
|
* console.log(ret);
|
|
3220
3209
|
*/
|
|
3221
3210
|
getVotingProposals(indexRange: IndexRange): Promise<ProposalInfo[]>;
|
|
3211
|
+
/**
|
|
3212
|
+
* Get recent active(voting) proposals
|
|
3213
|
+
* @param {RecentProposalsParam} param - Recent proposal parameters
|
|
3214
|
+
* @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index
|
|
3215
|
+
* @example
|
|
3216
|
+
* const param = {start:5, limit: 6}; // index 5-0
|
|
3217
|
+
* const ret = await sdk.getRecentVotingProposals(param);
|
|
3218
|
+
* console.log(ret);
|
|
3219
|
+
*/
|
|
3220
|
+
getRecentVotingProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult>;
|
|
3222
3221
|
/**
|
|
3223
3222
|
* Get succeed proposals
|
|
3224
3223
|
* @param {IndexRange} indexRange - Range of index
|
|
@@ -3229,6 +3228,16 @@ declare class Governance<TAbi extends Abi = typeof ABI> {
|
|
|
3229
3228
|
* console.log(ret);
|
|
3230
3229
|
*/
|
|
3231
3230
|
getSucceedProposals(indexRange: IndexRange): Promise<ProposalInfo[]>;
|
|
3231
|
+
/**
|
|
3232
|
+
* Get recent succeeded proposals
|
|
3233
|
+
* @param {RecentProposalsParam} param - Recent proposal parameters
|
|
3234
|
+
* @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index
|
|
3235
|
+
* @example
|
|
3236
|
+
* const param = {start:5, limit: 6}; // index 5-0
|
|
3237
|
+
* const ret = await sdk.getRecentSucceededProposals(param);
|
|
3238
|
+
* console.log(ret);
|
|
3239
|
+
*/
|
|
3240
|
+
getRecentSucceededProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult>;
|
|
3232
3241
|
/**
|
|
3233
3242
|
* Get failed proposals
|
|
3234
3243
|
* @param {IndexRange} indexRange - Range of index
|
|
@@ -3239,6 +3248,16 @@ declare class Governance<TAbi extends Abi = typeof ABI> {
|
|
|
3239
3248
|
* console.log(ret);
|
|
3240
3249
|
*/
|
|
3241
3250
|
getFailedProposals(indexRange: IndexRange): Promise<ProposalInfo[]>;
|
|
3251
|
+
/**
|
|
3252
|
+
* Get recent rejected proposals
|
|
3253
|
+
* @param {RecentProposalsParam} param - Recent proposal parameters
|
|
3254
|
+
* @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index
|
|
3255
|
+
* @example
|
|
3256
|
+
* const param = {start:5, limit: 6}; // index 5-0
|
|
3257
|
+
* const ret = await sdk.getRecentRejectedProposals(param);
|
|
3258
|
+
* console.log(ret);
|
|
3259
|
+
*/
|
|
3260
|
+
getRecentRejectedProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult>;
|
|
3242
3261
|
/**
|
|
3243
3262
|
* Get canceled proposals
|
|
3244
3263
|
* @param {IndexRange} indexRange - Range of index
|
|
@@ -3249,6 +3268,16 @@ declare class Governance<TAbi extends Abi = typeof ABI> {
|
|
|
3249
3268
|
* console.log(ret);
|
|
3250
3269
|
*/
|
|
3251
3270
|
getCanceledProposals(indexRange: IndexRange): Promise<ProposalInfo[]>;
|
|
3271
|
+
/**
|
|
3272
|
+
* Get recent canceled proposals
|
|
3273
|
+
* @param {RecentProposalsParam} param - Recent proposal parameters
|
|
3274
|
+
* @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index
|
|
3275
|
+
* @example
|
|
3276
|
+
* const param = {start:5, limit: 6}; // index 5-0
|
|
3277
|
+
* const ret = await sdk.getRecentCanceledProposals(param);
|
|
3278
|
+
* console.log(ret);
|
|
3279
|
+
*/
|
|
3280
|
+
getRecentCanceledProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult>;
|
|
3252
3281
|
/**
|
|
3253
3282
|
* Get specified proposal info
|
|
3254
3283
|
* @param {Hex} proposalId - ID of proposal
|
|
@@ -3534,7 +3563,8 @@ declare class Governance<TAbi extends Abi = typeof ABI> {
|
|
|
3534
3563
|
* console.log(ret);
|
|
3535
3564
|
*/
|
|
3536
3565
|
buildUpdateMinParticipationAmountTx(account: Address | Account, amount: bigint): Promise<PrepareTransactionRequestReturnType>;
|
|
3566
|
+
private _getRecentProposalsByState;
|
|
3537
3567
|
}
|
|
3538
3568
|
//#endregion
|
|
3539
|
-
export { type CanClaimProposalWithdrawalParam, type CanRequestProposalWithdrawalParam, type CanRequestProposalWithdrawalRetrunItem, type FundInfo, Governance, type IndexRange, type PartnerInfo, PledgeType, type PlegeMultiplierReturn, ProposalCategory, ProposalDescriptionData, type ProposalInfo, ProposalRole, ProposalState, type Tally, UnstakeStatus, ValidVersion, VoteType, type VoterInfo, decodeProposalDescriptionData, encodeProposalDescriptionData, getVersionFromData, supportedProposalDescriptionDataTypeSchema };
|
|
3569
|
+
export { type CanClaimProposalWithdrawalParam, type CanRequestProposalWithdrawalParam, type CanRequestProposalWithdrawalRetrunItem, type FundInfo, Governance, type IndexRange, type PartnerInfo, PledgeType, type PlegeMultiplierReturn, ProposalCategory, ProposalDescriptionData, ProposalDescriptionSchema, type ProposalInfo, ProposalRole, ProposalState, type Tally, UnstakeStatus, ValidVersion, VoteType, type VoterInfo, decodeProposalDescriptionData, encodeProposalDescriptionData, getVersionFromData, supportedProposalDescriptionDataTypeSchema };
|
|
3540
3570
|
//# sourceMappingURL=index.d.mts.map
|