Skip to main content

addresslist-voting

Classes

AddresslistVotingClient

Provider a generic client with high level methods to manage and interact an Address List Voting plugin installed in a DAO

AddresslistVotingClientDecoding

Decoding module for the SDK AddressList Client

AddresslistVotingClientEncoding

Encoding module for the SDK AddressList Client

AddresslistVotingClientEstimation

Estimation module the SDK Address List Client

AddresslistVotingClientMethods

Methods module the SDK Address List Client

AddresslistVotingClient

Provider a generic client with high level methods to manage and interact an Address List Voting plugin installed in a DAO

Kind: global class

AddresslistVotingClient.getPluginInstallItem(params, [network]) ⇒ PluginInstallItem

Computes the parameters to be given when creating the DAO, so that the plugin is configured

Kind: static method of AddresslistVotingClient
Returns: PluginInstallItem

ParamTypeDefault
paramsAddresslistVotingPluginInstall
[network]Networkish"mainnet"

AddresslistVotingClientDecoding

Decoding module for the SDK AddressList Client

Kind: global class

addresslistVotingClientDecoding.updatePluginSettingsAction(data) ⇒ VotingSettings

Decodes a dao metadata from an encoded update metadata action

Kind: instance method of AddresslistVotingClientDecoding
Returns: VotingSettings

ParamType
dataUint8Array

addresslistVotingClientDecoding.addMembersAction(data) ⇒ Array.<string>

Decodes a list of addresses from an encoded add members action

Kind: instance method of AddresslistVotingClientDecoding
Returns: Array.<string>

ParamType
dataUint8Array

addresslistVotingClientDecoding.removeMembersAction(data) ⇒ Array.<string>

Decodes a list of addresses from an encoded remove members action

Kind: instance method of AddresslistVotingClientDecoding
Returns: Array.<string>

ParamType
dataUint8Array

addresslistVotingClientDecoding.findInterface(data) ⇒ InterfaceParams | null

Returns the decoded function info given the encoded data of an action

Kind: instance method of AddresslistVotingClientDecoding
Returns: InterfaceParams | null

ParamType
dataUint8Array

AddresslistVotingClientEncoding

Encoding module for the SDK AddressList Client

Kind: global class

addresslistVotingClientEncoding.updatePluginSettingsAction(pluginAddress, params) ⇒ DaoAction

Computes the parameters to be given when creating a proposal that updates the governance configuration

Kind: instance method of AddresslistVotingClientEncoding
Returns: DaoAction

ParamType
pluginAddressstring
paramsVotingSettings

addresslistVotingClientEncoding.addMembersAction(pluginAddress, members) ⇒ DaoAction

Computes the parameters to be given when creating a proposal that adds addresses to address list

Kind: instance method of AddresslistVotingClientEncoding
Returns: DaoAction

ParamType
pluginAddressstring
membersArray.<string>

addresslistVotingClientEncoding.removeMembersAction(pluginAddress, members) ⇒ DaoAction

Computes the parameters to be given when creating a proposal that removes addresses from the address list

Kind: instance method of AddresslistVotingClientEncoding
Returns: DaoAction

ParamType
pluginAddressstring
membersArray.<string>

AddresslistVotingClientEncoding.getPluginInstallItem(params, network) ⇒ PluginInstallItem

Computes the parameters to be given when creating the DAO, so that the plugin is configured

Kind: static method of AddresslistVotingClientEncoding
Returns: PluginInstallItem

ParamType
paramsAddresslistVotingPluginInstall
networkNetworkish

AddresslistVotingClientEstimation

Estimation module the SDK Address List Client

Kind: global class

addresslistVotingClientEstimation.createProposal(params) ⇒ Promise.<GasFeeEstimation>

Estimates the gas fee of creating a proposal on the plugin

Kind: instance method of AddresslistVotingClientEstimation
Returns: Promise.<GasFeeEstimation>

ParamType
paramsCreateMajorityVotingProposalParams

addresslistVotingClientEstimation.voteProposal(params) ⇒ Promise.<GasFeeEstimation>

Estimates the gas fee of casting a vote on a proposal

Kind: instance method of AddresslistVotingClientEstimation
Returns: Promise.<GasFeeEstimation>

ParamType
paramsVoteProposalParams

addresslistVotingClientEstimation.executeProposal(proposalId) ⇒ Promise.<GasFeeEstimation>

Estimates the gas fee of executing an AddressList proposal

Kind: instance method of AddresslistVotingClientEstimation
Returns: Promise.<GasFeeEstimation>

ParamType
proposalIdstring

