You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We now have a deployment of the governance contracts on testnets, which are now available in the SDK. We need to update the UI code to make use of these addresses instead of hardcoding contract addresses here.
To achieve this we should do the following:
Update the chain helper to include the contracts and addresses that are needed in the UI
Use the latest version of the SDK and set the correct addresses for the chains defined in the chain helper
Update the chain state data to include an object to store the addresses of the mento contracts, then ensure they are populated.
Remove any hard coded contract addresses and refactor to make use of the useChainState hook
Acceptance Criteria
The chain helper (app/helpers/chains.ts) includes the required contracts and addresses.
The correct addresses for the chains defined in the chain helper are pulled from the latest SDK version
The chain state data (app/providers/chainState.provider.tsx) includes an object to store mento contract addresses.
The mento contract addresses are populated in the chain state data.
The UI interacts with the useChainState hook (app/providers/chainState.provider.tsx) to retrieve and use contract addresses.
All UI features requiring contract interaction function correctly with the new addresses.
The text was updated successfully, but these errors were encountered:
### Description
It improves the chain state helper definition and loading and exposes a `useContracts` hook used throughout the app.
The problem with this PR right now is that the addresses in the SDK are not the ones that are indexed in `The Graph` that is a separate deployment. I will migrate the indexers to this deployment as well.
After I do that, however, we will have no test proposals because the ones that I created are on the other deployment.
We need a small script to seed the deployment with some test proposals that have votes.
### Other changes
- None
### Tested
- Verified correct contract addresses were being used with logs on chain switch :)
### Related issues
- Fixes#49
Description
We now have a deployment of the governance contracts on testnets, which are now available in the SDK. We need to update the UI code to make use of these addresses instead of hardcoding contract addresses here.
To achieve this we should do the following:
useChainState
hookAcceptance Criteria
The text was updated successfully, but these errors were encountered: