@1hive/connect-thegraph-conviction-voting

Access organizations and interact with Convcition Voting apps.

Usage no npm install needed!

<script type="module">
  import 1hiveConnectThegraphConvictionVoting from 'https://cdn.skypack.dev/@1hive/connect-thegraph-conviction-voting';
</script>

README

The Graph Connector for Conviction Voting

Usage

const org = await connect(
  <org-address>,
  'thegraph',
  { chainId: <chain-id> }
)
const apps = await org.apps()
const convictionVotingApp = apps.find(
  app => app.appName === 'conviction-voting.open.aragonpm.eth'
)

const conviction = new ConvictionVoting(
  convictionVotingApp.address,
  <subgraph-url>
)

const proposals = await conviction.proposals()