addresslistVotingClientEstimation.prepareUpdate(params) ⇒ Promise.<GasFeeEstimation>

Estimates the gas fee of preparing an update

Kind: instance method of AddresslistVotingClientEstimation
Returns: Promise.<GasFeeEstimation>

ParamType
paramsAddresslistVotingPluginPrepareUpdateParams

AddresslistVotingClientMethods

Methods module the SDK Address List Client

Kind: global class

addresslistVotingClientMethods.createProposal(params) ⇒ AsyncGenerator.<ProposalCreationStepValue>

Creates a new proposal on the given AddressList plugin contract

Kind: instance method of AddresslistVotingClientMethods
Returns: AsyncGenerator.<ProposalCreationStepValue>

ParamType
paramsCreateMajorityVotingProposalParams

addresslistVotingClientMethods.voteProposal(params) ⇒ AsyncGenerator.<VoteProposalStepValue>

Cast a vote on the given proposal using the client's wallet. Depending on the proposal settings, an affirmative vote may execute the proposal's actions on the DAO.

Kind: instance method of AddresslistVotingClientMethods
Returns: AsyncGenerator.<VoteProposalStepValue>

ParamType
paramsVoteProposalParams

addresslistVotingClientMethods.executeProposal(proposalId) ⇒ AsyncGenerator.<ExecuteProposalStepValue>

Executes the given proposal, provided that it has already passed

Kind: instance method of AddresslistVotingClientMethods
Returns: AsyncGenerator.<ExecuteProposalStepValue>

ParamType
proposalIdstring

addresslistVotingClientMethods.prepareUpdate(params) ⇒ AsyncGenerator.<PrepareUpdateStepValue>

Prepares the update of a token voting plugin in a given dao

Kind: instance method of AddresslistVotingClientMethods
Returns: AsyncGenerator.<PrepareUpdateStepValue>

ParamType
paramsAddresslistVotingPluginPrepareUpdateParams

addresslistVotingClientMethods.canVote(params) ⇒ Promise.<boolean>

Checks if an user can vote in a proposal

Kind: instance method of AddresslistVotingClientMethods
Returns: Promise.<boolean>

ParamType
paramsCanVoteParams

addresslistVotingClientMethods.canExecute(proposalId) ⇒ Promise.<boolean>

Checks whether the current proposal can be executed

Kind: instance method of AddresslistVotingClientMethods
Returns: Promise.<boolean>

ParamType
proposalIdstring

addresslistVotingClientMethods.getMembers(params) ⇒ Promise.<Array.<string>>

Returns the list of wallet addresses with signing capabilities on the plugin

Kind: instance method of AddresslistVotingClientMethods
Returns: Promise.<Array.<string>>

ParamTypeDescription
paramsMembersQueryParams
  • pluginAddress
    • blockNumber
    • limit = 10
    • skip = 0
    • direction = SortDirection.ASC
    • sortBy = MembersSortBy.ADDRESS

addresslistVotingClientMethods.getProposal(proposalId) ⇒ Promise.<(AddresslistVotingProposal|null)>

Returns the details of the given proposal

Kind: instance method of AddresslistVotingClientMethods
Returns: Promise.<(AddresslistVotingProposal|null)>

ParamType
proposalIdstring

addresslistVotingClientMethods.getProposals(params) ⇒ Promise.<Array.<AddresslistVotingProposalListItem>>

Returns a list of proposals on the Plugin, filtered by the given criteria

Kind: instance method of AddresslistVotingClientMethods
Returns: Promise.<Array.<AddresslistVotingProposalListItem>>

ParamTypeDescription
paramsProposalQueryParams
  • daoAddressOrEns - limit = 10 - status - skip = 0 - direction = SortDirection.ASC - sortBy = ProposalSortBy.CREATED_AT

addresslistVotingClientMethods.getVotingSettings(pluginAddress, blockNumber) ⇒ Promise.<(VotingSettings|null)>

Returns the settings of a plugin given the address of the plugin instance

Kind: instance method of AddresslistVotingClientMethods
Returns: Promise.<(VotingSettings|null)>

ParamType
pluginAddressstring
blockNumbernumber

addresslistVotingClientMethods.isMember(params) ⇒ boolean

Checks if a given address is a member of the AddresslistVoting contract.

Kind: instance method of AddresslistVotingClientMethods
Returns: boolean - A boolean indicating whether the address is a member or not.

ParamDescription
params

The parameters for the isMember method.

params.pluginAddress

The address of the plugin.

params.address

The address to check.

params.blockNumber

The block number for specifying a specific block.

© 2024