useFetchMembers QUERY
Fetches a list of token holders associated with a TokenVoting
plugin.
import { useFetchMembers } from '@daobox/use-aragon'
Usage
import {
useFetchMembers,
TransferType,
TransferSortBy,
SortDirection,
} from '@daobox/use-aragon'
function App() {
const { data, isLoading, isError } = useFetchMembers({
// required
pluginAddress: '0x13c6e4f17bbe606fed867a5cd6389a504724e805',
})
if (isLoading) return <div>Loading...</div>
if (isError) return <div>Error!!!</div>
return (
<pre style={{ whiteSpace: 'pre-wrap' }}>
{data.map((member) => (
<div key={member}>
<p>{member}</p>
</div>
))}
</pre>
)
}
Required Parameters
- Name
pluginAddress
- Type
- string
- Description
The address of the plugin to fetch the members of.
Return Data
data: string[]
Return Data example
{
string: [
'0x1234567890123456789012345678901234567890',
'0x2345678901234567890123456789012345678901',
'0x3456789012345678901234567890123456789012',
'0x4567890123456789012345678901234567890123',
'0x5678901234567890123456789012345678901234',
]
}
Return Values
{
data: string[] | null,
error: Error | null,
isSuccess: boolean,
isError: boolean,
isLoading: boolean,
isRefetching: boolean,
}