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

Governance #2217

Draft
wants to merge 152 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
2500da1
Add useProposals and useProposal hooks with mock data
0xLienid Jun 30, 2022
d34d77e
Documentation for useProposals and useProposal
0xLienid Jul 1, 2022
28d2fb8
Update component-library for governance components
0xLienid Jul 1, 2022
ef8b84f
Add proposals dashboard, frame of filter modal
0xLienid Jul 5, 2022
dc09ba0
Merge branch 'develop' into governance
appleseed-iii Jul 7, 2022
e651e05
Merge branch 'governance' into ocg/proposals-dashboard
appleseed-iii Jul 7, 2022
84d9bef
remove childPaperBackground compile issue
appleseed-iii Jul 7, 2022
cedb8b6
mocked up modal
appleseed-iii Jul 7, 2022
faffeab
wip - filtration work in progress
appleseed-iii Jul 12, 2022
c73c539
Set up proposal page routing and frame proposal page component
0xLienid Jul 13, 2022
5ee1368
Modified alignment
0xLienid Jul 14, 2022
bba87d3
Styling and tab functionality
0xLienid Jul 14, 2022
f78a350
Placeholder end date countdown
0xLienid Jul 14, 2022
acd9b6f
Switch from x to left chevron for back button
0xLienid Jul 14, 2022
46c9a11
Adding content for votes section
0xLienid Jul 15, 2022
f9f9faf
Start create proposal form
0xLienid Jul 19, 2022
6800e64
Clean up create proposals page code
0xLienid Jul 19, 2022
9ce3226
Add continue button
0xLienid Jul 19, 2022
f18dab4
Clean up proposals page implementation
0xLienid Jul 19, 2022
fea6ae1
Merge pull request #2083 from OlympusDAO/ocg/proposals-page
appleseed-iii Jul 19, 2022
de64850
Mock proposal states
0xLienid Jul 21, 2022
7ad6c9c
Update snapshots, unsure why Give was failing
0xLienid Jul 21, 2022
5be5f83
Merge pull request #2087 from OlympusDAO/ocg/proposal-state
appleseed-iii Jul 27, 2022
244044c
proposals state
appleseed-iii Jul 27, 2022
c957dd0
Merge branch 'ocg/proposals-dashboard' of github-appleseed:OlympusDAO…
appleseed-iii Jul 28, 2022
c2e55fe
add contract abis
brightiron Jul 28, 2022
325ddcd
add contract addresses
brightiron Jul 28, 2022
9c84cc6
query hooks
brightiron Jul 28, 2022
416f90c
annotations. add query hooks for contracts
brightiron Jul 28, 2022
b92d6b6
OCG Sync Alpha (#2113)
brightiron Aug 1, 2022
c32fc35
add Governance Instructions contract
appleseed-iii Aug 3, 2022
54c6c87
wip modifying hooks to query proposals
appleseed-iii Aug 3, 2022
1cab461
update contract parsing for proposals, need metadata next
appleseed-iii Aug 3, 2022
85c32ad
fix loading
appleseed-iii Aug 3, 2022
9cc6784
proposal content.metadata parsing
appleseed-iii Aug 3, 2022
3776bb5
markdown parsing
appleseed-iii Aug 3, 2022
a4180b2
fix image overflow issue
brightiron Aug 4, 2022
fc82940
remove unused code
brightiron Aug 4, 2022
db24980
temp add back as other components are using it
brightiron Aug 4, 2022
ca985e8
a tags should use mui link component to receive styling
brightiron Aug 4, 2022
b5ad8f9
web3Storage functionality, need to tie to form
appleseed-iii Aug 4, 2022
6976fea
Merge branch 'ocg/proposals-dashboard' into ocg/contracts
appleseed-iii Aug 4, 2022
bdef463
wip - connected ipfs to form, needs cleanup
appleseed-iii Aug 4, 2022
cf3c5ea
updating creation form
brightiron Aug 5, 2022
bc07581
Merge branch 'ocg/contracts' of https://github.com/OlympusDAO/olympus…
brightiron Aug 5, 2022
316947e
refactor markdown preview to reusable component
brightiron Aug 5, 2022
d6b4d8a
allowedImgDomains list. Hides proposal images by default that arent o…
brightiron Aug 5, 2022
06c4ffa
refactor / update proposal view based on latest design
brightiron Aug 5, 2022
8d1b3b5
full width for vote page
brightiron Aug 5, 2022
04613e5
dashboard
brightiron Aug 5, 2022
5ae8439
link
brightiron Aug 5, 2022
be18470
votes tab
brightiron Aug 5, 2022
1846839
updating component library
brightiron Aug 6, 2022
8e06deb
ugly, but functioning contract creation
appleseed-iii Aug 6, 2022
d8615c1
Merge branch 'ocg/contracts' of github-appleseed:OlympusDAO/olympus-f…
appleseed-iii Aug 6, 2022
d386cf0
rename routes to /governance. add sidenav
brightiron Aug 8, 2022
54f17dc
moving from tabs to routes
brightiron Aug 8, 2022
52e8c2f
Merge branch 'ocg/contracts' of https://github.com/OlympusDAO/olympus…
brightiron Aug 8, 2022
1070e17
Merge pull request #2114 from OlympusDAO/ocg/contracts
brightiron Aug 8, 2022
4f24ce8
Merge branch 'alpha' into ocg/proposals-dashboard
brightiron Aug 8, 2022
df10f77
Initial commit for voting hooks
0xLienid Aug 9, 2022
88be2f3
Update voting hooks, tie in vote hook to VotesTab
0xLienid Aug 10, 2022
50dbca1
Bump useProposal and useProposals to react query 4
0xLienid Aug 10, 2022
c4b2021
Merge pull request #2140 from OlympusDAO/ocg/react-query-fix
0xLienid Aug 10, 2022
3206b1b
Merge branch 'ocg/proposals-dashboard' into ocg/voting
0xLienid Aug 10, 2022
07d11da
Fix VotesTab onClick functions
0xLienid Aug 10, 2022
6630fa5
Add button fill on vote selection
0xLienid Aug 11, 2022
f0fc490
use wallet balance. disable vote buttons if not active. or if not con…
brightiron Aug 12, 2022
77835b2
resolves unable to delete all content from markdown editor
brightiron Aug 12, 2022
7a75125
must have a value error
brightiron Aug 12, 2022
f89c183
console log
brightiron Aug 12, 2022
f9b28cf
adding rehype sanitize
brightiron Aug 12, 2022
1518318
Merge branch 'ocg/proposals-dashboard' into ocg/voting
brightiron Aug 15, 2022
a5a40ea
Merge pull request #2148 from OlympusDAO/ocg/voting
brightiron Aug 15, 2022
48f43f2
delegate modal. refactor to avoid duplication
brightiron Aug 15, 2022
ff6bd43
Add verification of valid address to delegate modal
0xLienid Aug 16, 2022
45d3442
Fix misalignment of ProposalSkeleton
0xLienid Aug 16, 2022
249ba8f
Merge pull request #2154 from OlympusDAO/ocg/skeleton-fix
brightiron Aug 18, 2022
3f1cee6
switch to isValidAddress helper
0xLienid Aug 18, 2022
c487593
Merge pull request #2150 from OlympusDAO/ocg/delegateModal
appleseed-iii Aug 18, 2022
dcf891c
Merge pull request #2153 from OlympusDAO/ocg/delegateModal-address-entry
brightiron Aug 18, 2022
b363769
Fix alignment on ProposalContainer
0xLienid Aug 23, 2022
cb577b3
Merge pull request #2177 from OlympusDAO/ocg/alignment-fix
0xLienid Aug 23, 2022
2bd5016
Fix bug noted on proposal time remaining
0xLienid Aug 23, 2022
7503280
Tweak display of time remaining on proposal page
0xLienid Aug 23, 2022
32f402a
Copy tweak
0xLienid Aug 23, 2022
18ae8ff
Merge pull request #2178 from OlympusDAO/ocg/proposal-time-remaining-fix
appleseed-iii Aug 27, 2022
7cb5bfc
replace relative paths w absolute
appleseed-iii Aug 30, 2022
1ca107a
update contract addresses & abi
appleseed-iii Aug 30, 2022
07c41db
more abi & type updates / tuneup
appleseed-iii Aug 30, 2022
ecc1d18
update proposal parsing
appleseed-iii Aug 30, 2022
d455154
update uniswap test for random tvl error
appleseed-iii Aug 30, 2022
11719af
Merge branch 'alpha' into governance
appleseed-iii Aug 30, 2022
5219681
Merge branch 'governance' into ocg/proposals-dashboard
appleseed-iii Aug 30, 2022
f82b576
Merge pull request #2041 from OlympusDAO/ocg/proposals-dashboard
appleseed-iii Aug 30, 2022
a2debae
init ticket https://github.com/OlympusDAO/internal-tasks/issues/41
appleseed-iii Aug 30, 2022
e5880dc
handle endorsement submission
appleseed-iii Aug 30, 2022
e65a4c4
parse user endorsements & user vote token value
appleseed-iii Aug 31, 2022
3998302
add total voting supply
appleseed-iii Aug 31, 2022
42b4d26
Merge pull request #2219 from OlympusDAO/gov/vote-tab-endorsements
appleseed-iii Aug 31, 2022
76d743c
Add pending status to create proposal button (#2232)
0xLienid Sep 11, 2022
092d4cf
Merge branch 'alpha' into governance
appleseed-iii Sep 20, 2022
26403a7
update cancelcallback refrence
appleseed-iii Sep 22, 2022
ea2d480
Merge branch 'alpha' into governance
appleseed-iii Nov 3, 2022
7b37b73
fix tests
appleseed-iii Nov 3, 2022
1506db6
ocg: added new addresses, need updated abis (#2304)
appleseed-iii Nov 4, 2022
635c0bd
Setup Governance Faucet (#2412)
appleseed-iii Nov 7, 2022
f655a0b
fixes most governance state issues, build will probably fail until co…
appleseed-iii Nov 15, 2022
000aae1
bump component-library for governance
appleseed-iii Nov 15, 2022
90d332a
Merge pull request #2424 from OlympusDAO/governance-active-states
appleseed-iii Nov 15, 2022
ed0058f
force higher component-library version
appleseed-iii Nov 15, 2022
080eb42
yarn.lock changes
appleseed-iii Dec 1, 2022
2c86b01
remove transalations
appleseed-iii Dec 1, 2022
1762b78
Merge branch 'staging-gov' into governance
appleseed-iii Dec 1, 2022
551e8ff
update all REACT_APP_ to VITE_
appleseed-iii Dec 1, 2022
6d1856a
fix NODE_ENV -> MODE for vite, add reclaimVohmButton
appleseed-iii Dec 1, 2022
ac2d19b
invalidate queries after wrap/unwrap
brightiron Dec 5, 2022
3aee34e
revert
brightiron Dec 5, 2022
a72c911
toggle vote button color based on vote state
brightiron Dec 5, 2022
0ac9e85
set quorum to 1
brightiron Dec 5, 2022
11b6dc5
isActive should check current date against vote expiry
brightiron Dec 5, 2022
d44bb35
Merge pull request #2457 from OlympusDAO/voteResults
appleseed-iii Dec 7, 2022
0d661ec
Merge pull request #2455 from OlympusDAO/governanceInvalidateQueries
appleseed-iii Dec 7, 2022
a317074
Merge pull request #2456 from OlympusDAO/voteButtons
appleseed-iii Dec 7, 2022
5b3b29e
Merge branch 'develop' into governance
brightiron Dec 10, 2022
fa101ea
Merge branch 'develop' into governance
appleseed-iii Dec 13, 2022
42f4f21
fix snapshots
appleseed-iii Dec 13, 2022
c353b49
Merge branch 'develop' into governance
appleseed-iii Dec 15, 2022
a38ecc3
Merge branch 'develop' into governance
brightiron Dec 18, 2022
f0e0f9b
update seconds on page refresh. fix page title
brightiron Dec 19, 2022
5140da6
pending state. on success redirect to main governance page. refresh s…
brightiron Dec 19, 2022
fec51b6
fix tests
appleseed-iii Dec 19, 2022
dc148dc
Merge branch 'governance' of github-appleseed:OlympusDAO/olympus-fron…
appleseed-iii Dec 19, 2022
c09d93c
Merge pull request #2543 from OlympusDAO/governanceFixes
appleseed-iii Dec 29, 2022
7ab9f80
Merge branch 'develop' into governance
appleseed-iii Jan 23, 2023
9d0c760
update governance addresses
appleseed-iii Feb 2, 2023
be2fe5c
fix collateral balance requirements for creating a proposal
appleseed-iii Feb 3, 2023
8f7111c
change voting tabulation back to gOHM
appleseed-iii Feb 3, 2023
4b0bbd2
update ipfs gateway to w3s.link
appleseed-iii Feb 6, 2023
f6c88d1
invalidate queries after voting & activation
appleseed-iii Feb 6, 2023
1931cdb
minor tweaks
appleseed-iii Feb 6, 2023
d66948a
cleanup proposal state
appleseed-iii Mar 6, 2023
df23bab
show voting power & history
appleseed-iii Mar 6, 2023
8041d76
fix fontsize on markdown preview
appleseed-iii Mar 7, 2023
ed5f89a
move cast vote, restyle discussion
appleseed-iii Mar 7, 2023
e786d4d
fix buttons & mutation states
appleseed-iii Mar 7, 2023
f5b821e
reorg voting power per figma
appleseed-iii Mar 13, 2023
067df5a
update proposal states, voting power & vote status
appleseed-iii Mar 14, 2023
88a6b1a
fix cast vote hero
appleseed-iii Mar 14, 2023
4a0106a
reorg proposals dashobard rows
appleseed-iii Mar 14, 2023
ced89ae
Merge branch 'develop' into governance
appleseed-iii May 8, 2023
950415a
md pkg upgrades
appleseed-iii May 8, 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
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ VITE_POLYGON_TESTNET_NODE_URL=""
# These 2 settings should be toggled to "true" if you want to use Olympus Give features
VITE_GIVE_ENABLED="true"
VITE_GIVE_GRANTS_ENABLED="true"
VITE_GIVE_ENABLED="true"
VITE_GIVE_GRANTS_ENABLED="true"

# This should be toggled to "true" if you need to use the mock sOHM contract
# (which allows for on-demand rebasing)
Expand All @@ -39,3 +41,6 @@ VITE_ARBITRUM_TESTNET_NODE_URL=""

VITE_AVALANCHE_NODE_URL=""
VITE_AVALANCHE_TESTNET_NODE_URL=""

# Optional - for On-Chain Governance - get from https://web3.storage/tokens/
VITE_WEB3_STORAGE_KEY=""
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"@reduxjs/toolkit": "^1.9.3",
"@tanstack/react-query": "^4.2.3",
"@types/recharts": "^1.8.24",
"@uiw/react-md-editor": "^3.20.10",
"@vitejs/plugin-react-swc": "^3.2.0",
"@wundergraph/react-query": "^0.8.22",
"@wundergraph/sdk": "^0.152.0",
Expand All @@ -64,15 +65,17 @@
"react-ga": "^3.3.1",
"react-ga4": "^2.1.0",
"react-hot-toast": "^2.4.0",
"react-markdown": "^8.0.6",
"react-markdown": "^8.0.7",
"react-redux": "^8.0.5",
"react-router-dom": "^6.9.0",
"react-step-progress-bar": "^1.0.3",
"react-uid": "^2.3.2",
"recharts": "^2.5.0",
"rehype-sanitize": "^5.0.1",
"tinycolor2": "^1.6.0",
"typescript": "^4.9.4",
"wagmi": "^0.12.12"
"wagmi": "^0.12.12",
"web3.storage": "^4.3.0"
},
"devDependencies": {
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
Expand Down
3 changes: 3 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { girth as gTheme } from "src/themes/girth.js";
import { light as lightTheme } from "src/themes/light.js";
import { BondModalContainer } from "src/views/Bond/components/BondModal/BondModal";
import { BondModalContainerV3 } from "src/views/Bond/components/BondModal/BondModalContainerV3";
import { Governance } from "src/views/Governance/Governance";
import { Liquidity } from "src/views/Liquidity";
import { ExternalStakePools } from "src/views/Liquidity/ExternalStakePools/ExternalStakePools";
import { Vault } from "src/views/Liquidity/Vault";
Expand Down Expand Up @@ -268,6 +269,8 @@ function App() {
element={<Wallet open={true} component="wallet" theme={theme} toggleTheme={toggleTheme} />}
></Route>
<Route path="*" element={<NotFound />} />

<Route path="/governance/*" element={<Governance />} />
</Routes>
</Suspense>
</div>
Expand Down
250 changes: 250 additions & 0 deletions src/abi/OlympusGovInstructions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
{
"abi": [
{
"inputs": [
{
"internalType": "contract Kernel",
"name": "kernel_",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "INSTR_InstructionsCannotBeEmpty",
"type": "error"
},
{
"inputs": [],
"name": "INSTR_InvalidAction",
"type": "error"
},
{
"inputs": [
{
"internalType": "Keycode",
"name": "keycode_",
"type": "bytes5"
}
],
"name": "InvalidKeycode",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "caller_",
"type": "address"
}
],
"name": "KernelAdapter_OnlyKernel",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "policy_",
"type": "address"
}
],
"name": "Module_PolicyNotPermitted",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "target_",
"type": "address"
}
],
"name": "TargetNotAContract",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "instructionsId",
"type": "uint256"
}
],
"name": "InstructionsStored",
"type": "event"
},
{
"inputs": [],
"name": "INIT",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "KEYCODE",
"outputs": [
{
"internalType": "Keycode",
"name": "",
"type": "bytes5"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "VERSION",
"outputs": [
{
"internalType": "uint8",
"name": "major",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "minor",
"type": "uint8"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract Kernel",
"name": "newKernel_",
"type": "address"
}
],
"name": "changeKernel",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "instructionsId_",
"type": "uint256"
}
],
"name": "getInstructions",
"outputs": [
{
"components": [
{
"internalType": "enum Actions",
"name": "action",
"type": "uint8"
},
{
"internalType": "address",
"name": "target",
"type": "address"
}
],
"internalType": "struct Instruction[]",
"name": "",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "kernel",
"outputs": [
{
"internalType": "contract Kernel",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "enum Actions",
"name": "action",
"type": "uint8"
},
{
"internalType": "address",
"name": "target",
"type": "address"
}
],
"internalType": "struct Instruction[]",
"name": "instructions_",
"type": "tuple[]"
}
],
"name": "store",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "storedInstructions",
"outputs": [
{
"internalType": "enum Actions",
"name": "action",
"type": "uint8"
},
{
"internalType": "address",
"name": "target",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalInstructions",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
}
]
}
Loading