Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check v1 delegate first #954

Merged
merged 5 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"inputs":[{"internalType":"address","name":"_chief","type":"address"},{"internalType":"address","name":"_polling","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":true,"internalType":"address","name":"voteDelegate","type":"address"}],"name":"CreateVoteDelegate","type":"event"},{"inputs":[],"name":"chief","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"create","outputs":[{"internalType":"address","name":"voteDelegate","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"delegates","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"guy","type":"address"}],"name":"isDelegate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"polling","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
1 change: 1 addition & 0 deletions modules/contracts/eth-sdk.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const config: EthSdkConfig = {
pot: '0x197E90f9FAD81970bA7976f33CbD77088E5D7cf7',
vat: '0x35D1b3F3D7966A1DFe207aa4514C12a259A0492B',
voteDelegateFactory: '0xC3D809E87A2C9da4F6d98fECea9135d834d6F5A0',
voteDelegateFactoryOld: '0xD897F108670903D1d6070fcf818f9db3615AF272',
voteProxyFactory: '0x6FCD258af181B3221073A96dD90D1f7AE7eEc408',
voteProxyFactoryOld: '0xa63E145309cadaa6A903a19993868Ef7E85058BE',
vow: '0xA950524441892A31ebddF91d3cEEFa04Bf454466'
Expand Down
7 changes: 6 additions & 1 deletion modules/delegates/helpers/getDelegateContractAddress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,10 @@ export async function getDelegateContractAddress(
address: string
): Promise<string | undefined> {
const voteDelegateAdress = await contracts.voteDelegateFactory.delegates(address);
return voteDelegateAdress !== ZERO_ADDRESS ? voteDelegateAdress : undefined;
const v1VoteDelegateAddress = await contracts.voteDelegateFactoryOld.delegates(address);
return v1VoteDelegateAddress !== ZERO_ADDRESS
? v1VoteDelegateAddress
: voteDelegateAdress !== ZERO_ADDRESS
? voteDelegateAdress
: undefined;
}
27 changes: 27 additions & 0 deletions modules/tags/constants/poll-tags-mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -4579,5 +4579,32 @@
"1144": [
"high-impact",
"endgame"
],
"1145": [
"high-impact",
"collateral-onboard",
"spark"
],
"1146": [
"high-impact",
"collateral-onboard",
"spark"
],
"1147": [
"high-impact",
"oracle",
"spark"
],
"1148": [
"high-impact",
"endgame"
],
"1149": [
"high-impact",
"endgame"
],
"1150": [
"high-impact",
"endgame"
]
}
Loading