-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #451 from DXgovernance/release/v2.2.0
Release/v2.2.0
- Loading branch information
Showing
90 changed files
with
5,816 additions
and
674 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
import BaseERC20Guild from 'contracts/BaseERC20Guild.json'; | ||
import { useContractRead } from 'wagmi'; | ||
import { BaseERC20Guild } from 'contracts/ts-files/BaseERC20Guild'; | ||
import { useContractEvent, useContractRead } from 'wagmi'; | ||
|
||
const useActiveProposalsNow = (guildAddress: string) => { | ||
return useContractRead({ | ||
addressOrName: guildAddress, | ||
contractInterface: BaseERC20Guild.abi, | ||
const { data, refetch, ...rest } = useContractRead({ | ||
address: guildAddress, | ||
abi: BaseERC20Guild.abi, | ||
functionName: 'getActiveProposalsNow', | ||
watch: true, | ||
}); | ||
|
||
useContractEvent({ | ||
address: guildAddress, | ||
abi: BaseERC20Guild.abi, | ||
eventName: 'ProposalStateChanged', | ||
listener() { | ||
refetch(); | ||
}, | ||
}); | ||
|
||
return { data, refetch, ...rest }; | ||
}; | ||
|
||
export default useActiveProposalsNow; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.