diff --git a/package.json b/package.json index 936dd7a3bd5..061fd971f58 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "eslint-plugin-prettier": "^3.1.3", "eslint-plugin-react": "^7.19.0", "eslint-plugin-react-hooks": "^4.0.0", - "ethers": "^5.4.0", + "ethers": "^5.4.6", "graphql": "^15.5.0", "graphql-request": "^3.4.0", "inter-ui": "^3.13.1", diff --git a/src/constants/proposals/bravo_proposal_description.ts b/src/constants/proposals/bravo_proposal_description.ts deleted file mode 100644 index efd8920e29c..00000000000 --- a/src/constants/proposals/bravo_proposal_description.ts +++ /dev/null @@ -1,27 +0,0 @@ -export const BRAVO_PROPOSAL_DESCRIPTION = `# Upgrade Governance Contract to Compound's Governor Bravo - -## Previous Discussion -[Temperature Check](https://gov.uniswap.org/t/temperature-check-upgrade-governance-contract-to-governor-bravo/13610) | [Snapshot](https://snapshot.org/#/uniswap/proposal/QmScNLeajiF2hQh1z9DYqTFKGgrRhHwrHisV4ynmDEQwxH) [Consensus Check](https://gov.uniswap.org/t/consensus-check-upgrade-governance-contract-to-governor-bravo/13707) | [Snapshot](https://snapshot.org/#/uniswap/proposal/QmWbgzHJ8nK2TDaj6LF6BxAMPahy97dMmbbU5kRBw1QkXt) - -## TL;DR: -Upgrade Uniswap's current governance contract from Governor Alpha to Governor Bravo to improve governance upgradability and protocol safety. [On-Chain Proposal]() - -## Summary and Motivation: -*Co-written with [Getty Hill](https://twitter.com/getty_hill) (@Getty), [Eddy Lee ](https://twitter.com/yesimeddy) (@elee), [Yuan Han Li ](https://twitter.com/yuan_han_li) (@yuan-han-li), [John Wang ](https://twitter.com/j0hnwang) (@johnwang), and [Ali Khambati ](https://twitter.com/alikhambati1) (@alikhambati)* Governor Alpha, the current governance contract used, was a great start, but in light of Compound's and other protocols upgrade to Governor Bravo, Uniswap should migrate given Bravo's additional safety benefits and upgradability. - -1. **Native upgradeability:** Under Governor Alpha, changes to governance parameters require deploying a new contract and completely migrating to a new address. This is particularly damaging to governance participation as it introduces downtime and asynchronicity. Many governance tools and custodians use factory contracts which point to a specific contract address, meaning parties must manually upgrade their infrastructure every time governance parameters are changed under Governor Alpha. This includes tools for creating autonomous proposals like [fish.vote ](https://www.fish.vote/); front-ends such as [Tally ](https://www.withtally.com/), [Sybil](https://sybil.org/#/delegates/uniswap), and [Boardroom ](https://app.boardroom.info/) which aggregate and display governance results for various protocols; and professional custodians which are used by large token holders, delegates, and community members. Enabling a static contract address that has proxy upgradability patterns is paramount for maximizing participation, and maintaining an open and secure governance process. -2. **Voting reason string:** Governor Bravo gives voters the opportunity to add free-form comments (text strings) along with their on-chain votes. Not only does this increase the transparency around the rationale people have behind their votes, but it also facilitates more in-depth and nuanced discussion. -3. **New abstain' voting option:** Governor Bravo enables voters to formally abstain rather than forcing them to choose between voting yes/no or not voting at all. This will give voters more flexibility and also increase transparency into delegate behavior. -4. **Proposal numbers won't reset:** Under Governor Alpha, any upgrades to the contract resets the proposal number schema. Notice that [Proposal 0.4'](https://app.uniswap.org/#/vote/0/4) (which resulted in deployment and migration to a new Governor Alpha contract due to modifying the proposal submission threshold parameter) caused the following on-chain proposal from @HarvardLawBFI to be numbered [Proposal 1.1' ](https://app.uniswap.org/#/vote/1/1). Under Governor Bravo, this would not be an issue and proposal numbers would be continuous because the contract would be maintained at a single address. -5. **Proposal Cancellation:** Bravo allows user-directed cancellations enabling erroneous proposals to be canceled if need be (rather than forcing people to vote no/abstain). -6. **Review Period:** Governor Bravo allows governance to include a review/analysis period. Currently, Compound uses a 13140 block (~2-day) review period that allows holders to review the proposal. This means that users will have 2-days to prepare for voting (e.g., remove UNI from Aave), unlike Governor Alpha which instantly snapshots users' voting power. A review period substantially improves the accessibility and safety of the governance process. - -## Implementation: -After speaking with the OpenZeppelin team about their reimplementation of Governor Bravo, we think using Compound's Governor Bravo contract instead makes the most sense at this stage. Although Open Zeppelin's Governor contract takes a simpler approach that can include all Bravo functionality, it does not do so by default. The contract uses similar logic, but the code is new. It has gone through an internal audit and review process but still needs to go through an external audit. For the safety and simplicity of Uniswap, we think using Compound's Governor Bravo contract is the best decision for the time being. Compound's Governor contract has already undergone an [audit](https://blog.openzeppelin.com/compound-governor-bravo-audit/) by OpenZeppelin and has been widely used. We can always change/upgrade to Open Zeppelin Governor contract at a future date if their contract introduces new features/functionality the community is interested in. More details on OpenZeppelin's code can be found here: [Github](https://github.com/OpenZeppelin/openzeppelin-contracts/tree/master/contracts/governance) [Docs](https://docs.openzeppelin.com/contracts/4.x/api/governance) [More info](https://openzeppelin.notion.site/Comparing-Compound-Governor-to-OpenZeppelin-Governor-2-10d0fdcf61ba476fae492b295822ee13) As mentioned in the previous Consensus Check, we have deployed the contract on the Ropsten test net for the community to review our code: [Governor Bravo Delegator](https://ropsten.etherscan.io/address/0x15df15caad12adaa03949014ba5cc49a84803d0f#code) [Governor Bravo Delegate](https://ropsten.etherscan.io/address/0xD8bf60dfC5115F6cB99bb50502346E7b863800f1#code) [Github for contracts](https://github.com/gettty/uniswap-gov) *NB: The \`_initiate\` function has been slightly modified to take an initial proposal number as an input rather than pulling it from Governor Alpha. This way Uniswap can resume proper proposal numbering.* - -## Resource links: -1. [Governor Bravo Development - Protocol Development - Compound Community Forum ](https://www.comp.xyz/t/governor-bravo-development/942) -2. [Understanding Governor Bravo. A review of key changes versus | by monetsupply | Tally | Jul, 2021 | Medium ](https://medium.com/tally-blog/understanding-governor-bravo-69b06f1875da) -3. [Compound | Proposal Detail #42 ](https://compound.finance/governance/proposals/42) -4. [Compound | Proposal Detail #43](https://compound.finance/governance/proposals/43) -` diff --git a/src/state/governance/hooks.ts b/src/state/governance/hooks.ts index 0fe5070e08b..2a2fecb481f 100644 --- a/src/state/governance/hooks.ts +++ b/src/state/governance/hooks.ts @@ -3,9 +3,16 @@ import { t } from '@lingui/macro' import { abi as GOV_ABI } from '@uniswap/governance/build/GovernorAlpha.json' import { CurrencyAmount, Token } from '@uniswap/sdk-core' import { UNISWAP_GRANTS_PROPOSAL_DESCRIPTION } from 'constants/proposals/uniswap_grants_proposal_description' -import { BRAVO_PROPOSAL_DESCRIPTION } from 'constants/proposals/bravo_proposal_description' import { Contract } from 'ethers' -import { defaultAbiCoder, formatUnits, Interface, isAddress, LogDescription } from 'ethers/lib/utils' +import { + defaultAbiCoder, + formatUnits, + Interface, + isAddress, + toUtf8String, + Utf8ErrorFuncs, + Utf8ErrorReason, +} from 'ethers/lib/utils' import { useGovernanceV0Contract, useGovernanceV1Contract, @@ -87,20 +94,43 @@ function useFormattedProposalCreatedLogs(contract: Contract | null): FormattedPr return useMemo(() => { return useLogsResult?.logs?.map((log) => { - let parsed: LogDescription['args'] + const parsed = GovernanceInterface.parseLog(log).args + let description!: string try { - parsed = GovernanceInterface.parseLog(log).args - } catch { - parsed = GovernanceInterface.parseLog({ - topics: log.topics, - data: log.data.replace( - '2223205570677261646520476f7665726e616e636520436f6e747261637420746f20436f6d706f756e64277320476f7665726e6f7220427261766f202023232050726576696f75732044697363757373696f6e3a20205b54656d706572617475726520436865636b5d2868747470733a2f2f676f762e756e69737761702e6f72672f742f74656d70657261747572652d636865636b2d757067726164652d676f7665726e616e63652d636f6e74726163742d746f2d676f7665726e6f722d627261766f2f313336313029207c205b536e617073686f745d2868747470733a2f2f736e617073686f742e6f72672f232f756e69737761702f70726f706f73616c2f516d53634e4c65616a694632685168317a3944597154464b47677252684877724869735634796e6d44455177784829205b436f6e73656e73757320436865636b5d2868747470733a2f2f676f762e756e69737761702e6f72672f742f636f6e73656e7375732d636865636b2d757067726164652d676f7665726e616e63652d636f6e74726163742d746f2d676f7665726e6f722d627261766f2f313337303729207c205b536e617073686f745d2868747470733a2f2f736e617073686f742e6f72672f232f756e69737761702f70726f706f73616c2f516d5762677a484a386e4b325444616a364c46364278414d506168793937644d6d626255356b52427731516b5874292020232320544c3b44523a20205570677261646520556e697377617027732063757272656e7420676f7665726e616e636520636f6e74726163742066726f6d20476f7665726e6f7220416c70686120746f20476f7665726e6f7220427261766f20746f20696d70726f766520676f7665726e616e6365207570677261646162696c69747920616e642070726f746f636f6c207361666574792e20205b4f6e2d436861696e2050726f706f73616c5d2829202023232053756d6d61727920616e64204d6f7469766174696f6e3a20202a436f2d7772697474656e2077697468205b47657474792048696c6c5d2868747470733a2f2f747769747465722e636f6d2f67657474795f68696c6c292028404765747479292c205b45646479204c6565205d2868747470733a2f2f747769747465722e636f6d2f796573696d6564647929202840656c6565292c205b5975616e2048616e204c69205d2868747470733a2f2f747769747465722e636f6d2f7975616e5f68616e5f6c69292028407975616e2d68616e2d6c69292c205b4a6f686e2057616e67205d2868747470733a2f2f747769747465722e636f6d2f6a30686e77616e67292028406a6f686e77616e67292c20616e64205b416c69204b68616d62617469205d2868747470733a2f2f747769747465722e636f6d2f616c696b68616d626174693129202840616c696b68616d62617469292a2020476f7665726e6f7220416c7068612c207468652063757272656e7420676f7665726e616e636520636f6e747261637420757365642c2077617320612067726561742073746172742c2062757420696e206c69676874206f6620436f6d706f756e64277320616e64206f746865722070726f746f636f6c73207570677261646520746f20476f7665726e6f7220427261766f2c20556e69737761702073686f756c64206d69677261746520676976656e20427261766f2773206164646974696f6e616c207361666574792062656e656669747320616e64207570677261646162696c6974792e2020312e202a2a4e617469766520757067726164656162696c6974793a2a2a20556e64657220476f7665726e6f7220416c7068612c206368616e67657320746f20676f7665726e616e636520706172616d65746572732072657175697265206465706c6f79696e672061206e657720636f6e747261637420616e6420636f6d706c6574656c79206d6967726174696e6720746f2061206e657720616464726573732e205468697320697320706172746963756c61726c792064616d6167696e6720746f20676f7665726e616e63652070617274696369706174696f6e20617320697420696e74726f647563657320646f776e74696d6520616e64206173796e6368726f6e69636974792e204d616e7920676f7665726e616e636520746f6f6c7320616e6420637573746f6469616e732075736520666163746f727920636f6e74726163747320776869636820706f696e7420746f206120737065636966696320636f6e747261637420616464726573732c206d65616e696e672070617274696573206d757374206d616e75616c6c79207570677261646520746865697220696e6672617374727563747572652065766572792074696d6520676f7665726e616e636520706172616d657465727320617265206368616e67656420756e64657220476f7665726e6f7220416c7068612e205468697320696e636c7564657320746f6f6c7320666f72206372656174696e67206175746f6e6f6d6f75732070726f706f73616c73206c696b65205b666973682e766f7465205d2868747470733a2f2f7777772e666973682e766f74652f293b2066726f6e742d656e64732073756368206173205b54616c6c79205d2868747470733a2f2f7777772e7769746874616c6c792e636f6d2f292c205b537962696c5d2868747470733a2f2f737962696c2e6f72672f232f64656c6567617465732f756e6973776170292c20616e64205b426f617264726f6f6d205d2868747470733a2f2f6170702e626f617264726f6f6d2e696e666f2f292077686963682061676772656761746520616e6420646973706c617920676f7665726e616e636520726573756c747320666f7220766172696f75732070726f746f636f6c733b20616e642070726f66657373696f6e616c20637573746f6469616e73207768696368206172652075736564206279206c6172676520746f6b656e20686f6c646572732c2064656c6567617465732c20616e6420636f6d6d756e697479206d656d626572732e20456e61626c696e6720612073746174696320636f6e747261637420616464726573732074686174206861732070726f7879207570677261646162696c697479207061747465726e7320697320706172616d6f756e7420666f72206d6178696d697a696e672070617274696369706174696f6e2c20616e64206d61696e7461696e696e6720616e206f70656e20616e642073656375726520676f7665726e616e63652070726f636573732e20322e202a2a566f74696e6720726561736f6e20737472696e673a2a2a20476f7665726e6f7220427261766f20676976657320766f7465727320746865206f70706f7274756e69747920746f2061646420667265652d666f726d20636f6d6d656e747320287465787420737472696e67732920616c6f6e672077697468207468656972206f6e2d636861696e20766f7465732e204e6f74206f6e6c7920646f6573207468697320696e63726561736520746865207472616e73706172656e63792061726f756e642074686520726174696f6e616c652070656f706c65206861766520626568696e6420746865697220766f7465732c2062757420697420616c736f20666163696c697461746573206d6f726520696e2d646570746820616e64206e75616e6365642064697363757373696f6e2e20332e202a2a4e6577209880e26162737461696e2720766f74696e67206f7074696f6e3a2a2a20476f7665726e6f7220427261766f20656e61626c657320766f7465727320746f20666f726d616c6c79206162737461696e20726174686572207468616e20666f7263696e67207468656d20746f2063686f6f7365206265747765656e20766f74696e67207965732f6e6f206f72206e6f7420766f74696e6720617420616c6c2e20546869732077696c6c206769766520766f74657273206d6f726520666c65786962696c69747920616e6420616c736f20696e637265617365207472616e73706172656e637920696e746f2064656c6567617465206265686176696f722e20342e202a2a50726f706f73616c206e756d6265727320776f6e27742072657365743a2a2a20556e64657220476f7665726e6f7220416c7068612c20616e7920757067726164657320746f2074686520636f6e747261637420726573657473207468652070726f706f73616c206e756d62657220736368656d612e204e6f746963652074686174205b9880e250726f706f73616c20302e34275d2868747470733a2f2f6170702e756e69737761702e6f72672f232f766f74652f302f34292028776869636820726573756c74656420696e206465706c6f796d656e7420616e64206d6967726174696f6e20746f2061206e657720476f7665726e6f7220416c70686120636f6e74726163742064756520746f206d6f64696679696e67207468652070726f706f73616c207375626d697373696f6e207468726573686f6c6420706172616d6574657229206361757365642074686520666f6c6c6f77696e67206f6e2d636861696e2070726f706f73616c2066726f6d2040486172766172644c617742464920746f206265206e756d6265726564205b9880e250726f706f73616c20312e3127205d2868747470733a2f2f6170702e756e69737761702e6f72672f232f766f74652f312f31292e20556e64657220476f7665726e6f7220427261766f2c207468697320776f756c64206e6f7420626520616e20697373756520616e642070726f706f73616c206e756d6265727320776f756c6420626520636f6e74696e756f757320626563617573652074686520636f6e747261637420776f756c64206265206d61696e7461696e656420617420612073696e676c6520616464726573732e20352e202a2a50726f706f73616c2043616e63656c6c6174696f6e3a2a2a20427261766f20616c6c6f777320757365722d64697265637465642063616e63656c6c6174696f6e7320656e61626c696e67206572726f6e656f75732070726f706f73616c7320746f2062652063616e63656c6564206966206e6565642062652028726174686572207468616e20666f7263696e672070656f706c6520746f20766f7465206e6f2f6162737461696e292e20362e202a2a52657669657720506572696f643a2a2a20476f7665726e6f7220427261766f20616c6c6f777320676f7665726e616e636520746f20696e636c7564652061207265766965772f616e616c7973697320706572696f642e2043757272656e746c792c20436f6d706f756e642075736573206120313331343020626c6f636b20287e322d646179292072657669657720706572696f64207468617420616c6c6f777320686f6c6465727320746f20726576696577207468652070726f706f73616c2e2054686973206d65616e7320746861742075736572732077696c6c206861766520322d6461797320746f207072657061726520666f7220766f74696e672028652e672e2c2072656d6f766520554e492066726f6d2041617665292c20756e6c696b6520476f7665726e6f7220416c70686120776869636820696e7374616e746c7920736e617073686f74732075736572732720766f74696e6720706f7765722e20412072657669657720706572696f64207375627374616e7469616c6c7920696d70726f76657320746865206163636573736962696c69747920616e6420736166657479206f662074686520676f7665726e616e63652070726f636573732e2020232320496d706c656d656e746174696f6e3a20416674657220737065616b696e67207769746820746865204f70656e5a657070656c696e207465616d2061626f7574207468656972207265696d706c656d656e746174696f6e206f6620476f7665726e6f7220427261766f2c207765207468696e6b207573696e6720436f6d706f756e64277320476f7665726e6f7220427261766f20636f6e747261637420696e7374656164206d616b657320746865206d6f73742073656e736520617420746869732073746167652e2020416c74686f756768204f70656e205a657070656c696e277320476f7665726e6f7220636f6e74726163742074616b657320612073696d706c657220617070726f61636820746861742063616e20696e636c75646520616c6c20427261766f2066756e6374696f6e616c6974792c20697420646f6573206e6f7420646f20736f2062792064656661756c742e2054686520636f6e747261637420757365732073696d696c6172206c6f6769632c206275742074686520636f6465206973206e65772e2049742068617320676f6e65207468726f75676820616e20696e7465726e616c20617564697420616e64207265766965772070726f6365737320627574207374696c6c206e6565647320746f20676f207468726f75676820616e2065787465726e616c2061756469742e2020466f72207468652073616665747920616e642073696d706c6963697479206f6620556e69737761702c207765207468696e6b207573696e6720436f6d706f756e64277320476f7665726e6f7220427261766f20636f6e7472616374206973207468652062657374206465636973696f6e20666f72207468652074696d65206265696e672e20436f6d706f756e64277320476f7665726e6f7220636f6e74726163742068617320616c726561647920756e646572676f6e6520616e205b61756469745d2868747470733a2f2f626c6f672e6f70656e7a657070656c696e2e636f6d2f636f6d706f756e642d676f7665726e6f722d627261766f2d61756469742f29206279204f70656e5a657070656c696e20616e6420686173206265656e20776964656c7920757365642e2057652063616e20616c77617973206368616e67652f7570677261646520746f204f70656e205a657070656c696e20476f7665726e6f7220636f6e7472616374206174206120667574757265206461746520696620746865697220636f6e747261637420696e74726f6475636573206e65772066656174757265732f66756e6374696f6e616c6974792074686520636f6d6d756e69747920697320696e746572657374656420696e2e204d6f72652064657461696c73206f6e204f70656e5a657070656c696e277320636f64652063616e20626520666f756e6420686572653a205b4769746875625d2868747470733a2f2f6769746875622e636f6d2f4f70656e5a657070656c696e2f6f70656e7a657070656c696e2d636f6e7472616374732f747265652f6d61737465722f636f6e7472616374732f676f7665726e616e636529205b446f63735d2868747470733a2f2f646f63732e6f70656e7a657070656c696e2e636f6d2f636f6e7472616374732f342e782f6170692f676f7665726e616e636529205b4d6f726520696e666f5d2868747470733a2f2f6f70656e7a657070656c696e2e6e6f74696f6e2e736974652f436f6d706172696e672d436f6d706f756e642d476f7665726e6f722d746f2d4f70656e5a657070656c696e2d476f7665726e6f722d322d31306430666463663631626134373666616534393262323935383232656531332920204173206d656e74696f6e656420696e207468652070726576696f757320436f6e73656e73757320436865636b2c2077652068617665206465706c6f7965642074686520636f6e7472616374206f6e2074686520526f707374656e2074657374206e657420666f722074686520636f6d6d756e69747920746f20726576696577206f757220636f64653a205b476f7665726e6f7220427261766f2044656c656761746f725d2868747470733a2f2f726f707374656e2e65746865727363616e2e696f2f616464726573732f30783135646631356361616431326164616130333934393031346261356363343961383438303364306623636f646529205b476f7665726e6f7220427261766f2044656c65676174655d2868747470733a2f2f726f707374656e2e65746865727363616e2e696f2f616464726573732f30784438626636306466433531313546366342393962623530353032333436453762383633383030663123636f646529205b47697468756220666f7220636f6e7472616374735d2868747470733a2f2f6769746875622e636f6d2f6765747474792f756e69737761702d676f762920202a4e423a2054686520605f696e697469617465602066756e6374696f6e20686173206265656e20736c696768746c79206d6f64696669656420746f2074616b6520616e20696e697469616c2070726f706f73616c206e756d62657220617320616e20696e70757420726174686572207468616e2070756c6c696e672069742066726f6d20476f7665726e6f7220416c7068612e20546869732077617920556e69737761702063616e20726573756d652070726f7065722070726f706f73616c206e756d626572696e672e2a20202323205265736f75726365206c696e6b733a2020312e205b476f7665726e6f7220427261766f20446576656c6f706d656e74202d2050726f746f636f6c20446576656c6f706d656e74202d20436f6d706f756e6420436f6d6d756e69747920466f72756d205d2868747470733a2f2f7777772e636f6d702e78797a2f742f676f7665726e6f722d627261766f2d646576656c6f706d656e742f3934322920322e205b556e6465727374616e64696e6720476f7665726e6f7220427261766f2e204120726576696577206f66206b6579206368616e67657320766572737573a680e2207c206279206d6f6e6574737570706c79207c2054616c6c79207c204a756c2c2032303231207c204d656469756d205d2868747470733a2f2f6d656469756d2e636f6d2f74616c6c792d626c6f672f756e6465727374616e64696e672d676f7665726e6f722d627261766f2d3639623036663138373564612920332e205b436f6d706f756e64207c2050726f706f73616c2044657461696c20233432205d2868747470733a2f2f636f6d706f756e642e66696e616e63652f676f7665726e616e63652f70726f706f73616c732f34322920342e205b436f6d706f756e64207c2050726f706f73616c2044657461696c202334335d2868747470733a2f2f636f6d706f756e642e66696e616e63652f676f7665726e616e63652f70726f706f73616c732f34332922', - '0'.repeat(13282) - ), - }).args + description = parsed.description + } catch (error) { + // replace invalid UTF-8 in the description with replacement characters + let onError = Utf8ErrorFuncs.replace + + // Bravo proposal reverses the codepoints for U+2018 (‘) and U+2026 (…) + const startBlock = parseInt(parsed.startBlock?.toString()) + if (startBlock === BRAVO_START_BLOCK) { + const U2018 = [0xe2, 0x80, 0x98].toString() + const U2026 = [0xe2, 0x80, 0xa6].toString() + onError = (reason, offset, bytes, output) => { + if (reason === Utf8ErrorReason.UNEXPECTED_CONTINUE) { + const charCode = [bytes[offset], bytes[offset + 1], bytes[offset + 2]].reverse().toString() + if (charCode === U2018) { + output.push(0x2018) + return 2 + } else if (charCode === U2026) { + output.push(0x2026) + return 2 + } + } + return Utf8ErrorFuncs.replace(reason, offset, bytes, output) + } + } + + description = JSON.parse(toUtf8String(error.error.value, onError)) || '' + + // Bravo proposal omits newlines + if (startBlock === BRAVO_START_BLOCK) { + description = description.replaceAll(/ /g, '\n').replaceAll(/\d\. /g, '\n$&') + } } return { - description: parsed.description, + description, details: parsed.targets.map((target: string, i: number) => { const signature = parsed.signatures[i] const [name, types] = signature.substr(0, signature.length - 1).split('(') @@ -173,8 +203,6 @@ export function useAllProposalData(): { data: ProposalData[]; loading: boolean } const startBlock = parseInt(proposal?.result?.startBlock?.toString()) if (startBlock === UNISWAP_GRANTS_START_BLOCK) { description = UNISWAP_GRANTS_PROPOSAL_DESCRIPTION - } else if (startBlock === BRAVO_START_BLOCK) { - description = BRAVO_PROPOSAL_DESCRIPTION } return { id: proposal?.result?.id.toString(), diff --git a/yarn.lock b/yarn.lock index 2f3e444a61d..97c3d96cbe1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1515,10 +1515,10 @@ minimatch "^3.0.4" strip-json-comments "^3.1.1" -"@ethersproject/abi@5.4.0", "@ethersproject/abi@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.4.0.tgz#a6d63bdb3672f738398846d4279fa6b6c9818242" - integrity sha512-9gU2H+/yK1j2eVMdzm6xvHSnMxk8waIHQGYCZg5uvAyH0rsAzxkModzBSpbAkAuhKFEovC2S9hM4nPuLym8IZw== +"@ethersproject/abi@5.4.1", "@ethersproject/abi@^5.4.0": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.4.1.tgz#6ac28fafc9ef6f5a7a37e30356a2eb31fa05d39b" + integrity sha512-9mhbjUk76BiSluiiW4BaYyI58KSbDMMQpCLdsAR+RsT2GyATiNYxVv+pGWRrekmsIdY3I+hOqsYQSTkc8L/mcg== dependencies: "@ethersproject/address" "^5.4.0" "@ethersproject/bignumber" "^5.4.0" @@ -1545,10 +1545,10 @@ "@ethersproject/properties" "^5.2.0" "@ethersproject/strings" "^5.2.0" -"@ethersproject/abstract-provider@5.4.0", "@ethersproject/abstract-provider@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.4.0.tgz#415331031b0f678388971e1987305244edc04e1d" - integrity sha512-vPBR7HKUBY0lpdllIn7tLIzNN7DrVnhCLKSzY0l8WAwxz686m/aL7ASDzrVxV93GJtIub6N2t4dfZ29CkPOxgA== +"@ethersproject/abstract-provider@5.4.1", "@ethersproject/abstract-provider@^5.4.0": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.4.1.tgz#e404309a29f771bd4d28dbafadcaa184668c2a6e" + integrity sha512-3EedfKI3LVpjSKgAxoUaI+gB27frKsxzm+r21w9G60Ugk+3wVLQwhi1LsEJAKNV7WoZc8CIpNrATlL1QFABjtQ== dependencies: "@ethersproject/bignumber" "^5.4.0" "@ethersproject/bytes" "^5.4.0" @@ -1571,10 +1571,10 @@ "@ethersproject/transactions" "^5.2.0" "@ethersproject/web" "^5.2.0" -"@ethersproject/abstract-signer@5.4.0", "@ethersproject/abstract-signer@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.4.0.tgz#cd5f50b93141ee9f9f49feb4075a0b3eafb57d65" - integrity sha512-AieQAzt05HJZS2bMofpuxMEp81AHufA5D6M4ScKwtolj041nrfIbIi8ciNW7+F59VYxXq+V4c3d568Q6l2m8ew== +"@ethersproject/abstract-signer@5.4.1", "@ethersproject/abstract-signer@^5.4.0": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.4.1.tgz#e4e9abcf4dd4f1ba0db7dff9746a5f78f355ea81" + integrity sha512-SkkFL5HVq1k4/25dM+NWP9MILgohJCgGv5xT5AcRruGz4ILpfHeBtO/y6j+Z3UN/PAjDeb4P7E51Yh8wcGNLGA== dependencies: "@ethersproject/abstract-provider" "^5.4.0" "@ethersproject/bignumber" "^5.4.0" @@ -1683,10 +1683,10 @@ dependencies: "@ethersproject/bignumber" "^5.2.0" -"@ethersproject/contracts@5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.4.0.tgz#e05fe6bd33acc98741e27d553889ec5920078abb" - integrity sha512-hkO3L3IhS1Z3ZtHtaAG/T87nQ7KiPV+/qnvutag35I0IkiQ8G3ZpCQ9NNOpSCzn4pWSW4CfzmtE02FcqnLI+hw== +"@ethersproject/contracts@5.4.1": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.4.1.tgz#3eb4f35b7fe60a962a75804ada2746494df3e470" + integrity sha512-m+z2ZgPy4pyR15Je//dUaymRUZq5MtDajF6GwFbGAVmKz/RF+DNIPwF0k5qEcL3wPGVqUjFg2/krlCRVTU4T5w== dependencies: "@ethersproject/abi" "^5.4.0" "@ethersproject/abstract-provider" "^5.4.0" @@ -1789,20 +1789,20 @@ "@ethersproject/bytes" "^5.2.0" js-sha3 "0.5.7" -"@ethersproject/logger@5.4.0", "@ethersproject/logger@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.4.0.tgz#f39adadf62ad610c420bcd156fd41270e91b3ca9" - integrity sha512-xYdWGGQ9P2cxBayt64d8LC8aPFJk6yWCawQi/4eJ4+oJdMMjEBMrIcIMZ9AxhwpPVmnBPrsB10PcXGmGAqgUEQ== +"@ethersproject/logger@5.4.1", "@ethersproject/logger@^5.4.0": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.4.1.tgz#503bd33683538b923c578c07d1c2c0dd18672054" + integrity sha512-DZ+bRinnYLPw1yAC64oRl0QyVZj43QeHIhVKfD/+YwSz4wsv1pfwb5SOFjz+r710YEWzU6LrhuSjpSO+6PeE4A== "@ethersproject/logger@^5.2.0": version "5.2.0" resolved "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.2.0.tgz" integrity sha512-dPZ6/E3YiArgG8dI/spGkaRDry7YZpCntf4gm/c6SI8Mbqiihd7q3nuLN5VvDap/0K3xm3RE1AIUOcUwwh2ezQ== -"@ethersproject/networks@5.4.1", "@ethersproject/networks@^5.4.0": - version "5.4.1" - resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.4.1.tgz#2ce83b8e42aa85216e5d277a7952d97b6ce8d852" - integrity sha512-8SvowCKz9Uf4xC5DTKI8+il8lWqOr78kmiqAVLYT9lzB8aSmJHQMD1GSuJI0CW4hMAnzocpGpZLgiMdzsNSPig== +"@ethersproject/networks@5.4.2", "@ethersproject/networks@^5.4.0": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.4.2.tgz#2247d977626e97e2c3b8ee73cd2457babde0ce35" + integrity sha512-eekOhvJyBnuibfJnhtK46b8HimBc5+4gqpvd1/H9LEl7Q7/qhsIhM81dI9Fcnjpk3jB1aTy6bj0hz3cifhNeYw== dependencies: "@ethersproject/logger" "^5.4.0" @@ -1821,10 +1821,10 @@ "@ethersproject/bytes" "^5.4.0" "@ethersproject/sha2" "^5.4.0" -"@ethersproject/properties@5.4.0", "@ethersproject/properties@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.4.0.tgz#38ba20539b44dcc5d5f80c45ad902017dcdbefe7" - integrity sha512-7jczalGVRAJ+XSRvNA6D5sAwT4gavLq3OXPuV/74o3Rd2wuzSL035IMpIMgei4CYyBdialJMrTqkOnzccLHn4A== +"@ethersproject/properties@5.4.1", "@ethersproject/properties@^5.4.0": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.4.1.tgz#9f051f976ce790142c6261ccb7b826eaae1f2f36" + integrity sha512-cyCGlF8wWlIZyizsj2PpbJ9I7rIlUAfnHYwy/T90pdkSn/NFTa5YWZx2wTJBe9V7dD65dcrrEMisCRUJiq6n3w== dependencies: "@ethersproject/logger" "^5.4.0" @@ -1835,10 +1835,10 @@ dependencies: "@ethersproject/logger" "^5.2.0" -"@ethersproject/providers@5.4.2": - version "5.4.2" - resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.4.2.tgz#73df9767869a31bd88d9e27e78cff96364b8fbed" - integrity sha512-Qr8Am8hlj2gL9HwNymhFlYd52MQVVEBLoDwPxhv4ASeyNpaoRiUAQnNEuE6SnEQtiwYkpLrQtSALNLUSeyuvjA== +"@ethersproject/providers@5.4.5": + version "5.4.5" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.4.5.tgz#eb2ea2a743a8115f79604a8157233a3a2c832928" + integrity sha512-1GkrvkiAw3Fj28cwi1Sqm8ED1RtERtpdXmRfwIBGmqBSN5MoeRUHuwHPppMtbPayPgpFcvD7/Gdc9doO5fGYgw== dependencies: "@ethersproject/abstract-provider" "^5.4.0" "@ethersproject/abstract-signer" "^5.4.0" @@ -4948,7 +4948,7 @@ adjust-sourcemap-loader@3.0.0: aes-js@3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" integrity sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0= aes-js@^3.1.2: @@ -6267,7 +6267,7 @@ bcrypt-pbkdf@^1.0.0: bech32@1.1.4: version "1.1.4" - resolved "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz" + resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== bfj@^7.0.2: @@ -6350,7 +6350,7 @@ bn.js@4.11.8: bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.10.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.8, bn.js@^4.11.9, bn.js@^4.4.0, bn.js@^4.8.0: version "4.12.0" - resolved "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== bn.js@^5.0.0, bn.js@^5.1.1: @@ -8875,7 +8875,7 @@ elegant-spinner@^1.0.1: elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3: version "6.5.4" - resolved "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== dependencies: bn.js "^4.11.9" @@ -9682,30 +9682,30 @@ ethereumjs-vm@^2.1.0, ethereumjs-vm@^2.3.4, ethereumjs-vm@^2.6.0: rustbn.js "~0.2.0" safe-buffer "^5.1.1" -ethers@^5.4.0: - version "5.4.2" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.4.2.tgz#91368e4d9c39f1111157de1c2aa1d8c1616c0f7b" - integrity sha512-JcFcNWjULzhm4tMp5cZKnU45zqN/c7rqabIITiUiQzZuP7LcYSD4WAbADo4Ja6G2orU4d/PbhAWGHGtAKYrB4Q== +ethers@^5.4.0, ethers@^5.4.6: + version "5.4.6" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.4.6.tgz#fe0a023956b5502c947f58e82fbcf9a73e5e75b6" + integrity sha512-F7LXARyB/Px3AQC6/QKedWZ8eqCkgOLORqL4B/F0Mag/K+qJSFGqsR36EaOZ6fKg3ZonI+pdbhb4A8Knt/43jQ== dependencies: - "@ethersproject/abi" "5.4.0" - "@ethersproject/abstract-provider" "5.4.0" - "@ethersproject/abstract-signer" "5.4.0" + "@ethersproject/abi" "5.4.1" + "@ethersproject/abstract-provider" "5.4.1" + "@ethersproject/abstract-signer" "5.4.1" "@ethersproject/address" "5.4.0" "@ethersproject/base64" "5.4.0" "@ethersproject/basex" "5.4.0" "@ethersproject/bignumber" "5.4.1" "@ethersproject/bytes" "5.4.0" "@ethersproject/constants" "5.4.0" - "@ethersproject/contracts" "5.4.0" + "@ethersproject/contracts" "5.4.1" "@ethersproject/hash" "5.4.0" "@ethersproject/hdnode" "5.4.0" "@ethersproject/json-wallets" "5.4.0" "@ethersproject/keccak256" "5.4.0" - "@ethersproject/logger" "5.4.0" - "@ethersproject/networks" "5.4.1" + "@ethersproject/logger" "5.4.1" + "@ethersproject/networks" "5.4.2" "@ethersproject/pbkdf2" "5.4.0" - "@ethersproject/properties" "5.4.0" - "@ethersproject/providers" "5.4.2" + "@ethersproject/properties" "5.4.1" + "@ethersproject/providers" "5.4.5" "@ethersproject/random" "5.4.0" "@ethersproject/rlp" "5.4.0" "@ethersproject/sha2" "5.4.0" @@ -12491,7 +12491,7 @@ jpeg-js@0.4.2: js-sha3@0.5.7: version "0.5.7" - resolved "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7" integrity sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc= js-sha3@0.8.0, js-sha3@^0.8.0: @@ -17006,7 +17006,7 @@ schema-utils@^3.0.0: scrypt-js@3.0.1, scrypt-js@^3.0.0: version "3.0.1" - resolved "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== scuid@^1.1.0: