Closed jagger-harris closed 2 years ago
Is there a particular reason why we're using castVoteWithReason as opposed to just castVote?
Is there a particular reason why we're using castVoteWithReason as opposed to just castVote?
It gives us more options, we can always just pass in a NULL or something.
The next step after completing the functions themselves and working towards actual React integration is grabbing the address and abi for each of the contracts, plus getting the provider that we set in the app.js file so that we can pass these in as arguments.
For the addresses and abi's, you can just import them from config.js at the top of every page that you need them.
For the provider, you'll have to probably pass it down as props to every page since it's set in app.js (the root). You can do that by something like this for each page:
{<Proposals activeProposals={activeProposals} inactiveProposals={inactiveProposals} provider={provider}/>}
This line in particular would be part of the element
tag in each of the Route
components located in app.js. The example I used here is just the proposals page by appending a provider prop and passing in the provider
variable already present on this page.
Connected the functions together, I also wrote queue and executing the proposals and changed the getContract
to Contract
.
What the title says :O