@wandevs/governance-contracts-sdk 1.6.0 → 1.7.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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","wanchain","GOVERNANCE_ABI","Parameters.totalProposalAmountInfo","Parameters.proposalGlobalConfig","Parameters.BURN","Parameters.getAllProposalCount","Parameters.getProposalCountByState","Parameters.getProposalMultiplierCounts","Parameters.DENOMINATOR","Parameters.MAX_REQUEST_WAN_RATIO_BPS_KEY","Parameters.WAN_TOTAL_SUPPLY","Parameters.PROPOSAL_CATEGORY_TECHNICAL_SUCCEED_THRESHOLD_KEY","Parameters.getUint","Parameters.getProposalWanMultiplierAt","Parameters.getVotingWanMultiplierAt","Parameters.proposalCategoryCount","Parameters.getEthBalance","Parameters.getErc20Balance","Parameters.getProposalCountByRole","Parameters.getFoundations","Parameters.hasRole","Parameters.isFoundation","Parameters.getProposalId","Parameters.getProposalPartnerAndVoterCounts","Parameters.getProposalIdByRoleAt","Parameters.getProposalInfo","Parameters.getProposalPartnerInfo","Parameters.getProposalVoterInfo","Parameters.getProposalInfoAt","Parameters.getProposalIdByStateAt","Parameters.getUnstakeStatus","Parameters.stWan","Parameters.getCurrentRate"],"sources":["../src/util.ts","../src/types/index.ts","../src/abis/WanGovernor.ts","../src/parameters/getEthBalance.ts","../src/parameters/getErc20Balance.ts","../src/parameters/BURN.ts","../src/parameters/isFoundation.ts","../src/parameters/getFoundations.ts","../src/parameters/hasRole.ts","../src/parameters/proposalCategoryCount.ts","../src/parameters/getProposalId.ts","../src/parameters/getProposalInfoAt.ts","../src/parameters/getProposalInfo.ts","../src/parameters/getProposalIdByStateAt.ts","../src/parameters/getProposalCountByState.ts","../src/parameters/getProposalCountByRole.ts","../src/parameters/getProposalPartnerAndVoterCounts.ts","../src/parameters/getProposalPartnerInfo.ts","../src/parameters/getProposalIdByRoleAt.ts","../src/parameters/getAllProposalCount.ts","../src/parameters/totalProposalAmountInfo.ts","../src/parameters/proposalGlobalConfig.ts","../src/parameters/getProposalVoterInfo.ts","../src/parameters/getProposalMultiplierCounts.ts","../src/parameters/getProposalWanMultiplierAt.ts","../src/parameters/getVotingWanMultiplierAt.ts","../src/parameters/DENOMINATOR.ts","../src/parameters/MAX_REQUEST_WAN_RATIO_BPS_KEY.ts","../src/parameters/WAN_TOTAL_SUPPLY.ts","../src/parameters/PROPOSAL_CATEGORY_TECHNICAL_SUCCEED_THRESHOLD_KEY.ts","../src/parameters/getUint.ts","../src/parameters/stWan.ts","../src/parameters/getCurrentRate.ts","../src/parameters/getUnstakeStatus.ts","../src/governance.ts"],"sourcesContent":["import {\n encodeAbiParameters,\n decodeAbiParameters,\n type Hex\n} from 'viem';\n\n/**\n * Type definition for proposal description schema structure\n * @interface ProposalDescriptionSchema\n * @property {Array<{ type: string }>} types - ABI parameter types array\n * @property {string[]} names - Corresponding parameter names array (no undefined values)\n */\nexport interface ProposalDescriptionSchema {\n types: Array<{ type: 'uint8' | 'string' }>;\n names: string[]; // Explicitly enforce string array (no undefined)\n}\n\n/**\n * Type definition for decoded proposal description data\n * @type {Record<string, number | string>}\n * Key-value pairs of proposal description data (version/title/description etc.)\n */\nexport type ProposalDescriptionData = Record<string, number | string>;\n\n/**\n * Valid version types for proposal description schema\n * @type {1 | 2 | 3}\n */\nexport type ValidVersion = 1 | 2 | 3;\n\n/**\n * Supported proposal description data type schemas by version\n * @readonly\n * @type {Record<ValidVersion, ProposalDescriptionSchema>}\n * Schema definitions for different versions of proposal description data:\n * - Version 1: basic fields (version/title/description/email/telegram)\n * - Version 2: adds twitter field\n * - Version 3: adds discord field\n */\nexport const supportedProposalDescriptionDataTypeSchema: Record<ValidVersion, ProposalDescriptionSchema> = {\n 1: {\n types: [\n { type: 'uint8' }, // version\n { type: 'string' }, // title\n { type: 'string' }, // description\n { type: 'string' }, // email\n { type: 'string' }, // telegram\n ],\n names: ['version', 'title', 'description', 'email', 'telegram'],\n },\n 2: {\n types: [\n { type: 'uint8' }, // version\n { type: 'string' }, // title\n { type: 'string' }, // description\n { type: 'string' }, // email\n { type: 'string' }, // telegram\n { type: 'string' }, // twitter\n ],\n names: ['version', 'title', 'description', 'email', 'telegram', 'twitter'],\n },\n 3: {\n types: [\n { type: 'uint8' }, // version\n { type: 'string' }, // title\n { type: 'string' }, // description\n { type: 'string' }, // email\n { type: 'string' }, // telegram\n { type: 'string' }, // twitter\n { type: 'string' }, // discord\n ],\n names: ['version', 'title', 'description', 'email', 'telegram', 'twitter', 'discord'],\n }\n};\n\n/**\n * Type guard to check if a number is a valid version (1/2/3)\n * @function isValidVersion\n * @param {number} version - Number to check\n * @returns {version is ValidVersion} True if version is 1/2/3\n */\nfunction isValidVersion(version: number): version is ValidVersion {\n return version === 1 || version === 2 || version === 3;\n}\n\n/**\n * Type guard to check if a value is a non-empty string (valid for object indexing)\n * @function isValidIndexString\n * @param {unknown} value - Value to check\n * @returns {value is string} True if value is a non-empty string\n */\nfunction isValidIndexString(value: unknown): value is string {\n return typeof value === 'string' && value.trim() !== '';\n}\n\n/**\n * Encodes proposal description data to Hex format using viem's encodeAbiParameters\n * @function encodeProposalDescriptionData\n * @param {...(number | string)} args - Proposal description parameters (matches schema by version):\n * - First argument: version (uint8, 1/2/3)\n * - Subsequent arguments: title, description, email, telegram, [twitter], [discord]\n * @returns {Hex} Encoded Hex string of proposal description data\n * @throws {Error} If version is unsupported or argument count doesn't match schema\n * @example\n * // Encode version 2 proposal data\n * const encoded = encodeProposalDescriptionData(2, \"Test Proposal\", \"Test Description\", \"test@example.com\", \"@test\", \"@test_twitter\");\n * console.log(encoded); // Hex string\n */\nexport function encodeProposalDescriptionData(...args: (number | string)[]): Hex {\n const version = args[0] as number;\n \n if (!isValidVersion(version)) {\n throw new Error(\"Unsupported version - only versions 1, 2, 3 are supported\");\n }\n \n const typeSchema = supportedProposalDescriptionDataTypeSchema[version];\n \n if (args.length !== typeSchema.types.length) {\n throw new Error(`Invalid number of arguments for version ${version} - expected ${typeSchema.types.length}, got ${args.length}`);\n }\n \n const encoded = encodeAbiParameters(typeSchema.types, args);\n return encoded;\n}\n\n/**\n * Decodes Hex formatted proposal description data back to object format\n * @function decodeProposalDescriptionData\n * @param {Hex} hexData - Encoded Hex string of proposal description data\n * @returns {ProposalDescriptionData} Decoded proposal description object with named fields\n * @throws {Error} If version from hexData is unsupported or data is corrupted\n * @example\n * // Decode Hex data to proposal object\n * const decoded = decodeProposalDescriptionData(\"0x...\");\n * console.log(decoded.title); // \"Test Proposal\"\n */\nexport function decodeProposalDescriptionData(hexData: Hex): ProposalDescriptionData {\n const version = getVersionFromData(hexData);\n \n // Fix 2: Use type guard for version validation in decode function\n if (!isValidVersion(version)) {\n throw new Error(`Unsupported version ${version} - only versions 1, 2, 3 are supported`);\n }\n \n const typeSchema = supportedProposalDescriptionDataTypeSchema[version];\n const decoded = decodeAbiParameters(typeSchema.types, hexData);\n \n // Validate decoded array length matches schema (prevent index out of bounds)\n if (decoded.length !== typeSchema.names.length) {\n throw new Error(`Corrupted data: decoded values count (${decoded.length}) does not match schema (${typeSchema.names.length})`);\n }\n\n // Map decoded array to named object (type-safe)\n const result: ProposalDescriptionData = {};\n for (let i = 0; i < typeSchema.names.length; i++) {\n // Fix: Strict check to ensure index is a valid non-empty string\n const fieldName = typeSchema.names[i];\n const fieldValue = decoded[i];\n\n // Skip invalid fields (or throw error if you want strict validation)\n if (!isValidIndexString(fieldName)) {\n continue; // Or: throw new Error(`Invalid field name at index ${i}: ${fieldName}`);\n }\n\n // Only assign if value is defined (matches number/string type)\n if (fieldValue !== undefined && (typeof fieldValue === 'number' || typeof fieldValue === 'string')) {\n result[fieldName] = fieldValue;\n }\n }\n \n return result;\n}\n\n/**\n * Extracts version number from encoded Hex proposal data\n * @function getVersionFromData\n * @param {Hex} hexData - Encoded Hex string of proposal description data\n * @returns {ValidVersion | 0} Extracted valid version (1/2/3) or 0 if invalid\n * Reads the first 32-byte slot of Hex data to get uint8 version value\n * @example\n * const version = getVersionFromData(\"0x...\");\n * console.log(version); // 2\n */\nexport function getVersionFromData(hexData: Hex): ValidVersion | 0 {\n if (!hexData || typeof hexData !== 'string' || hexData.length < 66) return 0;\n\n const offset = hexData.startsWith('0x') ? 2 : 0;\n const versionPart = hexData.substring(offset, offset + 64);\n \n const version = parseInt(versionPart, 16);\n return isValidVersion(version) ? version : 0;\n}\n\n// // --- 测试用例 ---\n// var myVersion = 1;\n// var myTitle = \"DApp 开发者资助计划\";\n// var myEmail = \"dev@example.com\";\n// var myTg = \"@wanchain_dev\";\n// var myDesc = \"这是一个关于链下存储优化的详细提案描述。\";\n\n// // 编码过程\n// var hexResult = encodeProposalDescriptionData(myVersion, myTitle, myDesc, myEmail, myTg);\n// console.log(\"编码后的 Bytes (十六进制):\", hexResult);\n\n// // 解码过程\n// var originalObject = decodeProposalDescriptionData(hexResult);\n// console.log(\"解码后的原始数据:\", originalObject);\n\n\n// // --- 测试用例 2 ---\n// var myVersion = 2;\n// var myTitle = \"DApp 开发者资助计划\";\n// var myEmail = \"dev@example.com\";\n// var myTg = \"@wanchain_dev\";\n// var twitter = \"wanchain_dev\";\n// var myDesc = \"这是一个关于链下存储优化的详细提案描述。\";\n\n// // 编码过程\n// var hexResult = encodeProposalDescriptionData(myVersion, myTitle, myDesc, myEmail, myTg, twitter);\n// console.log(\"编码后的 Bytes (十六进制):\", hexResult);\n\n// // 解码过程\n// var originalObject = decodeProposalDescriptionData(hexResult);\n// console.log(\"解码后的原始数据:\", originalObject);","import type { Hex, Address } from 'viem';\n\n/**\n * @enum {number} UnstakeStatus\n * Define unstake status at different stages.\n */\n\nexport enum UnstakeStatus {\n NotExists = 0, // Request does not exist\n Claimed = 1, // Request has been claimed\n InProgress = 2, // Request is in progress\n ReadyToClaim = 3 // Request is ready to be claimed\n};\n/**\n * @enum {number} ProposalRole\n * Define the roles of proposal participants.\n */\nexport enum ProposalRole {\n Proposer = 0,\n Partner = 1,\n Voter = 2\n};\n/**\n * @enum {number} PledgeType\n * Define the type of pledged.\n */\nexport enum PledgeType {\n None = 0,\n Burn = 1,\n Lock = 2\n};\n/**\n * @enum {number} VoteType\n * Define the type of vote.\n */\nexport enum VoteType {\n None = 0,\n For = 1,\n Against = 2\n};\n/**\n * @enum {number} ProposalState\n * Define the different stages of a proposal.\n */\nexport enum ProposalState {\n None = 0,\n UnderReview = 1,\n Canceled = 2,\n Fundraising = 3,\n VotingInProgress = 4,\n Succeeded = 5,\n Rejected = 6,\n Failed = 7\n};\n/**\n * @enum {number} ProposalCategory\n * Define the category of proposal.\n */\nexport enum ProposalCategory {\n Funding = 0,\n Technical = 1\n};\n/**\n * Funding info.\n */\nexport interface FundInfo {\n /**\n * Amount of WAN.\n * @type {bigint}\n */\n wanAmount: bigint; // uint256\n /**\n * Amount of WAN power.\n * @type {bigint}\n */\n wanPower: bigint; // uint256\n /**\n * ID of proposal request withdrawal to be queried for proposer, partner or voter.\n * @type {bigint}\n */\n requestId: bigint; // uint256\n /**\n * The amount of StWan that can be withdrawn after staking WAN in the proposal for proposer, partner or voter.\n * @type {bigint}\n */\n claimStWanAmount: bigint; // uint256\n /**\n * The amount of WAN that can be received after claim StWan in the proposal for proposer, partner or voter.\n * @type {bigint}\n */\n claimWanAmount: bigint; // uint256\n /**\n * Lock duration of proposal be queried for proposer, partner or voter.\n * @type {bigint}\n */\n lockDuration: bigint; // uint128\n /**\n * PledgeType of proposal be queried for proposer, partner or voter.\n * @type {PledgeType}\n */\n pledgeType: PledgeType;\n /**\n * Reasons for participating in the proposal.\n * @type {Hex}\n */\n reason: Hex; // bytes\n /**\n * Indicator showing whether it has been claimed.\n * @type {boolean}\n */\n exited: boolean;\n};\n/**\n * Pproposal vote statistics.\n */\nexport interface Tally {\n /**\n * Amount of WAN power for yes.\n * @type {bigint}\n */\n yes: bigint;\n /**\n * Amount of WAN power for no.\n * @type {bigint}\n */\n no: bigint;\n};\n\n/**\n * ContractProposal: proposal info of Wanchain governance contract.\n */\nexport interface ContractProposal {\n /**\n * Amount of XP required when proposal creation.\n * @type {bigint}\n */\n requireXpAmount: bigint; // uint256\n /**\n * Amount of WAN request when proposal creation.\n * @type {bigint}\n */\n requestWanAmount: bigint; // uint256\n /**\n * Minimum amount of WAN power to win proposal vote.\n * @type {bigint}\n */\n requestMinVotingWanPower: bigint; // uint256\n /**\n * Amount of WAN that proposal total pledged for proposer and partner.\n * @type {bigint}\n */\n\n totalPledgingWanAmount: bigint; // uint256\n /**\n * Amount of WAN power that proposal total pledged.\n * @type {bigint}\n */\n totalPledgingWanPower: bigint; // uint256\n /**\n * Amount of WAN voted.\n * @type {bigint}\n */\n\n totalVotingWanAmount: bigint; // uint256\n /**\n * Amount of WAN power voted.\n * @type {bigint}\n */\n totalVotingWanPower: bigint; // uint256\n /**\n * Amount of locked WAN voted.\n * @type {bigint}\n */\n\n totalVotingLockWanAmount: bigint; // uint256\n /**\n * Amount of locked WAN voted.\n * @type {bigint}\n */\n totalVotingLockWanPower: bigint; // uint256\n /**\n * Amount of burned WAN voted.\n * @type {bigint}\n */\n totalVotingBurnWanAmount: bigint; // uint256\n /**\n * Amount of burned WAN power voted.\n * @type {bigint}\n */\n totalVotingBurnWanPower: bigint; // uint256\n /**\n * The total amount of T involved in the proposal.\n * @type {bigint}\n */\n\n totalWanAmount: bigint; // uint256\n /**\n * The amount of WAN's that have passed review in the proposal.\n * @type {bigint}\n */\n totalLockingWanAmount: bigint; // uint256\n /**\n * The amount of WAN's that have burned in the proposal.\n * @type {bigint}\n */\n totalBurnedWanAmount: bigint; // uint256\n /**\n * The total amount of StWan received after staking WAN in the proposal.\n * @type {bigint}\n */\n totalStWanAmount: bigint; // uint256\n /**\n * The amount of StWan that can be withdrawn after staking WAN in the proposal.\n * @type {bigint}\n */\n\n totalClaimStWanAmount: bigint; // uint256\n /**\n * Timestamp of proposal creation.\n * @type {bigint}\n */\n\n submitTimestamp: bigint; // uint256\n /**\n * Fundraising deadline for prospective proposal.\n * @type {bigint}\n */\n fundraisingDeadline: bigint; // uint256\n /**\n * Vote deadline for active(voting) proposal.\n * @type {bigint}\n */\n voteDeadline: bigint; // uint256\n /**\n * Current proposal vote statistics.\n * @type {bigint}\n */\n\n tally: Tally;\n /**\n * Funding info of proposer.\n * @type {Hex}\n */\n\n proposerFundInfo: FundInfo;\n /**\n * Category of proposal.\n * @type {Hex}\n */\n category: ProposalCategory;\n /**\n * State of proposal.\n * @type {Hex}\n */\n\n state: ProposalState;\n /**\n * Proposer of proposal.\n * @type {Hex}\n */\n proposer: Address;\n /**\n * Description of proposal creation.\n * @type {Hex}\n */\n\n description: Hex; // bytes\n /**\n * Reasons to cancel or review proposal.\n * @type {Hex}\n */\n reason: Hex; // bytes\n};\n\n/**\n * ProposalInfo: proposal info extends contract proposal(ContractProposal)\n */\nexport interface ProposalInfo extends ContractProposal {\n /**\n * ID of proposal, should be bytes32.\n * @type {Hex}\n */\n proposalId: Hex,\n};\n\n/**\n * PartnerInfo: partner info in proposal\n */\nexport interface PartnerInfo {\n /**\n * Fund info for partner.\n * @type {FundInfo}\n */\n fundInfo: FundInfo;\n}\n/**\n * VoterInfo: voter info in proposal\n */\nexport interface VoterInfo {\n /**\n * Fund info for voter.\n * @type {FundInfo}\n */\n fundInfo: FundInfo;\n /**\n * Vote type for voter.\n * @type {VoteType}\n */\n voteType: VoteType;\n}\n\n/**\n * IndexRange: Index range: [start, index]\n */\nexport interface IndexRange {\n /**\n * Start index.\n * @type {number}\n */\n start: number;\n /**\n * End index.\n * @type {number}\n */\n end: number;\n}\n/**\n * PlegeMultiplierReturn: Return type for getProposalMultipliers.\n */\n\nexport interface PlegeMultiplierReturn {\n /**\n * PledgeType of proposal be queried for proposer, partner or voter.\n * @type {PledgeType}\n */\n pledgeType: PledgeType;\n /**\n * Lock duration of proposal be queried for proposer, partner or voter.\n * @type {bigint}\n */\n lockDuration: bigint;\n /**\n * Multiplier of proposal be queried for proposer, partner or voter.\n * @type {bigint}\n */\n multiplier: bigint;\n}\n\n/**\n * CanRequestProposalWithdrawalParam: Input parameter type for canRequestProposalWithdrawal, same as CanClaimProposalWithdrawalParam.\n */\nexport interface CanRequestProposalWithdrawalParam {\n /**\n * State of proposal to be queried.\n * @type {ProposalState}\n */\n state: ProposalState;\n /**\n * PledgeType of proposal to be queried.\n * @type {PledgeType}\n */\n pledgeType: PledgeType;\n /**\n * Lock duration of proposal be queried for proposer, partner or voter.\n * @type {bigint}\n */\n lockDuration: bigint;\n /**\n * Vote deadlint for proposal to be queried.\n * @type {bigint}\n */\n voteDeadline: bigint;\n /**\n * ID of proposal request withdrawal to be queried for proposer, partner or voter.\n * @type {bigint}\n */\n requestId: bigint;\n /**\n * Check if already claimed of proposal to be queried for proposer, partner or voter.\n * @type {boolean}\n */\n exited: boolean;\n}\n\n/**\n * CanClaimProposalWithdrawalParam: Input parameter type for canClaimProposalWithdrawal, same as CanRequestProposalWithdrawalParam.\n */\nexport type CanClaimProposalWithdrawalParam = CanRequestProposalWithdrawalParam;\n\n/**\n * CanRequestProposalWithdrawalRetrunItem: Return array item for canRequestProposalWithdrawal\n */\nexport interface CanRequestProposalWithdrawalRetrunItem {\n /**\n * Check if need to request withdrawal for proposer, partner or voter.\n * @type {boolean}\n */\n needRequestWithdrawal: boolean;\n /**\n * Check if can request withdrawal for proposer, partner or voter.\n * @type {boolean}\n */\n canRequestWithdrawal: boolean;\n}\n\n/**\n * Type definition of return type for getBaseParameters.\n * @interface BaseParametersReturnType\n * @property {bigint} allProposalWanAmount - All reviewed proposal WAN amounts.\n * @property {bigint} allProposalLockingWanAmount - All amount of WAN that locking into POS.\n * @property {bigint} allProposalBurnedWanAmount - All burned WAN amounts.\n * @property {bigint} ethTransferGasLimit - WAN transfer gaslimit.\n * @property {bigint} minParticipationAmount - Minimum amount of WANs a participant can participate in for funding proposal.\n * @property {bigint} requestWanMultiplier - Multiplier to request WANs from Wanchain Treasury.\n * @property {bigint} succeedThreshold - Threshold to succeed proposal.\n * @property {bigint} requireXpAmount - Proposal creation require amount of XP.\n * @property {bigint} pledgeLockDuration - Proposer or partner pledge WAN by locking duration.\n * @property {bigint} fundraisingDuration - Duration for partners to pledge their WAN to help a Prospective Proposal meet the pledge requirements.\n * @property {bigint} voteDuration - Duration for voters to vote active proposal.\n * @property {Address} xp - Address of XP token.\n * @property {Address} stakingManager - Address for StakingManager.\n * @property {Address} wanTreasury - Address for Wanchain community treasury.\n * @property {Address} burnAddr - Address for WAN burned.\n * @property {bigint} proposalCount - Count for total proposal: include reviewing proposals, canceled proposals, prospective proposals, active proposals, succeeded proposals and failed proposals.\n * @property {bigint} reviewPendingProposalCount - Count for reviewing proposals.\n * @property {bigint} prospectiveProposalCount - Count for prospective proposals.\n * @property {bigint} votingProposalCount - Count for active(voting) proposals.\n * @property {bigint} succeededProposalCount - Count for succeeded proposals.\n * @property {bigint} rejectedProposalCount - Count for rejected proposals.\n * @property {bigint} failedProposalCount - Count for failed proposals.\n * @property {bigint} canceledProposalCount - Count for canceled proposals.\n * @property {bigint} proposalWanMultiplierCount - Count of multipliers for proposer and partner .\n * @property {bigint} votingWanMultiplierCount - Count of multipliers for voter.\n * @property {bigint} DENOMINATOR - DENOMINATOR.\n * @property {Hex} MAX_REQUEST_WAN_RATIO_BPS_KEY - The key for the maximum request WAN ratio in basis points.\n * @property {Hex} WAN_TOTAL_SUPPLY - The total supply of WAN.\n * @property {Hex} PROPOSAL_CATEGORY_TECHNICAL_SUCCEED_THRESHOLD_KEY - The key for technical proposal succeed threshold by WAN total supply.\n */\nexport interface BaseParametersReturnType {\n allProposalWanAmount: bigint;\n allProposalLockingWanAmount: bigint;\n allProposalBurnedWanAmount: bigint;\n\n ethTransferGasLimit: bigint;\n minParticipationAmount: bigint;\n requestWanMultiplier: bigint;\n succeedThreshold: bigint;\n requireXpAmount: bigint;\n pledgeLockDuration: bigint;\n fundraisingDuration: bigint;\n voteDuration: bigint;\n\n xp: Address;\n stakingManager: Address;\n wanTreasury: Address;\n burnAddr: Address;\n\n proposalCount: bigint;\n reviewPendingProposalCount: bigint;\n prospectiveProposalCount: bigint;\n votingProposalCount: bigint;\n succeededProposalCount: bigint;\n rejectedProposalCount: bigint;\n failedProposalCount: bigint;\n canceledProposalCount: bigint;\n\n proposalWanMultiplierCount: bigint;\n votingWanMultiplierCount: bigint;\n\n DENOMINATOR: bigint;\n MAX_REQUEST_WAN_RATIO_BPS_KEY: Hex;\n WAN_TOTAL_SUPPLY: bigint;\n PROPOSAL_CATEGORY_TECHNICAL_SUCCEED_THRESHOLD_KEY: Hex;\n}\n\nexport type GetProposalInfoAtResult = readonly [Hex, ContractProposal];\n\n/**\n * RecentProposalsParam: Recent proposals parameter\n */\nexport interface RecentProposalsParam {\n /**\n * The start index to query recent proposals, it is the recent index\n * @type {number}\n */\n start: number;\n /**\n * The max count of proposals\n * @type {number}\n */\n limit: number;\n}\n/**\n * GetRecentProposalsResult: Return recent reviewed proposals: state shoud be in [Fundraising, VotingInProgress, Succeeded, Failed]\n */\nexport interface GetRecentProposalsResult {\n /**\n * The proposal array obtained this time is sorted by index from large to small (that is, the latest first)\n * @type {ProposalInfo[]}\n */\n proposals: ProposalInfo[];\n /**\n * The starting index of the next request\n * @type {number}\n */\n nextIndex: number;\n}\n","export const ABI = [\n {\n \"type\": \"constructor\",\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"receive\",\n \"stateMutability\": \"payable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"BURN\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"DENOMINATOR\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_REQUEST_WAN_RATIO_BPS_KEY\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"PROPOSAL_CATEGORY_TECHNICAL_SUCCEED_THRESHOLD_KEY\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"WAN_GOVERNOR_OPERATOR_ROLE\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"WAN_TOTAL_SUPPLY\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"cancelProposal\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"_reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"claimPartnerWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"_requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"claimProposerWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"_requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"claimVoterWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"_requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"contributeProposal\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"_pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"_reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"payable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"createProposal\",\n \"inputs\": [\n {\n \"name\": \"_reqWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"_category\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalCategory\"\n },\n {\n \"name\": \"_pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"_description\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"payable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getAllProposalCount\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"count\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getFoundations\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address[]\",\n \"internalType\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalCountByRole\",\n \"inputs\": [\n {\n \"name\": \"_role\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalRole\"\n },\n {\n \"name\": \"_account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"count\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalCountByState\",\n \"inputs\": [\n {\n \"name\": \"_state\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"count\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalId\",\n \"inputs\": [\n {\n \"name\": \"_reqWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"_proposer\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"_category\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalCategory\"\n },\n {\n \"name\": \"_pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"_description\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalIdByRoleAt\",\n \"inputs\": [\n {\n \"name\": \"_role\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalRole\"\n },\n {\n \"name\": \"_account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"_index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalIdByStateAt\",\n \"inputs\": [\n {\n \"name\": \"_state\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n },\n {\n \"name\": \"_index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalInfo\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"info\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.ProposalInfo\",\n \"components\": [\n {\n \"name\": \"requireXpAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestMinVotingWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalPledgingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalPledgingWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingLockWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingLockWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingBurnWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingBurnWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalLockingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalBurnedWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalClaimStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"submitTimestamp\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"fundraisingDeadline\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"voteDeadline\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"tally\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.Tally\",\n \"components\": [\n {\n \"name\": \"yes\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"no\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"name\": \"proposerFundInfo\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.FundInfo\",\n \"components\": [\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"exited\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n },\n {\n \"name\": \"category\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalCategory\"\n },\n {\n \"name\": \"state\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n },\n {\n \"name\": \"proposer\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"description\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalInfoAt\",\n \"inputs\": [\n {\n \"name\": \"_index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"info\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.ProposalInfo\",\n \"components\": [\n {\n \"name\": \"requireXpAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestMinVotingWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalPledgingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalPledgingWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingLockWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingLockWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingBurnWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingBurnWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalLockingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalBurnedWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalClaimStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"submitTimestamp\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"fundraisingDeadline\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"voteDeadline\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"tally\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.Tally\",\n \"components\": [\n {\n \"name\": \"yes\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"no\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"name\": \"proposerFundInfo\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.FundInfo\",\n \"components\": [\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"exited\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n },\n {\n \"name\": \"category\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalCategory\"\n },\n {\n \"name\": \"state\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n },\n {\n \"name\": \"proposer\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"description\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalMultiplierCounts\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"proposalWanMultiplierCount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"votingWanMultiplierCount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalPartnerAndVoterCounts\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"partnerCount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"voterCount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalPartnerAt\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"_index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalPartnerInfo\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"_partner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"partnerInfo\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.PartnerInfo\",\n \"components\": [\n {\n \"name\": \"fundInfo\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.FundInfo\",\n \"components\": [\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"exited\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalState\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"state\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalVoterAt\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"_index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalVoterInfo\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"_voter\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"voterInfo\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.VoterInfo\",\n \"components\": [\n {\n \"name\": \"fundInfo\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.FundInfo\",\n \"components\": [\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"exited\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n },\n {\n \"name\": \"voteType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.VoteType\"\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalWanMultiplier\",\n \"inputs\": [\n {\n \"name\": \"_pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"_lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"multiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalWanMultiplierAt\",\n \"inputs\": [\n {\n \"name\": \"_index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"multiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getRoleAdmin\",\n \"inputs\": [\n {\n \"name\": \"role\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getUint\",\n \"inputs\": [\n {\n \"name\": \"key\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getVotingWanMultiplier\",\n \"inputs\": [\n {\n \"name\": \"_pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"_lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"multiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getVotingWanMultiplierAt\",\n \"inputs\": [\n {\n \"name\": \"_index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"multiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getWanPower\",\n \"inputs\": [\n {\n \"name\": \"multiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"wanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"grantRole\",\n \"inputs\": [\n {\n \"name\": \"role\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"hasProposalExists\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"state\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"hasRole\",\n \"inputs\": [\n {\n \"name\": \"role\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"initialize\",\n \"inputs\": [\n {\n \"name\": \"_admin\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"_operator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"_ultimateUniversalStore\",\n \"type\": \"address\",\n \"internalType\": \"contract IUltimateUniversalStore\"\n },\n {\n \"name\": \"_proposalGlobalConfig\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.ProposalGlobalConfig\",\n \"components\": [\n {\n \"name\": \"ethTransferGasLimit\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"minParticipationAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestWanMultiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"succeedThreshold\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requireXpAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"pledgeLockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"fundraisingDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"voteDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"xp\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"stakingManager\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"wanTreasury\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"isFoundation\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"isFoundationMember\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"proposalCategoryCount\",\n \"inputs\": [\n {\n \"name\": \"state\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n },\n {\n \"name\": \"category\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalCategory\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"count\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"proposalGlobalConfig\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"ethTransferGasLimit\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"minParticipationAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestWanMultiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"succeedThreshold\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requireXpAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"pledgeLockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"fundraisingDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"voteDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"xp\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"stakingManager\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"wanTreasury\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"renounceRole\",\n \"inputs\": [\n {\n \"name\": \"role\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"callerConfirmation\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"requestPartnerWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"partnerRequestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"requestProposerWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"proposerRequestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"requestVoterWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"voterRequestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"reviewProposal\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"isApproved\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"_reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"revokeRole\",\n \"inputs\": [\n {\n \"name\": \"role\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"setFoundations\",\n \"inputs\": [\n {\n \"name\": \"params\",\n \"type\": \"tuple[]\",\n \"internalType\": \"struct IWanGovernor.SetFoundationParam[]\",\n \"components\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"isFoundationMember\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ]\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"setProposalWanMultiplier\",\n \"inputs\": [\n {\n \"name\": \"params\",\n \"type\": \"tuple[]\",\n \"internalType\": \"struct IWanGovernor.SetWanMultiplier[]\",\n \"components\": [\n {\n \"name\": \"multiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n }\n ]\n },\n {\n \"name\": \"ifClean\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"setUint\",\n \"inputs\": [\n {\n \"name\": \"key\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"value\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"setVotingWanMultiplier\",\n \"inputs\": [\n {\n \"name\": \"params\",\n \"type\": \"tuple[]\",\n \"internalType\": \"struct IWanGovernor.SetWanMultiplier[]\",\n \"components\": [\n {\n \"name\": \"multiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n }\n ]\n },\n {\n \"name\": \"ifClean\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"supportsInterface\",\n \"inputs\": [\n {\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\",\n \"internalType\": \"bytes4\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"tallyProposal\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"totalProposalAmountInfo\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"allProposalWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"allProposalLockingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"allProposalBurnedWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"updateProposalGlobalConfig\",\n \"inputs\": [\n {\n \"name\": \"_proposalGlobalConfig\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.ProposalGlobalConfig\",\n \"components\": [\n {\n \"name\": \"ethTransferGasLimit\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"minParticipationAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestWanMultiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"succeedThreshold\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requireXpAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"pledgeLockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"fundraisingDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"voteDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"xp\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"stakingManager\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"wanTreasury\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"voteProposal\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"_lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"votePledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"_voteType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.VoteType\"\n },\n {\n \"name\": \"_reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"payable\"\n },\n {\n \"type\": \"event\",\n \"name\": \"CancelProposal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"proposer\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"keys\",\n \"type\": \"string[]\",\n \"indexed\": false,\n \"internalType\": \"string[]\"\n },\n {\n \"name\": \"values\",\n \"type\": \"bytes[]\",\n \"indexed\": false,\n \"internalType\": \"bytes[]\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"ClaimWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"proposalRole\",\n \"type\": \"uint8\",\n \"indexed\": true,\n \"internalType\": \"enum IWanGovernor.ProposalRole\"\n },\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"ClaimPartnerWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"ClaimProposerWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"ClaimVoterWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"ContributeProposal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"partner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"state\",\n \"type\": \"uint8\",\n \"indexed\": true,\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n },\n {\n \"name\": \"keys\",\n \"type\": \"string[]\",\n \"indexed\": false,\n \"internalType\": \"string[]\"\n },\n {\n \"name\": \"values\",\n \"type\": \"bytes[]\",\n \"indexed\": false,\n \"internalType\": \"bytes[]\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"CreateProposal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"proposer\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"state\",\n \"type\": \"uint8\",\n \"indexed\": true,\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n },\n {\n \"name\": \"keys\",\n \"type\": \"string[]\",\n \"indexed\": false,\n \"internalType\": \"string[]\"\n },\n {\n \"name\": \"values\",\n \"type\": \"bytes[]\",\n \"indexed\": false,\n \"internalType\": \"bytes[]\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"Initialized\",\n \"inputs\": [\n {\n \"name\": \"version\",\n \"type\": \"uint64\",\n \"indexed\": false,\n \"internalType\": \"uint64\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"RequestWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"proposalRole\",\n \"type\": \"uint8\",\n \"indexed\": true,\n \"internalType\": \"enum IWanGovernor.ProposalRole\"\n },\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"stWanAmount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"RequestPartnerWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"stWanAmount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"RequestProposerWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"stWanAmount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"RequestVoterWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"stWanAmount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"ReviewProposal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"isApproved\",\n \"type\": \"bool\",\n \"indexed\": true,\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"state\",\n \"type\": \"uint8\",\n \"indexed\": true,\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"indexed\": false,\n \"internalType\": \"bytes\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"RoleAdminChanged\",\n \"inputs\": [\n {\n \"name\": \"role\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"RoleGranted\",\n \"inputs\": [\n {\n \"name\": \"role\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"sender\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"RoleRevoked\",\n \"inputs\": [\n {\n \"name\": \"role\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"sender\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"SetFoundation\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"isFoundationMember\",\n \"type\": \"bool\",\n \"indexed\": true,\n \"internalType\": \"bool\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"SetProposalFailed\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"indexed\": false,\n \"internalType\": \"bytes\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"SetProposalStage\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"_state\",\n \"type\": \"uint8\",\n \"indexed\": true,\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n },\n {\n \"name\": \"_category\",\n \"type\": \"uint8\",\n \"indexed\": true,\n \"internalType\": \"enum IWanGovernor.ProposalCategory\"\n },\n {\n \"name\": \"ifSet\",\n \"type\": \"bool\",\n \"indexed\": false,\n \"internalType\": \"bool\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"SetProposalStage\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"ifSet\",\n \"type\": \"bool\",\n \"indexed\": true,\n \"internalType\": \"bool\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"SetProposalWanMultiplier\",\n \"inputs\": [\n {\n \"name\": \"multiplier\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"indexed\": true,\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"indexed\": true,\n \"internalType\": \"uint128\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"SetVotingWanMultiplier\",\n \"inputs\": [\n {\n \"name\": \"multiplier\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"indexed\": true,\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"indexed\": true,\n \"internalType\": \"uint128\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"TallyProposal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"stWanAmount\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"UpdateProposalGlobalConfig\",\n \"inputs\": [\n {\n \"name\": \"proposalGlobalConfig\",\n \"type\": \"tuple\",\n \"indexed\": false,\n \"internalType\": \"struct IWanGovernor.ProposalGlobalConfig\",\n \"components\": [\n {\n \"name\": \"ethTransferGasLimit\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"minParticipationAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestWanMultiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"succeedThreshold\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requireXpAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"pledgeLockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"fundraisingDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"voteDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"xp\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"stakingManager\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"wanTreasury\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"VoteProposal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"voter\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"voteType\",\n \"type\": \"uint8\",\n \"indexed\": true,\n \"internalType\": \"enum IWanGovernor.VoteType\"\n },\n {\n \"name\": \"keys\",\n \"type\": \"string[]\",\n \"indexed\": false,\n \"internalType\": \"string[]\"\n },\n {\n \"name\": \"values\",\n \"type\": \"bytes[]\",\n \"indexed\": false,\n \"internalType\": \"bytes[]\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"error\",\n \"name\": \"AccessControlBadConfirmation\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"AccessControlUnauthorizedAccount\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"neededRole\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"AlreadyContributeProposal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"partner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"AmountBelowMinimum\",\n \"inputs\": [\n {\n \"name\": \"provided\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"required\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ApplicationExceedsLimit\",\n \"inputs\": [\n {\n \"name\": \"requested\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"limit\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"EthTransferFailed\",\n \"inputs\": [\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"value\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"gasLimit\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidInitialization\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidPledgeType\",\n \"inputs\": [\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidVotePlegeType\",\n \"inputs\": [\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidVoteType\",\n \"inputs\": [\n {\n \"name\": \"voteType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.VoteType\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"LockPeriodNotReached\",\n \"inputs\": [\n {\n \"name\": \"unlockTime\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotAdmin\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotExistsRequestId\",\n \"inputs\": [\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotInitializing\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NotMatchArrayLength\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NotRequestProposal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotSupportedPledgeType\",\n \"inputs\": [\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotSupportedVotePledgeType\",\n \"inputs\": [\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProposalAlreadyVoted\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"voter\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProposalAlreadyExists\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProposalNotApproved\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProposalNotExist\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProposalNotFundraising\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProposalNotReachedTallyStage\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProposalNotUnderReview\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProposalNotVotingInProgress\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProposalVotingEnded\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProposalVotingTallied\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProspectiveProposalNotExist\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ReentrancyGuardReentrantCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"ReviewPendingProposalNotExist\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"SafeCastOverflowedUintDowncast\",\n \"inputs\": [\n {\n \"name\": \"bits\",\n \"type\": \"uint8\",\n \"internalType\": \"uint8\"\n },\n {\n \"name\": \"value\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"SafeERC20FailedOperation\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"Unauthorized\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"proposer\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"UnauthorizedEtherTransfer\",\n \"inputs\": [\n {\n \"name\": \"from\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"VotingProposalNotExist\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"VotingProposalRejected\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"WithdrawalNotRequested\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ZeroAddress\",\n \"inputs\": []\n }\n] as const;","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n type: 'function',\n name: 'getEthBalance',\n inputs: [{ \"name\": \"addr\", \"type\": \"address\", \"internalType\": \"address\" }],\n outputs: [{ name: 'balance', type: 'uint256', internalType: 'uint256' }],\n stateMutability: 'view'\n }\n] as const;\n\n\nexport function getEthBalance(multicall3Addr: Address, owner: Address) {\n const call = {\n address: multicall3Addr,\n abi,\n functionName: 'getEthBalance',\n args: [ owner ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getEthBalance.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n name: 'balanceOf',\n type: 'function',\n inputs: [{ name: 'owner', type: 'address' }],\n outputs: [{ name: 'balance', type: 'uint256' }],\n stateMutability: 'view'\n }\n] as const;\n\n\nexport function getErc20Balance(erc20Addr: Address, owner: Address) {\n const call = {\n address: erc20Addr,\n abi,\n functionName: 'balanceOf',\n args: [ owner ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getErc20Balance.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"BURN\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function BURN(governanceAddr: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'BURN',\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/BURN.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"isFoundation\",\n \"inputs\": [\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"isFoundationMember\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function isFoundation(governanceAddr: Address, account: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'isFoundation',\n args: [ account ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/isFoundation.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getFoundations\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address[]\",\n \"internalType\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getFoundations(governanceAddr: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getFoundations',\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getFoundations.ts","import type { Address, Hex } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"hasRole\",\n \"inputs\": [\n {\n \"name\": \"role\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function hasRole(governanceAddr: Address, account: Address, role: Hex) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'hasRole',\n args: [ role, account ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/hasRole.ts","import type { Address } from 'viem';\nimport { ProposalState, ProposalCategory } from '../types';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"proposalCategoryCount\",\n \"inputs\": [\n {\n \"name\": \"state\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n },\n {\n \"name\": \"category\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalCategory\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"count\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function proposalCategoryCount(governanceAddr: Address, state: ProposalState, category: ProposalCategory) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'proposalCategoryCount',\n args: [state, category]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/proposalCategoryCount.ts","import type { Address, Hex } from 'viem';\nimport type { ProposalCategory, PledgeType } from '../types';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getProposalId\",\n \"inputs\": [\n {\n \"name\": \"_reqWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"_proposer\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"_category\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalCategory\"\n },\n {\n \"name\": \"_pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"_description\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getProposalId(governanceAddr: Address, reqWanAmount: bigint, proposer: Address, category: ProposalCategory, pledgeType: PledgeType, description: Hex) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getProposalId',\n args: [ reqWanAmount, proposer, category, pledgeType, description ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getProposalId.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getProposalInfoAt\",\n \"inputs\": [\n {\n \"name\": \"_index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"info\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.ProposalInfo\",\n \"components\": [\n {\n \"name\": \"requireXpAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestMinVotingWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalPledgingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalPledgingWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingLockWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingLockWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingBurnWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingBurnWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalLockingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalBurnedWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalClaimStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"submitTimestamp\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"fundraisingDeadline\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"voteDeadline\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"tally\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.Tally\",\n \"components\": [\n {\n \"name\": \"yes\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"no\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"name\": \"proposerFundInfo\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.FundInfo\",\n \"components\": [\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"exited\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n },\n {\n \"name\": \"category\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalCategory\"\n },\n {\n \"name\": \"state\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n },\n {\n \"name\": \"proposer\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"description\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getProposalInfoAt(governanceAddr: Address, index: number) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getProposalInfoAt',\n args: [ index ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getProposalInfoAt.ts","import type { Address, Hex } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getProposalInfo\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"info\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.ProposalInfo\",\n \"components\": [\n {\n \"name\": \"requireXpAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestMinVotingWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalPledgingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalPledgingWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingLockWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingLockWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingBurnWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingBurnWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalLockingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalBurnedWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalClaimStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"submitTimestamp\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"fundraisingDeadline\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"voteDeadline\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"tally\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.Tally\",\n \"components\": [\n {\n \"name\": \"yes\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"no\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"name\": \"proposerFundInfo\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.FundInfo\",\n \"components\": [\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"exited\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n },\n {\n \"name\": \"category\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalCategory\"\n },\n {\n \"name\": \"state\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n },\n {\n \"name\": \"proposer\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"description\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getProposalInfo(governanceAddr: Address, proposalId: Hex) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getProposalInfo',\n args: [ proposalId ],\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getProposalInfo.ts","import type { Address } from 'viem';\nimport type { ProposalState } from '../types';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getProposalIdByStateAt\",\n \"inputs\": [\n {\n \"name\": \"_state\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n },\n {\n \"name\": \"_index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getProposalIdByStateAt(governanceAddr: Address, state: ProposalState, index: number) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getProposalIdByStateAt',\n args: [ state, index ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getProposalIdByStateAt.ts","import type { Address } from 'viem';\nimport type { ProposalState } from '../types';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getProposalCountByState\",\n \"inputs\": [\n {\n \"name\": \"_state\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"count\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getProposalCountByState(governanceAddr: Address, state: ProposalState) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getProposalCountByState',\n args: [ state ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getProposalCountByState.ts","import type { Address } from 'viem';\nimport type { ProposalRole } from '../types';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getProposalCountByRole\",\n \"inputs\": [\n {\n \"name\": \"_role\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalRole\"\n },\n {\n \"name\": \"_account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"count\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getProposalCountByRole(governanceAddr: Address, role: ProposalRole, account: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getProposalCountByRole',\n args: [ role, account ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getProposalCountByRole.ts","import type { Address, Hex } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getProposalPartnerAndVoterCounts\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"partnerCount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"voterCount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getProposalPartnerAndVoterCounts(governanceAddr: Address, proposalId: Hex) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getProposalPartnerAndVoterCounts',\n args: [ proposalId ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getProposalPartnerAndVoterCounts.ts","import type { Address, Hex } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getProposalPartnerInfo\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"_partner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"partnerInfo\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.PartnerInfo\",\n \"components\": [\n {\n \"name\": \"fundInfo\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.FundInfo\",\n \"components\": [\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"exited\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getProposalPartnerInfo(governanceAddr: Address, proposalId: Hex, partnerAddr: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getProposalPartnerInfo',\n args: [ proposalId, partnerAddr ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getProposalPartnerInfo.ts","import type { Address } from 'viem';\nimport type { ProposalRole } from '../types';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getProposalIdByRoleAt\",\n \"inputs\": [\n {\n \"name\": \"_role\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalRole\"\n },\n {\n \"name\": \"_account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"_index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getProposalIdByRoleAt(governanceAddr: Address, role: ProposalRole, account: Address, index: number) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getProposalIdByRoleAt',\n args: [role, account, index]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getProposalIdByRoleAt.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getAllProposalCount\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"count\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getAllProposalCount(governanceAddr: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getAllProposalCount',\n args: []\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getAllProposalCount.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"totalProposalAmountInfo\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"allProposalWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"allProposalLockingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"allProposalBurnedWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function totalProposalAmountInfo(governanceAddr: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'totalProposalAmountInfo',\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/totalProposalAmountInfo.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"proposalGlobalConfig\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"ethTransferGasLimit\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"minParticipationAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestWanMultiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"succeedThreshold\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requireXpAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"pledgeLockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"fundraisingDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"voteDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"xp\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"stakingManager\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"wanTreasury\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function proposalGlobalConfig(governanceAddr: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'proposalGlobalConfig',\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/proposalGlobalConfig.ts","import type { Address, Hex } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getProposalVoterInfo\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"_voter\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"voterInfo\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.VoterInfo\",\n \"components\": [\n {\n \"name\": \"fundInfo\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.FundInfo\",\n \"components\": [\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"exited\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n },\n {\n \"name\": \"voteType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.VoteType\"\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getProposalVoterInfo(governanceAddr: Address, proposalId: Hex, voterAddr: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getProposalVoterInfo',\n args: [proposalId, voterAddr]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getProposalVoterInfo.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getProposalMultiplierCounts\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"proposalWanMultiplierCount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"votingWanMultiplierCount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getProposalMultiplierCounts(governanceAddr: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getProposalMultiplierCounts',\n args: []\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/proposalWanMultiplierCount.ts","import type { Address, ContractFunctionParameters } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getProposalWanMultiplierAt\",\n \"inputs\": [\n {\n \"name\": \"_index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"multiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getProposalWanMultiplierAt(governanceAddr: Address, index: number): ContractFunctionParameters {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getProposalWanMultiplierAt',\n args: [ index ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getProposalWanMultiplierAt.ts","import type { Address, ContractFunctionParameters } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getVotingWanMultiplierAt\",\n \"inputs\": [\n {\n \"name\": \"_index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"multiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getVotingWanMultiplierAt(governanceAddr: Address, index: number): ContractFunctionParameters {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getVotingWanMultiplierAt',\n args: [ index ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getVotingWanMultiplierAt.ts","import type { Address, Hex } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"DENOMINATOR\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function DENOMINATOR(governanceAddr: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'DENOMINATOR',\n args: []\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/DENOMINATOR.ts","import type { Address, Hex } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"MAX_REQUEST_WAN_RATIO_BPS_KEY\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function MAX_REQUEST_WAN_RATIO_BPS_KEY(governanceAddr: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'MAX_REQUEST_WAN_RATIO_BPS_KEY',\n args: []\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/MAX_REQUEST_WAN_RATIO_BPS_KEY.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"WAN_TOTAL_SUPPLY\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function WAN_TOTAL_SUPPLY(governanceAddr: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'WAN_TOTAL_SUPPLY',\n args: []\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/WAN_TOTAL_SUPPLY.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"PROPOSAL_CATEGORY_TECHNICAL_SUCCEED_THRESHOLD_KEY\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function PROPOSAL_CATEGORY_TECHNICAL_SUCCEED_THRESHOLD_KEY(governanceAddr: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'PROPOSAL_CATEGORY_TECHNICAL_SUCCEED_THRESHOLD_KEY',\n args: []\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/PROPOSAL_CATEGORY_TECHNICAL_SUCCEED_THRESHOLD_KEY.ts","import type { Address, Hex } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getUint\",\n \"inputs\": [\n {\n \"name\": \"key\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getUint(governanceAddr: Address, key: Hex) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getUint',\n args: [ key ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getUint.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"stWan\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function stWan(stakingManagerAddr: Address) {\n const call = {\n address: stakingManagerAddr,\n abi,\n functionName: 'stWan',\n args: []\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/stWan.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getCurrentRate\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getCurrentRate(stWanAddr: Address) {\n const call = {\n address: stWanAddr,\n abi,\n functionName: 'getCurrentRate',\n args: []\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getCurrentRate.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getUnstakeStatus\",\n \"inputs\": [\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"unstakeStatus\",\n \"type\": \"uint8\",\n \"internalType\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getUnstakeStatus(stakingManagerAddr: Address, requestId: bigint) {\n const call = {\n address: stakingManagerAddr,\n abi,\n functionName: 'getUnstakeStatus',\n args: [ requestId ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getUnstakeStatus.ts","import {\n createPublicClient,\n encodeFunctionData,\n http,\n type Abi,\n type Address,\n type Account,\n type Hex,\n type Chain,\n type EncodeFunctionDataParameters,\n type ContractFunctionArgs,\n type ContractFunctionName,\n type ContractFunctionParameters,\n type PrepareTransactionRequestParameters,\n type PrepareTransactionRequestReturnType,\n type PublicClient,\n} from 'viem';\nimport { wanchain } from 'viem/chains';\nimport {\n UnstakeStatus,\n ProposalRole,\n PledgeType,\n VoteType,\n ProposalState,\n ProposalCategory,\n type BaseParametersReturnType,\n type ContractProposal,\n type GetProposalInfoAtResult,\n type ProposalInfo,\n type PartnerInfo,\n type VoterInfo,\n type IndexRange,\n type PlegeMultiplierReturn,\n type CanRequestProposalWithdrawalParam,\n type CanRequestProposalWithdrawalRetrunItem,\n type CanClaimProposalWithdrawalParam,\n type RecentProposalsParam,\n type GetRecentProposalsResult,\n} from './types'\nimport { ABI as GOVERNANCE_ABI } from './abis/WanGovernor';\nimport * as Parameters from './parameters';\n\n\n/**\n * Wanchain governance\n * @remarks Providing creation, cancellation, review, contribute, voting, query, etc. proposal API\n */\n/**\n * Governance Core Class: Encapsulates Viem's PublicClient and Wanchain governance contract address management\n * @class SDK\n * @template TAbi - Contract ABI type, the built-in GOVERNANCE_ABI constant is used by default\n * @param {Address} governanceAddr - Wanchain governance contract address\n * @param {Chain} chain - Block chain from Viem's chains(such as wanchain, wanchainTestnet)\n * @param {string} [rpcUrl] - Optional custom RPC; if not provided, the chain's default RPC is used.\n * @example\n * const sdk = new Governance('0x123...', wanchain);\n * console.log(sdk.governanceAddr); // '0x123...'\n */\nexport class Governance<TAbi extends Abi = typeof GOVERNANCE_ABI> {\n public readonly publicClient: PublicClient;\n public readonly governanceAddr: Address;\n public readonly governanceAbi: Abi = GOVERNANCE_ABI;\n private readonly DEFAULT_ADMIN_ROLE: Hex = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n private readonly WAN_GOVERNOR_OPERATOR_ROLE: Hex = \"0x9c307f370e24cd9c4086c6c16452697787789246a163292b4e4203788924e58f\";\n\n constructor(governanceAddr: Address, chain: Chain = wanchain, rpcUrl?: string) {\n // 1. Init Public Client (for read-only operations)\n this.publicClient = createPublicClient({\n chain,\n transport: rpcUrl ? http(rpcUrl) : http(),\n });\n this.governanceAddr = governanceAddr;\n }\n\n /**\n * Get the basic parameters(return JSON object)\n * @returns {Promise<BaseParametersReturnType>}\n * @example\n * const ret = await sdk.getBaseParameters();\n * console.log(ret);\n */\n async getBaseParameters(): Promise<BaseParametersReturnType> {\n const results = await this.publicClient.multicall({\n contracts: [\n Parameters.totalProposalAmountInfo(this.governanceAddr),\n Parameters.proposalGlobalConfig(this.governanceAddr),\n Parameters.BURN(this.governanceAddr),\n Parameters.getAllProposalCount(this.governanceAddr),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.UnderReview),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.Fundraising),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.VotingInProgress),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.Succeeded),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.Rejected),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.Failed),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.Canceled),\n Parameters.getProposalMultiplierCounts(this.governanceAddr),\n Parameters.DENOMINATOR(this.governanceAddr),\n Parameters.MAX_REQUEST_WAN_RATIO_BPS_KEY(this.governanceAddr),\n Parameters.WAN_TOTAL_SUPPLY(this.governanceAddr),\n Parameters.PROPOSAL_CATEGORY_TECHNICAL_SUCCEED_THRESHOLD_KEY(this.governanceAddr),\n ],\n allowFailure: false,\n });\n\n return {\n allProposalWanAmount: results[0][0],\n allProposalLockingWanAmount: results[0][1],\n allProposalBurnedWanAmount: results[0][2],\n\n ethTransferGasLimit: results[1][0],\n minParticipationAmount: results[1][1],\n requestWanMultiplier: results[1][2],\n succeedThreshold: results[1][3],\n requireXpAmount: results[1][4],\n pledgeLockDuration: results[1][5],\n fundraisingDuration: results[1][6],\n voteDuration: results[1][7],\n xp: results[1][8],\n stakingManager: results[1][9],\n wanTreasury: results[1][10],\n\n burnAddr: results[2],\n\n proposalCount: results[3],\n reviewPendingProposalCount: results[4],\n prospectiveProposalCount: results[5],\n votingProposalCount: results[6],\n succeededProposalCount: results[7],\n rejectedProposalCount: results[8],\n failedProposalCount: results[9],\n canceledProposalCount: results[10],\n\n proposalWanMultiplierCount: results[11][0],\n votingWanMultiplierCount: results[11][1],\n\n DENOMINATOR: results[12],\n MAX_REQUEST_WAN_RATIO_BPS_KEY: results[13],\n WAN_TOTAL_SUPPLY: results[14],\n PROPOSAL_CATEGORY_TECHNICAL_SUCCEED_THRESHOLD_KEY: results[15],\n }\n }\n\n /**\n * Get array of uint value by keys, they were set by setUint\n * @param {Hex[]} keys - Bytes32 keys to be queried\n * @returns {Promise<{bigint[]}>}\n * @example\n * const ret = await sdk.getUints(\"0x9c307f370e24cd9c4086c6c16452697787789246a163292b4e4203788924e58f\");\n * console.log(ret);\n */\n async getUints(keys: Hex[]): Promise<bigint[]> {\n\n const results = await this.publicClient.multicall({\n contracts: keys.map(key => Parameters.getUint(this.governanceAddr, key)),\n allowFailure: false,\n });\n\n return results;\n }\n\n /**\n * Get the basic parameters(return JSON object)\n * @param options - Optional parameters\n * @param options.proposalWanMultiplier - Index range of proposal WAN multipliers\n * @param options.votingWanMultiplier - Index range of voter WAN multipliers\n * @returns {Promise<{\n proposalWanMultipliers: PlegeMultiplierReturn[] | []\n votingWanMultipliers: PlegeMultiplierReturn[] | []\n }>}\n * @example\n * const ret = await sdk.getProposalMultipliers({proposalWanMultiplier:{start: 0, end: 0}, votingWanMultiplier:{start: 0, end: 0}});\n * console.log(ret);\n */\n async getProposalMultipliers(options:{proposalWanMultiplier: IndexRange | undefined, votingWanMultiplier: IndexRange | undefined}): Promise<{\n proposalWanMultipliers: PlegeMultiplierReturn[] | []\n votingWanMultipliers: PlegeMultiplierReturn[] | []\n }> {\n let proposalWanMultiplierCount = 0;\n let votingWanMultiplierCount = 0;\n if (options.proposalWanMultiplier) {\n if (options.proposalWanMultiplier.end < options.proposalWanMultiplier.start || options.proposalWanMultiplier.start < 0) {\n throw new Error('Invalid proposalWanMultiplier');\n }\n proposalWanMultiplierCount = options.proposalWanMultiplier.end - options.proposalWanMultiplier.start + 1;\n }\n if (options.votingWanMultiplier) {\n if (options.votingWanMultiplier.end < options.votingWanMultiplier.start || options.votingWanMultiplier.start < 0) {\n throw new Error('Invalid votingWanMultiplier');\n }\n votingWanMultiplierCount = options.votingWanMultiplier.end - options.votingWanMultiplier.start + 1;\n }\n\n let contractCount = proposalWanMultiplierCount + votingWanMultiplierCount;\n\n let hasProposalWanMultipliers = proposalWanMultiplierCount > 0;\n let hasVotingWanMultipliers = votingWanMultiplierCount > 0;\n let contracts: ContractFunctionParameters[] = new Array(contractCount);\n if (hasProposalWanMultipliers) {\n for (let i = 0; i < proposalWanMultiplierCount; ++i) {\n contracts[i] = Parameters.getProposalWanMultiplierAt(this.governanceAddr, i);\n }\n }\n if (hasVotingWanMultipliers) {\n for (let i = proposalWanMultiplierCount; i < contractCount; ++i) {\n contracts[i] = Parameters.getVotingWanMultiplierAt(this.governanceAddr, i - proposalWanMultiplierCount);\n }\n }\n\n const results = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n });\n\n let proposalWanMultipliers = hasProposalWanMultipliers ? new Array(proposalWanMultiplierCount) : [];\n let votingWanMultipliers = hasVotingWanMultipliers ? new Array(votingWanMultiplierCount) : [];\n\n for (let i = 0; i < results.length; ++i) {\n if (i < proposalWanMultiplierCount) {\n let data = results[i] as [PledgeType, bigint, bigint];\n proposalWanMultipliers[i] = {\n pledgeType: data[0],\n lockDuration: data[1],\n multiplier: data[2],\n };\n } else {\n let data = results[i] as [PledgeType, bigint, bigint];\n votingWanMultipliers[i - proposalWanMultiplierCount] = {\n pledgeType: data[0],\n lockDuration: data[1],\n multiplier: data[2],\n };\n }\n }\n\n return {\n proposalWanMultipliers: proposalWanMultipliers,\n votingWanMultipliers: votingWanMultipliers,\n }\n }\n\n /**\n * Get proposal counts for all, recviewPending, prospective, voting, succeeded, failed and canceled proposal\n * @returns {Promise<{\n allProposalCount: bigint\n reviewPendingProposalCount: bigint\n prospectiveProposalCount: bigint\n votingProposalCount: bigint\n succeededProposalCount: bigint\n failedProposalCount: bigint\n canceledProposalCount: bigint\n }>}\n * @example\n * const ret = await sdk.getProposalCounts();\n * console.log(ret);\n */\n async getProposalCounts(): Promise<{\n allProposalCount: bigint\n reviewPendingProposalCount: bigint\n prospectiveProposalCount: bigint\n votingProposalCount: bigint\n succeededProposalCount: bigint\n rejectedProposalCount: bigint\n failedProposalCount: bigint\n canceledProposalCount: bigint\n }> {\n\n const results = await this.publicClient.multicall({\n contracts: [\n Parameters.getAllProposalCount(this.governanceAddr),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.UnderReview),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.Fundraising),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.VotingInProgress),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.Succeeded),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.Rejected),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.Failed),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.Canceled),\n ],\n allowFailure: false,\n });\n\n return {\n allProposalCount: results[0],\n reviewPendingProposalCount: results[1],\n prospectiveProposalCount: results[2],\n votingProposalCount: results[3],\n succeededProposalCount: results[4],\n rejectedProposalCount: results[5],\n failedProposalCount: results[6],\n canceledProposalCount: results[7],\n }\n }\n\n /**\n * Get active proposal counts by category\n * @returns {Promise<{\n fundingProposalCount: bigint\n technicalProposalCount: bigint\n }>}\n * @example\n * const ret = await sdk.getActiveProposalCategoryCounts();\n * console.log(ret);\n */\n async getActiveProposalCategoryCounts(): Promise<{\n fundingProposalCount: bigint\n technicalProposalCount: bigint\n }> {\n const results = await this.publicClient.multicall({\n contracts: [\n Parameters.proposalCategoryCount(this.governanceAddr, ProposalState.VotingInProgress, ProposalCategory.Funding),\n Parameters.proposalCategoryCount(this.governanceAddr, ProposalState.VotingInProgress, ProposalCategory.Technical),\n ],\n allowFailure: false,\n });\n\n return {\n fundingProposalCount: results[0],\n technicalProposalCount: results[1],\n }\n }\n\n /**\n * Get prospective + active proposal counts by category\n * @returns {Promise<{\n fundingProposalCount: bigint\n technicalProposalCount: bigint\n }>}\n * @example\n * const ret = await sdk.getParticipableProposalCategoryCounts();\n * console.log(ret);\n */\n async getParticipableProposalCategoryCounts(): Promise<{\n fundingProposalCount: bigint\n technicalProposalCount: bigint\n }> {\n const results = await this.publicClient.multicall({\n contracts: [\n Parameters.proposalCategoryCount(this.governanceAddr, ProposalState.Fundraising, ProposalCategory.Funding),\n Parameters.proposalCategoryCount(this.governanceAddr, ProposalState.Fundraising, ProposalCategory.Technical),\n Parameters.proposalCategoryCount(this.governanceAddr, ProposalState.VotingInProgress, ProposalCategory.Funding),\n Parameters.proposalCategoryCount(this.governanceAddr, ProposalState.VotingInProgress, ProposalCategory.Technical),\n ],\n allowFailure: false,\n });\n\n return {\n fundingProposalCount: results[0] + results[2],\n technicalProposalCount: results[1] + results[3],\n }\n }\n\n /**\n * Get WAN and XP balance for identified account\n * @returns {Promise<{\n ethBalance: bigint\n xpBalance: bigint\n }>}\n * @example\n * const xpAddress = '0x123...';\n * const account = '0x456...';\n * const ret = await sdk.getAssetBalances(xpAddress, account);\n * console.log(ret);\n */\n async getAssetBalances(xpAddress: Address, account: Address): Promise<{\n ethBalance: bigint\n xpBalance: bigint\n }> {\n if (!this.publicClient?.chain?.contracts?.multicall3?.address) {\n throw new Error('not support multicall3');\n }\n const results = await this.publicClient.multicall({\n contracts: [\n Parameters.getEthBalance(this.publicClient?.chain?.contracts?.multicall3?.address, account),\n Parameters.getErc20Balance(xpAddress, account)\n ],\n allowFailure: false,\n });\n\n return {\n ethBalance: results[0],\n xpBalance: results[1],\n }\n }\n\n /**\n * Get counts proposal count for identified account\n * @param {Address} account - Account to be queried\n * @returns {Promise<{\n proposerProposalCount: bigint,\n partnerProposalCount: bigint,\n voterProposalCount: bigint,\n }>}\n * @example\n * const account = '0x456...';\n * const ret = await sdk.getAccountProposalCount(account);\n * console.log(ret);\n */\n async getAccountProposalCount(account: Address): Promise<{\n proposerProposalCount: bigint,\n partnerProposalCount: bigint,\n voterProposalCount: bigint,\n }> {\n const results = await this.publicClient.multicall({\n contracts: [\n Parameters.getProposalCountByRole(this.governanceAddr, ProposalRole.Proposer, account),\n Parameters.getProposalCountByRole(this.governanceAddr, ProposalRole.Partner, account),\n Parameters.getProposalCountByRole(this.governanceAddr, ProposalRole.Voter, account),\n ],\n allowFailure: false,\n });\n\n return {\n proposerProposalCount: results[0],\n partnerProposalCount: results[1],\n voterProposalCount: results[2],\n }\n }\n\n /**\n * Get fouondations\n * @returns {Promise<readonly Address[]>} - Array of foundations\n * @example\n * const ret = await sdk.getFoundations(account);\n * console.log(ret);\n */\n async getFoundations(): Promise<readonly Address[]> {\n const results = await this.publicClient.readContract(Parameters.getFoundations(this.governanceAddr));\n return results;\n }\n\n /**\n * Check account role\n * @returns {Promise<{\n isAdmin: boolean,\n isOperator: boolean,\n isFouondation: boolean,\n }>} - Result of account role verification\n * @example\n * const ret = await sdk.checkAccountRole(account);\n * console.log(ret);\n */\n async checkAccountRole(account: Address): Promise<{\n isAdmin: boolean,\n isOperator: boolean,\n isFouondation: boolean,\n }> {\n const results = await this.publicClient.multicall({\n contracts: [\n Parameters.hasRole(this.governanceAddr, account, this.DEFAULT_ADMIN_ROLE),\n Parameters.hasRole(this.governanceAddr, account, this.WAN_GOVERNOR_OPERATOR_ROLE),\n Parameters.isFoundation(this.governanceAddr, account)\n ],\n allowFailure: false,\n });\n\n return {\n isAdmin: results[0],\n isOperator: results[1],\n isFouondation: results[2],\n }\n }\n\n /**\n * Caculate proposal ID\n * @param {Address} account - Account of proposer\n * @param {bigint} requestWanAmount - Amount of WAN's requested for proposal\n * @param {ProposalCategory} category - Category of proposal\n * @param {PledgeType} pledgeType - PledgeType of proposal for proposer\n * @param {Hex} description - Description of proposal\n * @returns {Promise<Hex>} - ID of proposal\n * @example\n * const account = '0x456...';\n * const requestWanAmount = 100n;\n * const category = ProposalCategory.ProposalCategory;\n * const pledgeType = PledgeType.Burn;\n * const description = 'request';\n * const ret = await sdk.getAccountProposalId(account, requestWanAmount, category, pledgeType, description);\n * console.log(ret);\n */\n async getAccountProposalId(\n account: Address,\n requestWanAmount: bigint,\n category: ProposalCategory,\n pledgeType: PledgeType,\n description: Hex\n\n ): Promise<Hex> {\n const proposalId = await this.publicClient.readContract(Parameters.getProposalId(this.governanceAddr, requestWanAmount, account, category, pledgeType, description));\n return proposalId;\n }\n\n /**\n * Get counts for the proposal partners and voteres\n * @param {Hex} proposalId - ID of propsal\n * @returns {Promise<{\n partnerCount: bigint,\n voterCount: bigint\n }>}\n * @example\n * const proposalId = '0x456...';\n * const ret = await sdk.getProposalPartnerAndVoterCounts(proposalId);\n * console.log(ret);\n */\n async getProposalPartnerAndVoterCounts(proposalId: Hex): Promise<{\n partnerCount: bigint,\n voterCount: bigint\n }> {\n const result = await this.publicClient.readContract(Parameters.getProposalPartnerAndVoterCounts(this.governanceAddr, proposalId));\n return {\n partnerCount: result[0],\n voterCount: result[1]\n };\n }\n\n /**\n * Get multi-proposasl info of proposer\n * @param {Address} proposerAddr - Proposer address\n * @param {IndexRange} indexRange - Range of index\n * @returns {Promise<ProposalInfo[]>} - Multi-info of proposal\n * @example\n * const proposerAddr = '0x456...';\n * const indexRange = {start:0, end: 1};\n * const ret = await sdk.getProposerProposals(proposerAddr, indexRange);\n * console.log(ret);\n */\n async getProposerProposals(proposerAddr: Address, indexRange: IndexRange): Promise<ProposalInfo[]> {\n if (indexRange.end < indexRange.start || indexRange.start < 0) {\n throw new Error('Invalid indexRange');\n }\n\n let contracts: ContractFunctionParameters[] = new Array(indexRange.end - indexRange.start + 1);\n for (let i = indexRange.start; i <= indexRange.end; ++i) {\n contracts[i - indexRange.start] = Parameters.getProposalIdByRoleAt(this.governanceAddr, ProposalRole.Proposer, proposerAddr, i);\n }\n\n const proposalIds = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false\n }) as Hex[];\n contracts = new Array(proposalIds.length);\n for (let i = 0; i < proposalIds.length; i++) {\n const proposalId = proposalIds[i]!;\n contracts[i] = Parameters.getProposalInfo(this.governanceAddr, proposalId);\n }\n let multiProposalData = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n }) as ContractProposal[];\n const results: ProposalInfo[] = multiProposalData.map((proposal, i) => ({proposalId: proposalIds[i]!, ...proposal}));\n return results;\n }\n\n /**\n * Get multi-proposasl info of partner\n * @param {Address} partnerAddr - Partner address\n * @param {IndexRange} indexRange - Range of index\n * @returns {Promise<ProposalInfo[]>} - Multi-info of proposal\n * @example\n * const partnerAddr = '0x456...';\n * const indexRange = {start:0, end: 1};\n * const ret = await sdk.getPartnerProposals(partnerAddr, indexRange);\n * console.log(ret);\n */\n async getPartnerProposals(partnerAddr: Address, indexRange: IndexRange): Promise<\n {\n proposalInfo: ProposalInfo\n partnerInfo: PartnerInfo\n }[]\n > {\n if (indexRange.end < indexRange.start || indexRange.start < 0) {\n throw new Error('Invalid indexRange');\n }\n\n let contracts: ContractFunctionParameters[] = new Array(indexRange.end - indexRange.start + 1);\n\n for (let i = indexRange.start; i <= indexRange.end; ++i) {\n contracts[i - indexRange.start] = Parameters.getProposalIdByRoleAt(this.governanceAddr, ProposalRole.Partner, partnerAddr, i);\n }\n const proposalIds = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false\n }) as Hex[];\n contracts = new Array(proposalIds.length * 2);\n for (let i = 0; i < proposalIds.length; ++i) {\n const index = i * 2;\n const proposalId = proposalIds[i]!;\n contracts[index] = Parameters.getProposalInfo(this.governanceAddr, proposalId);\n contracts[index + 1] = Parameters.getProposalPartnerInfo(this.governanceAddr, proposalId, partnerAddr);\n }\n\n let results = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n });\n\n let partnerProposals = new Array(proposalIds.length);\n\n for (let i = 0; i < proposalIds.length; ++i) {\n let index = i * 2;\n let contractProposal = results[index] as ContractProposal;\n let partnerInfo = results[index + 1] as PartnerInfo;\n\n const proposalId = proposalIds[i]!;\n const proposalInfo: ProposalInfo = {proposalId: proposalId, ...contractProposal};\n\n partnerProposals[i] = {\n proposalInfo: proposalInfo,\n partnerInfo: partnerInfo,\n }\n }\n return partnerProposals;\n }\n\n /**\n * Get multi-proposasl info of voter\n * @param {Address} voterAddr - Voter address\n * @param {IndexRange} indexRange - Range of index\n * @returns {Promise<ProposalInfo[]>} - Multi-info of proposal\n * @example\n * const voterAddr = '0x456...';\n * const indexRange = {start:0, end: 1};\n * const ret = await sdk.getPartnerProposals(voterAddr, indexRange);\n * console.log(ret);\n */\n async getVoterProposals(voterAddr: Address, indexRange: IndexRange): Promise<\n {\n proposalInfo: ProposalInfo\n voterInfo: VoterInfo\n }[]\n > {\n if (indexRange.end < indexRange.start || indexRange.start < 0) {\n throw new Error('Invalid indexRange');\n }\n\n let contracts: ContractFunctionParameters[] = new Array(indexRange.end - indexRange.start + 1);\n for (let i = indexRange.start; i <= indexRange.end; ++i) {\n contracts[i - indexRange.start] = Parameters.getProposalIdByRoleAt(this.governanceAddr, ProposalRole.Voter, voterAddr, i);\n }\n const proposalIds = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false\n }) as Hex[];\n contracts = new Array(proposalIds.length * 2);\n for (let i = 0; i < proposalIds.length; ++i) {\n const index = i * 2;\n const proposalId = proposalIds[i]!;\n contracts[index] = Parameters.getProposalInfo(this.governanceAddr, proposalId);\n contracts[index + 1] = Parameters.getProposalVoterInfo(this.governanceAddr, proposalId, voterAddr);\n }\n\n let results = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n });\n\n let voterProposals = new Array(proposalIds.length);\n\n for (let i = 0; i < proposalIds.length; ++i) {\n const index = i * 2;\n let contractProposal = results[index] as ContractProposal;\n let voterInfo = results[index + 1] as VoterInfo;\n\n const proposalId = proposalIds[i]!;\n const proposalInfo: ProposalInfo = {proposalId, ...contractProposal};\n\n voterProposals[i] = {\n proposalInfo: proposalInfo,\n voterInfo: voterInfo,\n }\n }\n return voterProposals;\n }\n\n /**\n * Get multi-info of partner\n * @param {Address} partnerAddr - Partner address\n * @param {Hex[]} proposalIds - IDs of proposal\n * @returns {Promise<PartnerInfo[]>} - Multi-info of partner\n * @example\n * const partnerAddr = '0x456...';\n * const proposalIds = ['0x1...','[0x2...]];\n * const ret = await sdk.getPartnerInfo(partnerAddr, proposalIds);\n * console.log(ret);\n */\n async getPartnerInfo(partnerAddr: Address, proposalIds: Hex[]): Promise<PartnerInfo[]> {\n let contracts: ContractFunctionParameters[] = new Array(proposalIds.length);\n for (let i = 0; i < proposalIds.length; ++i) {\n const proposalId = proposalIds[i]!;\n contracts[i] = Parameters.getProposalPartnerInfo(this.governanceAddr, proposalId, partnerAddr);\n }\n\n let results = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n }) as PartnerInfo[];\n\n return results;\n }\n\n /**\n * Get multi-info of voter\n * @param {Address} voterAddr - Voter address\n * @param {Hex[]} proposalIds - IDs of proposal\n * @returns {Promise<PartnerInfo[]>} - Multi-info of voter\n * @example\n * const voterAddr = '0x456...';\n * const proposalIds = ['0x1...','[0x2...]];\n * const ret = await sdk.getVoterInfo(voterAddr, proposalIds);\n * console.log(ret);\n */\n async getVoterInfo(voterAddr: Address, proposalIds: Hex[]): Promise<VoterInfo[]> {\n let contracts: ContractFunctionParameters[] = new Array(proposalIds.length);\n for (let i = 0; i < proposalIds.length; ++i) {\n const proposalId = proposalIds[i]!;\n contracts[i] = Parameters.getProposalVoterInfo(this.governanceAddr, proposalId, voterAddr);\n }\n\n let results = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n }) as VoterInfo[];\n\n return results;\n }\n\n /**\n * Get recent all proposals, include UnderReview, Canceled, Rejected\n * @param {RecentProposalsParam} param - Recent proposal parameters\n * @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index\n * @example\n * const param = {start:5, limit: 6}; // index 5-0\n * const ret = await sdk.getRecentAllProposals(param);\n * console.log(ret);\n */\n async getRecentAllProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult> {\n const { start, limit } = param;\n if (start < 0 || limit < 1) {\n throw new Error('Invalid param: start must be >= 0, limit must be > 0');\n }\n\n let collected: ProposalInfo[] = [];\n let currentStart = start;\n let nextIndex: number = -1;\n let currentBatchSize = Math.max(limit * 2, 20);\n\n while (collected.length < limit && currentStart >= 0) {\n const endIdx = Math.max(currentStart - currentBatchSize + 1, 0);\n const batchIndices: number[] = [];\n for (let i = currentStart; i >= endIdx; i--) {\n batchIndices.push(i);\n }\n\n const contracts: ContractFunctionParameters[] = batchIndices.map(idx =>\n Parameters.getProposalInfoAt(this.governanceAddr, idx)\n );\n\n const contractProposalsAt = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n }) as GetProposalInfoAtResult[];\n // console.log(\"contractProposalsAt:\", contractProposalsAt);\n for (let i = 0; i < contractProposalsAt.length; ++i) {\n const [proposalId, proposal] = contractProposalsAt[i] as GetProposalInfoAtResult;\n // collected.push({proposalId: proposalIds[i]!, ...proposal});\n collected.push({proposalId: proposalId!, ...proposal});\n if (collected.length === limit) {\n const lastIndexUsed = batchIndices[i]!;\n nextIndex = lastIndexUsed > 0 ? lastIndexUsed - 1 : -1;\n break;\n }\n }\n // Strategy: If we haven’t found enough in this round, it means we’ve filtered out a lot; in the next round, double the search range, but do not exceed 100.\n if (collected.length < limit) {\n currentStart = endIdx - 1;\n currentBatchSize = Math.min(currentBatchSize * 2, 100);\n } else {\n break;\n }\n }\n\n return {\n proposals: collected,\n nextIndex: nextIndex,\n };\n }\n\n /**\n * Get recent all proposals exclude Canceled\n * @param {RecentProposalsParam} param - Recent proposal parameters\n * @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index\n * @example\n * const param = {start:5, limit: 6}; // index 5-0\n * const ret = await sdk.getRecentProposalsExcludeCanceled(param);\n * console.log(ret);\n */\n async getRecentProposalsExcludeCanceled(param: RecentProposalsParam): Promise<GetRecentProposalsResult> {\n const { start, limit } = param;\n if (start < 0 || limit < 1) {\n throw new Error('Invalid param: start must be >= 0, limit must be > 0');\n }\n\n let collected: ProposalInfo[] = [];\n let currentStart = start;\n let nextIndex: number = -1;\n let currentBatchSize = Math.max(limit * 2, 20);\n\n while (collected.length < limit && currentStart >= 0) {\n const endIdx = Math.max(currentStart - currentBatchSize + 1, 0);\n const batchIndices: number[] = [];\n for (let i = currentStart; i >= endIdx; i--) {\n batchIndices.push(i);\n }\n\n const contracts: ContractFunctionParameters[] = batchIndices.map(idx =>\n Parameters.getProposalInfoAt(this.governanceAddr, idx)\n );\n\n const contractProposalsAt = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n }) as GetProposalInfoAtResult[];\n // console.log(\"contractProposalsAt:\", contractProposalsAt);\n for (let i = 0; i < contractProposalsAt.length; ++i) {\n const [proposalId, proposal] = contractProposalsAt[i] as GetProposalInfoAtResult;\n if (proposal.state !== ProposalState.Canceled) {\n // collected.push({proposalId: proposalIds[i]!, ...proposal});\n collected.push({proposalId: proposalId!, ...proposal});\n if (collected.length === limit) {\n const lastIndexUsed = batchIndices[i]!;\n nextIndex = lastIndexUsed > 0 ? lastIndexUsed - 1 : -1;\n break;\n }\n }\n }\n // Strategy: If we haven’t found enough in this round, it means we’ve filtered out a lot; in the next round, double the search range, but do not exceed 100.\n if (collected.length < limit) {\n currentStart = endIdx - 1;\n currentBatchSize = Math.min(currentBatchSize * 2, 100);\n } else {\n break;\n }\n }\n\n return {\n proposals: collected,\n nextIndex: nextIndex,\n };\n }\n\n /**\n * Get recent reviewed proposals\n * @param {RecentProposalsParam} param - Recent proposal parameters\n * @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index\n * @example\n * const param = {start:5, limit: 6}; // index 5-0\n * const ret = await sdk.getRecentReviewedProposals(param);\n * console.log(ret);\n */\n async getRecentReviewedProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult> {\n const { start, limit } = param;\n if (start < 0 || limit < 1) {\n throw new Error('Invalid param: start must be >= 0, limit must be > 0');\n }\n\n let collected: ProposalInfo[] = [];\n let currentStart = start;\n let nextIndex: number = -1;\n let currentBatchSize = Math.max(limit * 2, 20);\n\n while (collected.length < limit && currentStart >= 0) {\n const endIdx = Math.max(currentStart - currentBatchSize + 1, 0);\n const batchIndices: number[] = [];\n for (let i = currentStart; i >= endIdx; i--) {\n batchIndices.push(i);\n }\n\n const contracts: ContractFunctionParameters[] = batchIndices.map(idx =>\n Parameters.getProposalInfoAt(this.governanceAddr, idx)\n );\n\n const contractProposalsAt = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n }) as GetProposalInfoAtResult[];\n // console.log(\"contractProposalsAt:\", contractProposalsAt);\n for (let i = 0; i < contractProposalsAt.length; ++i) {\n const [proposalId, proposal] = contractProposalsAt[i] as GetProposalInfoAtResult;\n if (proposal.state !== ProposalState.UnderReview && proposal.state !== ProposalState.Canceled && proposal.state !== ProposalState.Rejected) {\n // collected.push({proposalId: proposalIds[i]!, ...proposal});\n collected.push({proposalId: proposalId!, ...proposal});\n if (collected.length === limit) {\n const lastIndexUsed = batchIndices[i]!;\n nextIndex = lastIndexUsed > 0 ? lastIndexUsed - 1 : -1;\n break;\n }\n }\n }\n // Strategy: If we haven’t found enough in this round, it means we’ve filtered out a lot; in the next round, double the search range, but do not exceed 100.\n if (collected.length < limit) {\n currentStart = endIdx - 1;\n currentBatchSize = Math.min(currentBatchSize * 2, 100);\n } else {\n break;\n }\n }\n\n return {\n proposals: collected,\n nextIndex: nextIndex,\n };\n }\n\n /**\n * Get review pending proposals\n * @param {IndexRange} indexRange - Range of index\n * @returns {Promise<ProposalInfo[]>} - Multi-info of proposal\n * @example\n * const indexRange = {start:0, end: 5};\n * const ret = await sdk.getReviewPendingProposals(indexRange);\n * console.log(ret);\n */\n async getReviewPendingProposals(indexRange: IndexRange): Promise<ProposalInfo[]> {\n if (indexRange.end < indexRange.start || indexRange.start < 0) {\n throw new Error('Invalid indexRange');\n }\n\n let contracts: ContractFunctionParameters[] = new Array(indexRange.end - indexRange.start + 1);\n for (let i = indexRange.start; i <= indexRange.end; ++i) {\n contracts[i - indexRange.start] = Parameters.getProposalIdByStateAt(this.governanceAddr, ProposalState.UnderReview, i);\n }\n\n const proposalIds = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false\n }) as Hex[];\n\n contracts = new Array(proposalIds.length);\n for (let i = 0; i < proposalIds.length; ++i) {\n const proposalId = proposalIds[i]!;\n contracts[i] = Parameters.getProposalInfo(this.governanceAddr, proposalId);\n }\n\n let contractProposals = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n }) as ContractProposal[];\n\n let results: ProposalInfo[] = contractProposals.map((proposal, i) => ({proposalId: proposalIds[i]!, ...proposal}))\n return results;\n }\n\n /**\n * Get recent review pending proposals\n * @param {RecentProposalsParam} param - Recent proposal parameters\n * @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index\n * @example\n * const param = {start:5, limit: 6}; // index 5-0\n * const ret = await sdk.getRecentReviewPendingProposals(param);\n * console.log(ret);\n */\n async getRecentReviewPendingProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult> {\n return await this._getRecentProposalsByState(param, ProposalState.UnderReview);\n }\n /**\n * Get prospective proposals\n * @param {IndexRange} indexRange - Range of index\n * @returns {Promise<ProposalInfo[]>} - Multi-info of proposal\n * @example\n * const indexRange = {start:0, end: 5};\n * const ret = await sdk.getProspectiveProposals(indexRange);\n * console.log(ret);\n */\n async getProspectiveProposals(indexRange: IndexRange): Promise<ProposalInfo[]> {\n if (indexRange.end < indexRange.start || indexRange.start < 0) {\n throw new Error('Invalid indexRange');\n }\n\n let contracts: ContractFunctionParameters[] = new Array(indexRange.end - indexRange.start + 1);\n for (let i = indexRange.start; i <= indexRange.end; ++i) {\n contracts[i - indexRange.start] = Parameters.getProposalIdByStateAt(this.governanceAddr, ProposalState.Fundraising, i);\n }\n const proposalIds = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false\n }) as Hex[];\n contracts = new Array(proposalIds.length);\n for (let i = 0; i < proposalIds.length; ++i) {\n const proposalId = proposalIds[i]!;\n contracts[i] = Parameters.getProposalInfo(this.governanceAddr, proposalId);\n }\n let contractProposals = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n }) as ContractProposal[];\n\n let results: ProposalInfo[] = contractProposals.map((proposal, i) => ({proposalId: proposalIds[i]!, ...proposal}))\n return results;\n }\n\n /**\n * Get recent prospective proposals\n * @param {RecentProposalsParam} param - Recent proposal parameters\n * @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index\n * @example\n * const param = {start:5, limit: 6}; // index 5-0\n * const ret = await sdk.getRecentProspectiveProposals(param);\n * console.log(ret);\n */\n async getRecentProspectiveProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult> {\n return await this._getRecentProposalsByState(param, ProposalState.Fundraising);\n }\n /**\n * Get active(voting) proposals\n * @param {IndexRange} indexRange - Range of index\n * @returns {Promise<ProposalInfo[]>} - Multi-info of proposal\n * @example\n * const indexRange = {start:0, end: 5};\n * const ret = await sdk.getVotingProposals(indexRange);\n * console.log(ret);\n */\n async getVotingProposals(indexRange: IndexRange): Promise<ProposalInfo[]> {\n if (indexRange.end < indexRange.start || indexRange.start < 0) {\n throw new Error('Invalid indexRange');\n }\n\n let contracts: ContractFunctionParameters[] = new Array(indexRange.end - indexRange.start + 1);\n for (let i = indexRange.start; i <= indexRange.end; ++i) {\n contracts[i - indexRange.start] = Parameters.getProposalIdByStateAt(this.governanceAddr, ProposalState.VotingInProgress, i);\n }\n const proposalIds = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false\n }) as Hex[];\n contracts = new Array(proposalIds.length);\n for (let i = 0; i < proposalIds.length; ++i) {\n const proposalId = proposalIds[i]!;\n contracts[i] = Parameters.getProposalInfo(this.governanceAddr, proposalId);\n }\n let contractProposals = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n }) as ContractProposal[];\n\n let results: ProposalInfo[] = contractProposals.map((proposal, i) => ({proposalId: proposalIds[i]!, ...proposal}))\n return results;\n }\n\n /**\n * Get recent active(voting) proposals\n * @param {RecentProposalsParam} param - Recent proposal parameters\n * @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index\n * @example\n * const param = {start:5, limit: 6}; // index 5-0\n * const ret = await sdk.getRecentVotingProposals(param);\n * console.log(ret);\n */\n async getRecentVotingProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult> {\n return await this._getRecentProposalsByState(param, ProposalState.VotingInProgress);\n }\n /**\n * Get succeed proposals\n * @param {IndexRange} indexRange - Range of index\n * @returns {Promise<ProposalInfo[]>} - Multi-info of proposal\n * @example\n * const indexRange = {start:0, end: 5};\n * const ret = await sdk.getSucceedProposals(indexRange);\n * console.log(ret);\n */\n async getSucceedProposals(indexRange: IndexRange): Promise<ProposalInfo[]> {\n if (indexRange.end < indexRange.start || indexRange.start < 0) {\n throw new Error('Invalid indexRange');\n }\n\n let contracts: ContractFunctionParameters[] = new Array(indexRange.end - indexRange.start + 1);\n for (let i = indexRange.start; i <= indexRange.end; ++i) {\n contracts[i - indexRange.start] = Parameters.getProposalIdByStateAt(this.governanceAddr, ProposalState.Succeeded, i);\n }\n const proposalIds = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false\n }) as Hex[];\n contracts = new Array(proposalIds.length);\n for (let i = 0; i < proposalIds.length; ++i) {\n const proposalId = proposalIds[i]!;\n contracts[i] = Parameters.getProposalInfo(this.governanceAddr, proposalId);\n }\n let contractProposals = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n }) as ContractProposal[];\n\n let results: ProposalInfo[] = contractProposals.map((proposal, i) => ({proposalId: proposalIds[i]!, ...proposal}))\n return results;\n }\n\n /**\n * Get recent succeeded proposals\n * @param {RecentProposalsParam} param - Recent proposal parameters\n * @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index\n * @example\n * const param = {start:5, limit: 6}; // index 5-0\n * const ret = await sdk.getRecentSucceededProposals(param);\n * console.log(ret);\n */\n async getRecentSucceededProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult> {\n return await this._getRecentProposalsByState(param, ProposalState.Succeeded);\n }\n /**\n * Get failed proposals\n * @param {IndexRange} indexRange - Range of index\n * @returns {Promise<ProposalInfo[]>} - Multi-info of proposal\n * @example\n * const indexRange = {start:0, end: 5};\n * const ret = await sdk.getFailedProposals(indexRange);\n * console.log(ret);\n */\n async getFailedProposals(indexRange: IndexRange): Promise<ProposalInfo[]> {\n if (indexRange.end < indexRange.start || indexRange.start < 0) {\n throw new Error('Invalid indexRange');\n }\n\n let contracts: ContractFunctionParameters[] = new Array(indexRange.end - indexRange.start + 1);\n for (let i = indexRange.start; i <= indexRange.end; ++i) {\n contracts[i - indexRange.start] = Parameters.getProposalIdByStateAt(this.governanceAddr, ProposalState.Failed, i);\n }\n const proposalIds = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false\n }) as Hex[];\n contracts = new Array(proposalIds.length);\n for (let i = 0; i < proposalIds.length; ++i) {\n const proposalId = proposalIds[i]!;\n contracts[i] = Parameters.getProposalInfo(this.governanceAddr, proposalId);\n }\n let contractProposals = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n }) as ContractProposal[];\n\n let results: ProposalInfo[] = contractProposals.map((proposal, i) => ({proposalId: proposalIds[i]!, ...proposal}))\n return results;\n }\n\n /**\n * Get recent rejected proposals\n * @param {RecentProposalsParam} param - Recent proposal parameters\n * @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index\n * @example\n * const param = {start:5, limit: 6}; // index 5-0\n * const ret = await sdk.getRecentRejectedProposals(param);\n * console.log(ret);\n */\n async getRecentRejectedProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult> {\n return await this._getRecentProposalsByState(param, ProposalState.Rejected);\n }\n /**\n * Get recent failed proposals\n * @param {RecentProposalsParam} param - Recent proposal parameters\n * @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index\n * @example\n * const param = {start:5, limit: 6}; // index 5-0\n * const ret = await sdk.getRecentFailedProposals(param);\n * console.log(ret);\n */\n async getRecentFailedProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult> {\n return await this._getRecentProposalsByState(param, ProposalState.Failed);\n }\n /**\n * Get canceled proposals\n * @param {IndexRange} indexRange - Range of index\n * @returns {Promise<ProposalInfo[]>} - Multi-info of proposal\n * @example\n * const indexRange = {start:0, end: 5};\n * const ret = await sdk.getCanceledProposals(indexRange);\n * console.log(ret);\n */\n async getCanceledProposals(indexRange: IndexRange): Promise<ProposalInfo[]> {\n if (indexRange.end < indexRange.start || indexRange.start < 0) {\n throw new Error('Invalid indexRange');\n }\n\n let contracts: ContractFunctionParameters[] = new Array(indexRange.end - indexRange.start + 1);\n for (let i = indexRange.start; i <= indexRange.end; ++i) {\n contracts[i - indexRange.start] = Parameters.getProposalIdByStateAt(this.governanceAddr, ProposalState.Canceled, i);\n }\n const proposalIds = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false\n }) as Hex[];\n contracts = new Array(proposalIds.length);\n for (let i = 0; i < proposalIds.length; ++i) {\n const proposalId = proposalIds[i]!;\n contracts[i] = Parameters.getProposalInfo(this.governanceAddr, proposalId);\n }\n let contractProposals = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n }) as ContractProposal[];\n\n let results: ProposalInfo[] = contractProposals.map((proposal, i) => ({proposalId: proposalIds[i]!, ...proposal}))\n return results;\n }\n\n /**\n * Get recent canceled proposals\n * @param {RecentProposalsParam} param - Recent proposal parameters\n * @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index\n * @example\n * const param = {start:5, limit: 6}; // index 5-0\n * const ret = await sdk.getRecentCanceledProposals(param);\n * console.log(ret);\n */\n async getRecentCanceledProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult> {\n return await this._getRecentProposalsByState(param, ProposalState.Canceled);\n }\n /**\n * Get specified proposal info\n * @param {Hex} proposalId - ID of proposal\n * @returns {Promise<ProposalInfo>} - Proposal info\n * @example\n * const proposalId = '0x12...';\n * const ret = await sdk.getProposalInfo(proposalId);\n * console.log(ret);\n */\n async getProposalInfo(proposalId: Hex): Promise<ProposalInfo> {\n let contractProposal = await this.publicClient.readContract(Parameters.getProposalInfo(this.governanceAddr, proposalId)) as ContractProposal;\n let result: ProposalInfo = {proposalId, ...contractProposal};\n return result;\n }\n\n /**\n * Check whether need or can request proposal withdrawal\n * @param {bigint} timestamp - Timestamp of latest block\n * @param {CanRequestProposalWithdrawalParam[]} params - Parameters\n * @returns {Promise<CanRequestProposalWithdrawalRetrunItem[]>} - Array of {needRequestWithdrawal, canRequestWithdrawal}\n * @example\n * var proposalId = '0x12...';\n * var proposalInfo = await sdk.getProposalInfo(proposalId);\n * var latestBlock = await sdk.publicClient.getBlock();\n * var [{needRequestWithdrawal, canRequestWithdrawal}] = sdk.canRequestProposalWithdrawal(latestBlock.timestamp, [\n {\n state: proposalInfo.state,\n pledgeType: proposalInfo.proposerFundInfo.pledgeType,\n lockDuration: proposalInfo.proposerFundInfo.lockDuration,\n voteDeadline: proposalInfo.voteDeadline,\n requestId: proposalInfo.proposerFundInfo.requestId,\n exited: proposalInfo.proposerFundInfo.exited,\n }\n ]);\n */\n canRequestProposalWithdrawal(timestamp: bigint, params: CanRequestProposalWithdrawalParam[]): CanRequestProposalWithdrawalRetrunItem[] {\n if (params.length == 0) {\n return [];\n }\n let results = new Array(params.length);\n for (let i = 0; i < params.length; ++i) {\n let needRequestWithdrawal = false;\n let canRequestWithdrawal = false;\n if (\n params[i]!.state == ProposalState.Succeeded\n && params[i]!.pledgeType == PledgeType.Lock\n && params[i]!.lockDuration > BigInt(0)\n && params[i]!.requestId == BigInt(0)\n && !params[i]!.exited\n // && timestamp > params[i]!.voteDeadline + params[i]!.lockDuration\n ) {\n needRequestWithdrawal = true;\n }\n if (needRequestWithdrawal && timestamp > params[i]!.voteDeadline + params[i]!.lockDuration) {\n canRequestWithdrawal = true;\n }\n results[i] = {needRequestWithdrawal, canRequestWithdrawal};\n }\n return results;\n }\n\n /**\n * Check whether can claim proposal withdrawal or not\n * @param {Address} stakingManagerAddr - Address of stakingManager\n * @param {bigint} timestamp - Timestamp of latest block\n * @param {CanClaimProposalWithdrawalParam[]} params - Parameters\n * @returns {Promise<boolean[]>} - Array of boolean\n * @example\n * var stakingManagerAddr = '0x34...';\n * var proposalId = '0x12...';\n * var proposalInfo = await sdk.getProposalInfo(proposalId);\n * var latestBlock = await sdk.publicClient.getBlock();\n * var ret = sdk.canClaimProposalWithdrawal(stakingManagerAddr, latestBlock.timestamp, [\n {\n state: proposalInfo.state,\n pledgeType: proposalInfo.proposerFundInfo.pledgeType,\n lockDuration: proposalInfo.proposerFundInfo.lockDuration,\n voteDeadline: proposalInfo.voteDeadline,\n requestId: proposalInfo.proposerFundInfo.requestId,\n exited: proposalInfo.proposerFundInfo.exited,\n }\n ]);\n * console.log(ret);\n */\n async canClaimProposalWithdrawal(stakingManagerAddr: Address, timestamp: bigint, params: CanClaimProposalWithdrawalParam[]): Promise<boolean[]> {\n if (params.length == 0) {\n return [];\n }\n\n let contractCount = 0;\n let indexMap: Record<number, number> = {};\n let results = new Array(params.length);\n let contracts: ContractFunctionParameters[] = new Array(params.length);\n for (let i = 0; i < params.length; ++i) {\n if (this._canWithdrawProposalImmediately(timestamp, params[i]!)) {\n results[i] = true;\n continue;\n }\n\n if (this._canWithdrawSucceededProposal(timestamp, params[i]!)) {\n contracts[contractCount] = Parameters.getUnstakeStatus(stakingManagerAddr, params[i]!.requestId);\n indexMap[i] = contractCount;\n contractCount ++;\n continue;\n }\n\n results[i] = false;\n }\n contracts = contracts.slice(0, contractCount);\n\n let multiUnstakeStatus = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n });\n for (let i = 0; i < contracts.length; i++) {\n results[indexMap[i]!] = multiUnstakeStatus[i] == UnstakeStatus.ReadyToClaim;\n }\n return results;\n\n }\n\n private _canWithdrawProposalImmediately(timestamp: bigint, param: CanClaimProposalWithdrawalParam): boolean {\n /*\n 1. failed proposal\n 2. succeeded proposal, no lock, no burn\n */\n return (\n param.state == ProposalState.Failed\n || (\n param.lockDuration == BigInt(0)\n && param.pledgeType == PledgeType.Lock\n && param.state == ProposalState.Succeeded\n && timestamp > (param.voteDeadline + param.lockDuration)\n )\n );\n }\n private _canWithdrawSucceededProposal(timestamp: bigint, param: CanClaimProposalWithdrawalParam): boolean {\n /*\n 1. succeeded proposal, lock\n */\n return param.lockDuration > BigInt(0)\n && param.pledgeType == PledgeType.Lock\n && param.state == ProposalState.Succeeded\n && param.requestId > BigInt(0)\n && !param.exited\n && timestamp > (param.voteDeadline + param.lockDuration)\n ;\n }\n\n /**\n * Get unstake status after request proposal withdrawal\n * @param {Address} stakingManagerAddr - Address of stakingManager\n * @param {bigint} requestId - ID of proposal request withdrawal to be queried for proposer, partner or voter.\n * @returns {Promise<UnstakeStatus>} - Status of unstake\n * @example\n * var stakingManagerAddr = '0x34...';\n * var proposalId = '0x12...';\n * var proposalInfo = await sdk.getProposalInfo(proposalId);\n * var ret = sdk.getUnstakeStatus(stakingManagerAddr, proposalInfo.proposerFundInfo.requestId);\n * console.log(ret);\n */\n async getUnstakeStatus(stakingManagerAddr: Address, requestId: bigint): Promise<UnstakeStatus> {\n return await this.publicClient.readContract(Parameters.getUnstakeStatus(stakingManagerAddr, requestId));\n }\n\n /**\n * Get current ration\n * @param {Address} stakingManagerAddr - Address of stakingManager\n * @returns {Promise<bigint>} - current ratio\n * @example\n * var stakingManagerAddr = '0x34...';\n * var ret = sdk.getCurrentRate(stakingManagerAddr);\n * console.log(ret);\n */\n async getCurrentRatio(stakingManagerAddr: Address): Promise<bigint> {\n const stWanAddr = await this.publicClient.readContract(Parameters.stWan(stakingManagerAddr));\n return await this.publicClient.readContract(Parameters.getCurrentRate(stWanAddr));\n }\n\n /**\n * Build transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {ContractFunctionName} functionName - Function name\n * @param {ContractFunctionArgs} args - Parameters\n * @param {bigint} value - Amount of WAN\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const functionName = 'cancelProposal' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n * const args = [proposalId, reason] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n * const ret = await sdk.buildTx(account, functionName, args, BigInt(0));\n * console.log(ret);\n */\n async buildTx<\n TFunctionName extends ContractFunctionName<TAbi, 'nonpayable' | 'payable'>\n >(\n account: Account | Address,\n functionName: TFunctionName,\n args: ContractFunctionArgs<TAbi, 'nonpayable' | 'payable', TFunctionName>,\n value: bigint = BigInt(0)\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n await this.publicClient.simulateContract({\n address: this.governanceAddr,\n abi: this.governanceAbi,\n functionName,\n args: args as ContractFunctionArgs,\n account,\n value,\n });\n\n return await this.publicClient.prepareTransactionRequest({\n account,\n to: this.governanceAddr,\n data: encodeFunctionData({\n abi: this.governanceAbi,\n functionName,\n args: args as ContractFunctionArgs,\n } as EncodeFunctionDataParameters),\n value,\n } as PrepareTransactionRequestParameters);\n }\n\n /**\n * Build createProposal transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {bigint} pledgeWanAmount - Amount of WAN that proposer pledged\n * @param {bigint} requestWanAmount - Amount of WAN that proposer request.\n * @param {ProposalCategory} category - Category of proposal\n * @param {PledgeType} pledgeType - Pledge type\n * @param {Hex} description - Description of proposal\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const walletClient = createWalletClient({ account: privateKeyToAccount(`0x${process.env.PK}`), chain: sdk.publicClient.chain, transport: http() });\n * const pledgeWanAmount = parseEther(\"1\");\n * const requestWanAmount = parseEther(\"100\");\n * const category = ProposalCategory.Funding;\n * const pledgeType = PledgeType.Lock;\n * const ret = await sdk.buildCreateProposalTx(walletClient.account!, pledgeWanAmount, requestWanAmount, category, pledgeType, description);\n * console.log(ret);\n */\n async buildCreateProposalTx(\n account: Address | Account,\n pledgeWanAmount: bigint,\n requestWanAmount: bigint,\n category: ProposalCategory,\n pledgeType: PledgeType,\n description: Hex\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'createProposal' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n const args = [requestWanAmount, category, pledgeType, description] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(account, functionName, args, pledgeWanAmount);\n }\n\n /**\n * Build cancelProposal transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {Hex} proposalId - ID of proposal\n * @param {Hex} reason - Cancel reason.\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const walletClient = createWalletClient({ account: privateKeyToAccount(`0x${process.env.PK}`), chain: sdk.publicClient.chain, transport: http() });\n * const proposalId = '0x12...';\n * const reason = toHex('cancel');\n * const ret = await sdk.buildCancelProposalTx(walletClient.account!, proposalId, reason);\n * console.log(ret);\n */\n async buildCancelProposalTx(account: Address | Account, proposalId: Hex, reason: Hex): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'cancelProposal' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n const args = [proposalId, reason] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(account, functionName, args, BigInt(0));\n // return await this.buildTx(account, \"cancelProposal\" as const, [proposalId, reason]);\n }\n\n /**\n * Build reviewPoposal transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {Hex} proposalId - ID of proposal\n * @param {boolean} isApproved - For or against.\n * @param {Hex} reason - Cancel reason.\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const walletClient = createWalletClient({ account: privateKeyToAccount(`0x${process.env.PK}`), chain: sdk.publicClient.chain, transport: http() });\n * const proposalId = '0x12...';\n * const isApproved = true;\n * const reason = toHex('greate');\n * const ret = await sdk.buildReviewProposalTx(walletClient.account!, proposalId, isApproved, reason);\n * console.log(ret);\n */\n async buildReviewProposalTx(\n account: Address | Account,\n proposalId: Hex,\n isApproved: boolean,\n reason: Hex\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'reviewProposal' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n const args = [proposalId, isApproved, reason] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(account, functionName, args, BigInt(0));\n // return await this.buildTx(account, \"reviewProposal\" as const, [proposalId, isApproved, reason]);\n }\n\n /**\n * Build contributePoposal transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {Hex} proposalId - ID of proposal\n * @param {bigint} pledgeWanAmount - Amount of WAN that partner pledged\n * @param {PledgeType} pledgeType - Pledge type\n * @param {Hex} reason - Reason.\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const walletClient = createWalletClient({ account: privateKeyToAccount(`0x${process.env.PK}`), chain: sdk.publicClient.chain, transport: http() });\n * const proposalId = '0x12...';\n * const pledgeWanAmount = parseEther(\"1\");\n * const pledgeType = PledgeType.Lock;\n * const reason = toHex('support');\n * const ret = await sdk.buildContributeProposalTx(walletClient.account!, proposalId, pledgeWanAmount, pledgeType, toHex(reason));\n * console.log(ret);\n */\n async buildContributeProposalTx(\n account: Address | Account,\n proposalId: Hex,\n pledgeWanAmount: bigint,\n pledgeType: PledgeType,\n reason: Hex\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'contributeProposal' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n const args = [proposalId, pledgeType, reason] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(account, functionName, args, pledgeWanAmount);\n // return await this.buildTx(account, \"contributeProposal\" as const, [proposalId, pledgeType, reason], pledgeWanAmount);\n }\n\n /**\n * Build votePoposal transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {Hex} proposalId - ID of proposal\n * @param {bigint} pledgeWanAmount - Amount of WAN that partner pledged\n * @param {bigint} lockDuration - Lock duration of proposal for voter\n * @param {PledgeType} pledgeType - Pledge type\n * @param {VoteType} voteType - Vote type\n * @param {Hex} reason - Reason.\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const walletClient = createWalletClient({ account: privateKeyToAccount(`0x${process.env.PK}`), chain: sdk.publicClient.chain, transport: http() });\n * const proposalId = '0x12...';\n * const pledgeWanAmount = parseEther(\"1\");\n * const lockDuration = 8...;\n * const pledgeType = PledgeType.Lock;\n * const voteType = VoteType.For;\n * const reason = toHex('support');\n * const ret = await sdk.buildVoteProposalTx(walletClient.account!, proposalId, pledgeWanAmount, lockDuration, pledgeType, voteType, toHex(reason));\n * console.log(ret);\n */\n async buildVoteProposalTx(\n account: Address | Account,\n proposalId: Hex,\n pledgeWanAmount: bigint,\n lockDuration: bigint,\n pledgeType: PledgeType,\n voteType: VoteType,\n reason: Hex\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'voteProposal' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n const args = [proposalId, lockDuration, pledgeType, voteType, reason] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(account, functionName, args, pledgeWanAmount);\n // return await this.buildTx(account, \"voteProposal\" as const, [proposalId, lockDuration, pledgeType, voteType, reason], pledgeWanAmount);\n }\n\n /**\n * Build tallyPoposal transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {Hex} proposalId - ID of proposal\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const walletClient = createWalletClient({ account: privateKeyToAccount(`0x${process.env.PK}`), chain: sdk.publicClient.chain, transport: http() });\n * const proposalId = '0x12...';\n * const ret = await sdk.buildTallyProposalTx(walletClient.account!, proposalId);\n * console.log(ret);\n */\n async buildTallyProposalTx(\n account: Address | Account,\n proposalId: Hex\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'tallyProposal' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n const args = [proposalId] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(account, functionName, args, BigInt(0));\n // return await this.buildTx(account, \"tallyProposal\" as const, [proposalId], BigInt(0));\n }\n\n /**\n * Build requestProposerWithdrawal transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {Hex} proposalId - ID of proposal\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const walletClient = createWalletClient({ account: privateKeyToAccount(`0x${process.env.PK}`), chain: sdk.publicClient.chain, transport: http() });\n * const proposalId = '0x12...';\n * const ret = await sdk.buildRequestProposerWithdrawalTx(walletClient.account!, proposalId);\n * console.log(ret);\n */\n async buildRequestProposerWithdrawalTx(\n account: Address | Account,\n proposalId: Hex\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'requestProposerWithdrawal' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n const args = [proposalId] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(account, functionName, args, BigInt(0));\n // return await this.buildTx(account, \"requestProposerWithdrawal\" as const, [proposalId], BigInt(0));\n }\n\n /**\n * Build claimProposerWithdrawal transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {Hex} proposalId - ID of proposal\n * @param {bigint} requestId - ID of proposal request withdrawal to be queried\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const walletClient = createWalletClient({ account: privateKeyToAccount(`0x${process.env.PK}`), chain: sdk.publicClient.chain, transport: http() });\n * const proposalId = '0x12...';\n * const requestId = 34...n;\n * const ret = await sdk.buildClaimProposerWithdrawalTx(walletClient.account!, proposalId, requestId);\n * console.log(ret);\n */\n async buildClaimProposerWithdrawalTx(\n account: Address | Account,\n proposalId: Hex,\n requestId: bigint\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'claimProposerWithdrawal' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n const args = [proposalId, requestId] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(account, functionName, args, BigInt(0));\n // return await this.buildTx(account, \"claimProposerWithdrawal\" as const, [proposalId, requestId], BigInt(0));\n }\n\n /**\n * Build requestPartnerWithdrawal transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {Hex} proposalId - ID of proposal\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const walletClient = createWalletClient({ account: privateKeyToAccount(`0x${process.env.PK}`), chain: sdk.publicClient.chain, transport: http() });\n * const proposalId = '0x12...';\n * const ret = await sdk.buildRequestPartnerWithdrawalTx(walletClient.account!, proposalId);\n * console.log(ret);\n */\n async buildRequestPartnerWithdrawalTx(\n account: Address | Account,\n proposalId: Hex\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'requestPartnerWithdrawal' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n const args = [proposalId] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(account, functionName, args, BigInt(0));\n // return await this.buildTx(account, \"requestPartnerWithdrawal\" as const, [proposalId], BigInt(0));\n }\n\n /**\n * Build claimPartnerWithdrawal transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {Hex} proposalId - ID of proposal\n * @param {bigint} requestId - ID of proposal request withdrawal to be queried\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const walletClient = createWalletClient({ account: privateKeyToAccount(`0x${process.env.PK}`), chain: sdk.publicClient.chain, transport: http() });\n * const proposalId = '0x12...';\n * const requestId = 34...n;\n * const ret = await sdk.buildClaimPartnerWithdrawalTx(walletClient.account!, proposalId, requestId);\n * console.log(ret);\n */\n async buildClaimPartnerWithdrawalTx(\n account: Address | Account,\n proposalId: Hex,\n requestId: bigint\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'claimPartnerWithdrawal' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n const args = [proposalId, requestId] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(account, functionName, args, BigInt(0));\n // return await this.buildTx(account, \"claimPartnerWithdrawal\" as const, [proposalId, requestId], BigInt(0));\n }\n\n /**\n * Build requestVoterWithdrawal transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {Hex} proposalId - ID of proposal\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const walletClient = createWalletClient({ account: privateKeyToAccount(`0x${process.env.PK}`), chain: sdk.publicClient.chain, transport: http() });\n * const proposalId = '0x12...';\n * const ret = await sdk.buildRequestVoterWithdrawalTx(walletClient.account!, proposalId);\n * console.log(ret);\n */\n async buildRequestVoterWithdrawalTx(\n account: Address | Account,\n proposalId: Hex\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'requestVoterWithdrawal' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n const args = [proposalId] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(account, functionName, args, BigInt(0));\n // return await this.buildTx(account, \"requestVoterWithdrawal\" as const, [proposalId], BigInt(0));\n }\n\n /**\n * Build claimVoterWithdrawal transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {Hex} proposalId - ID of proposal\n * @param {bigint} requestId - ID of proposal request withdrawal to be queried\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const walletClient = createWalletClient({ account: privateKeyToAccount(`0x${process.env.PK}`), chain: sdk.publicClient.chain, transport: http() });\n * const proposalId = '0x12...';\n * const requestId = 34...n;\n * const ret = await sdk.buildClaimVoterWithdrawalTx(walletClient.account!, proposalId, requestId);\n * console.log(ret);\n */\n async buildClaimVoterWithdrawalTx(\n account: Address | Account,\n proposalId: Hex,\n requestId: bigint\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'claimVoterWithdrawal' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n const args = [proposalId, requestId] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(account, functionName, args, BigInt(0));\n // return await this.buildTx(account, \"claimVoterWithdrawal\" as const, [proposalId, requestId], BigInt(0));\n }\n\n /**\n * Build updateProposalGlobalConfig transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {bigint} ethTransferGasLimit - WAN transfer gaslimit.\n * @param {bigint} minParticipationAmount - Minimum amount of WANs a participant can participate in for funding proposal.\n * @param {bigint} requestWanMultiplier - Multiplier to request WANs from Wanchain Treasury.\n * @param {bigint} succeedThreshold - Threshold to succeed proposal.\n * @param {bigint} requireXpAmount - Proposal creation require amount of XP.\n * @param {bigint} pledgeLockDuration - Proposer or partner pledge WAN by locking duration.\n * @param {bigint} fundraisingDuration - Duration for partners to pledge their WAN to help a Prospective Proposal meet the pledge requirements.\n * @param {bigint} voteDuration - Duration for voters to vote active proposal.\n * @param {Address} xpAddress - Address of XP token.\n * @param {Address} stakingManagerAddress - Address for StakingManager.\n * @param {Address} wanTreasuryAddress - Address for Wanchain community treasury.\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const walletClient = createWalletClient({ account: privateKeyToAccount(`0x${process.env.PK}`), chain: sdk.publicClient.chain, transport: http() });\n * const fundraisingDuration = 34...n;\n * const ret = await sdk.buildUpdateFundraisingDurationTx(walletClient.account!, fundraisingDuration);\n * console.log(ret);\n */\n async buildUpdateProposalGlobalConfigTx(\n account: Address | Account,\n ethTransferGasLimit: bigint,\n minParticipationAmount: bigint,\n requestWanMultiplier: bigint,\n succeedThreshold: bigint,\n requireXpAmount: bigint,\n pledgeLockDuration: bigint,\n fundraisingDuration: bigint,\n voteDuration: bigint,\n xpAddress: Address,\n stakingManagerAddress: Address,\n wanTreasuryAddress: Address\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'updateProposalGlobalConfig' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n const args = [\n [\n ethTransferGasLimit,\n minParticipationAmount,\n requestWanMultiplier,\n succeedThreshold,\n requireXpAmount,\n pledgeLockDuration,\n fundraisingDuration,\n voteDuration,\n xpAddress,\n stakingManagerAddress,\n wanTreasuryAddress\n ]\n ] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(account, functionName, args, BigInt(0));\n }\n\n private async _getRecentProposalsByState(param: RecentProposalsParam, state: ProposalState): Promise<GetRecentProposalsResult> {\n const { start, limit } = param;\n if (start < 0 || limit < 1) {\n throw new Error('Invalid param: start must be >= 0, limit must be > 0');\n }\n\n let collected: ProposalInfo[] = [];\n let currentStart = start;\n let nextIndex: number = -1;\n let currentBatchSize = Math.max(limit * 2, 20);\n\n while (collected.length < limit && currentStart >= 0) {\n const endIdx = Math.max(currentStart - currentBatchSize + 1, 0);\n const batchIndices: number[] = [];\n for (let i = currentStart; i >= endIdx; i--) {\n batchIndices.push(i);\n }\n\n const idContracts: ContractFunctionParameters[] = batchIndices.map(idx =>\n Parameters.getProposalIdByStateAt(this.governanceAddr, state, idx)\n );\n const proposalIds = await this.publicClient.multicall({\n contracts: idContracts,\n allowFailure: false,\n }) as Hex[];\n\n const infoContracts: ContractFunctionParameters[] = proposalIds.map(proposalId =>\n Parameters.getProposalInfo(this.governanceAddr, proposalId)\n );\n\n const contractProposals = await this.publicClient.multicall({\n contracts: infoContracts,\n allowFailure: false,\n }) as ContractProposal[];\n // console.log(\"contractProposalsAt:\", contractProposalsAt);\n\n for (let i = 0; i < contractProposals.length; ++i) {\n const proposal = contractProposals[i]!;\n\n // if (proposal.state !== ProposalState.UnderReview && proposal.state !== ProposalState.Canceled && proposal.state == state) {\n if (proposal.state === state) {\n collected.push({proposalId: proposalIds[i]!, ...proposal});\n if (collected.length === limit) {\n const lastIndexUsed = batchIndices[i]!;\n nextIndex = lastIndexUsed > 0 ? lastIndexUsed - 1 : -1;\n break;\n }\n }\n }\n // Strategy: If we haven’t found enough in this round, it means we’ve filtered out a lot; in the next round, double the search range, but do not exceed 100.\n if (collected.length < limit) {\n currentStart = endIdx - 1;\n currentBatchSize = Math.min(currentBatchSize * 2, 100);\n } else {\n break;\n }\n }\n\n return {\n proposals: collected,\n nextIndex: nextIndex,\n };\n }\n\n}"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SAAU,EACzB,GAAI,EAAQ,GAAK,EAAQ,EACvB,MAAU,MAAM,uDAAuD,CAGzE,IAAI,EAA4B,EAAE,CAC9B,EAAe,EACf,EAAoB,GACpB,EAAmB,KAAK,IAAI,EAAQ,EAAG,GAAG,CAE9C,KAAO,EAAU,OAAS,GAAS,GAAgB,GAAG,CACpD,IAAM,EAAS,KAAK,IAAI,EAAe,EAAmB,EAAG,EAAE,CACzD,EAAyB,EAAE,CACjC,IAAK,IAAI,EAAI,EAAc,GAAK,EAAQ,IACtC,EAAa,KAAK,EAAE,CAGtB,IAAM,EAA4C,EAAa,IAAI,GACjEH,EAAkC,KAAK,eAAgB,EAAO,EAAI,CACnE,CACK,EAAc,MAAM,KAAK,aAAa,UAAU,CACpD,UAAW,EACX,aAAc,GACf,CAAC,CAEI,EAA8C,EAAY,IAAI,GAClEJ,EAA2B,KAAK,eAAgB,EAAW,CAC5D,CAEK,EAAoB,MAAM,KAAK,aAAa,UAAU,CAC1D,UAAW,EACX,aAAc,GACf,CAAC,CAGF,IAAK,IAAI,EAAI,EAAG,EAAI,EAAkB,OAAQ,EAAE,EAAG,CACjD,IAAM,EAAW,EAAkB,GAGnC,GAAI,EAAS,QAAU,IACrB,EAAU,KAAK,CAAC,WAAY,EAAY,GAAK,GAAG,EAAS,CAAC,CACtD,EAAU,SAAW,GAAO,CAC9B,IAAM,EAAgB,EAAa,GACnC,EAAY,EAAgB,EAAI,EAAgB,EAAI,GACpD,OAKN,GAAI,EAAU,OAAS,EACrB,EAAe,EAAS,EACxB,EAAmB,KAAK,IAAI,EAAmB,EAAG,IAAI,MAEtD,MAIJ,MAAO,CACL,UAAW,EACA,YACZ"}
1
+ {"version":3,"file":"index.cjs","names":["ABI","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","abi","wanchain","GOVERNANCE_ABI","MULTICALL3_ABI","Parameters.totalProposalAmountInfo","Parameters.proposalGlobalConfig","Parameters.BURN","Parameters.getAllProposalCount","Parameters.getProposalCountByState","Parameters.getProposalMultiplierCounts","Parameters.DENOMINATOR","Parameters.MAX_REQUEST_WAN_RATIO_BPS_KEY","Parameters.WAN_TOTAL_SUPPLY","Parameters.PROPOSAL_CATEGORY_TECHNICAL_SUCCEED_THRESHOLD_KEY","Parameters.getUint","Parameters.getProposalWanMultiplierAt","Parameters.getVotingWanMultiplierAt","Parameters.proposalCategoryCount","Parameters.getEthBalance","Parameters.getErc20Balance","Parameters.getProposalCountByRole","Parameters.getFoundations","Parameters.hasRole","Parameters.isFoundation","Parameters.getProposalId","Parameters.getProposalPartnerAndVoterCounts","Parameters.getProposalIdByRoleAt","Parameters.getProposalInfo","Parameters.getProposalPartnerInfo","Parameters.getProposalVoterInfo","Parameters.getProposalInfoAt","Parameters.getProposalIdByStateAt","Parameters.getUnstakeStatus","Parameters.stWan","Parameters.getCurrentRate"],"sources":["../src/util.ts","../src/types/index.ts","../src/abis/WanGovernor.ts","../src/abis/Multicall3.ts","../src/parameters/getEthBalance.ts","../src/parameters/getErc20Balance.ts","../src/parameters/BURN.ts","../src/parameters/isFoundation.ts","../src/parameters/getFoundations.ts","../src/parameters/hasRole.ts","../src/parameters/proposalCategoryCount.ts","../src/parameters/getProposalId.ts","../src/parameters/getProposalInfoAt.ts","../src/parameters/getProposalInfo.ts","../src/parameters/getProposalIdByStateAt.ts","../src/parameters/getProposalCountByState.ts","../src/parameters/getProposalCountByRole.ts","../src/parameters/getProposalPartnerAndVoterCounts.ts","../src/parameters/getProposalPartnerInfo.ts","../src/parameters/getProposalIdByRoleAt.ts","../src/parameters/getAllProposalCount.ts","../src/parameters/totalProposalAmountInfo.ts","../src/parameters/proposalGlobalConfig.ts","../src/parameters/getProposalVoterInfo.ts","../src/parameters/getProposalMultiplierCounts.ts","../src/parameters/getProposalWanMultiplierAt.ts","../src/parameters/getVotingWanMultiplierAt.ts","../src/parameters/DENOMINATOR.ts","../src/parameters/MAX_REQUEST_WAN_RATIO_BPS_KEY.ts","../src/parameters/WAN_TOTAL_SUPPLY.ts","../src/parameters/PROPOSAL_CATEGORY_TECHNICAL_SUCCEED_THRESHOLD_KEY.ts","../src/parameters/getUint.ts","../src/parameters/stWan.ts","../src/parameters/getCurrentRate.ts","../src/parameters/getUnstakeStatus.ts","../src/governance.ts"],"sourcesContent":["import {\n encodeAbiParameters,\n decodeAbiParameters,\n type Hex\n} from 'viem';\n\n/**\n * Type definition for proposal description schema structure\n * @interface ProposalDescriptionSchema\n * @property {Array<{ type: string }>} types - ABI parameter types array\n * @property {string[]} names - Corresponding parameter names array (no undefined values)\n */\nexport interface ProposalDescriptionSchema {\n types: Array<{ type: 'uint8' | 'string' }>;\n names: string[]; // Explicitly enforce string array (no undefined)\n}\n\n/**\n * Type definition for decoded proposal description data\n * @type {Record<string, number | string>}\n * Key-value pairs of proposal description data (version/title/description etc.)\n */\nexport type ProposalDescriptionData = Record<string, number | string>;\n\n/**\n * Valid version types for proposal description schema\n * @type {1 | 2 | 3}\n */\nexport type ValidVersion = 1 | 2 | 3;\n\n/**\n * Supported proposal description data type schemas by version\n * @readonly\n * @type {Record<ValidVersion, ProposalDescriptionSchema>}\n * Schema definitions for different versions of proposal description data:\n * - Version 1: basic fields (version/title/description/email/telegram)\n * - Version 2: adds twitter field\n * - Version 3: adds discord field\n */\nexport const supportedProposalDescriptionDataTypeSchema: Record<ValidVersion, ProposalDescriptionSchema> = {\n 1: {\n types: [\n { type: 'uint8' }, // version\n { type: 'string' }, // title\n { type: 'string' }, // description\n { type: 'string' }, // email\n { type: 'string' }, // telegram\n ],\n names: ['version', 'title', 'description', 'email', 'telegram'],\n },\n 2: {\n types: [\n { type: 'uint8' }, // version\n { type: 'string' }, // title\n { type: 'string' }, // description\n { type: 'string' }, // email\n { type: 'string' }, // telegram\n { type: 'string' }, // twitter\n ],\n names: ['version', 'title', 'description', 'email', 'telegram', 'twitter'],\n },\n 3: {\n types: [\n { type: 'uint8' }, // version\n { type: 'string' }, // title\n { type: 'string' }, // description\n { type: 'string' }, // email\n { type: 'string' }, // telegram\n { type: 'string' }, // twitter\n { type: 'string' }, // discord\n ],\n names: ['version', 'title', 'description', 'email', 'telegram', 'twitter', 'discord'],\n }\n};\n\n/**\n * Type guard to check if a number is a valid version (1/2/3)\n * @function isValidVersion\n * @param {number} version - Number to check\n * @returns {version is ValidVersion} True if version is 1/2/3\n */\nfunction isValidVersion(version: number): version is ValidVersion {\n return version === 1 || version === 2 || version === 3;\n}\n\n/**\n * Type guard to check if a value is a non-empty string (valid for object indexing)\n * @function isValidIndexString\n * @param {unknown} value - Value to check\n * @returns {value is string} True if value is a non-empty string\n */\nfunction isValidIndexString(value: unknown): value is string {\n return typeof value === 'string' && value.trim() !== '';\n}\n\n/**\n * Encodes proposal description data to Hex format using viem's encodeAbiParameters\n * @function encodeProposalDescriptionData\n * @param {...(number | string)} args - Proposal description parameters (matches schema by version):\n * - First argument: version (uint8, 1/2/3)\n * - Subsequent arguments: title, description, email, telegram, [twitter], [discord]\n * @returns {Hex} Encoded Hex string of proposal description data\n * @throws {Error} If version is unsupported or argument count doesn't match schema\n * @example\n * // Encode version 2 proposal data\n * const encoded = encodeProposalDescriptionData(2, \"Test Proposal\", \"Test Description\", \"test@example.com\", \"@test\", \"@test_twitter\");\n * console.log(encoded); // Hex string\n */\nexport function encodeProposalDescriptionData(...args: (number | string)[]): Hex {\n const version = args[0] as number;\n \n if (!isValidVersion(version)) {\n throw new Error(\"Unsupported version - only versions 1, 2, 3 are supported\");\n }\n \n const typeSchema = supportedProposalDescriptionDataTypeSchema[version];\n \n if (args.length !== typeSchema.types.length) {\n throw new Error(`Invalid number of arguments for version ${version} - expected ${typeSchema.types.length}, got ${args.length}`);\n }\n \n const encoded = encodeAbiParameters(typeSchema.types, args);\n return encoded;\n}\n\n/**\n * Decodes Hex formatted proposal description data back to object format\n * @function decodeProposalDescriptionData\n * @param {Hex} hexData - Encoded Hex string of proposal description data\n * @returns {ProposalDescriptionData} Decoded proposal description object with named fields\n * @throws {Error} If version from hexData is unsupported or data is corrupted\n * @example\n * // Decode Hex data to proposal object\n * const decoded = decodeProposalDescriptionData(\"0x...\");\n * console.log(decoded.title); // \"Test Proposal\"\n */\nexport function decodeProposalDescriptionData(hexData: Hex): ProposalDescriptionData {\n const version = getVersionFromData(hexData);\n \n // Fix 2: Use type guard for version validation in decode function\n if (!isValidVersion(version)) {\n throw new Error(`Unsupported version ${version} - only versions 1, 2, 3 are supported`);\n }\n \n const typeSchema = supportedProposalDescriptionDataTypeSchema[version];\n const decoded = decodeAbiParameters(typeSchema.types, hexData);\n \n // Validate decoded array length matches schema (prevent index out of bounds)\n if (decoded.length !== typeSchema.names.length) {\n throw new Error(`Corrupted data: decoded values count (${decoded.length}) does not match schema (${typeSchema.names.length})`);\n }\n\n // Map decoded array to named object (type-safe)\n const result: ProposalDescriptionData = {};\n for (let i = 0; i < typeSchema.names.length; i++) {\n // Fix: Strict check to ensure index is a valid non-empty string\n const fieldName = typeSchema.names[i];\n const fieldValue = decoded[i];\n\n // Skip invalid fields (or throw error if you want strict validation)\n if (!isValidIndexString(fieldName)) {\n continue; // Or: throw new Error(`Invalid field name at index ${i}: ${fieldName}`);\n }\n\n // Only assign if value is defined (matches number/string type)\n if (fieldValue !== undefined && (typeof fieldValue === 'number' || typeof fieldValue === 'string')) {\n result[fieldName] = fieldValue;\n }\n }\n \n return result;\n}\n\n/**\n * Extracts version number from encoded Hex proposal data\n * @function getVersionFromData\n * @param {Hex} hexData - Encoded Hex string of proposal description data\n * @returns {ValidVersion | 0} Extracted valid version (1/2/3) or 0 if invalid\n * Reads the first 32-byte slot of Hex data to get uint8 version value\n * @example\n * const version = getVersionFromData(\"0x...\");\n * console.log(version); // 2\n */\nexport function getVersionFromData(hexData: Hex): ValidVersion | 0 {\n if (!hexData || typeof hexData !== 'string' || hexData.length < 66) return 0;\n\n const offset = hexData.startsWith('0x') ? 2 : 0;\n const versionPart = hexData.substring(offset, offset + 64);\n \n const version = parseInt(versionPart, 16);\n return isValidVersion(version) ? version : 0;\n}\n\n// // --- 测试用例 ---\n// var myVersion = 1;\n// var myTitle = \"DApp 开发者资助计划\";\n// var myEmail = \"dev@example.com\";\n// var myTg = \"@wanchain_dev\";\n// var myDesc = \"这是一个关于链下存储优化的详细提案描述。\";\n\n// // 编码过程\n// var hexResult = encodeProposalDescriptionData(myVersion, myTitle, myDesc, myEmail, myTg);\n// console.log(\"编码后的 Bytes (十六进制):\", hexResult);\n\n// // 解码过程\n// var originalObject = decodeProposalDescriptionData(hexResult);\n// console.log(\"解码后的原始数据:\", originalObject);\n\n\n// // --- 测试用例 2 ---\n// var myVersion = 2;\n// var myTitle = \"DApp 开发者资助计划\";\n// var myEmail = \"dev@example.com\";\n// var myTg = \"@wanchain_dev\";\n// var twitter = \"wanchain_dev\";\n// var myDesc = \"这是一个关于链下存储优化的详细提案描述。\";\n\n// // 编码过程\n// var hexResult = encodeProposalDescriptionData(myVersion, myTitle, myDesc, myEmail, myTg, twitter);\n// console.log(\"编码后的 Bytes (十六进制):\", hexResult);\n\n// // 解码过程\n// var originalObject = decodeProposalDescriptionData(hexResult);\n// console.log(\"解码后的原始数据:\", originalObject);","import type { Hex, Address } from 'viem';\n\n/**\n * @enum {number} UnstakeStatus\n * Define unstake status at different stages.\n */\n\nexport enum UnstakeStatus {\n NotExists = 0, // Request does not exist\n Claimed = 1, // Request has been claimed\n InProgress = 2, // Request is in progress\n ReadyToClaim = 3 // Request is ready to be claimed\n};\n/**\n * @enum {number} ProposalRole\n * Define the roles of proposal participants.\n */\nexport enum ProposalRole {\n Proposer = 0,\n Partner = 1,\n Voter = 2\n};\n/**\n * @enum {number} PledgeType\n * Define the type of pledged.\n */\nexport enum PledgeType {\n None = 0,\n Burn = 1,\n Lock = 2\n};\n/**\n * @enum {number} VoteType\n * Define the type of vote.\n */\nexport enum VoteType {\n None = 0,\n For = 1,\n Against = 2\n};\n/**\n * @enum {number} ProposalState\n * Define the different stages of a proposal.\n */\nexport enum ProposalState {\n None = 0,\n UnderReview = 1,\n Canceled = 2,\n Fundraising = 3,\n VotingInProgress = 4,\n Succeeded = 5,\n Rejected = 6,\n Failed = 7\n};\n/**\n * @enum {number} ProposalCategory\n * Define the category of proposal.\n */\nexport enum ProposalCategory {\n Funding = 0,\n Technical = 1\n};\n/**\n * Funding info.\n */\nexport interface FundInfo {\n /**\n * Amount of WAN.\n * @type {bigint}\n */\n wanAmount: bigint; // uint256\n /**\n * Amount of WAN power.\n * @type {bigint}\n */\n wanPower: bigint; // uint256\n /**\n * ID of proposal request withdrawal to be queried for proposer, partner or voter.\n * @type {bigint}\n */\n requestId: bigint; // uint256\n /**\n * The amount of StWan that can be withdrawn after staking WAN in the proposal for proposer, partner or voter.\n * @type {bigint}\n */\n claimStWanAmount: bigint; // uint256\n /**\n * The amount of WAN that can be received after claim StWan in the proposal for proposer, partner or voter.\n * @type {bigint}\n */\n claimWanAmount: bigint; // uint256\n /**\n * Lock duration of proposal be queried for proposer, partner or voter.\n * @type {bigint}\n */\n lockDuration: bigint; // uint128\n /**\n * PledgeType of proposal be queried for proposer, partner or voter.\n * @type {PledgeType}\n */\n pledgeType: PledgeType;\n /**\n * Reasons for participating in the proposal.\n * @type {Hex}\n */\n reason: Hex; // bytes\n /**\n * Indicator showing whether it has been claimed.\n * @type {boolean}\n */\n exited: boolean;\n};\n/**\n * Pproposal vote statistics.\n */\nexport interface Tally {\n /**\n * Amount of WAN power for yes.\n * @type {bigint}\n */\n yes: bigint;\n /**\n * Amount of WAN power for no.\n * @type {bigint}\n */\n no: bigint;\n};\n\n/**\n * ContractProposal: proposal info of Wanchain governance contract.\n */\nexport interface ContractProposal {\n /**\n * Amount of XP required when proposal creation.\n * @type {bigint}\n */\n requireXpAmount: bigint; // uint256\n /**\n * Amount of WAN request when proposal creation.\n * @type {bigint}\n */\n requestWanAmount: bigint; // uint256\n /**\n * Minimum amount of WAN power to win proposal vote.\n * @type {bigint}\n */\n requestMinVotingWanPower: bigint; // uint256\n /**\n * Amount of WAN that proposal total pledged for proposer and partner.\n * @type {bigint}\n */\n\n totalPledgingWanAmount: bigint; // uint256\n /**\n * Amount of WAN power that proposal total pledged.\n * @type {bigint}\n */\n totalPledgingWanPower: bigint; // uint256\n /**\n * Amount of WAN voted.\n * @type {bigint}\n */\n\n totalVotingWanAmount: bigint; // uint256\n /**\n * Amount of WAN power voted.\n * @type {bigint}\n */\n totalVotingWanPower: bigint; // uint256\n /**\n * Amount of locked WAN voted.\n * @type {bigint}\n */\n\n totalVotingLockWanAmount: bigint; // uint256\n /**\n * Amount of locked WAN voted.\n * @type {bigint}\n */\n totalVotingLockWanPower: bigint; // uint256\n /**\n * Amount of burned WAN voted.\n * @type {bigint}\n */\n totalVotingBurnWanAmount: bigint; // uint256\n /**\n * Amount of burned WAN power voted.\n * @type {bigint}\n */\n totalVotingBurnWanPower: bigint; // uint256\n /**\n * The total amount of T involved in the proposal.\n * @type {bigint}\n */\n\n totalWanAmount: bigint; // uint256\n /**\n * The amount of WAN's that have passed review in the proposal.\n * @type {bigint}\n */\n totalLockingWanAmount: bigint; // uint256\n /**\n * The amount of WAN's that have burned in the proposal.\n * @type {bigint}\n */\n totalBurnedWanAmount: bigint; // uint256\n /**\n * The total amount of StWan received after staking WAN in the proposal.\n * @type {bigint}\n */\n totalStWanAmount: bigint; // uint256\n /**\n * The amount of StWan that can be withdrawn after staking WAN in the proposal.\n * @type {bigint}\n */\n\n totalClaimStWanAmount: bigint; // uint256\n /**\n * Timestamp of proposal creation.\n * @type {bigint}\n */\n\n submitTimestamp: bigint; // uint256\n /**\n * Fundraising deadline for prospective proposal.\n * @type {bigint}\n */\n fundraisingDeadline: bigint; // uint256\n /**\n * Vote deadline for active(voting) proposal.\n * @type {bigint}\n */\n voteDeadline: bigint; // uint256\n /**\n * Current proposal vote statistics.\n * @type {bigint}\n */\n\n tally: Tally;\n /**\n * Funding info of proposer.\n * @type {Hex}\n */\n\n proposerFundInfo: FundInfo;\n /**\n * Category of proposal.\n * @type {Hex}\n */\n category: ProposalCategory;\n /**\n * State of proposal.\n * @type {Hex}\n */\n\n state: ProposalState;\n /**\n * Proposer of proposal.\n * @type {Hex}\n */\n proposer: Address;\n /**\n * Description of proposal creation.\n * @type {Hex}\n */\n\n description: Hex; // bytes\n /**\n * Reasons to cancel or review proposal.\n * @type {Hex}\n */\n reason: Hex; // bytes\n};\n\n/**\n * ProposalInfo: proposal info extends contract proposal(ContractProposal)\n */\nexport interface ProposalInfo extends ContractProposal {\n /**\n * ID of proposal, should be bytes32.\n * @type {Hex}\n */\n proposalId: Hex,\n};\n\n/**\n * PartnerInfo: partner info in proposal\n */\nexport interface PartnerInfo {\n /**\n * Fund info for partner.\n * @type {FundInfo}\n */\n fundInfo: FundInfo;\n}\n/**\n * VoterInfo: voter info in proposal\n */\nexport interface VoterInfo {\n /**\n * Fund info for voter.\n * @type {FundInfo}\n */\n fundInfo: FundInfo;\n /**\n * Vote type for voter.\n * @type {VoteType}\n */\n voteType: VoteType;\n}\n\n/**\n * IndexRange: Index range: [start, index]\n */\nexport interface IndexRange {\n /**\n * Start index.\n * @type {number}\n */\n start: number;\n /**\n * End index.\n * @type {number}\n */\n end: number;\n}\n/**\n * PlegeMultiplierReturn: Return type for getProposalMultipliers.\n */\n\nexport interface PlegeMultiplierReturn {\n /**\n * PledgeType of proposal be queried for proposer, partner or voter.\n * @type {PledgeType}\n */\n pledgeType: PledgeType;\n /**\n * Lock duration of proposal be queried for proposer, partner or voter.\n * @type {bigint}\n */\n lockDuration: bigint;\n /**\n * Multiplier of proposal be queried for proposer, partner or voter.\n * @type {bigint}\n */\n multiplier: bigint;\n}\n\n/**\n * CanRequestProposalWithdrawalParam: Input parameter type for canRequestProposalWithdrawal, same as CanClaimProposalWithdrawalParam.\n */\nexport interface CanRequestProposalWithdrawalParam {\n /**\n * State of proposal to be queried.\n * @type {ProposalState}\n */\n state: ProposalState;\n /**\n * PledgeType of proposal to be queried.\n * @type {PledgeType}\n */\n pledgeType: PledgeType;\n /**\n * Lock duration of proposal be queried for proposer, partner or voter.\n * @type {bigint}\n */\n lockDuration: bigint;\n /**\n * Vote deadlint for proposal to be queried.\n * @type {bigint}\n */\n voteDeadline: bigint;\n /**\n * ID of proposal request withdrawal to be queried for proposer, partner or voter.\n * @type {bigint}\n */\n requestId: bigint;\n /**\n * Check if already claimed of proposal to be queried for proposer, partner or voter.\n * @type {boolean}\n */\n exited: boolean;\n}\n\n/**\n * CanClaimProposalWithdrawalParam: Input parameter type for canClaimProposalWithdrawal, same as CanRequestProposalWithdrawalParam.\n */\nexport type CanClaimProposalWithdrawalParam = CanRequestProposalWithdrawalParam;\n\n/**\n * CanRequestProposalWithdrawalRetrunItem: Return array item for canRequestProposalWithdrawal\n */\nexport interface CanRequestProposalWithdrawalRetrunItem {\n /**\n * Check if need to request withdrawal for proposer, partner or voter.\n * @type {boolean}\n */\n needRequestWithdrawal: boolean;\n /**\n * Check if can request withdrawal for proposer, partner or voter.\n * @type {boolean}\n */\n canRequestWithdrawal: boolean;\n}\n\n/**\n * Type definition of return type for getBaseParameters.\n * @interface BaseParametersReturnType\n * @property {bigint} allProposalWanAmount - All reviewed proposal WAN amounts.\n * @property {bigint} allProposalLockingWanAmount - All amount of WAN that locking into POS.\n * @property {bigint} allProposalBurnedWanAmount - All burned WAN amounts.\n * @property {bigint} ethTransferGasLimit - WAN transfer gaslimit.\n * @property {bigint} minParticipationAmount - Minimum amount of WANs a participant can participate in for funding proposal.\n * @property {bigint} requestWanMultiplier - Multiplier to request WANs from Wanchain Treasury.\n * @property {bigint} succeedThreshold - Threshold to succeed proposal.\n * @property {bigint} requireXpAmount - Proposal creation require amount of XP.\n * @property {bigint} pledgeLockDuration - Proposer or partner pledge WAN by locking duration.\n * @property {bigint} fundraisingDuration - Duration for partners to pledge their WAN to help a Prospective Proposal meet the pledge requirements.\n * @property {bigint} voteDuration - Duration for voters to vote active proposal.\n * @property {Address} xp - Address of XP token.\n * @property {Address} stakingManager - Address for StakingManager.\n * @property {Address} wanTreasury - Address for Wanchain community treasury.\n * @property {Address} burnAddr - Address for WAN burned.\n * @property {bigint} proposalCount - Count for total proposal: include reviewing proposals, canceled proposals, prospective proposals, active proposals, succeeded proposals and failed proposals.\n * @property {bigint} reviewPendingProposalCount - Count for reviewing proposals.\n * @property {bigint} prospectiveProposalCount - Count for prospective proposals.\n * @property {bigint} votingProposalCount - Count for active(voting) proposals.\n * @property {bigint} succeededProposalCount - Count for succeeded proposals.\n * @property {bigint} rejectedProposalCount - Count for rejected proposals.\n * @property {bigint} failedProposalCount - Count for failed proposals.\n * @property {bigint} canceledProposalCount - Count for canceled proposals.\n * @property {bigint} proposalWanMultiplierCount - Count of multipliers for proposer and partner .\n * @property {bigint} votingWanMultiplierCount - Count of multipliers for voter.\n * @property {bigint} DENOMINATOR - DENOMINATOR.\n * @property {Hex} MAX_REQUEST_WAN_RATIO_BPS_KEY - The key for the maximum request WAN ratio in basis points.\n * @property {Hex} WAN_TOTAL_SUPPLY - The total supply of WAN.\n * @property {Hex} PROPOSAL_CATEGORY_TECHNICAL_SUCCEED_THRESHOLD_KEY - The key for technical proposal succeed threshold by WAN total supply.\n */\nexport interface BaseParametersReturnType {\n allProposalWanAmount: bigint;\n allProposalLockingWanAmount: bigint;\n allProposalBurnedWanAmount: bigint;\n\n ethTransferGasLimit: bigint;\n minParticipationAmount: bigint;\n requestWanMultiplier: bigint;\n succeedThreshold: bigint;\n requireXpAmount: bigint;\n pledgeLockDuration: bigint;\n fundraisingDuration: bigint;\n voteDuration: bigint;\n\n xp: Address;\n stakingManager: Address;\n wanTreasury: Address;\n burnAddr: Address;\n\n proposalCount: bigint;\n reviewPendingProposalCount: bigint;\n prospectiveProposalCount: bigint;\n votingProposalCount: bigint;\n succeededProposalCount: bigint;\n rejectedProposalCount: bigint;\n failedProposalCount: bigint;\n canceledProposalCount: bigint;\n\n proposalWanMultiplierCount: bigint;\n votingWanMultiplierCount: bigint;\n\n DENOMINATOR: bigint;\n MAX_REQUEST_WAN_RATIO_BPS_KEY: Hex;\n WAN_TOTAL_SUPPLY: bigint;\n PROPOSAL_CATEGORY_TECHNICAL_SUCCEED_THRESHOLD_KEY: Hex;\n}\n\nexport type GetProposalInfoAtResult = readonly [Hex, ContractProposal];\n\n/**\n * RecentProposalsParam: Recent proposals parameter\n */\nexport interface RecentProposalsParam {\n /**\n * The start index to query recent proposals, it is the recent index\n * @type {number}\n */\n start: number;\n /**\n * The max count of proposals\n * @type {number}\n */\n limit: number;\n}\n/**\n * GetRecentProposalsResult: Return recent reviewed proposals: state shoud be in [Fundraising, VotingInProgress, Succeeded, Failed]\n */\nexport interface GetRecentProposalsResult {\n /**\n * The proposal array obtained this time is sorted by index from large to small (that is, the latest first)\n * @type {ProposalInfo[]}\n */\n proposals: ProposalInfo[];\n /**\n * The starting index of the next request\n * @type {number}\n */\n nextIndex: number;\n}\n\n/**\n * Aggregate3Call: Aggregate calls, ensuring each returns success if required.\n */\nexport interface Aggregate3Call {\n /**\n * Address of target contract.\n * @type {Hex}\n */\n target: Address;\n /**\n * Whether or not the Hook should throw if a call reverts. If set to true, and a call reverts, then multicall will fail silently and its error will be logged in the results array.\n * @type {boolean}\n */\n\n allowFailure: boolean;\n /**\n * The encoded information sent to the Multicall3 contract. It packages multiple function calls into a single transaction.\n * @type {Hex}\n */\n callData: Hex; // bytes\n};\n\nexport type Aggregate3Calls = Aggregate3Call[];\n","export const ABI = [\n {\n \"type\": \"constructor\",\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"receive\",\n \"stateMutability\": \"payable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"BURN\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"DENOMINATOR\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_REQUEST_WAN_RATIO_BPS_KEY\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"PROPOSAL_CATEGORY_TECHNICAL_SUCCEED_THRESHOLD_KEY\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"WAN_GOVERNOR_OPERATOR_ROLE\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"WAN_TOTAL_SUPPLY\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"cancelProposal\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"_reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"claimPartnerWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"_requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"claimProposerWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"_requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"claimVoterWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"_requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"contributeProposal\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"_pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"_reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"payable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"createProposal\",\n \"inputs\": [\n {\n \"name\": \"_reqWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"_category\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalCategory\"\n },\n {\n \"name\": \"_pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"_description\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"payable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getAllProposalCount\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"count\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getFoundations\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address[]\",\n \"internalType\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalCountByRole\",\n \"inputs\": [\n {\n \"name\": \"_role\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalRole\"\n },\n {\n \"name\": \"_account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"count\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalCountByState\",\n \"inputs\": [\n {\n \"name\": \"_state\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"count\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalId\",\n \"inputs\": [\n {\n \"name\": \"_reqWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"_proposer\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"_category\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalCategory\"\n },\n {\n \"name\": \"_pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"_description\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalIdByRoleAt\",\n \"inputs\": [\n {\n \"name\": \"_role\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalRole\"\n },\n {\n \"name\": \"_account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"_index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalIdByStateAt\",\n \"inputs\": [\n {\n \"name\": \"_state\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n },\n {\n \"name\": \"_index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalInfo\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"info\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.ProposalInfo\",\n \"components\": [\n {\n \"name\": \"requireXpAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestMinVotingWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalPledgingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalPledgingWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingLockWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingLockWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingBurnWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingBurnWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalLockingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalBurnedWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalClaimStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"submitTimestamp\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"fundraisingDeadline\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"voteDeadline\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"tally\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.Tally\",\n \"components\": [\n {\n \"name\": \"yes\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"no\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"name\": \"proposerFundInfo\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.FundInfo\",\n \"components\": [\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"exited\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n },\n {\n \"name\": \"category\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalCategory\"\n },\n {\n \"name\": \"state\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n },\n {\n \"name\": \"proposer\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"description\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalInfoAt\",\n \"inputs\": [\n {\n \"name\": \"_index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"info\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.ProposalInfo\",\n \"components\": [\n {\n \"name\": \"requireXpAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestMinVotingWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalPledgingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalPledgingWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingLockWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingLockWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingBurnWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingBurnWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalLockingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalBurnedWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalClaimStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"submitTimestamp\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"fundraisingDeadline\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"voteDeadline\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"tally\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.Tally\",\n \"components\": [\n {\n \"name\": \"yes\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"no\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"name\": \"proposerFundInfo\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.FundInfo\",\n \"components\": [\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"exited\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n },\n {\n \"name\": \"category\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalCategory\"\n },\n {\n \"name\": \"state\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n },\n {\n \"name\": \"proposer\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"description\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalMultiplierCounts\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"proposalWanMultiplierCount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"votingWanMultiplierCount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalPartnerAndVoterCounts\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"partnerCount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"voterCount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalPartnerAt\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"_index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalPartnerInfo\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"_partner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"partnerInfo\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.PartnerInfo\",\n \"components\": [\n {\n \"name\": \"fundInfo\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.FundInfo\",\n \"components\": [\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"exited\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalState\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"state\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalVoterAt\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"_index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalVoterInfo\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"_voter\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"voterInfo\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.VoterInfo\",\n \"components\": [\n {\n \"name\": \"fundInfo\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.FundInfo\",\n \"components\": [\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"exited\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n },\n {\n \"name\": \"voteType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.VoteType\"\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalWanMultiplier\",\n \"inputs\": [\n {\n \"name\": \"_pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"_lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"multiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getProposalWanMultiplierAt\",\n \"inputs\": [\n {\n \"name\": \"_index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"multiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getRoleAdmin\",\n \"inputs\": [\n {\n \"name\": \"role\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getUint\",\n \"inputs\": [\n {\n \"name\": \"key\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getVotingWanMultiplier\",\n \"inputs\": [\n {\n \"name\": \"_pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"_lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"multiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getVotingWanMultiplierAt\",\n \"inputs\": [\n {\n \"name\": \"_index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"multiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getWanPower\",\n \"inputs\": [\n {\n \"name\": \"multiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"wanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"grantRole\",\n \"inputs\": [\n {\n \"name\": \"role\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"hasProposalExists\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"state\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"hasRole\",\n \"inputs\": [\n {\n \"name\": \"role\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"initialize\",\n \"inputs\": [\n {\n \"name\": \"_admin\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"_operator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"_ultimateUniversalStore\",\n \"type\": \"address\",\n \"internalType\": \"contract IUltimateUniversalStore\"\n },\n {\n \"name\": \"_proposalGlobalConfig\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.ProposalGlobalConfig\",\n \"components\": [\n {\n \"name\": \"ethTransferGasLimit\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"minParticipationAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestWanMultiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"succeedThreshold\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requireXpAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"pledgeLockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"fundraisingDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"voteDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"xp\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"stakingManager\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"wanTreasury\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"isFoundation\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"isFoundationMember\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"multicall\",\n \"inputs\": [\n {\n \"name\": \"data\",\n \"type\": \"bytes[]\",\n \"internalType\": \"bytes[]\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"results\",\n \"type\": \"bytes[]\",\n \"internalType\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"proposalCategoryCount\",\n \"inputs\": [\n {\n \"name\": \"state\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n },\n {\n \"name\": \"category\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalCategory\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"count\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"proposalGlobalConfig\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"ethTransferGasLimit\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"minParticipationAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestWanMultiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"succeedThreshold\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requireXpAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"pledgeLockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"fundraisingDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"voteDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"xp\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"stakingManager\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"wanTreasury\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"renounceRole\",\n \"inputs\": [\n {\n \"name\": \"role\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"callerConfirmation\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"requestPartnerWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"partnerRequestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"requestProposerWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"proposerRequestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"requestVoterWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"voterRequestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"reviewProposal\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"isApproved\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"_reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"revokeRole\",\n \"inputs\": [\n {\n \"name\": \"role\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"setFoundations\",\n \"inputs\": [\n {\n \"name\": \"params\",\n \"type\": \"tuple[]\",\n \"internalType\": \"struct IWanGovernor.SetFoundationParam[]\",\n \"components\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"isFoundationMember\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ]\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"setProposalWanMultiplier\",\n \"inputs\": [\n {\n \"name\": \"params\",\n \"type\": \"tuple[]\",\n \"internalType\": \"struct IWanGovernor.SetWanMultiplier[]\",\n \"components\": [\n {\n \"name\": \"multiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n }\n ]\n },\n {\n \"name\": \"ifClean\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"setUint\",\n \"inputs\": [\n {\n \"name\": \"key\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"value\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"setVotingWanMultiplier\",\n \"inputs\": [\n {\n \"name\": \"params\",\n \"type\": \"tuple[]\",\n \"internalType\": \"struct IWanGovernor.SetWanMultiplier[]\",\n \"components\": [\n {\n \"name\": \"multiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n }\n ]\n },\n {\n \"name\": \"ifClean\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"supportsInterface\",\n \"inputs\": [\n {\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\",\n \"internalType\": \"bytes4\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"tallyProposal\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"totalProposalAmountInfo\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"allProposalWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"allProposalLockingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"allProposalBurnedWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"updateProposalGlobalConfig\",\n \"inputs\": [\n {\n \"name\": \"_proposalGlobalConfig\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.ProposalGlobalConfig\",\n \"components\": [\n {\n \"name\": \"ethTransferGasLimit\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"minParticipationAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestWanMultiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"succeedThreshold\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requireXpAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"pledgeLockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"fundraisingDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"voteDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"xp\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"stakingManager\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"wanTreasury\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"voteProposal\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"_lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"votePledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"_voteType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.VoteType\"\n },\n {\n \"name\": \"_reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"payable\"\n },\n {\n \"type\": \"event\",\n \"name\": \"CancelProposal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"proposer\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"keys\",\n \"type\": \"string[]\",\n \"indexed\": false,\n \"internalType\": \"string[]\"\n },\n {\n \"name\": \"values\",\n \"type\": \"bytes[]\",\n \"indexed\": false,\n \"internalType\": \"bytes[]\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"ClaimWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"proposalRole\",\n \"type\": \"uint8\",\n \"indexed\": true,\n \"internalType\": \"enum IWanGovernor.ProposalRole\"\n },\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"ClaimPartnerWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"ClaimProposerWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"ClaimVoterWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"ContributeProposal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"partner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"state\",\n \"type\": \"uint8\",\n \"indexed\": true,\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n },\n {\n \"name\": \"keys\",\n \"type\": \"string[]\",\n \"indexed\": false,\n \"internalType\": \"string[]\"\n },\n {\n \"name\": \"values\",\n \"type\": \"bytes[]\",\n \"indexed\": false,\n \"internalType\": \"bytes[]\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"CreateProposal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"proposer\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"state\",\n \"type\": \"uint8\",\n \"indexed\": true,\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n },\n {\n \"name\": \"keys\",\n \"type\": \"string[]\",\n \"indexed\": false,\n \"internalType\": \"string[]\"\n },\n {\n \"name\": \"values\",\n \"type\": \"bytes[]\",\n \"indexed\": false,\n \"internalType\": \"bytes[]\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"Initialized\",\n \"inputs\": [\n {\n \"name\": \"version\",\n \"type\": \"uint64\",\n \"indexed\": false,\n \"internalType\": \"uint64\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"RequestWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"proposalRole\",\n \"type\": \"uint8\",\n \"indexed\": true,\n \"internalType\": \"enum IWanGovernor.ProposalRole\"\n },\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"stWanAmount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"RequestPartnerWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"stWanAmount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"RequestProposerWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"stWanAmount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"RequestVoterWithdrawal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"stWanAmount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"ReviewProposal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"isApproved\",\n \"type\": \"bool\",\n \"indexed\": true,\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"state\",\n \"type\": \"uint8\",\n \"indexed\": true,\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"indexed\": false,\n \"internalType\": \"bytes\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"RoleAdminChanged\",\n \"inputs\": [\n {\n \"name\": \"role\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"RoleGranted\",\n \"inputs\": [\n {\n \"name\": \"role\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"sender\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"RoleRevoked\",\n \"inputs\": [\n {\n \"name\": \"role\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"sender\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"SetFoundation\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"isFoundationMember\",\n \"type\": \"bool\",\n \"indexed\": true,\n \"internalType\": \"bool\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"SetProposalFailed\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"indexed\": false,\n \"internalType\": \"bytes\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"SetProposalStage\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"_state\",\n \"type\": \"uint8\",\n \"indexed\": true,\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n },\n {\n \"name\": \"_category\",\n \"type\": \"uint8\",\n \"indexed\": true,\n \"internalType\": \"enum IWanGovernor.ProposalCategory\"\n },\n {\n \"name\": \"ifSet\",\n \"type\": \"bool\",\n \"indexed\": false,\n \"internalType\": \"bool\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"SetProposalStage\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"ifSet\",\n \"type\": \"bool\",\n \"indexed\": true,\n \"internalType\": \"bool\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"SetProposalWanMultiplier\",\n \"inputs\": [\n {\n \"name\": \"multiplier\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"indexed\": true,\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"indexed\": true,\n \"internalType\": \"uint128\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"SetVotingWanMultiplier\",\n \"inputs\": [\n {\n \"name\": \"multiplier\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"indexed\": true,\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"indexed\": true,\n \"internalType\": \"uint128\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"TallyProposal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"stWanAmount\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"UpdateProposalGlobalConfig\",\n \"inputs\": [\n {\n \"name\": \"proposalGlobalConfig\",\n \"type\": \"tuple\",\n \"indexed\": false,\n \"internalType\": \"struct IWanGovernor.ProposalGlobalConfig\",\n \"components\": [\n {\n \"name\": \"ethTransferGasLimit\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"minParticipationAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestWanMultiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"succeedThreshold\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requireXpAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"pledgeLockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"fundraisingDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"voteDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"xp\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"stakingManager\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"wanTreasury\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"VoteProposal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"voter\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"voteType\",\n \"type\": \"uint8\",\n \"indexed\": true,\n \"internalType\": \"enum IWanGovernor.VoteType\"\n },\n {\n \"name\": \"keys\",\n \"type\": \"string[]\",\n \"indexed\": false,\n \"internalType\": \"string[]\"\n },\n {\n \"name\": \"values\",\n \"type\": \"bytes[]\",\n \"indexed\": false,\n \"internalType\": \"bytes[]\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"error\",\n \"name\": \"AccessControlBadConfirmation\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"AccessControlUnauthorizedAccount\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"neededRole\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"AddressEmptyCode\",\n \"inputs\": [\n {\n \"name\": \"target\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"AlreadyContributeProposal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"partner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"AmountBelowMinimum\",\n \"inputs\": [\n {\n \"name\": \"provided\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"required\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ApplicationExceedsLimit\",\n \"inputs\": [\n {\n \"name\": \"requested\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"limit\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"EthTransferFailed\",\n \"inputs\": [\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"value\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"gasLimit\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"FailedCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidInitialization\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidInitialization\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidPledgeType\",\n \"inputs\": [\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidVotePlegeType\",\n \"inputs\": [\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidVoteType\",\n \"inputs\": [\n {\n \"name\": \"voteType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.VoteType\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"LockPeriodNotReached\",\n \"inputs\": [\n {\n \"name\": \"unlockTime\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotAdmin\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotExistsRequestId\",\n \"inputs\": [\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotInitializing\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NotMatchArrayLength\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NotRequestProposal\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotSupportedPledgeType\",\n \"inputs\": [\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotSupportedVotePledgeType\",\n \"inputs\": [\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProposalAlreadyVoted\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"voter\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProposalAlreadyExists\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProposalNotApproved\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProposalNotExist\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProposalNotFundraising\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProposalNotReachedTallyStage\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProposalNotUnderReview\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProposalNotVotingInProgress\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProposalVotingEnded\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProposalVotingTallied\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProspectiveProposalNotExist\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ReentrancyGuardReentrantCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"ReviewPendingProposalNotExist\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"SafeCastOverflowedUintDowncast\",\n \"inputs\": [\n {\n \"name\": \"bits\",\n \"type\": \"uint8\",\n \"internalType\": \"uint8\"\n },\n {\n \"name\": \"value\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"SafeERC20FailedOperation\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"Unauthorized\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"proposer\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"UnauthorizedEtherTransfer\",\n \"inputs\": [\n {\n \"name\": \"from\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"VotingProposalNotExist\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"VotingProposalRejected\",\n \"inputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"WithdrawalNotRequested\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ZeroAddress\",\n \"inputs\": []\n }\n] as const;","export const ABI = [\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"target\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"callData\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct Multicall3.Call[]\",\n \"name\": \"calls\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"aggregate\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"blockNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"returnData\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"target\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"allowFailure\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"callData\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct Multicall3.Call3[]\",\n \"name\": \"calls\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"aggregate3\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"success\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"returnData\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct Multicall3.Result[]\",\n \"name\": \"returnData\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"target\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"allowFailure\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"callData\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct Multicall3.Call3Value[]\",\n \"name\": \"calls\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"aggregate3Value\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"success\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"returnData\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct Multicall3.Result[]\",\n \"name\": \"returnData\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"target\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"callData\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct Multicall3.Call[]\",\n \"name\": \"calls\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"blockAndAggregate\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"blockNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"blockHash\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"success\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"returnData\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct Multicall3.Result[]\",\n \"name\": \"returnData\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getBasefee\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"basefee\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"blockNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getBlockHash\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"blockHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getBlockNumber\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"blockNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getChainId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainid\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getCurrentBlockCoinbase\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"coinbase\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getCurrentBlockDifficulty\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"difficulty\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getCurrentBlockGasLimit\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"gaslimit\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getCurrentBlockTimestamp\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timestamp\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"addr\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getEthBalance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getLastBlockHash\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"blockHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"requireSuccess\",\n \"type\": \"bool\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"target\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"callData\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct Multicall3.Call[]\",\n \"name\": \"calls\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"tryAggregate\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"success\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"returnData\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct Multicall3.Result[]\",\n \"name\": \"returnData\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"requireSuccess\",\n \"type\": \"bool\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"target\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"callData\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct Multicall3.Call[]\",\n \"name\": \"calls\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"tryBlockAndAggregate\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"blockNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"blockHash\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"success\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"returnData\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct Multicall3.Result[]\",\n \"name\": \"returnData\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n }\n] as const;","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n type: 'function',\n name: 'getEthBalance',\n inputs: [{ \"name\": \"addr\", \"type\": \"address\", \"internalType\": \"address\" }],\n outputs: [{ name: 'balance', type: 'uint256', internalType: 'uint256' }],\n stateMutability: 'view'\n }\n] as const;\n\n\nexport function getEthBalance(multicall3Addr: Address, owner: Address) {\n const call = {\n address: multicall3Addr,\n abi,\n functionName: 'getEthBalance',\n args: [ owner ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getEthBalance.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n name: 'balanceOf',\n type: 'function',\n inputs: [{ name: 'owner', type: 'address' }],\n outputs: [{ name: 'balance', type: 'uint256' }],\n stateMutability: 'view'\n }\n] as const;\n\n\nexport function getErc20Balance(erc20Addr: Address, owner: Address) {\n const call = {\n address: erc20Addr,\n abi,\n functionName: 'balanceOf',\n args: [ owner ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getErc20Balance.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"BURN\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function BURN(governanceAddr: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'BURN',\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/BURN.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"isFoundation\",\n \"inputs\": [\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"isFoundationMember\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function isFoundation(governanceAddr: Address, account: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'isFoundation',\n args: [ account ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/isFoundation.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getFoundations\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address[]\",\n \"internalType\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getFoundations(governanceAddr: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getFoundations',\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getFoundations.ts","import type { Address, Hex } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"hasRole\",\n \"inputs\": [\n {\n \"name\": \"role\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function hasRole(governanceAddr: Address, account: Address, role: Hex) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'hasRole',\n args: [ role, account ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/hasRole.ts","import type { Address } from 'viem';\nimport { ProposalState, ProposalCategory } from '../types';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"proposalCategoryCount\",\n \"inputs\": [\n {\n \"name\": \"state\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n },\n {\n \"name\": \"category\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalCategory\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"count\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function proposalCategoryCount(governanceAddr: Address, state: ProposalState, category: ProposalCategory) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'proposalCategoryCount',\n args: [state, category]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/proposalCategoryCount.ts","import type { Address, Hex } from 'viem';\nimport type { ProposalCategory, PledgeType } from '../types';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getProposalId\",\n \"inputs\": [\n {\n \"name\": \"_reqWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"_proposer\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"_category\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalCategory\"\n },\n {\n \"name\": \"_pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"_description\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getProposalId(governanceAddr: Address, reqWanAmount: bigint, proposer: Address, category: ProposalCategory, pledgeType: PledgeType, description: Hex) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getProposalId',\n args: [ reqWanAmount, proposer, category, pledgeType, description ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getProposalId.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getProposalInfoAt\",\n \"inputs\": [\n {\n \"name\": \"_index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"info\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.ProposalInfo\",\n \"components\": [\n {\n \"name\": \"requireXpAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestMinVotingWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalPledgingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalPledgingWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingLockWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingLockWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingBurnWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingBurnWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalLockingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalBurnedWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalClaimStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"submitTimestamp\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"fundraisingDeadline\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"voteDeadline\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"tally\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.Tally\",\n \"components\": [\n {\n \"name\": \"yes\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"no\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"name\": \"proposerFundInfo\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.FundInfo\",\n \"components\": [\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"exited\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n },\n {\n \"name\": \"category\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalCategory\"\n },\n {\n \"name\": \"state\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n },\n {\n \"name\": \"proposer\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"description\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getProposalInfoAt(governanceAddr: Address, index: number) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getProposalInfoAt',\n args: [ index ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getProposalInfoAt.ts","import type { Address, Hex } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getProposalInfo\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"info\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.ProposalInfo\",\n \"components\": [\n {\n \"name\": \"requireXpAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestMinVotingWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalPledgingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalPledgingWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingLockWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingLockWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingBurnWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalVotingBurnWanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalLockingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalBurnedWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalClaimStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"submitTimestamp\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"fundraisingDeadline\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"voteDeadline\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"tally\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.Tally\",\n \"components\": [\n {\n \"name\": \"yes\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"no\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"name\": \"proposerFundInfo\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.FundInfo\",\n \"components\": [\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"exited\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n },\n {\n \"name\": \"category\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalCategory\"\n },\n {\n \"name\": \"state\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n },\n {\n \"name\": \"proposer\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"description\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getProposalInfo(governanceAddr: Address, proposalId: Hex) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getProposalInfo',\n args: [ proposalId ],\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getProposalInfo.ts","import type { Address } from 'viem';\nimport type { ProposalState } from '../types';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getProposalIdByStateAt\",\n \"inputs\": [\n {\n \"name\": \"_state\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n },\n {\n \"name\": \"_index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getProposalIdByStateAt(governanceAddr: Address, state: ProposalState, index: number) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getProposalIdByStateAt',\n args: [ state, index ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getProposalIdByStateAt.ts","import type { Address } from 'viem';\nimport type { ProposalState } from '../types';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getProposalCountByState\",\n \"inputs\": [\n {\n \"name\": \"_state\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalState\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"count\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getProposalCountByState(governanceAddr: Address, state: ProposalState) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getProposalCountByState',\n args: [ state ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getProposalCountByState.ts","import type { Address } from 'viem';\nimport type { ProposalRole } from '../types';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getProposalCountByRole\",\n \"inputs\": [\n {\n \"name\": \"_role\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalRole\"\n },\n {\n \"name\": \"_account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"count\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getProposalCountByRole(governanceAddr: Address, role: ProposalRole, account: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getProposalCountByRole',\n args: [ role, account ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getProposalCountByRole.ts","import type { Address, Hex } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getProposalPartnerAndVoterCounts\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"partnerCount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"voterCount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getProposalPartnerAndVoterCounts(governanceAddr: Address, proposalId: Hex) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getProposalPartnerAndVoterCounts',\n args: [ proposalId ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getProposalPartnerAndVoterCounts.ts","import type { Address, Hex } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getProposalPartnerInfo\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"_partner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"partnerInfo\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.PartnerInfo\",\n \"components\": [\n {\n \"name\": \"fundInfo\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.FundInfo\",\n \"components\": [\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"exited\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getProposalPartnerInfo(governanceAddr: Address, proposalId: Hex, partnerAddr: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getProposalPartnerInfo',\n args: [ proposalId, partnerAddr ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getProposalPartnerInfo.ts","import type { Address } from 'viem';\nimport type { ProposalRole } from '../types';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getProposalIdByRoleAt\",\n \"inputs\": [\n {\n \"name\": \"_role\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.ProposalRole\"\n },\n {\n \"name\": \"_account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"_index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getProposalIdByRoleAt(governanceAddr: Address, role: ProposalRole, account: Address, index: number) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getProposalIdByRoleAt',\n args: [role, account, index]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getProposalIdByRoleAt.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getAllProposalCount\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"count\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getAllProposalCount(governanceAddr: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getAllProposalCount',\n args: []\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getAllProposalCount.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"totalProposalAmountInfo\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"allProposalWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"allProposalLockingWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"allProposalBurnedWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function totalProposalAmountInfo(governanceAddr: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'totalProposalAmountInfo',\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/totalProposalAmountInfo.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"proposalGlobalConfig\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"ethTransferGasLimit\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"minParticipationAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestWanMultiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"succeedThreshold\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requireXpAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"pledgeLockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"fundraisingDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"voteDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"xp\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"stakingManager\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"wanTreasury\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function proposalGlobalConfig(governanceAddr: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'proposalGlobalConfig',\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/proposalGlobalConfig.ts","import type { Address, Hex } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getProposalVoterInfo\",\n \"inputs\": [\n {\n \"name\": \"_proposalId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"_voter\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"voterInfo\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.VoterInfo\",\n \"components\": [\n {\n \"name\": \"fundInfo\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IWanGovernor.FundInfo\",\n \"components\": [\n {\n \"name\": \"wanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"wanPower\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimStWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimWanAmount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"exited\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n },\n {\n \"name\": \"voteType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.VoteType\"\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getProposalVoterInfo(governanceAddr: Address, proposalId: Hex, voterAddr: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getProposalVoterInfo',\n args: [proposalId, voterAddr]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getProposalVoterInfo.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getProposalMultiplierCounts\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"proposalWanMultiplierCount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"votingWanMultiplierCount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getProposalMultiplierCounts(governanceAddr: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getProposalMultiplierCounts',\n args: []\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/proposalWanMultiplierCount.ts","import type { Address, ContractFunctionParameters } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getProposalWanMultiplierAt\",\n \"inputs\": [\n {\n \"name\": \"_index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"multiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getProposalWanMultiplierAt(governanceAddr: Address, index: number): ContractFunctionParameters {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getProposalWanMultiplierAt',\n args: [ index ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getProposalWanMultiplierAt.ts","import type { Address, ContractFunctionParameters } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getVotingWanMultiplierAt\",\n \"inputs\": [\n {\n \"name\": \"_index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"pledgeType\",\n \"type\": \"uint8\",\n \"internalType\": \"enum IWanGovernor.PledgeType\"\n },\n {\n \"name\": \"lockDuration\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"multiplier\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getVotingWanMultiplierAt(governanceAddr: Address, index: number): ContractFunctionParameters {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getVotingWanMultiplierAt',\n args: [ index ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getVotingWanMultiplierAt.ts","import type { Address, Hex } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"DENOMINATOR\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function DENOMINATOR(governanceAddr: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'DENOMINATOR',\n args: []\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/DENOMINATOR.ts","import type { Address, Hex } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"MAX_REQUEST_WAN_RATIO_BPS_KEY\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function MAX_REQUEST_WAN_RATIO_BPS_KEY(governanceAddr: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'MAX_REQUEST_WAN_RATIO_BPS_KEY',\n args: []\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/MAX_REQUEST_WAN_RATIO_BPS_KEY.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"WAN_TOTAL_SUPPLY\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function WAN_TOTAL_SUPPLY(governanceAddr: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'WAN_TOTAL_SUPPLY',\n args: []\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/WAN_TOTAL_SUPPLY.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"PROPOSAL_CATEGORY_TECHNICAL_SUCCEED_THRESHOLD_KEY\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function PROPOSAL_CATEGORY_TECHNICAL_SUCCEED_THRESHOLD_KEY(governanceAddr: Address) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'PROPOSAL_CATEGORY_TECHNICAL_SUCCEED_THRESHOLD_KEY',\n args: []\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/PROPOSAL_CATEGORY_TECHNICAL_SUCCEED_THRESHOLD_KEY.ts","import type { Address, Hex } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getUint\",\n \"inputs\": [\n {\n \"name\": \"key\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getUint(governanceAddr: Address, key: Hex) {\n const call = {\n address: governanceAddr,\n abi,\n functionName: 'getUint',\n args: [ key ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getUint.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"stWan\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function stWan(stakingManagerAddr: Address) {\n const call = {\n address: stakingManagerAddr,\n abi,\n functionName: 'stWan',\n args: []\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/stWan.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getCurrentRate\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getCurrentRate(stWanAddr: Address) {\n const call = {\n address: stWanAddr,\n abi,\n functionName: 'getCurrentRate',\n args: []\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getCurrentRate.ts","import type { Address } from 'viem';\n\n\nconst abi = [\n {\n \"type\": \"function\",\n \"name\": \"getUnstakeStatus\",\n \"inputs\": [\n {\n \"name\": \"requestId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"unstakeStatus\",\n \"type\": \"uint8\",\n \"internalType\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n] as const;\n\n\nexport function getUnstakeStatus(stakingManagerAddr: Address, requestId: bigint) {\n const call = {\n address: stakingManagerAddr,\n abi,\n functionName: 'getUnstakeStatus',\n args: [ requestId ]\n } as const;\n\n return call;\n}\n\n// yarn tsx --tsconfig tsconfig.json src/parameters/getUnstakeStatus.ts","import {\n createPublicClient,\n encodeFunctionData,\n http,\n type Abi,\n type Address,\n type Account,\n type Hex,\n type Chain,\n type EncodeFunctionDataParameters,\n type ContractFunctionArgs,\n type ContractFunctionName,\n type ContractFunctionParameters,\n type PrepareTransactionRequestParameters,\n type PrepareTransactionRequestReturnType,\n type PublicClient,\n} from 'viem';\nimport { wanchain } from 'viem/chains';\nimport {\n UnstakeStatus,\n ProposalRole,\n PledgeType,\n VoteType,\n ProposalState,\n ProposalCategory,\n type BaseParametersReturnType,\n type ContractProposal,\n type GetProposalInfoAtResult,\n type ProposalInfo,\n type PartnerInfo,\n type VoterInfo,\n type IndexRange,\n type PlegeMultiplierReturn,\n type CanRequestProposalWithdrawalParam,\n type CanRequestProposalWithdrawalRetrunItem,\n type CanClaimProposalWithdrawalParam,\n type RecentProposalsParam,\n type GetRecentProposalsResult,\n type Aggregate3Call,\n type Aggregate3Calls,\n} from './types'\nimport { ABI as GOVERNANCE_ABI } from './abis/WanGovernor';\nimport { ABI as MULTICALL3_ABI } from './abis/Multicall3';\nimport * as Parameters from './parameters';\n\n\n/**\n * Wanchain governance\n * @remarks Providing creation, cancellation, review, contribute, voting, query, etc. proposal API\n */\n/**\n * Governance Core Class: Encapsulates Viem's PublicClient and Wanchain governance contract address management\n * @class SDK\n * @template TAbi - Contract ABI type, the built-in GOVERNANCE_ABI constant is used by default\n * @param {Address} governanceAddr - Wanchain governance contract address\n * @param {Chain} chain - Block chain from Viem's chains(such as wanchain, wanchainTestnet)\n * @param {string} [rpcUrl] - Optional custom RPC; if not provided, the chain's default RPC is used.\n * @example\n * const sdk = new Governance('0x123...', wanchain);\n * console.log(sdk.governanceAddr); // '0x123...'\n */\nexport class Governance<TAbi extends Abi = typeof GOVERNANCE_ABI, TMulticallAbi extends Abi = typeof MULTICALL3_ABI> {\n public readonly publicClient: PublicClient;\n public readonly governanceAddr: Address;\n public readonly multicallAddr: Address;\n public readonly governanceAbi: Abi = GOVERNANCE_ABI;\n public readonly multicallAbi: Abi = MULTICALL3_ABI;\n private readonly DEFAULT_ADMIN_ROLE: Hex = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n private readonly WAN_GOVERNOR_OPERATOR_ROLE: Hex = \"0x9c307f370e24cd9c4086c6c16452697787789246a163292b4e4203788924e58f\";\n\n constructor(governanceAddr: Address, chain: Chain = wanchain, rpcUrl?: string) {\n if (!chain?.contracts?.multicall3?.address) {\n throw new Error('not support multicall3');\n }\n this.multicallAddr = chain.contracts.multicall3.address;\n\n // 1. Init Public Client (for read-only operations)\n this.publicClient = createPublicClient({\n chain,\n transport: rpcUrl ? http(rpcUrl) : http(),\n });\n this.governanceAddr = governanceAddr;\n }\n\n /**\n * Get the basic parameters(return JSON object)\n * @returns {Promise<BaseParametersReturnType>}\n * @example\n * const ret = await sdk.getBaseParameters();\n * console.log(ret);\n */\n async getBaseParameters(): Promise<BaseParametersReturnType> {\n const results = await this.publicClient.multicall({\n contracts: [\n Parameters.totalProposalAmountInfo(this.governanceAddr),\n Parameters.proposalGlobalConfig(this.governanceAddr),\n Parameters.BURN(this.governanceAddr),\n Parameters.getAllProposalCount(this.governanceAddr),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.UnderReview),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.Fundraising),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.VotingInProgress),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.Succeeded),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.Rejected),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.Failed),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.Canceled),\n Parameters.getProposalMultiplierCounts(this.governanceAddr),\n Parameters.DENOMINATOR(this.governanceAddr),\n Parameters.MAX_REQUEST_WAN_RATIO_BPS_KEY(this.governanceAddr),\n Parameters.WAN_TOTAL_SUPPLY(this.governanceAddr),\n Parameters.PROPOSAL_CATEGORY_TECHNICAL_SUCCEED_THRESHOLD_KEY(this.governanceAddr),\n ],\n allowFailure: false,\n });\n\n return {\n allProposalWanAmount: results[0][0],\n allProposalLockingWanAmount: results[0][1],\n allProposalBurnedWanAmount: results[0][2],\n\n ethTransferGasLimit: results[1][0],\n minParticipationAmount: results[1][1],\n requestWanMultiplier: results[1][2],\n succeedThreshold: results[1][3],\n requireXpAmount: results[1][4],\n pledgeLockDuration: results[1][5],\n fundraisingDuration: results[1][6],\n voteDuration: results[1][7],\n xp: results[1][8],\n stakingManager: results[1][9],\n wanTreasury: results[1][10],\n\n burnAddr: results[2],\n\n proposalCount: results[3],\n reviewPendingProposalCount: results[4],\n prospectiveProposalCount: results[5],\n votingProposalCount: results[6],\n succeededProposalCount: results[7],\n rejectedProposalCount: results[8],\n failedProposalCount: results[9],\n canceledProposalCount: results[10],\n\n proposalWanMultiplierCount: results[11][0],\n votingWanMultiplierCount: results[11][1],\n\n DENOMINATOR: results[12],\n MAX_REQUEST_WAN_RATIO_BPS_KEY: results[13],\n WAN_TOTAL_SUPPLY: results[14],\n PROPOSAL_CATEGORY_TECHNICAL_SUCCEED_THRESHOLD_KEY: results[15],\n }\n }\n\n /**\n * Get array of uint value by keys, they were set by setUint\n * @param {Hex[]} keys - Bytes32 keys to be queried\n * @returns {Promise<{bigint[]}>}\n * @example\n * const ret = await sdk.getUints(\"0x9c307f370e24cd9c4086c6c16452697787789246a163292b4e4203788924e58f\");\n * console.log(ret);\n */\n async getUints(keys: Hex[]): Promise<bigint[]> {\n\n const results = await this.publicClient.multicall({\n contracts: keys.map(key => Parameters.getUint(this.governanceAddr, key)),\n allowFailure: false,\n });\n\n return results;\n }\n\n /**\n * Get the basic parameters(return JSON object)\n * @param options - Optional parameters\n * @param options.proposalWanMultiplier - Index range of proposal WAN multipliers\n * @param options.votingWanMultiplier - Index range of voter WAN multipliers\n * @returns {Promise<{\n proposalWanMultipliers: PlegeMultiplierReturn[] | []\n votingWanMultipliers: PlegeMultiplierReturn[] | []\n }>}\n * @example\n * const ret = await sdk.getProposalMultipliers({proposalWanMultiplier:{start: 0, end: 0}, votingWanMultiplier:{start: 0, end: 0}});\n * console.log(ret);\n */\n async getProposalMultipliers(options:{proposalWanMultiplier: IndexRange | undefined, votingWanMultiplier: IndexRange | undefined}): Promise<{\n proposalWanMultipliers: PlegeMultiplierReturn[] | []\n votingWanMultipliers: PlegeMultiplierReturn[] | []\n }> {\n let proposalWanMultiplierCount = 0;\n let votingWanMultiplierCount = 0;\n if (options.proposalWanMultiplier) {\n if (options.proposalWanMultiplier.end < options.proposalWanMultiplier.start || options.proposalWanMultiplier.start < 0) {\n throw new Error('Invalid proposalWanMultiplier');\n }\n proposalWanMultiplierCount = options.proposalWanMultiplier.end - options.proposalWanMultiplier.start + 1;\n }\n if (options.votingWanMultiplier) {\n if (options.votingWanMultiplier.end < options.votingWanMultiplier.start || options.votingWanMultiplier.start < 0) {\n throw new Error('Invalid votingWanMultiplier');\n }\n votingWanMultiplierCount = options.votingWanMultiplier.end - options.votingWanMultiplier.start + 1;\n }\n\n let contractCount = proposalWanMultiplierCount + votingWanMultiplierCount;\n\n let hasProposalWanMultipliers = proposalWanMultiplierCount > 0;\n let hasVotingWanMultipliers = votingWanMultiplierCount > 0;\n let contracts: ContractFunctionParameters[] = new Array(contractCount);\n if (hasProposalWanMultipliers) {\n for (let i = 0; i < proposalWanMultiplierCount; ++i) {\n contracts[i] = Parameters.getProposalWanMultiplierAt(this.governanceAddr, i);\n }\n }\n if (hasVotingWanMultipliers) {\n for (let i = proposalWanMultiplierCount; i < contractCount; ++i) {\n contracts[i] = Parameters.getVotingWanMultiplierAt(this.governanceAddr, i - proposalWanMultiplierCount);\n }\n }\n\n const results = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n });\n\n let proposalWanMultipliers = hasProposalWanMultipliers ? new Array(proposalWanMultiplierCount) : [];\n let votingWanMultipliers = hasVotingWanMultipliers ? new Array(votingWanMultiplierCount) : [];\n\n for (let i = 0; i < results.length; ++i) {\n if (i < proposalWanMultiplierCount) {\n let data = results[i] as [PledgeType, bigint, bigint];\n proposalWanMultipliers[i] = {\n pledgeType: data[0],\n lockDuration: data[1],\n multiplier: data[2],\n };\n } else {\n let data = results[i] as [PledgeType, bigint, bigint];\n votingWanMultipliers[i - proposalWanMultiplierCount] = {\n pledgeType: data[0],\n lockDuration: data[1],\n multiplier: data[2],\n };\n }\n }\n\n return {\n proposalWanMultipliers: proposalWanMultipliers,\n votingWanMultipliers: votingWanMultipliers,\n }\n }\n\n /**\n * Get proposal counts for all, recviewPending, prospective, voting, succeeded, failed and canceled proposal\n * @returns {Promise<{\n allProposalCount: bigint\n reviewPendingProposalCount: bigint\n prospectiveProposalCount: bigint\n votingProposalCount: bigint\n succeededProposalCount: bigint\n failedProposalCount: bigint\n canceledProposalCount: bigint\n }>}\n * @example\n * const ret = await sdk.getProposalCounts();\n * console.log(ret);\n */\n async getProposalCounts(): Promise<{\n allProposalCount: bigint\n reviewPendingProposalCount: bigint\n prospectiveProposalCount: bigint\n votingProposalCount: bigint\n succeededProposalCount: bigint\n rejectedProposalCount: bigint\n failedProposalCount: bigint\n canceledProposalCount: bigint\n }> {\n\n const results = await this.publicClient.multicall({\n contracts: [\n Parameters.getAllProposalCount(this.governanceAddr),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.UnderReview),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.Fundraising),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.VotingInProgress),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.Succeeded),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.Rejected),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.Failed),\n Parameters.getProposalCountByState(this.governanceAddr, ProposalState.Canceled),\n ],\n allowFailure: false,\n });\n\n return {\n allProposalCount: results[0],\n reviewPendingProposalCount: results[1],\n prospectiveProposalCount: results[2],\n votingProposalCount: results[3],\n succeededProposalCount: results[4],\n rejectedProposalCount: results[5],\n failedProposalCount: results[6],\n canceledProposalCount: results[7],\n }\n }\n\n /**\n * Get active proposal counts by category\n * @returns {Promise<{\n fundingProposalCount: bigint\n technicalProposalCount: bigint\n }>}\n * @example\n * const ret = await sdk.getActiveProposalCategoryCounts();\n * console.log(ret);\n */\n async getActiveProposalCategoryCounts(): Promise<{\n fundingProposalCount: bigint\n technicalProposalCount: bigint\n }> {\n const results = await this.publicClient.multicall({\n contracts: [\n Parameters.proposalCategoryCount(this.governanceAddr, ProposalState.VotingInProgress, ProposalCategory.Funding),\n Parameters.proposalCategoryCount(this.governanceAddr, ProposalState.VotingInProgress, ProposalCategory.Technical),\n ],\n allowFailure: false,\n });\n\n return {\n fundingProposalCount: results[0],\n technicalProposalCount: results[1],\n }\n }\n\n /**\n * Get prospective + active proposal counts by category\n * @returns {Promise<{\n fundingProposalCount: bigint\n technicalProposalCount: bigint\n }>}\n * @example\n * const ret = await sdk.getParticipableProposalCategoryCounts();\n * console.log(ret);\n */\n async getParticipableProposalCategoryCounts(): Promise<{\n fundingProposalCount: bigint\n technicalProposalCount: bigint\n }> {\n const results = await this.publicClient.multicall({\n contracts: [\n Parameters.proposalCategoryCount(this.governanceAddr, ProposalState.Fundraising, ProposalCategory.Funding),\n Parameters.proposalCategoryCount(this.governanceAddr, ProposalState.Fundraising, ProposalCategory.Technical),\n Parameters.proposalCategoryCount(this.governanceAddr, ProposalState.VotingInProgress, ProposalCategory.Funding),\n Parameters.proposalCategoryCount(this.governanceAddr, ProposalState.VotingInProgress, ProposalCategory.Technical),\n ],\n allowFailure: false,\n });\n\n return {\n fundingProposalCount: results[0] + results[2],\n technicalProposalCount: results[1] + results[3],\n }\n }\n\n /**\n * Get WAN and XP balance for identified account\n * @returns {Promise<{\n ethBalance: bigint\n xpBalance: bigint\n }>}\n * @example\n * const xpAddress = '0x123...';\n * const account = '0x456...';\n * const ret = await sdk.getAssetBalances(xpAddress, account);\n * console.log(ret);\n */\n async getAssetBalances(xpAddress: Address, account: Address): Promise<{\n ethBalance: bigint\n xpBalance: bigint\n }> {\n const results = await this.publicClient.multicall({\n contracts: [\n Parameters.getEthBalance(this.multicallAddr, account),\n Parameters.getErc20Balance(xpAddress, account)\n ],\n allowFailure: false,\n });\n\n return {\n ethBalance: results[0],\n xpBalance: results[1],\n }\n }\n\n /**\n * Get counts proposal count for identified account\n * @param {Address} account - Account to be queried\n * @returns {Promise<{\n proposerProposalCount: bigint,\n partnerProposalCount: bigint,\n voterProposalCount: bigint,\n }>}\n * @example\n * const account = '0x456...';\n * const ret = await sdk.getAccountProposalCount(account);\n * console.log(ret);\n */\n async getAccountProposalCount(account: Address): Promise<{\n proposerProposalCount: bigint,\n partnerProposalCount: bigint,\n voterProposalCount: bigint,\n }> {\n const results = await this.publicClient.multicall({\n contracts: [\n Parameters.getProposalCountByRole(this.governanceAddr, ProposalRole.Proposer, account),\n Parameters.getProposalCountByRole(this.governanceAddr, ProposalRole.Partner, account),\n Parameters.getProposalCountByRole(this.governanceAddr, ProposalRole.Voter, account),\n ],\n allowFailure: false,\n });\n\n return {\n proposerProposalCount: results[0],\n partnerProposalCount: results[1],\n voterProposalCount: results[2],\n }\n }\n\n /**\n * Get fouondations\n * @returns {Promise<readonly Address[]>} - Array of foundations\n * @example\n * const ret = await sdk.getFoundations(account);\n * console.log(ret);\n */\n async getFoundations(): Promise<readonly Address[]> {\n const results = await this.publicClient.readContract(Parameters.getFoundations(this.governanceAddr));\n return results;\n }\n\n /**\n * Check account role\n * @returns {Promise<{\n isAdmin: boolean,\n isOperator: boolean,\n isFouondation: boolean,\n }>} - Result of account role verification\n * @example\n * const ret = await sdk.checkAccountRole(account);\n * console.log(ret);\n */\n async checkAccountRole(account: Address): Promise<{\n isAdmin: boolean,\n isOperator: boolean,\n isFouondation: boolean,\n }> {\n const results = await this.publicClient.multicall({\n contracts: [\n Parameters.hasRole(this.governanceAddr, account, this.DEFAULT_ADMIN_ROLE),\n Parameters.hasRole(this.governanceAddr, account, this.WAN_GOVERNOR_OPERATOR_ROLE),\n Parameters.isFoundation(this.governanceAddr, account)\n ],\n allowFailure: false,\n });\n\n return {\n isAdmin: results[0],\n isOperator: results[1],\n isFouondation: results[2],\n }\n }\n\n /**\n * Caculate proposal ID\n * @param {Address} account - Account of proposer\n * @param {bigint} requestWanAmount - Amount of WAN's requested for proposal\n * @param {ProposalCategory} category - Category of proposal\n * @param {PledgeType} pledgeType - PledgeType of proposal for proposer\n * @param {Hex} description - Description of proposal\n * @returns {Promise<Hex>} - ID of proposal\n * @example\n * const account = '0x456...';\n * const requestWanAmount = 100n;\n * const category = ProposalCategory.ProposalCategory;\n * const pledgeType = PledgeType.Burn;\n * const description = 'request';\n * const ret = await sdk.getAccountProposalId(account, requestWanAmount, category, pledgeType, description);\n * console.log(ret);\n */\n async getAccountProposalId(\n account: Address,\n requestWanAmount: bigint,\n category: ProposalCategory,\n pledgeType: PledgeType,\n description: Hex\n\n ): Promise<Hex> {\n const proposalId = await this.publicClient.readContract(Parameters.getProposalId(this.governanceAddr, requestWanAmount, account, category, pledgeType, description));\n return proposalId;\n }\n\n /**\n * Get counts for the proposal partners and voteres\n * @param {Hex} proposalId - ID of propsal\n * @returns {Promise<{\n partnerCount: bigint,\n voterCount: bigint\n }>}\n * @example\n * const proposalId = '0x456...';\n * const ret = await sdk.getProposalPartnerAndVoterCounts(proposalId);\n * console.log(ret);\n */\n async getProposalPartnerAndVoterCounts(proposalId: Hex): Promise<{\n partnerCount: bigint,\n voterCount: bigint\n }> {\n const result = await this.publicClient.readContract(Parameters.getProposalPartnerAndVoterCounts(this.governanceAddr, proposalId));\n return {\n partnerCount: result[0],\n voterCount: result[1]\n };\n }\n\n /**\n * Get multi-proposasl info of proposer\n * @param {Address} proposerAddr - Proposer address\n * @param {IndexRange} indexRange - Range of index\n * @returns {Promise<ProposalInfo[]>} - Multi-info of proposal\n * @example\n * const proposerAddr = '0x456...';\n * const indexRange = {start:0, end: 1};\n * const ret = await sdk.getProposerProposals(proposerAddr, indexRange);\n * console.log(ret);\n */\n async getProposerProposals(proposerAddr: Address, indexRange: IndexRange): Promise<ProposalInfo[]> {\n if (indexRange.end < indexRange.start || indexRange.start < 0) {\n throw new Error('Invalid indexRange');\n }\n\n let contracts: ContractFunctionParameters[] = new Array(indexRange.end - indexRange.start + 1);\n for (let i = indexRange.start; i <= indexRange.end; ++i) {\n contracts[i - indexRange.start] = Parameters.getProposalIdByRoleAt(this.governanceAddr, ProposalRole.Proposer, proposerAddr, i);\n }\n\n const proposalIds = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false\n }) as Hex[];\n contracts = new Array(proposalIds.length);\n for (let i = 0; i < proposalIds.length; i++) {\n const proposalId = proposalIds[i]!;\n contracts[i] = Parameters.getProposalInfo(this.governanceAddr, proposalId);\n }\n let multiProposalData = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n }) as ContractProposal[];\n const results: ProposalInfo[] = multiProposalData.map((proposal, i) => ({proposalId: proposalIds[i]!, ...proposal}));\n return results;\n }\n\n /**\n * Get multi-proposasl info of partner\n * @param {Address} partnerAddr - Partner address\n * @param {IndexRange} indexRange - Range of index\n * @returns {Promise<ProposalInfo[]>} - Multi-info of proposal\n * @example\n * const partnerAddr = '0x456...';\n * const indexRange = {start:0, end: 1};\n * const ret = await sdk.getPartnerProposals(partnerAddr, indexRange);\n * console.log(ret);\n */\n async getPartnerProposals(partnerAddr: Address, indexRange: IndexRange): Promise<\n {\n proposalInfo: ProposalInfo\n partnerInfo: PartnerInfo\n }[]\n > {\n if (indexRange.end < indexRange.start || indexRange.start < 0) {\n throw new Error('Invalid indexRange');\n }\n\n let contracts: ContractFunctionParameters[] = new Array(indexRange.end - indexRange.start + 1);\n\n for (let i = indexRange.start; i <= indexRange.end; ++i) {\n contracts[i - indexRange.start] = Parameters.getProposalIdByRoleAt(this.governanceAddr, ProposalRole.Partner, partnerAddr, i);\n }\n const proposalIds = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false\n }) as Hex[];\n contracts = new Array(proposalIds.length * 2);\n for (let i = 0; i < proposalIds.length; ++i) {\n const index = i * 2;\n const proposalId = proposalIds[i]!;\n contracts[index] = Parameters.getProposalInfo(this.governanceAddr, proposalId);\n contracts[index + 1] = Parameters.getProposalPartnerInfo(this.governanceAddr, proposalId, partnerAddr);\n }\n\n let results = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n });\n\n let partnerProposals = new Array(proposalIds.length);\n\n for (let i = 0; i < proposalIds.length; ++i) {\n let index = i * 2;\n let contractProposal = results[index] as ContractProposal;\n let partnerInfo = results[index + 1] as PartnerInfo;\n\n const proposalId = proposalIds[i]!;\n const proposalInfo: ProposalInfo = {proposalId: proposalId, ...contractProposal};\n\n partnerProposals[i] = {\n proposalInfo: proposalInfo,\n partnerInfo: partnerInfo,\n }\n }\n return partnerProposals;\n }\n\n /**\n * Get multi-proposasl info of voter\n * @param {Address} voterAddr - Voter address\n * @param {IndexRange} indexRange - Range of index\n * @returns {Promise<ProposalInfo[]>} - Multi-info of proposal\n * @example\n * const voterAddr = '0x456...';\n * const indexRange = {start:0, end: 1};\n * const ret = await sdk.getPartnerProposals(voterAddr, indexRange);\n * console.log(ret);\n */\n async getVoterProposals(voterAddr: Address, indexRange: IndexRange): Promise<\n {\n proposalInfo: ProposalInfo\n voterInfo: VoterInfo\n }[]\n > {\n if (indexRange.end < indexRange.start || indexRange.start < 0) {\n throw new Error('Invalid indexRange');\n }\n\n let contracts: ContractFunctionParameters[] = new Array(indexRange.end - indexRange.start + 1);\n for (let i = indexRange.start; i <= indexRange.end; ++i) {\n contracts[i - indexRange.start] = Parameters.getProposalIdByRoleAt(this.governanceAddr, ProposalRole.Voter, voterAddr, i);\n }\n const proposalIds = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false\n }) as Hex[];\n contracts = new Array(proposalIds.length * 2);\n for (let i = 0; i < proposalIds.length; ++i) {\n const index = i * 2;\n const proposalId = proposalIds[i]!;\n contracts[index] = Parameters.getProposalInfo(this.governanceAddr, proposalId);\n contracts[index + 1] = Parameters.getProposalVoterInfo(this.governanceAddr, proposalId, voterAddr);\n }\n\n let results = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n });\n\n let voterProposals = new Array(proposalIds.length);\n\n for (let i = 0; i < proposalIds.length; ++i) {\n const index = i * 2;\n let contractProposal = results[index] as ContractProposal;\n let voterInfo = results[index + 1] as VoterInfo;\n\n const proposalId = proposalIds[i]!;\n const proposalInfo: ProposalInfo = {proposalId, ...contractProposal};\n\n voterProposals[i] = {\n proposalInfo: proposalInfo,\n voterInfo: voterInfo,\n }\n }\n return voterProposals;\n }\n\n /**\n * Get multi-info of partner\n * @param {Address} partnerAddr - Partner address\n * @param {Hex[]} proposalIds - IDs of proposal\n * @returns {Promise<PartnerInfo[]>} - Multi-info of partner\n * @example\n * const partnerAddr = '0x456...';\n * const proposalIds = ['0x1...','[0x2...]];\n * const ret = await sdk.getPartnerInfo(partnerAddr, proposalIds);\n * console.log(ret);\n */\n async getPartnerInfo(partnerAddr: Address, proposalIds: Hex[]): Promise<PartnerInfo[]> {\n let contracts: ContractFunctionParameters[] = new Array(proposalIds.length);\n for (let i = 0; i < proposalIds.length; ++i) {\n const proposalId = proposalIds[i]!;\n contracts[i] = Parameters.getProposalPartnerInfo(this.governanceAddr, proposalId, partnerAddr);\n }\n\n let results = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n }) as PartnerInfo[];\n\n return results;\n }\n\n /**\n * Get multi-info of voter\n * @param {Address} voterAddr - Voter address\n * @param {Hex[]} proposalIds - IDs of proposal\n * @returns {Promise<PartnerInfo[]>} - Multi-info of voter\n * @example\n * const voterAddr = '0x456...';\n * const proposalIds = ['0x1...','[0x2...]];\n * const ret = await sdk.getVoterInfo(voterAddr, proposalIds);\n * console.log(ret);\n */\n async getVoterInfo(voterAddr: Address, proposalIds: Hex[]): Promise<VoterInfo[]> {\n let contracts: ContractFunctionParameters[] = new Array(proposalIds.length);\n for (let i = 0; i < proposalIds.length; ++i) {\n const proposalId = proposalIds[i]!;\n contracts[i] = Parameters.getProposalVoterInfo(this.governanceAddr, proposalId, voterAddr);\n }\n\n let results = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n }) as VoterInfo[];\n\n return results;\n }\n\n /**\n * Get recent all proposals, include UnderReview, Canceled, Rejected\n * @param {RecentProposalsParam} param - Recent proposal parameters\n * @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index\n * @example\n * const param = {start:5, limit: 6}; // index 5-0\n * const ret = await sdk.getRecentAllProposals(param);\n * console.log(ret);\n */\n async getRecentAllProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult> {\n const { start, limit } = param;\n if (start < 0 || limit < 1) {\n throw new Error('Invalid param: start must be >= 0, limit must be > 0');\n }\n\n let collected: ProposalInfo[] = [];\n let currentStart = start;\n let nextIndex: number = -1;\n let currentBatchSize = Math.max(limit * 2, 20);\n\n while (collected.length < limit && currentStart >= 0) {\n const endIdx = Math.max(currentStart - currentBatchSize + 1, 0);\n const batchIndices: number[] = [];\n for (let i = currentStart; i >= endIdx; i--) {\n batchIndices.push(i);\n }\n\n const contracts: ContractFunctionParameters[] = batchIndices.map(idx =>\n Parameters.getProposalInfoAt(this.governanceAddr, idx)\n );\n\n const contractProposalsAt = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n }) as GetProposalInfoAtResult[];\n // console.log(\"contractProposalsAt:\", contractProposalsAt);\n for (let i = 0; i < contractProposalsAt.length; ++i) {\n const [proposalId, proposal] = contractProposalsAt[i] as GetProposalInfoAtResult;\n // collected.push({proposalId: proposalIds[i]!, ...proposal});\n collected.push({proposalId: proposalId!, ...proposal});\n if (collected.length === limit) {\n const lastIndexUsed = batchIndices[i]!;\n nextIndex = lastIndexUsed > 0 ? lastIndexUsed - 1 : -1;\n break;\n }\n }\n // Strategy: If we haven’t found enough in this round, it means we’ve filtered out a lot; in the next round, double the search range, but do not exceed 100.\n if (collected.length < limit) {\n currentStart = endIdx - 1;\n currentBatchSize = Math.min(currentBatchSize * 2, 100);\n } else {\n break;\n }\n }\n\n return {\n proposals: collected,\n nextIndex: nextIndex,\n };\n }\n\n /**\n * Get recent all proposals exclude Canceled\n * @param {RecentProposalsParam} param - Recent proposal parameters\n * @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index\n * @example\n * const param = {start:5, limit: 6}; // index 5-0\n * const ret = await sdk.getRecentProposalsExcludeCanceled(param);\n * console.log(ret);\n */\n async getRecentProposalsExcludeCanceled(param: RecentProposalsParam): Promise<GetRecentProposalsResult> {\n const { start, limit } = param;\n if (start < 0 || limit < 1) {\n throw new Error('Invalid param: start must be >= 0, limit must be > 0');\n }\n\n let collected: ProposalInfo[] = [];\n let currentStart = start;\n let nextIndex: number = -1;\n let currentBatchSize = Math.max(limit * 2, 20);\n\n while (collected.length < limit && currentStart >= 0) {\n const endIdx = Math.max(currentStart - currentBatchSize + 1, 0);\n const batchIndices: number[] = [];\n for (let i = currentStart; i >= endIdx; i--) {\n batchIndices.push(i);\n }\n\n const contracts: ContractFunctionParameters[] = batchIndices.map(idx =>\n Parameters.getProposalInfoAt(this.governanceAddr, idx)\n );\n\n const contractProposalsAt = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n }) as GetProposalInfoAtResult[];\n // console.log(\"contractProposalsAt:\", contractProposalsAt);\n for (let i = 0; i < contractProposalsAt.length; ++i) {\n const [proposalId, proposal] = contractProposalsAt[i] as GetProposalInfoAtResult;\n if (proposal.state !== ProposalState.Canceled) {\n // collected.push({proposalId: proposalIds[i]!, ...proposal});\n collected.push({proposalId: proposalId!, ...proposal});\n if (collected.length === limit) {\n const lastIndexUsed = batchIndices[i]!;\n nextIndex = lastIndexUsed > 0 ? lastIndexUsed - 1 : -1;\n break;\n }\n }\n }\n // Strategy: If we haven’t found enough in this round, it means we’ve filtered out a lot; in the next round, double the search range, but do not exceed 100.\n if (collected.length < limit) {\n currentStart = endIdx - 1;\n currentBatchSize = Math.min(currentBatchSize * 2, 100);\n } else {\n break;\n }\n }\n\n return {\n proposals: collected,\n nextIndex: nextIndex,\n };\n }\n\n /**\n * Get recent reviewed proposals\n * @param {RecentProposalsParam} param - Recent proposal parameters\n * @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index\n * @example\n * const param = {start:5, limit: 6}; // index 5-0\n * const ret = await sdk.getRecentReviewedProposals(param);\n * console.log(ret);\n */\n async getRecentReviewedProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult> {\n const { start, limit } = param;\n if (start < 0 || limit < 1) {\n throw new Error('Invalid param: start must be >= 0, limit must be > 0');\n }\n\n let collected: ProposalInfo[] = [];\n let currentStart = start;\n let nextIndex: number = -1;\n let currentBatchSize = Math.max(limit * 2, 20);\n\n while (collected.length < limit && currentStart >= 0) {\n const endIdx = Math.max(currentStart - currentBatchSize + 1, 0);\n const batchIndices: number[] = [];\n for (let i = currentStart; i >= endIdx; i--) {\n batchIndices.push(i);\n }\n\n const contracts: ContractFunctionParameters[] = batchIndices.map(idx =>\n Parameters.getProposalInfoAt(this.governanceAddr, idx)\n );\n\n const contractProposalsAt = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n }) as GetProposalInfoAtResult[];\n // console.log(\"contractProposalsAt:\", contractProposalsAt);\n for (let i = 0; i < contractProposalsAt.length; ++i) {\n const [proposalId, proposal] = contractProposalsAt[i] as GetProposalInfoAtResult;\n if (proposal.state !== ProposalState.UnderReview && proposal.state !== ProposalState.Canceled && proposal.state !== ProposalState.Rejected) {\n // collected.push({proposalId: proposalIds[i]!, ...proposal});\n collected.push({proposalId: proposalId!, ...proposal});\n if (collected.length === limit) {\n const lastIndexUsed = batchIndices[i]!;\n nextIndex = lastIndexUsed > 0 ? lastIndexUsed - 1 : -1;\n break;\n }\n }\n }\n // Strategy: If we haven’t found enough in this round, it means we’ve filtered out a lot; in the next round, double the search range, but do not exceed 100.\n if (collected.length < limit) {\n currentStart = endIdx - 1;\n currentBatchSize = Math.min(currentBatchSize * 2, 100);\n } else {\n break;\n }\n }\n\n return {\n proposals: collected,\n nextIndex: nextIndex,\n };\n }\n\n /**\n * Get review pending proposals\n * @param {IndexRange} indexRange - Range of index\n * @returns {Promise<ProposalInfo[]>} - Multi-info of proposal\n * @example\n * const indexRange = {start:0, end: 5};\n * const ret = await sdk.getReviewPendingProposals(indexRange);\n * console.log(ret);\n */\n async getReviewPendingProposals(indexRange: IndexRange): Promise<ProposalInfo[]> {\n if (indexRange.end < indexRange.start || indexRange.start < 0) {\n throw new Error('Invalid indexRange');\n }\n\n let contracts: ContractFunctionParameters[] = new Array(indexRange.end - indexRange.start + 1);\n for (let i = indexRange.start; i <= indexRange.end; ++i) {\n contracts[i - indexRange.start] = Parameters.getProposalIdByStateAt(this.governanceAddr, ProposalState.UnderReview, i);\n }\n\n const proposalIds = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false\n }) as Hex[];\n\n contracts = new Array(proposalIds.length);\n for (let i = 0; i < proposalIds.length; ++i) {\n const proposalId = proposalIds[i]!;\n contracts[i] = Parameters.getProposalInfo(this.governanceAddr, proposalId);\n }\n\n let contractProposals = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n }) as ContractProposal[];\n\n let results: ProposalInfo[] = contractProposals.map((proposal, i) => ({proposalId: proposalIds[i]!, ...proposal}))\n return results;\n }\n\n /**\n * Get recent review pending proposals\n * @param {RecentProposalsParam} param - Recent proposal parameters\n * @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index\n * @example\n * const param = {start:5, limit: 6}; // index 5-0\n * const ret = await sdk.getRecentReviewPendingProposals(param);\n * console.log(ret);\n */\n async getRecentReviewPendingProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult> {\n return await this._getRecentProposalsByState(param, ProposalState.UnderReview);\n }\n /**\n * Get prospective proposals\n * @param {IndexRange} indexRange - Range of index\n * @returns {Promise<ProposalInfo[]>} - Multi-info of proposal\n * @example\n * const indexRange = {start:0, end: 5};\n * const ret = await sdk.getProspectiveProposals(indexRange);\n * console.log(ret);\n */\n async getProspectiveProposals(indexRange: IndexRange): Promise<ProposalInfo[]> {\n if (indexRange.end < indexRange.start || indexRange.start < 0) {\n throw new Error('Invalid indexRange');\n }\n\n let contracts: ContractFunctionParameters[] = new Array(indexRange.end - indexRange.start + 1);\n for (let i = indexRange.start; i <= indexRange.end; ++i) {\n contracts[i - indexRange.start] = Parameters.getProposalIdByStateAt(this.governanceAddr, ProposalState.Fundraising, i);\n }\n const proposalIds = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false\n }) as Hex[];\n contracts = new Array(proposalIds.length);\n for (let i = 0; i < proposalIds.length; ++i) {\n const proposalId = proposalIds[i]!;\n contracts[i] = Parameters.getProposalInfo(this.governanceAddr, proposalId);\n }\n let contractProposals = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n }) as ContractProposal[];\n\n let results: ProposalInfo[] = contractProposals.map((proposal, i) => ({proposalId: proposalIds[i]!, ...proposal}))\n return results;\n }\n\n /**\n * Get recent prospective proposals\n * @param {RecentProposalsParam} param - Recent proposal parameters\n * @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index\n * @example\n * const param = {start:5, limit: 6}; // index 5-0\n * const ret = await sdk.getRecentProspectiveProposals(param);\n * console.log(ret);\n */\n async getRecentProspectiveProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult> {\n return await this._getRecentProposalsByState(param, ProposalState.Fundraising);\n }\n /**\n * Get active(voting) proposals\n * @param {IndexRange} indexRange - Range of index\n * @returns {Promise<ProposalInfo[]>} - Multi-info of proposal\n * @example\n * const indexRange = {start:0, end: 5};\n * const ret = await sdk.getVotingProposals(indexRange);\n * console.log(ret);\n */\n async getVotingProposals(indexRange: IndexRange): Promise<ProposalInfo[]> {\n if (indexRange.end < indexRange.start || indexRange.start < 0) {\n throw new Error('Invalid indexRange');\n }\n\n let contracts: ContractFunctionParameters[] = new Array(indexRange.end - indexRange.start + 1);\n for (let i = indexRange.start; i <= indexRange.end; ++i) {\n contracts[i - indexRange.start] = Parameters.getProposalIdByStateAt(this.governanceAddr, ProposalState.VotingInProgress, i);\n }\n const proposalIds = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false\n }) as Hex[];\n contracts = new Array(proposalIds.length);\n for (let i = 0; i < proposalIds.length; ++i) {\n const proposalId = proposalIds[i]!;\n contracts[i] = Parameters.getProposalInfo(this.governanceAddr, proposalId);\n }\n let contractProposals = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n }) as ContractProposal[];\n\n let results: ProposalInfo[] = contractProposals.map((proposal, i) => ({proposalId: proposalIds[i]!, ...proposal}))\n return results;\n }\n\n /**\n * Get recent active(voting) proposals\n * @param {RecentProposalsParam} param - Recent proposal parameters\n * @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index\n * @example\n * const param = {start:5, limit: 6}; // index 5-0\n * const ret = await sdk.getRecentVotingProposals(param);\n * console.log(ret);\n */\n async getRecentVotingProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult> {\n return await this._getRecentProposalsByState(param, ProposalState.VotingInProgress);\n }\n /**\n * Get succeed proposals\n * @param {IndexRange} indexRange - Range of index\n * @returns {Promise<ProposalInfo[]>} - Multi-info of proposal\n * @example\n * const indexRange = {start:0, end: 5};\n * const ret = await sdk.getSucceedProposals(indexRange);\n * console.log(ret);\n */\n async getSucceedProposals(indexRange: IndexRange): Promise<ProposalInfo[]> {\n if (indexRange.end < indexRange.start || indexRange.start < 0) {\n throw new Error('Invalid indexRange');\n }\n\n let contracts: ContractFunctionParameters[] = new Array(indexRange.end - indexRange.start + 1);\n for (let i = indexRange.start; i <= indexRange.end; ++i) {\n contracts[i - indexRange.start] = Parameters.getProposalIdByStateAt(this.governanceAddr, ProposalState.Succeeded, i);\n }\n const proposalIds = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false\n }) as Hex[];\n contracts = new Array(proposalIds.length);\n for (let i = 0; i < proposalIds.length; ++i) {\n const proposalId = proposalIds[i]!;\n contracts[i] = Parameters.getProposalInfo(this.governanceAddr, proposalId);\n }\n let contractProposals = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n }) as ContractProposal[];\n\n let results: ProposalInfo[] = contractProposals.map((proposal, i) => ({proposalId: proposalIds[i]!, ...proposal}))\n return results;\n }\n\n /**\n * Get recent succeeded proposals\n * @param {RecentProposalsParam} param - Recent proposal parameters\n * @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index\n * @example\n * const param = {start:5, limit: 6}; // index 5-0\n * const ret = await sdk.getRecentSucceededProposals(param);\n * console.log(ret);\n */\n async getRecentSucceededProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult> {\n return await this._getRecentProposalsByState(param, ProposalState.Succeeded);\n }\n /**\n * Get failed proposals\n * @param {IndexRange} indexRange - Range of index\n * @returns {Promise<ProposalInfo[]>} - Multi-info of proposal\n * @example\n * const indexRange = {start:0, end: 5};\n * const ret = await sdk.getFailedProposals(indexRange);\n * console.log(ret);\n */\n async getFailedProposals(indexRange: IndexRange): Promise<ProposalInfo[]> {\n if (indexRange.end < indexRange.start || indexRange.start < 0) {\n throw new Error('Invalid indexRange');\n }\n\n let contracts: ContractFunctionParameters[] = new Array(indexRange.end - indexRange.start + 1);\n for (let i = indexRange.start; i <= indexRange.end; ++i) {\n contracts[i - indexRange.start] = Parameters.getProposalIdByStateAt(this.governanceAddr, ProposalState.Failed, i);\n }\n const proposalIds = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false\n }) as Hex[];\n contracts = new Array(proposalIds.length);\n for (let i = 0; i < proposalIds.length; ++i) {\n const proposalId = proposalIds[i]!;\n contracts[i] = Parameters.getProposalInfo(this.governanceAddr, proposalId);\n }\n let contractProposals = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n }) as ContractProposal[];\n\n let results: ProposalInfo[] = contractProposals.map((proposal, i) => ({proposalId: proposalIds[i]!, ...proposal}))\n return results;\n }\n\n /**\n * Get recent rejected proposals\n * @param {RecentProposalsParam} param - Recent proposal parameters\n * @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index\n * @example\n * const param = {start:5, limit: 6}; // index 5-0\n * const ret = await sdk.getRecentRejectedProposals(param);\n * console.log(ret);\n */\n async getRecentRejectedProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult> {\n return await this._getRecentProposalsByState(param, ProposalState.Rejected);\n }\n /**\n * Get recent failed proposals\n * @param {RecentProposalsParam} param - Recent proposal parameters\n * @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index\n * @example\n * const param = {start:5, limit: 6}; // index 5-0\n * const ret = await sdk.getRecentFailedProposals(param);\n * console.log(ret);\n */\n async getRecentFailedProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult> {\n return await this._getRecentProposalsByState(param, ProposalState.Failed);\n }\n /**\n * Get canceled proposals\n * @param {IndexRange} indexRange - Range of index\n * @returns {Promise<ProposalInfo[]>} - Multi-info of proposal\n * @example\n * const indexRange = {start:0, end: 5};\n * const ret = await sdk.getCanceledProposals(indexRange);\n * console.log(ret);\n */\n async getCanceledProposals(indexRange: IndexRange): Promise<ProposalInfo[]> {\n if (indexRange.end < indexRange.start || indexRange.start < 0) {\n throw new Error('Invalid indexRange');\n }\n\n let contracts: ContractFunctionParameters[] = new Array(indexRange.end - indexRange.start + 1);\n for (let i = indexRange.start; i <= indexRange.end; ++i) {\n contracts[i - indexRange.start] = Parameters.getProposalIdByStateAt(this.governanceAddr, ProposalState.Canceled, i);\n }\n const proposalIds = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false\n }) as Hex[];\n contracts = new Array(proposalIds.length);\n for (let i = 0; i < proposalIds.length; ++i) {\n const proposalId = proposalIds[i]!;\n contracts[i] = Parameters.getProposalInfo(this.governanceAddr, proposalId);\n }\n let contractProposals = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n }) as ContractProposal[];\n\n let results: ProposalInfo[] = contractProposals.map((proposal, i) => ({proposalId: proposalIds[i]!, ...proposal}))\n return results;\n }\n\n /**\n * Get recent canceled proposals\n * @param {RecentProposalsParam} param - Recent proposal parameters\n * @returns {Promise<GetRecentProposalsResult>} - Multi-info of proposal and next index\n * @example\n * const param = {start:5, limit: 6}; // index 5-0\n * const ret = await sdk.getRecentCanceledProposals(param);\n * console.log(ret);\n */\n async getRecentCanceledProposals(param: RecentProposalsParam): Promise<GetRecentProposalsResult> {\n return await this._getRecentProposalsByState(param, ProposalState.Canceled);\n }\n /**\n * Get specified proposal info\n * @param {Hex} proposalId - ID of proposal\n * @returns {Promise<ProposalInfo>} - Proposal info\n * @example\n * const proposalId = '0x12...';\n * const ret = await sdk.getProposalInfo(proposalId);\n * console.log(ret);\n */\n async getProposalInfo(proposalId: Hex): Promise<ProposalInfo> {\n let contractProposal = await this.publicClient.readContract(Parameters.getProposalInfo(this.governanceAddr, proposalId)) as ContractProposal;\n let result: ProposalInfo = {proposalId, ...contractProposal};\n return result;\n }\n\n /**\n * Check whether need or can request proposal withdrawal\n * @param {bigint} timestamp - Timestamp of latest block\n * @param {CanRequestProposalWithdrawalParam[]} params - Parameters\n * @returns {Promise<CanRequestProposalWithdrawalRetrunItem[]>} - Array of {needRequestWithdrawal, canRequestWithdrawal}\n * @example\n * var proposalId = '0x12...';\n * var proposalInfo = await sdk.getProposalInfo(proposalId);\n * var latestBlock = await sdk.publicClient.getBlock();\n * var [{needRequestWithdrawal, canRequestWithdrawal}] = sdk.canRequestProposalWithdrawal(latestBlock.timestamp, [\n {\n state: proposalInfo.state,\n pledgeType: proposalInfo.proposerFundInfo.pledgeType,\n lockDuration: proposalInfo.proposerFundInfo.lockDuration,\n voteDeadline: proposalInfo.voteDeadline,\n requestId: proposalInfo.proposerFundInfo.requestId,\n exited: proposalInfo.proposerFundInfo.exited,\n }\n ]);\n */\n canRequestProposalWithdrawal(timestamp: bigint, params: CanRequestProposalWithdrawalParam[]): CanRequestProposalWithdrawalRetrunItem[] {\n if (params.length == 0) {\n return [];\n }\n let results = new Array(params.length);\n for (let i = 0; i < params.length; ++i) {\n let needRequestWithdrawal = false;\n let canRequestWithdrawal = false;\n if (\n params[i]!.state == ProposalState.Succeeded\n && params[i]!.pledgeType == PledgeType.Lock\n && params[i]!.lockDuration > BigInt(0)\n && params[i]!.requestId == BigInt(0)\n && !params[i]!.exited\n // && timestamp > params[i]!.voteDeadline + params[i]!.lockDuration\n ) {\n needRequestWithdrawal = true;\n }\n if (needRequestWithdrawal && timestamp > params[i]!.voteDeadline + params[i]!.lockDuration) {\n canRequestWithdrawal = true;\n }\n results[i] = {needRequestWithdrawal, canRequestWithdrawal};\n }\n return results;\n }\n\n /**\n * Check whether can claim proposal withdrawal or not\n * @param {Address} stakingManagerAddr - Address of stakingManager\n * @param {bigint} timestamp - Timestamp of latest block\n * @param {CanClaimProposalWithdrawalParam[]} params - Parameters\n * @returns {Promise<boolean[]>} - Array of boolean\n * @example\n * var stakingManagerAddr = '0x34...';\n * var proposalId = '0x12...';\n * var proposalInfo = await sdk.getProposalInfo(proposalId);\n * var latestBlock = await sdk.publicClient.getBlock();\n * var ret = sdk.canClaimProposalWithdrawal(stakingManagerAddr, latestBlock.timestamp, [\n {\n state: proposalInfo.state,\n pledgeType: proposalInfo.proposerFundInfo.pledgeType,\n lockDuration: proposalInfo.proposerFundInfo.lockDuration,\n voteDeadline: proposalInfo.voteDeadline,\n requestId: proposalInfo.proposerFundInfo.requestId,\n exited: proposalInfo.proposerFundInfo.exited,\n }\n ]);\n * console.log(ret);\n */\n async canClaimProposalWithdrawal(stakingManagerAddr: Address, timestamp: bigint, params: CanClaimProposalWithdrawalParam[]): Promise<boolean[]> {\n if (params.length == 0) {\n return [];\n }\n\n let contractCount = 0;\n let indexMap: Record<number, number> = {};\n let results = new Array(params.length);\n let contracts: ContractFunctionParameters[] = new Array(params.length);\n for (let i = 0; i < params.length; ++i) {\n if (this._canWithdrawProposalImmediately(timestamp, params[i]!)) {\n results[i] = true;\n continue;\n }\n\n if (this._canWithdrawSucceededProposal(timestamp, params[i]!)) {\n contracts[contractCount] = Parameters.getUnstakeStatus(stakingManagerAddr, params[i]!.requestId);\n indexMap[i] = contractCount;\n contractCount ++;\n continue;\n }\n\n results[i] = false;\n }\n contracts = contracts.slice(0, contractCount);\n\n let multiUnstakeStatus = await this.publicClient.multicall({\n contracts: contracts,\n allowFailure: false,\n });\n for (let i = 0; i < contracts.length; i++) {\n results[indexMap[i]!] = multiUnstakeStatus[i] == UnstakeStatus.ReadyToClaim;\n }\n return results;\n\n }\n\n private _canWithdrawProposalImmediately(timestamp: bigint, param: CanClaimProposalWithdrawalParam): boolean {\n /*\n 1. failed proposal\n 2. succeeded proposal, no lock, no burn\n */\n return (\n param.state == ProposalState.Failed\n || (\n param.lockDuration == BigInt(0)\n && param.pledgeType == PledgeType.Lock\n && param.state == ProposalState.Succeeded\n && timestamp > (param.voteDeadline + param.lockDuration)\n )\n );\n }\n private _canWithdrawSucceededProposal(timestamp: bigint, param: CanClaimProposalWithdrawalParam): boolean {\n /*\n 1. succeeded proposal, lock\n */\n return param.lockDuration > BigInt(0)\n && param.pledgeType == PledgeType.Lock\n && param.state == ProposalState.Succeeded\n && param.requestId > BigInt(0)\n && !param.exited\n && timestamp > (param.voteDeadline + param.lockDuration)\n ;\n }\n\n /**\n * Get unstake status after request proposal withdrawal\n * @param {Address} stakingManagerAddr - Address of stakingManager\n * @param {bigint} requestId - ID of proposal request withdrawal to be queried for proposer, partner or voter.\n * @returns {Promise<UnstakeStatus>} - Status of unstake\n * @example\n * var stakingManagerAddr = '0x34...';\n * var proposalId = '0x12...';\n * var proposalInfo = await sdk.getProposalInfo(proposalId);\n * var ret = sdk.getUnstakeStatus(stakingManagerAddr, proposalInfo.proposerFundInfo.requestId);\n * console.log(ret);\n */\n async getUnstakeStatus(stakingManagerAddr: Address, requestId: bigint): Promise<UnstakeStatus> {\n return await this.publicClient.readContract(Parameters.getUnstakeStatus(stakingManagerAddr, requestId));\n }\n\n /**\n * Get current ration\n * @param {Address} stakingManagerAddr - Address of stakingManager\n * @returns {Promise<bigint>} - current ratio\n * @example\n * var stakingManagerAddr = '0x34...';\n * var ret = sdk.getCurrentRate(stakingManagerAddr);\n * console.log(ret);\n */\n async getCurrentRatio(stakingManagerAddr: Address): Promise<bigint> {\n const stWanAddr = await this.publicClient.readContract(Parameters.stWan(stakingManagerAddr));\n return await this.publicClient.readContract(Parameters.getCurrentRate(stWanAddr));\n }\n\n /**\n * Build transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {ContractFunctionName} functionName - Function name\n * @param {ContractFunctionArgs} args - Parameters\n * @param {bigint} value - Amount of WAN\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const functionName = 'cancelProposal' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n * const args = [proposalId, reason] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n * const ret = await sdk.buildTx(account, functionName, args, BigInt(0));\n * console.log(ret);\n */\n async buildTx<\n TCombinedAbi extends Abi = TAbi | TMulticallAbi,\n TFunctionName extends ContractFunctionName<TCombinedAbi, 'nonpayable' | 'payable'> = ContractFunctionName<TCombinedAbi, 'nonpayable' | 'payable'>\n >(\n account: Account | Address,\n functionName: TFunctionName,\n args: ContractFunctionArgs<TCombinedAbi, 'nonpayable' | 'payable', TFunctionName>,\n value: bigint = BigInt(0)\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n const [abi, address] = (this.governanceAbi as Abi).some(\n (item) => 'name' in item && item.name === functionName\n )\n ? [this.governanceAbi, this.governanceAddr]\n : [this.multicallAbi, this.multicallAddr]\n ;\n\n await this.publicClient.simulateContract({\n address: address,\n abi: abi,\n functionName,\n args: args as ContractFunctionArgs,\n account,\n value,\n });\n\n return await this.publicClient.prepareTransactionRequest({\n account,\n to: address,\n data: encodeFunctionData({\n abi: abi,\n functionName,\n args: args as ContractFunctionArgs,\n } as EncodeFunctionDataParameters),\n value,\n } as PrepareTransactionRequestParameters);\n }\n\n /**\n * Build createProposal transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {bigint} pledgeWanAmount - Amount of WAN that proposer pledged\n * @param {bigint} requestWanAmount - Amount of WAN that proposer request.\n * @param {ProposalCategory} category - Category of proposal\n * @param {PledgeType} pledgeType - Pledge type\n * @param {Hex} description - Description of proposal\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const walletClient = createWalletClient({ account: privateKeyToAccount(`0x${process.env.PK}`), chain: sdk.publicClient.chain, transport: http() });\n * const pledgeWanAmount = parseEther(\"1\");\n * const requestWanAmount = parseEther(\"100\");\n * const category = ProposalCategory.Funding;\n * const pledgeType = PledgeType.Lock;\n * const ret = await sdk.buildCreateProposalTx(walletClient.account!, pledgeWanAmount, requestWanAmount, category, pledgeType, description);\n * console.log(ret);\n */\n async buildCreateProposalTx(\n account: Address | Account,\n pledgeWanAmount: bigint,\n requestWanAmount: bigint,\n category: ProposalCategory,\n pledgeType: PledgeType,\n description: Hex\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'createProposal' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n const args = [requestWanAmount, category, pledgeType, description] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(account, functionName, args, pledgeWanAmount);\n }\n\n /**\n * Build cancelProposal transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {Hex} proposalId - ID of proposal\n * @param {Hex} reason - Cancel reason.\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const walletClient = createWalletClient({ account: privateKeyToAccount(`0x${process.env.PK}`), chain: sdk.publicClient.chain, transport: http() });\n * const proposalId = '0x12...';\n * const reason = toHex('cancel');\n * const ret = await sdk.buildCancelProposalTx(walletClient.account!, proposalId, reason);\n * console.log(ret);\n */\n async buildCancelProposalTx(account: Address | Account, proposalId: Hex, reason: Hex): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'cancelProposal' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n const args = [proposalId, reason] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(account, functionName, args, BigInt(0));\n // return await this.buildTx(account, \"cancelProposal\" as const, [proposalId, reason]);\n }\n\n /**\n * Build reviewPoposal transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {Hex} proposalId - ID of proposal\n * @param {boolean} isApproved - For or against.\n * @param {Hex} reason - Cancel reason.\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const walletClient = createWalletClient({ account: privateKeyToAccount(`0x${process.env.PK}`), chain: sdk.publicClient.chain, transport: http() });\n * const proposalId = '0x12...';\n * const isApproved = true;\n * const reason = toHex('greate');\n * const ret = await sdk.buildReviewProposalTx(walletClient.account!, proposalId, isApproved, reason);\n * console.log(ret);\n */\n async buildReviewProposalTx(\n account: Address | Account,\n proposalId: Hex,\n isApproved: boolean,\n reason: Hex\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'reviewProposal' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n const args = [proposalId, isApproved, reason] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(account, functionName, args, BigInt(0));\n // return await this.buildTx(account, \"reviewProposal\" as const, [proposalId, isApproved, reason]);\n }\n\n /**\n * Build contributePoposal transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {Hex} proposalId - ID of proposal\n * @param {bigint} pledgeWanAmount - Amount of WAN that partner pledged\n * @param {PledgeType} pledgeType - Pledge type\n * @param {Hex} reason - Reason.\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const walletClient = createWalletClient({ account: privateKeyToAccount(`0x${process.env.PK}`), chain: sdk.publicClient.chain, transport: http() });\n * const proposalId = '0x12...';\n * const pledgeWanAmount = parseEther(\"1\");\n * const pledgeType = PledgeType.Lock;\n * const reason = toHex('support');\n * const ret = await sdk.buildContributeProposalTx(walletClient.account!, proposalId, pledgeWanAmount, pledgeType, toHex(reason));\n * console.log(ret);\n */\n async buildContributeProposalTx(\n account: Address | Account,\n proposalId: Hex,\n pledgeWanAmount: bigint,\n pledgeType: PledgeType,\n reason: Hex\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'contributeProposal' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n const args = [proposalId, pledgeType, reason] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(account, functionName, args, pledgeWanAmount);\n // return await this.buildTx(account, \"contributeProposal\" as const, [proposalId, pledgeType, reason], pledgeWanAmount);\n }\n\n /**\n * Build votePoposal transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {Hex} proposalId - ID of proposal\n * @param {bigint} pledgeWanAmount - Amount of WAN that partner pledged\n * @param {bigint} lockDuration - Lock duration of proposal for voter\n * @param {PledgeType} pledgeType - Pledge type\n * @param {VoteType} voteType - Vote type\n * @param {Hex} reason - Reason.\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const walletClient = createWalletClient({ account: privateKeyToAccount(`0x${process.env.PK}`), chain: sdk.publicClient.chain, transport: http() });\n * const proposalId = '0x12...';\n * const pledgeWanAmount = parseEther(\"1\");\n * const lockDuration = 8...;\n * const pledgeType = PledgeType.Lock;\n * const voteType = VoteType.For;\n * const reason = toHex('support');\n * const ret = await sdk.buildVoteProposalTx(walletClient.account!, proposalId, pledgeWanAmount, lockDuration, pledgeType, voteType, toHex(reason));\n * console.log(ret);\n */\n async buildVoteProposalTx(\n account: Address | Account,\n proposalId: Hex,\n pledgeWanAmount: bigint,\n lockDuration: bigint,\n pledgeType: PledgeType,\n voteType: VoteType,\n reason: Hex\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'voteProposal' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n const args = [proposalId, lockDuration, pledgeType, voteType, reason] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(account, functionName, args, pledgeWanAmount);\n // return await this.buildTx(account, \"voteProposal\" as const, [proposalId, lockDuration, pledgeType, voteType, reason], pledgeWanAmount);\n }\n\n /**\n * Build tallyPoposal transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {Hex} proposalId - ID of proposal\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const walletClient = createWalletClient({ account: privateKeyToAccount(`0x${process.env.PK}`), chain: sdk.publicClient.chain, transport: http() });\n * const proposalId = '0x12...';\n * const ret = await sdk.buildTallyProposalTx(walletClient.account!, proposalId);\n * console.log(ret);\n */\n async buildTallyProposalTx(\n account: Address | Account,\n proposalId: Hex\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'tallyProposal' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n const args = [proposalId] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(account, functionName, args, BigInt(0));\n // return await this.buildTx(account, \"tallyProposal\" as const, [proposalId], BigInt(0));\n }\n\n /**\n * Build requestProposerWithdrawal transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {Hex} proposalId - ID of proposal\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const walletClient = createWalletClient({ account: privateKeyToAccount(`0x${process.env.PK}`), chain: sdk.publicClient.chain, transport: http() });\n * const proposalId = '0x12...';\n * const ret = await sdk.buildRequestProposerWithdrawalTx(walletClient.account!, proposalId);\n * console.log(ret);\n */\n async buildRequestProposerWithdrawalTx(\n account: Address | Account,\n proposalId: Hex\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'requestProposerWithdrawal' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n const args = [proposalId] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(account, functionName, args, BigInt(0));\n // return await this.buildTx(account, \"requestProposerWithdrawal\" as const, [proposalId], BigInt(0));\n }\n\n /**\n * Build claimProposerWithdrawal transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {Hex} proposalId - ID of proposal\n * @param {bigint} requestId - ID of proposal request withdrawal to be queried\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const walletClient = createWalletClient({ account: privateKeyToAccount(`0x${process.env.PK}`), chain: sdk.publicClient.chain, transport: http() });\n * const proposalId = '0x12...';\n * const requestId = 34...n;\n * const ret = await sdk.buildClaimProposerWithdrawalTx(walletClient.account!, proposalId, requestId);\n * console.log(ret);\n */\n async buildClaimProposerWithdrawalTx(\n account: Address | Account,\n proposalId: Hex,\n requestId: bigint\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'claimProposerWithdrawal' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n const args = [proposalId, requestId] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(account, functionName, args, BigInt(0));\n // return await this.buildTx(account, \"claimProposerWithdrawal\" as const, [proposalId, requestId], BigInt(0));\n }\n\n /**\n * Build requestPartnerWithdrawal transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {Hex} proposalId - ID of proposal\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const walletClient = createWalletClient({ account: privateKeyToAccount(`0x${process.env.PK}`), chain: sdk.publicClient.chain, transport: http() });\n * const proposalId = '0x12...';\n * const ret = await sdk.buildRequestPartnerWithdrawalTx(walletClient.account!, proposalId);\n * console.log(ret);\n */\n async buildRequestPartnerWithdrawalTx(\n account: Address | Account,\n proposalId: Hex\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'requestPartnerWithdrawal' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n const args = [proposalId] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(account, functionName, args, BigInt(0));\n // return await this.buildTx(account, \"requestPartnerWithdrawal\" as const, [proposalId], BigInt(0));\n }\n\n /**\n * Build claimPartnerWithdrawal transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {Hex} proposalId - ID of proposal\n * @param {bigint} requestId - ID of proposal request withdrawal to be queried\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const walletClient = createWalletClient({ account: privateKeyToAccount(`0x${process.env.PK}`), chain: sdk.publicClient.chain, transport: http() });\n * const proposalId = '0x12...';\n * const requestId = 34...n;\n * const ret = await sdk.buildClaimPartnerWithdrawalTx(walletClient.account!, proposalId, requestId);\n * console.log(ret);\n */\n async buildClaimPartnerWithdrawalTx(\n account: Address | Account,\n proposalId: Hex,\n requestId: bigint\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'claimPartnerWithdrawal' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n const args = [proposalId, requestId] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(account, functionName, args, BigInt(0));\n // return await this.buildTx(account, \"claimPartnerWithdrawal\" as const, [proposalId, requestId], BigInt(0));\n }\n\n /**\n * Build requestVoterWithdrawal transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {Hex} proposalId - ID of proposal\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const walletClient = createWalletClient({ account: privateKeyToAccount(`0x${process.env.PK}`), chain: sdk.publicClient.chain, transport: http() });\n * const proposalId = '0x12...';\n * const ret = await sdk.buildRequestVoterWithdrawalTx(walletClient.account!, proposalId);\n * console.log(ret);\n */\n async buildRequestVoterWithdrawalTx(\n account: Address | Account,\n proposalId: Hex\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'requestVoterWithdrawal' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n const args = [proposalId] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(account, functionName, args, BigInt(0));\n // return await this.buildTx(account, \"requestVoterWithdrawal\" as const, [proposalId], BigInt(0));\n }\n\n /**\n * Build claimVoterWithdrawal transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {Hex} proposalId - ID of proposal\n * @param {bigint} requestId - ID of proposal request withdrawal to be queried\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const walletClient = createWalletClient({ account: privateKeyToAccount(`0x${process.env.PK}`), chain: sdk.publicClient.chain, transport: http() });\n * const proposalId = '0x12...';\n * const requestId = 34...n;\n * const ret = await sdk.buildClaimVoterWithdrawalTx(walletClient.account!, proposalId, requestId);\n * console.log(ret);\n */\n async buildClaimVoterWithdrawalTx(\n account: Address | Account,\n proposalId: Hex,\n requestId: bigint\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'claimVoterWithdrawal' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n const args = [proposalId, requestId] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(account, functionName, args, BigInt(0));\n // return await this.buildTx(account, \"claimVoterWithdrawal\" as const, [proposalId, requestId], BigInt(0));\n }\n\n /**\n * Build updateProposalGlobalConfig transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {bigint} ethTransferGasLimit - WAN transfer gaslimit.\n * @param {bigint} minParticipationAmount - Minimum amount of WANs a participant can participate in for funding proposal.\n * @param {bigint} requestWanMultiplier - Multiplier to request WANs from Wanchain Treasury.\n * @param {bigint} succeedThreshold - Threshold to succeed proposal.\n * @param {bigint} requireXpAmount - Proposal creation require amount of XP.\n * @param {bigint} pledgeLockDuration - Proposer or partner pledge WAN by locking duration.\n * @param {bigint} fundraisingDuration - Duration for partners to pledge their WAN to help a Prospective Proposal meet the pledge requirements.\n * @param {bigint} voteDuration - Duration for voters to vote active proposal.\n * @param {Address} xpAddress - Address of XP token.\n * @param {Address} stakingManagerAddress - Address for StakingManager.\n * @param {Address} wanTreasuryAddress - Address for Wanchain community treasury.\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const walletClient = createWalletClient({ account: privateKeyToAccount(`0x${process.env.PK}`), chain: sdk.publicClient.chain, transport: http() });\n * const fundraisingDuration = 34...n;\n * const ret = await sdk.buildUpdateFundraisingDurationTx(walletClient.account!, fundraisingDuration);\n * console.log(ret);\n */\n async buildUpdateProposalGlobalConfigTx(\n account: Address | Account,\n ethTransferGasLimit: bigint,\n minParticipationAmount: bigint,\n requestWanMultiplier: bigint,\n succeedThreshold: bigint,\n requireXpAmount: bigint,\n pledgeLockDuration: bigint,\n fundraisingDuration: bigint,\n voteDuration: bigint,\n xpAddress: Address,\n stakingManagerAddress: Address,\n wanTreasuryAddress: Address\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'updateProposalGlobalConfig' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n const args = [\n [\n ethTransferGasLimit,\n minParticipationAmount,\n requestWanMultiplier,\n succeedThreshold,\n requireXpAmount,\n pledgeLockDuration,\n fundraisingDuration,\n voteDuration,\n xpAddress,\n stakingManagerAddress,\n wanTreasuryAddress\n ]\n ] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(account, functionName, args, BigInt(0));\n }\n\n private async _getRecentProposalsByState(param: RecentProposalsParam, state: ProposalState): Promise<GetRecentProposalsResult> {\n const { start, limit } = param;\n if (start < 0 || limit < 1) {\n throw new Error('Invalid param: start must be >= 0, limit must be > 0');\n }\n\n let collected: ProposalInfo[] = [];\n let currentStart = start;\n let nextIndex: number = -1;\n let currentBatchSize = Math.max(limit * 2, 20);\n\n while (collected.length < limit && currentStart >= 0) {\n const endIdx = Math.max(currentStart - currentBatchSize + 1, 0);\n const batchIndices: number[] = [];\n for (let i = currentStart; i >= endIdx; i--) {\n batchIndices.push(i);\n }\n\n const idContracts: ContractFunctionParameters[] = batchIndices.map(idx =>\n Parameters.getProposalIdByStateAt(this.governanceAddr, state, idx)\n );\n const proposalIds = await this.publicClient.multicall({\n contracts: idContracts,\n allowFailure: false,\n }) as Hex[];\n\n const infoContracts: ContractFunctionParameters[] = proposalIds.map(proposalId =>\n Parameters.getProposalInfo(this.governanceAddr, proposalId)\n );\n\n const contractProposals = await this.publicClient.multicall({\n contracts: infoContracts,\n allowFailure: false,\n }) as ContractProposal[];\n // console.log(\"contractProposalsAt:\", contractProposalsAt);\n\n for (let i = 0; i < contractProposals.length; ++i) {\n const proposal = contractProposals[i]!;\n\n // if (proposal.state !== ProposalState.UnderReview && proposal.state !== ProposalState.Canceled && proposal.state == state) {\n if (proposal.state === state) {\n collected.push({proposalId: proposalIds[i]!, ...proposal});\n if (collected.length === limit) {\n const lastIndexUsed = batchIndices[i]!;\n nextIndex = lastIndexUsed > 0 ? lastIndexUsed - 1 : -1;\n break;\n }\n }\n }\n // Strategy: If we haven’t found enough in this round, it means we’ve filtered out a lot; in the next round, double the search range, but do not exceed 100.\n if (collected.length < limit) {\n currentStart = endIdx - 1;\n currentBatchSize = Math.min(currentBatchSize * 2, 100);\n } else {\n break;\n }\n }\n\n return {\n proposals: collected,\n nextIndex: nextIndex,\n };\n }\n\n /**\n * Build transaction\n * @param {Account | Address} account - Account | Address of sender\n * @param {bigint} ethTransferGasLimit - WAN transfer gaslimit.\n * @param {bigint} minParticipationAmount - Minimum amount of WANs a participant can participate in for funding proposal.\n * @param {bigint} requestWanMultiplier - Multiplier to request WANs from Wanchain Treasury.\n * @param {bigint} succeedThreshold - Threshold to succeed proposal.\n * @param {bigint} requireXpAmount - Proposal creation require amount of XP.\n * @param {bigint} pledgeLockDuration - Proposer or partner pledge WAN by locking duration.\n * @param {bigint} fundraisingDuration - Duration for partners to pledge their WAN to help a Prospective Proposal meet the pledge requirements.\n * @param {bigint} voteDuration - Duration for voters to vote active proposal.\n * @param {Address} xpAddress - Address of XP token.\n * @param {Address} stakingManagerAddress - Address for StakingManager.\n * @param {Address} wanTreasuryAddress - Address for Wanchain community treasury.\n * @returns {Promise<PrepareTransactionRequestReturnType>} - Transaction\n * @example\n * const walletClient = createWalletClient({ account: privateKeyToAccount(`0x${process.env.PK}`), chain: sdk.publicClient.chain, transport: http() });\n * const fundraisingDuration = 34...n;\n * const ret = await sdk.buildUpdateFundraisingDurationTx(walletClient.account!, fundraisingDuration);\n * console.log(ret);\n */\n async encodeProposalMulticallCall<\n TCurrentAbi extends Abi = TAbi,\n TFunctionName extends ContractFunctionName<TCurrentAbi, 'nonpayable' | 'payable'> = ContractFunctionName<TCurrentAbi, 'nonpayable' | 'payable'>\n >(\n functionName: TFunctionName,\n args: ContractFunctionArgs<TAbi, 'nonpayable' | 'payable', TFunctionName>\n ): Promise<Hex> {\n const data = encodeFunctionData({\n abi: this.governanceAbi,\n functionName: functionName,\n args: args,\n } as EncodeFunctionDataParameters);\n return data;\n }\n\n async buildProposalMulticallTx(\n account: Address | Account,\n args: Hex[]\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'multicall' as ContractFunctionName<TAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(\n account,\n functionName,\n [args] as ContractFunctionArgs<TAbi, 'nonpayable' | 'payable', typeof functionName>,\n BigInt(0)\n );\n }\n\n async buildPublicMulticallCall<\n TCurrentAbi extends Abi = TAbi,\n TFunctionName extends ContractFunctionName<TCurrentAbi, 'nonpayable' | 'payable'> = ContractFunctionName<TCurrentAbi, 'nonpayable' | 'payable'>\n >(\n functionName: TFunctionName,\n args: ContractFunctionArgs<TAbi, 'nonpayable' | 'payable', TFunctionName>\n ): Promise<Aggregate3Call> {\n const callData = encodeFunctionData({\n abi: this.governanceAbi,\n functionName: functionName,\n args: args,\n } as EncodeFunctionDataParameters);\n return {\n target: this.multicallAddr,\n allowFailure: false,\n callData: callData\n };\n }\n\n async buildPublicMulticallTx(\n account: Address | Account,\n args: Aggregate3Calls\n ): Promise<\n PrepareTransactionRequestReturnType\n > {\n const functionName = 'aggregate3' as ContractFunctionName<TMulticallAbi, 'nonpayable' | 'payable'>;\n return await this.buildTx(\n account,\n functionName,\n [args] as ContractFunctionArgs<TMulticallAbi, 'nonpayable' | 'payable', typeof functionName>,\n BigInt(0)\n );\n }\n\n}"],"mappings":"kHAuCA,MAAa,EAA8F,CACzG,EAAG,CACD,MAAO,CACL,CAAE,KAAM,QAAS,CACjB,CAAE,KAAM,SAAU,CAClB,CAAE,KAAM,SAAU,CAClB,CAAE,KAAM,SAAU,CAClB,CAAE,KAAM,SAAU,CACnB,CACD,MAAO,CAAC,UAAW,QAAS,cAAe,QAAS,WAAW,CAChE,CACD,EAAG,CACD,MAAO,CACL,CAAE,KAAM,QAAS,CACjB,CAAE,KAAM,SAAU,CAClB,CAAE,KAAM,SAAU,CAClB,CAAE,KAAM,SAAU,CAClB,CAAE,KAAM,SAAU,CAClB,CAAE,KAAM,SAAU,CACnB,CACD,MAAO,CAAC,UAAW,QAAS,cAAe,QAAS,WAAY,UAAU,CAC3E,CACD,EAAG,CACD,MAAO,CACL,CAAE,KAAM,QAAS,CACjB,CAAE,KAAM,SAAU,CAClB,CAAE,KAAM,SAAU,CAClB,CAAE,KAAM,SAAU,CAClB,CAAE,KAAM,SAAU,CAClB,CAAE,KAAM,SAAU,CAClB,CAAE,KAAM,SAAU,CACnB,CACD,MAAO,CAAC,UAAW,QAAS,cAAe,QAAS,WAAY,UAAW,UAAU,CACtF,CACF,CAQD,SAAS,EAAe,EAA0C,CAChE,OAAO,IAAY,GAAK,IAA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