Skip to content

Commit

Permalink
Bip39 seed gauge remediations (#819)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brean0 authored Apr 10, 2024
2 parents 67ae965 + f5bda85 commit bd25667
Show file tree
Hide file tree
Showing 226 changed files with 247,892 additions and 58,294 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.dex-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Node Install
uses: actions/setup-node@v3
with:
node-version: "16"
node-version: "18"
- name: Cache Node Modules
id: node-modules-cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.protocol.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Protocol Tests
uses: actions/setup-node@v3
with:
node-version: "16"
node-version: "18"
- name: Cache Node Modules
id: node-modules-cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.sdk-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: SDK Core Tests
uses: actions/setup-node@v3
with:
node-version: "16"
node-version: "18"
- name: Cache Node Modules
id: node-modules-cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.sdk-wells.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: SDK Wells Tests
uses: actions/setup-node@v3
with:
node-version: "16"
node-version: "18"
- name: Cache Node Modules
id: node-modules-cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: SDK Tests
uses: actions/setup-node@v3
with:
node-version: "16"
node-version: "18"
- name: Cache Node Modules
id: node-modules-cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.subgraph-bean.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "16"
node-version: "18"
- name: Cache Node Modules
id: node-modules-cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.subgraph-beanstalk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "16"
node-version: "18"
- name: Cache Node Modules
id: node-modules-cache
uses: actions/cache@v3
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ci.ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "16"
node-version: "18"
- name: Cache Node Modules
id: node-modules-cache
uses: actions/cache@v3
Expand All @@ -32,3 +32,4 @@ jobs:
run: yarn ui:test
env:
VITE_ALCHEMY_API_KEY: ${{ secrets.VITE_ALCHEMY_API_KEY }}
VITE_WALLETCONNECT_PROJECT_ID: ${{ secrets.VITE_WALLETCONNECT_PROJECT_ID }}
2 changes: 1 addition & 1 deletion .github/workflows/publish-cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Checkout
uses: actions/setup-node@v3
with:
node-version: "16"
node-version: "18"
- name: Cache Node Modules
id: node-modules-cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Checkout
uses: actions/setup-node@v3
with:
node-version: "16"
node-version: "18"
- name: Cache Node Modules
id: node-modules-cache
uses: actions/cache@v3
Expand Down
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ diamondCut-*.json
# Foundry
cache/
out/
coverage_data/
.openzeppelin
protocol/lib/prb-math
protocol/remappings.txt
protocol/lib
.gas-snapshot

# From SDK Monorepo Join:
Expand All @@ -42,4 +40,4 @@ node_modules
# Local Netlify folder
.netlify

protocol/lib/forge-std

9 changes: 0 additions & 9 deletions .yarn/plugins/@yarnpkg/plugin-typescript.cjs

This file was deleted.

550 changes: 0 additions & 550 deletions .yarn/plugins/@yarnpkg/plugin-version.cjs

This file was deleted.

823 changes: 0 additions & 823 deletions .yarn/releases/yarn-3.3.1.cjs

This file was deleted.

893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.1.0.cjs

Large diffs are not rendered by default.

12 changes: 5 additions & 7 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
compressionLevel: mixed

defaultSemverRangePrefix: ""

nodeLinker: node-modules
enableGlobalCache: false

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
spec: "@yarnpkg/plugin-typescript"
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: "@yarnpkg/plugin-version"
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.3.1.cjs
yarnPath: .yarn/releases/yarn-4.1.0.cjs
10 changes: 10 additions & 0 deletions PROPOSALS.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ You can read more about BIPs [here](https://docs.bean.money/almanac/governance/p
* [BIP-36](https://bean.money/bip-36): Silo V3
* [BIP-37](https://bean.money/bip-37): Basin Integration
* [BIP-38](https://bean.money/bip-38): Migrate urBEAN3CRV to urBEANETH
* [BIP-39](https://bean.money/bip-39): Beanstalk Farms 2024 Development Budget
* [BIP-40](https://bean.money/bip-40): Beanstalk Farms 2024 Development Budget
* [BIP-41](https://bean.money/bip-41): Immunefi Program Update

## Emergency Beanstalk Improvement Proposal (EBIP)

Expand All @@ -63,6 +66,12 @@ You can read about the BCM's Emergency Response Procedures [here](https://docs.b
* [EBIP-6](https://bean.money/ebip-6): Resolve EBIP-4 and EBIP-5
* [EBIP-7](https://bean.money/ebip-7): Enroot BDV Update
* [EBIP-8](https://bean.money/ebip-8): Enroot BDV Rounding
* [EBIP-9](https://bean.money/ebip-9): Temporarily Disable the Well Minting Oracle
* [EBIP-10](https://bean.money/ebip-10): Fix Bean to LP Well Convert
* [EBIP-11](https://bean.money/ebip-11): Upgrade Minting Oracle to 60 Minute TWA ETH/USD Price
* [EBIP-12](https://bean.money/ebip-12): Remove Convert
* [EBIP-13](https://bean.money/ebip-13): Re-Add Convert
* [EBIP-14](https://bean.money/ebip-14): Remove Vesting Period

## Beanstalk Operations Proposal (BOP)

Expand All @@ -73,3 +82,4 @@ You can read more about BOPs [here](https://docs.bean.money/almanac/governance/p
* [BOP-1](https://bean.money/bop-1): Ratify Disclosures Statement
* [BOP-2](https://bean.money/bop-2): Increase and Revisit Bounty for April Governance Exploit
* [BOP-3](https://bean.money/bop-3): Form the BeaNFT DAO
* [BOP-4](https://bean.money/bop-4): Formalize BFC Reporting
19 changes: 11 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
{
"name": "root",
"private": true,
"packageManager": "[email protected]",
"packageManager": "[email protected]",
"engines": {
"node": ">=18"
},
"workspaces": [
"projects/*",
"protocol",
"utils"
],
"devDependencies": {
"@types/prettier": "^2",
"husky": "8.0.1",
"@types/prettier": "^2.7.3",
"husky": "8.0.3",
"jest": "29.2.2",
"jest-serial-runner": "1.2.1",
"lint-staged": "13.1.0",
"prettier": "2.7.1",
"ts-jest": "29.0.3",
"ts-node": "10.9.1",
"typescript": "4.8.4"
"lint-staged": "13.3.0",
"prettier": "3.2.5",
"ts-jest": "29.1.2",
"ts-node": "10.9.2",
"typescript": "5.3.3"
},
"scripts": {
"bootstrap": "yarn husky install && yarn generate",
Expand Down
12 changes: 6 additions & 6 deletions projects/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
"g:bean": "yarn ts-node-esm src/cli.ts"
},
"devDependencies": {
"@types/command-line-args": "^5",
"@types/node": "18.11.9",
"@types/rimraf": "^3",
"@types/command-line-args": "^5.2.3",
"@types/node": "18.19.17",
"@types/rimraf": "^3.0.2",
"rimraf": "3.0.2",
"ts-node": "10.9.1",
"typescript": "4.9.3"
"ts-node": "10.9.2",
"typescript": "5.3.3"
},
"dependencies": {
"@beanstalk/sdk": "workspace:*",
"chalk": "5.1.2",
"chalk": "5.3.0",
"command-line-args": "5.2.1",
"command-line-usage": "6.1.3",
"ethers": "5.7.2",
Expand Down
1 change: 1 addition & 0 deletions projects/dev-graph-node/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.data
graph-node
seed
49 changes: 25 additions & 24 deletions projects/dex-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"type": "module",
"scripts": {
"start": "vite --port 2424",
"dev": "vite --port 2424",
"build": "yarn all:build && yarn generate && tsc && vite build",
"build:netlify": "./utils/build-netlify.sh",
"generate:graphql": "graphql-codegen --config codegen.ts",
Expand All @@ -21,40 +21,41 @@
},
"dependencies": {
"@beanstalk/sdk": "workspace:*",
"@tanstack/react-query": "4.28.0",
"@tanstack/react-query-devtools": "4.28.0",
"@typechain/ethers-v5": "10.2.0",
"connectkit": "1.2.1",
"ethers": "^5",
"@tanstack/react-query": "5.28.4",
"@tanstack/react-query-devtools": "5.28.4",
"@typechain/ethers-v5": "10.2.1",
"connectkit": "1.7.2",
"ethers": "^5.7.2",
"graphql-request": "5.2.0",
"lightweight-charts": "4.0.1",
"lightweight-charts": "4.1.3",
"loadash": "1.0.0",
"prettier": "2.7.1",
"prettier": "3.2.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hot-toast": "2.4.1",
"react-jazzicon": "1.0.4",
"react-router-dom": "^6.4.4",
"styled-components": "5.3.9",
"react-router-dom": "^6.22.1",
"styled-components": "5.3.11",
"typechain": "8.1.1",
"typescript": "4.8.4",
"wagmi": "0.12.2"
"viem": "2.7.18",
"wagmi": "2.5.7"
},
"devDependencies": {
"@graphql-codegen/cli": "3.2.2",
"@graphql-codegen/client-preset": "2.1.1",
"@graphql-codegen/typescript-react-query": "4.1.0",
"@types/react": "^18.0.21",
"@types/react-dom": "^18.0.6",
"@types/styled-components": "^5",
"@typescript-eslint/eslint-plugin": "4.13.0",
"@typescript-eslint/parser": "4.13.0",
"@vitejs/plugin-react": "^2.0.0",
"eslint": "^7.32.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jsx-a11y": "6.4.1",
"eslint-plugin-react": "7.22.0",
"eslint-plugin-react-hooks": "4.2.0",
"vite": "^3.2.5"
"@types/react": "^18.2.57",
"@types/react-dom": "^18.2.19",
"@types/styled-components": "^5.1.34",
"@typescript-eslint/eslint-plugin": "7.1.0",
"@typescript-eslint/parser": "7.1.0",
"@vitejs/plugin-react": "4.2.1",
"eslint": "8.57.0",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-jsx-a11y": "6.8.0",
"eslint-plugin-react": "7.34.0",
"eslint-plugin-react-hooks": "4.6.0",
"typescript": "5.3.3",
"vite": "5.1.4"
}
}
27 changes: 15 additions & 12 deletions projects/dex-ui/src/components/App/OnLoad.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import React, { useEffect } from "react";
import { useAllTokensBalance } from "src/tokens/useAllTokenBalance";
import { FC } from "src/types";
import { useAccount, useNetwork } from "wagmi";
import { watchNetwork } from "@wagmi/core";
import { useAccount } from "wagmi";

export const OnLoad: FC<{}> = ({ children }) => {
const { address } = useAccount();
const { chain } = useNetwork();
const { address, chain } = useAccount();
// this call effectively acts as a 'prefetch' for the "get all token balances" query.
// we also refetch it when network or account changes
const { refetch } = useAllTokensBalance();
Expand All @@ -15,15 +13,20 @@ export const OnLoad: FC<{}> = ({ children }) => {
refetch();
}, [address, chain?.id, refetch]);

useEffect(() => {
const unwatch = watchNetwork((_network) => {
if (_network?.chain?.id !== chain?.id) {
location.reload();
}
});
// useEffect(() => {
// const unwatch = watchAccount(config, {
// onChange(account, prevAccount) {
// // if (account.chain?.id !== chain?.id) {
// // console.log("CHECK ME");
// // }
// // if (prevAccount.address !== account.address) {
// // console.log(`CHANGED! - from(${prevAccount.address}) to => ${account.address}`);
// // }
// }
// });

return unwatch;
});
// return () => unwatch();
// });

return <>{children}</>;
};
Loading

0 comments on commit bd25667

Please sign in to comment.