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
Param | Type | Default |
---|---|---|
params | AddresslistVotingPluginInstall | |
[network] | Networkish | "mainnet" |
AddresslistVotingClientDecoding
Decoding module for the SDK AddressList Client
Kind: global class
- AddresslistVotingClientDecoding
- .updatePluginSettingsAction(data) ⇒
VotingSettings
- .addMembersAction(data) ⇒
Array.<string>
- .removeMembersAction(data) ⇒
Array.<string>
- .findInterface(data) ⇒
InterfaceParams
|null
- .updatePluginSettingsAction(data) ⇒
addresslistVotingClientDecoding.updatePluginSettingsAction(data) ⇒ VotingSettings
Decodes a dao metadata from an encoded update metadata action
Kind: instance method of AddresslistVotingClientDecoding
Returns: VotingSettings
Param | Type |
---|---|
data | Uint8Array |
addresslistVotingClientDecoding.addMembersAction(data) ⇒ Array.<string>
Decodes a list of addresses from an encoded add members action
Kind: instance method of AddresslistVotingClientDecoding
Returns: Array.<string>
Param | Type |
---|---|
data | Uint8Array |
addresslistVotingClientDecoding.removeMembersAction(data) ⇒ Array.<string>
Decodes a list of addresses from an encoded remove members action
Kind: instance method of AddresslistVotingClientDecoding
Returns: Array.<string>
Param | Type |
---|---|
data | Uint8Array |
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
Param | Type |
---|---|
data | Uint8Array |
AddresslistVotingClientEncoding
Encoding module for the SDK AddressList Client
Kind: global class
- AddresslistVotingClientEncoding
- instance
- .updatePluginSettingsAction(pluginAddress, params) ⇒
DaoAction
- .addMembersAction(pluginAddress, members) ⇒
DaoAction
- .removeMembersAction(pluginAddress, members) ⇒
DaoAction
- .updatePluginSettingsAction(pluginAddress, params) ⇒
- static
- .getPluginInstallItem(params, network) ⇒
PluginInstallItem
- .getPluginInstallItem(params, network) ⇒
- instance
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
Param | Type |
---|---|
pluginAddress | string |
params | VotingSettings |
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
Param | Type |
---|---|
pluginAddress | string |
members | Array.<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
Param | Type |
---|---|
pluginAddress | string |
members | Array.<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
Param | Type |
---|---|
params | AddresslistVotingPluginInstall |
network | Networkish |
AddresslistVotingClientEstimation
Estimation module the SDK Address List Client
Kind: global class
- AddresslistVotingClientEstimation
- .createProposal(params) ⇒
Promise.<GasFeeEstimation>
- .voteProposal(params) ⇒
Promise.<GasFeeEstimation>
- .executeProposal(proposalId) ⇒
Promise.<GasFeeEstimation>
- .prepareUpdate(params) ⇒
Promise.<GasFeeEstimation>
- .createProposal(params) ⇒
addresslistVotingClientEstimation.createProposal(params) ⇒ Promise.<GasFeeEstimation>
Estimates the gas fee of creating a proposal on the plugin
Kind: instance method of AddresslistVotingClientEstimation
Returns: Promise.<GasFeeEstimation>
Param | Type |
---|---|
params | CreateMajorityVotingProposalParams |
addresslistVotingClientEstimation.voteProposal(params) ⇒ Promise.<GasFeeEstimation>
Estimates the gas fee of casting a vote on a proposal
Kind: instance method of AddresslistVotingClientEstimation
Returns: Promise.<GasFeeEstimation>
Param | Type |
---|---|
params | VoteProposalParams |
addresslistVotingClientEstimation.executeProposal(proposalId) ⇒ Promise.<GasFeeEstimation>
Estimates the gas fee of executing an AddressList proposal
Kind: instance method of AddresslistVotingClientEstimation
Returns: Promise.<GasFeeEstimation>
Param | Type |
---|---|
proposalId | string |
addresslistVotingClientEstimation.prepareUpdate(params) ⇒ Promise.<GasFeeEstimation>
Estimates the gas fee of preparing an update
Kind: instance method of AddresslistVotingClientEstimation
Returns: Promise.<GasFeeEstimation>
Param | Type |
---|---|
params | AddresslistVotingPluginPrepareUpdateParams |
AddresslistVotingClientMethods
Methods module the SDK Address List Client
Kind: global class
- AddresslistVotingClientMethods
- .createProposal(params) ⇒
AsyncGenerator.<ProposalCreationStepValue>
- .voteProposal(params) ⇒
AsyncGenerator.<VoteProposalStepValue>
- .executeProposal(proposalId) ⇒
AsyncGenerator.<ExecuteProposalStepValue>
- .prepareUpdate(params) ⇒
AsyncGenerator.<PrepareUpdateStepValue>
- .canVote(params) ⇒
Promise.<boolean>
- .canExecute(proposalId) ⇒
Promise.<boolean>
- .getMembers(params) ⇒
Promise.<Array.<string>>
- .getProposal(proposalId) ⇒
Promise.<(AddresslistVotingProposal|null)>
- .getProposals(params) ⇒
Promise.<Array.<AddresslistVotingProposalListItem>>
- .getVotingSettings(pluginAddress, blockNumber) ⇒
Promise.<(VotingSettings|null)>
- .isMember(params) ⇒
boolean
- .createProposal(params) ⇒
addresslistVotingClientMethods.createProposal(params) ⇒ AsyncGenerator.<ProposalCreationStepValue>
Creates a new proposal on the given AddressList plugin contract
Kind: instance method of AddresslistVotingClientMethods
Returns: AsyncGenerator.<ProposalCreationStepValue>
Param | Type |
---|---|
params | CreateMajorityVotingProposalParams |
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>
Param | Type |
---|---|
params | VoteProposalParams |
addresslistVotingClientMethods.executeProposal(proposalId) ⇒ AsyncGenerator.<ExecuteProposalStepValue>
Executes the given proposal, provided that it has already passed
Kind: instance method of AddresslistVotingClientMethods
Returns: AsyncGenerator.<ExecuteProposalStepValue>
Param | Type |
---|---|
proposalId | string |
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>
Param | Type |
---|---|
params | AddresslistVotingPluginPrepareUpdateParams |
addresslistVotingClientMethods.canVote(params) ⇒ Promise.<boolean>
Checks if an user can vote in a proposal
Kind: instance method of AddresslistVotingClientMethods
Returns: Promise.<boolean>
Param | Type |
---|---|
params | CanVoteParams |
addresslistVotingClientMethods.canExecute(proposalId) ⇒ Promise.<boolean>
Checks whether the current proposal can be executed
Kind: instance method of AddresslistVotingClientMethods
Returns: Promise.<boolean>
Param | Type |
---|---|
proposalId | string |
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>>
Param | Type | Description |
---|---|---|
params | MembersQueryParams |
|
addresslistVotingClientMethods.getProposal(proposalId) ⇒ Promise.<(AddresslistVotingProposal|null)>
Returns the details of the given proposal
Kind: instance method of AddresslistVotingClientMethods
Returns: Promise.<(AddresslistVotingProposal|null)>
Param | Type |
---|---|
proposalId | string |
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>>
Param | Type | Description |
---|---|---|
params | ProposalQueryParams |
|
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)>
Param | Type |
---|---|
pluginAddress | string |
blockNumber | number |
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.
Param | Description |
---|---|
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. |