/** * The IDL of the module. * * @module */ /** The IDL of the module. */ export declare const idl: { readonly module_id: "0x1::aptos_governance"; readonly doc: "AptosGovernance represents the on-chain governance of the Aptos network. Voting power is calculated based on the\ncurrent epoch's voting power of the proposer or voter's backing stake pool. In addition, for it to count,\nthe stake pool's lockup needs to be at least as long as the proposal's duration.\n\nIt provides the following flow:\n1. Proposers can create a proposal by calling AptosGovernance::create_proposal. The proposer's backing stake pool\nneeds to have the minimum proposer stake required. Off-chain components can subscribe to CreateProposalEvent to\ntrack proposal creation and proposal ids.\n2. Voters can vote on a proposal. Their voting power is derived from the backing stake pool. Each stake pool can\nonly be used to vote on each proposal exactly once."; readonly functions: readonly [{ readonly name: "create_proposal"; readonly doc: "Create a proposal with the backing `stake_pool`.\n@param execution_hash Required. This is the hash of the resolution script. When the proposal is resolved,\nonly the exact script with matching hash can be successfully executed."; readonly ty_args: readonly []; readonly args: readonly [{ readonly name: "stake_pool"; readonly ty: "address"; }, { readonly name: "execution_hash"; readonly ty: { readonly vector: "u8"; }; }, { readonly name: "metadata_location"; readonly ty: { readonly vector: "u8"; }; }, { readonly name: "metadata_hash"; readonly ty: { readonly vector: "u8"; }; }]; }, { readonly name: "vote"; readonly doc: "Vote on proposal with `proposal_id` and voting power from `stake_pool`."; readonly ty_args: readonly []; readonly args: readonly [{ readonly name: "stake_pool"; readonly ty: "address"; }, { readonly name: "proposal_id"; readonly ty: "u64"; }, { readonly name: "should_pass"; readonly ty: "bool"; }]; }]; readonly structs: readonly [{ readonly name: "0x1::aptos_governance::CreateProposalEvent"; readonly doc: "Event emitted when a proposal is created."; readonly fields: readonly [{ readonly name: "proposer"; readonly ty: "address"; }, { readonly name: "stake_pool"; readonly ty: "address"; }, { readonly name: "proposal_id"; readonly ty: "u64"; }, { readonly name: "execution_hash"; readonly ty: { readonly vector: "u8"; }; }, { readonly name: "proposal_metadata"; readonly ty: { readonly struct: { readonly name: "0x1::simple_map::SimpleMap"; readonly ty_args: readonly [{ readonly struct: { readonly name: "0x1::string::String"; }; }, { readonly vector: "u8"; }]; }; }; }]; readonly abilities: readonly ["drop", "store"]; }, { readonly name: "0x1::aptos_governance::VoteEvent"; readonly doc: "Event emitted when there's a vote on a proposa;"; readonly fields: readonly [{ readonly name: "proposal_id"; readonly ty: "u64"; }, { readonly name: "voter"; readonly ty: "address"; }, { readonly name: "stake_pool"; readonly ty: "address"; }, { readonly name: "num_votes"; readonly ty: "u64"; }, { readonly name: "should_pass"; readonly ty: "bool"; }]; readonly abilities: readonly ["drop", "store"]; }, { readonly name: "0x1::aptos_governance::ApprovedExecutionHashes"; readonly doc: "Used to track which execution script hashes have been approved by governance.\nThis is required to bypass cases where the execution scripts exceed the size limit imposed by mempool."; readonly fields: readonly [{ readonly name: "hashes"; readonly ty: { readonly struct: { readonly name: "0x1::simple_map::SimpleMap"; readonly ty_args: readonly ["u64", { readonly vector: "u8"; }]; }; }; }]; readonly abilities: readonly ["key"]; }, { readonly name: "0x1::aptos_governance::GovernanceConfig"; readonly doc: "Configurations of the AptosGovernance, set during Genesis and can be updated by the same process offered\nby this AptosGovernance module."; readonly fields: readonly [{ readonly name: "min_voting_threshold"; readonly ty: "u128"; }, { readonly name: "required_proposer_stake"; readonly ty: "u64"; }, { readonly name: "voting_duration_secs"; readonly ty: "u64"; }]; readonly abilities: readonly ["key"]; }, { readonly name: "0x1::aptos_governance::GovernanceEvents"; readonly doc: "Events generated by interactions with the AptosGovernance module."; readonly fields: readonly [{ readonly name: "create_proposal_events"; readonly ty: { readonly struct: { readonly name: "0x1::event::EventHandle"; readonly ty_args: readonly [{ readonly struct: { readonly name: "0x1::aptos_governance::CreateProposalEvent"; }; }]; }; }; }, { readonly name: "update_config_events"; readonly ty: { readonly struct: { readonly name: "0x1::event::EventHandle"; readonly ty_args: readonly [{ readonly struct: { readonly name: "0x1::aptos_governance::UpdateConfigEvent"; }; }]; }; }; }, { readonly name: "vote_events"; readonly ty: { readonly struct: { readonly name: "0x1::event::EventHandle"; readonly ty_args: readonly [{ readonly struct: { readonly name: "0x1::aptos_governance::VoteEvent"; }; }]; }; }; }]; readonly abilities: readonly ["key"]; }, { readonly name: "0x1::aptos_governance::GovernanceResponsbility"; readonly doc: "Store the SignerCapabilities of accounts under the on-chain governance's control."; readonly fields: readonly [{ readonly name: "signer_caps"; readonly ty: { readonly struct: { readonly name: "0x1::simple_map::SimpleMap"; readonly ty_args: readonly ["address", { readonly struct: { readonly name: "0x1::account::SignerCapability"; }; }]; }; }; }]; readonly abilities: readonly ["key"]; }, { readonly name: "0x1::aptos_governance::RecordKey"; readonly fields: readonly [{ readonly name: "stake_pool"; readonly ty: "address"; }, { readonly name: "proposal_id"; readonly ty: "u64"; }]; readonly abilities: readonly ["copy", "drop", "store"]; }, { readonly name: "0x1::aptos_governance::UpdateConfigEvent"; readonly doc: "Event emitted when the governance configs are updated."; readonly fields: readonly [{ readonly name: "min_voting_threshold"; readonly ty: "u128"; }, { readonly name: "required_proposer_stake"; readonly ty: "u64"; }, { readonly name: "voting_duration_secs"; readonly ty: "u64"; }]; readonly abilities: readonly ["drop", "store"]; }, { readonly name: "0x1::aptos_governance::VotingRecords"; readonly doc: "Records to track the proposals each stake pool has been used to vote on."; readonly fields: readonly [{ readonly name: "votes"; readonly ty: { readonly struct: { readonly name: "0x1::table::Table"; readonly ty_args: readonly [{ readonly struct: { readonly name: "0x1::aptos_governance::RecordKey"; }; }, "bool"]; }; }; }]; readonly abilities: readonly ["key"]; }]; readonly errors: { readonly "1": { readonly name: "EINSUFFICIENT_PROPOSER_STAKE"; readonly doc: "The specified stake pool does not have sufficient stake to create a proposal"; }; readonly "2": { readonly name: "ENOT_DELEGATED_VOTER"; readonly doc: "This account is not the designated voter of the specified stake pool"; }; readonly "3": { readonly name: "EINSUFFICIENT_STAKE_LOCKUP"; readonly doc: "The specified stake pool does not have long enough remaining lockup to create a proposal or vote"; }; readonly "4": { readonly name: "EALREADY_VOTED"; readonly doc: "The specified stake pool has already been used to vote on the same proposal"; }; readonly "5": { readonly name: "ENO_VOTING_POWER"; readonly doc: "The specified stake pool must be part of the validator set"; }; readonly "6": { readonly name: "EPROPOSAL_NOT_RESOLVABLE_YET"; readonly doc: "Proposal is not ready to be resolved. Waiting on time or votes"; }; readonly "7": { readonly name: "ESCRIPT_HASH_ALREADY_ADDED"; readonly doc: "Proposal's script hash has already been added to the approved list"; }; readonly "8": { readonly name: "EPROPOSAL_NOT_RESOLVED_YET"; readonly doc: "The proposal has not been resolved yet"; }; readonly "9": { readonly name: "EMETADATA_LOCATION_TOO_LONG"; readonly doc: "Metadata location cannot be longer than 256 chars"; }; readonly "10": { readonly name: "EMETADATA_HASH_TOO_LONG"; readonly doc: "Metadata hash cannot be longer than 256 chars"; }; }; }; //# sourceMappingURL=idl.d.ts.map