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

Feat/gov v3 [skip cypress] #1882

Merged
merged 94 commits into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
8efb02a
feat: getting hooks setup
grothem Dec 7, 2023
3133fb6
feat: stubbing out gov service
grothem Dec 8, 2023
845138e
feat: latest utils
grothem Dec 8, 2023
71ade52
feat: latest utils
grothem Dec 8, 2023
1e274a4
feat: more data helper fetchers
grothem Dec 8, 2023
7e3a196
feat: latest utils
grothem Dec 8, 2023
ffc45cd
feat: proposal data fetching
grothem Dec 11, 2023
e68d659
feat: infinite scroll
grothem Dec 12, 2023
c739296
feat: fetch by voting chain
grothem Dec 12, 2023
84a3350
feat: list styling
grothem Dec 12, 2023
ebcf3a4
feat: proposal list UI
grothem Dec 13, 2023
a65a2ed
feat: stub out reps
grothem Dec 13, 2023
a704d48
feat: stub out rep modal
grothem Dec 13, 2023
8edabaf
feat: scaffold out rep modal
grothem Dec 14, 2023
7053b24
feat: testing rep tx
grothem Dec 14, 2023
af4d69c
fix: list style
grothem Dec 14, 2023
bd2f110
feat: added governance v3 to proposal detials page
Dec 15, 2023
c5f0baa
fix: remove testing data
grothem Dec 15, 2023
e784fdf
feat: rep modal
grothem Dec 15, 2023
59ac458
feat: input validation
grothem Dec 15, 2023
cc3363c
feat: handle zero address
grothem Dec 15, 2023
b8b9d10
fix: loader
grothem Dec 15, 2023
8e5fcf0
fix: no reps state
grothem Dec 18, 2023
5055b9c
fix: styling
grothem Dec 18, 2023
64ef703
fix: deploying
grothem Dec 18, 2023
ddd5f46
fix: enable gov on deployment
grothem Dec 18, 2023
b6f7587
fix: build errors
grothem Dec 18, 2023
f1ff3b4
fix: lint
grothem Dec 18, 2023
0b51f2a
fix: revert
grothem Dec 18, 2023
ee2ea4c
fix: testing
grothem Dec 18, 2023
d7e554f
fix: test
grothem Dec 18, 2023
3c50cd7
fix: deployment
grothem Dec 18, 2023
6fba25c
feat: representing view
grothem Dec 18, 2023
0dcba9f
feat: refactoring config
grothem Dec 18, 2023
744edfb
feat: new subgraph
grothem Dec 19, 2023
912e5ca
chore: init setup
foodaka Dec 19, 2023
da96b86
chore: sync v3-gov
foodaka Dec 19, 2023
4bff116
feat: get voting powers at blockhash
grothem Dec 19, 2023
cb74b7d
chore: testing powers
foodaka Dec 20, 2023
e4ddf34
feat: proposal structure preparing for vote
Dec 20, 2023
26909f8
feat: continue delegation
foodaka Dec 20, 2023
e609e04
chore: remove debug
foodaka Dec 20, 2023
612065b
Merge pull request #20 from aave/feat/aAave-delegation
grothem Dec 20, 2023
1dd4ba5
feat: proposal timeline initial version
grothem Dec 20, 2023
81f0fbf
fix: gov chain id
grothem Dec 20, 2023
d5b4f12
feat: basic vote flow
Dec 21, 2023
357fa8d
Merge branch 'feat/gov-v3' of github.com:aave/interface-governance-v3…
Dec 21, 2023
fa83616
fix: proposal details
grothem Dec 21, 2023
f7b30e1
fix: voting results
grothem Dec 21, 2023
85a36ae
fix: voting subgraph urls
grothem Dec 21, 2023
685e040
fix: voting results
grothem Dec 21, 2023
1c3ce02
fix: temporarily remove search/filter
grothem Dec 21, 2023
de4cc72
fix: config
grothem Dec 21, 2023
cfc86ff
fix: mui versions
grothem Dec 22, 2023
c62c55d
chore: delegation multople
foodaka Dec 22, 2023
56690c9
chore: delegation multople
foodaka Dec 22, 2023
3564961
fix: state colors
grothem Dec 22, 2023
eff9ea4
chore: delegation multople
foodaka Dec 22, 2023
6e9e36c
chore: delegation multople
foodaka Dec 22, 2023
bfabd79
chore: delegation multople
foodaka Dec 22, 2023
3eebf23
feat: gelato relayer
Dec 22, 2023
f15aa52
Merge branch 'feat/gov-v3' of github.com:aave/interface-governance-v3…
Dec 22, 2023
ed9a0f0
feat: gelato relayer
Dec 22, 2023
abee1f4
chore: delegation multople
foodaka Dec 22, 2023
bfbf216
chore: delegation multople
foodaka Dec 22, 2023
64cf25a
chore: delegation multople
foodaka Dec 22, 2023
f3cb813
Feat/delegation multiple test (#22)
JoaquinBattilana Dec 22, 2023
05ceac3
chore: cleanup
foodaka Dec 22, 2023
4438542
chore: address
foodaka Dec 22, 2023
36d4b30
chore: sync gov v3
foodaka Dec 22, 2023
baa3482
chore: address
foodaka Dec 22, 2023
6b02c77
chore: remove debug
foodaka Dec 22, 2023
bd0d8ed
Merge pull request #21 from aave/feat/delegation-multiple
grothem Dec 22, 2023
12aead1
fix: list times
grothem Dec 22, 2023
9f04014
fix: subgraph urls
grothem Dec 22, 2023
49ac950
chore: cleanup
grothem Dec 22, 2023
00cc70b
fix: gas station warning
grothem Dec 23, 2023
acf4294
fix: discussion link
grothem Dec 23, 2023
3eacd5e
feat: delegate by type
foodaka Dec 23, 2023
4e5d418
fix: voting info
grothem Dec 23, 2023
7eb306f
Merge pull request #23 from aave/feat/delegate-by-type
grothem Dec 23, 2023
d236c73
fix: voting details
grothem Dec 23, 2023
707eb62
feat: fixed loaders on proposal details
JoaquinBattilana Dec 23, 2023
89cb785
Merge branch 'feat/gov-v3' of github.com:aave/interface-governance-v3…
JoaquinBattilana Dec 23, 2023
e1045ad
fix: gov delegation type
grothem Dec 23, 2023
fb7e725
feat: vote as delegate
grothem Dec 24, 2023
e85bdc2
Merge pull request #24 from aave/feat/vote-as-delegate
JoaquinBattilana Dec 26, 2023
edbafd3
feat: build fixes
JoaquinBattilana Dec 26, 2023
04e9b38
feat: build fixes
JoaquinBattilana Dec 26, 2023
4bc21ad
feat: bumping axios
JoaquinBattilana Dec 26, 2023
d3e2228
feat: fix gelato
JoaquinBattilana Dec 26, 2023
7500cec
feat: next config
JoaquinBattilana Dec 26, 2023
ef43772
feat: updated dependencies
JoaquinBattilana Dec 26, 2023
3d5e5a2
feat: updated aave utils
JoaquinBattilana Dec 26, 2023
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
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({

const pageExtensions = ['page.tsx'];
if (process.env.NEXT_PUBLIC_ENABLE_GOVERNANCE === 'true') pageExtensions.push('governance.tsx');
pageExtensions.push('governance.tsx');
if (process.env.NEXT_PUBLIC_ENABLE_STAKING === 'true') pageExtensions.push('staking.tsx');

/** @type {import('next').NextConfig} */
Expand Down
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,19 @@
"test:coverage": "jest --coverage"
},
"dependencies": {
"@aave/contract-helpers": "1.21.1",
"@aave/math-utils": "1.21.1",
"@bgd-labs/aave-address-book": "^2.10.0",
"@aave/contract-helpers": "1.21.2-2022bac22871a85776f017f1d6214d9ecfcc5abe.0",
"@aave/math-utils": "1.21.2-2022bac22871a85776f017f1d6214d9ecfcc5abe.0",
"@bgd-labs/aave-address-book": "^2.13.1",
"@emotion/cache": "11.10.3",
"@emotion/react": "11.10.4",
"@emotion/server": "latest",
"@emotion/styled": "11.10.4",
"@gelatonetwork/relay-sdk": "^5.5.5",
"@gnosis.pm/safe-apps-web3-react": "^1.2.0",
"@heroicons/react": "^1.0.6",
"@lingui/react": "^3.14.0",
"@mui/icons-material": "^5.10.14",
"@mui/lab": "5.0.0-alpha.103",
"@mui/material": "^5.10.9",
"@paraswap/sdk": "6.2.4",
"@tanstack/react-query": "^4.28.0",
Expand Down Expand Up @@ -72,6 +74,8 @@
"dayjs": "^1.11.5",
"ethers": "^5.5.4",
"fuse.js": "^6.6.2",
"graphql": "^16.8.1",
"graphql-request": "^6.1.0",
"gray-matter": "^4.0.3",
"immer": "^9.0.15",
"lowdb": "^3.0.0",
Expand Down Expand Up @@ -111,7 +115,7 @@
"@types/react": "latest",
"@types/react-infinite-scroller": "^1.2.3",
"@typescript-eslint/eslint-plugin": "^5.38.1",
"axios": "^0.27.2",
"axios": "^1.6.2",
"babel-loader": "^8.2.5",
"babel-plugin-dynamic-import-node": "^2.3.3",
"babel-plugin-macros": "^3.1.0",
Expand Down
8 changes: 7 additions & 1 deletion pages/_app.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,13 @@ function getWeb3Library(provider: any): providers.Web3Provider {
return library;
}

export const queryClient = new QueryClient();
export const queryClient = new QueryClient({
defaultOptions: {
queries: {
refetchOnWindowFocus: false,
},
},
});

interface MyAppProps extends AppProps {
emotionCache?: EmotionCache;
Expand Down
30 changes: 26 additions & 4 deletions pages/governance/index.governance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import StyledToggleButton from 'src/components/StyledToggleButton';
import StyledToggleButtonGroup from 'src/components/StyledToggleButtonGroup';
import { MainLayout } from 'src/layouts/MainLayout';
import { GovernanceTopPanel } from 'src/modules/governance/GovernanceTopPanel';
import { ProposalsList } from 'src/modules/governance/ProposalsList';
import { ProposalsV3List } from 'src/modules/governance/ProposalsV3List';
import { UserGovernanceInfo } from 'src/modules/governance/UserGovernanceInfo';
import { Ipfs, IpfsType } from 'src/static-build/ipfs';
import { CustomProposalType, Proposal } from 'src/static-build/proposal';
Expand All @@ -20,7 +20,22 @@ const GovDelegationModal = dynamic(() =>
)
);

const GovRepresentativesModal = dynamic(() =>
import('../../src/components/transactions/GovRepresentatives/GovRepresentativesModal').then(
(module) => module.GovRepresentativesModal
)
);

export const getStaticProps = async () => {
// const queryClient = new QueryClient();
// await queryClient.prefetchQuery({ queryKey: ['proposals'], queryFn: () => getProposals });

// return {
// props: {
// dehydratedState: dehydrate(queryClient),
// },
// };

const IpfsFetcher = new Ipfs();
const ProposalFetcher = new Proposal();

Expand All @@ -39,7 +54,11 @@ export const getStaticProps = async () => {
};
});

return { props: { proposals: proposals.slice().reverse() } };
return {
props: {
proposals: proposals.slice().reverse(),
},
};
};

enum Tabs {
Expand All @@ -61,6 +80,8 @@ export default function Governance(props: GovernancePageProps) {
const [mode, setMode] = useState(Tabs.PROPOSALS);
const trackEvent = useRootStore((store) => store.trackEvent);

console.log(props);

useEffect(() => {
trackEvent('Page Viewed', {
'Page Name': 'Governance',
Expand Down Expand Up @@ -95,14 +116,14 @@ export default function Governance(props: GovernancePageProps) {
</StyledToggleButtonGroup>
{isMobile ? (
mode === Tabs.PROPOSALS ? (
<ProposalsList {...props} />
<ProposalsV3List />
) : (
<UserGovernanceInfo />
)
) : (
<Grid container spacing={4}>
<Grid item md={8}>
<ProposalsList {...props} />
<ProposalsV3List />
</Grid>
<Grid item md={4}>
<UserGovernanceInfo />
Expand All @@ -119,6 +140,7 @@ Governance.getLayout = function getLayout(page: React.ReactElement) {
<MainLayout>
{page}
<GovDelegationModal />
<GovRepresentativesModal />
</MainLayout>
);
};
4 changes: 2 additions & 2 deletions pages/governance/ipfs-preview.governance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function IpfsPreview() {
const router = useRouter();
const ipfsHash = router.query.ipfsHash as string;
const [ipfs, setIpfs] = useState<IpfsType>();

console.log(ipfs);
async function fetchIpfs() {
const proposalMetadata = await getProposalMetadata(ipfsHash, governanceConfig.ipfsGateway);
const newIpfs = {
Expand All @@ -31,7 +31,7 @@ export default function IpfsPreview() {
if (!ipfsHash) return;
fetchIpfs();
}, [ipfsHash]);
return <ProposalPage ipfs={ipfs} proposal={undefined} />;
return <ProposalPage />;
}

IpfsPreview.getLayout = function getLayout(page: React.ReactElement) {
Expand Down
Loading
Loading