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

Dr-t-Remediations #1056

Merged
merged 579 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
579 commits
Select commit Hold shift + click to select a range
826b3fc
`getWellTwaUsdLiquidityFromReserves` decimal fix. (#1075)
nickkatsios Sep 11, 2024
5d76ae0
Add External Unripe Data in Reseed (#1073)
nickkatsios Sep 11, 2024
b50d7d6
Fix: Set only individual receiver internal balance in `L1RecieverFace…
nickkatsios Sep 11, 2024
22373d4
Fix: `calculateTokenBeanPriceFromReserves` incorrect conditional. (#1…
nickkatsios Sep 11, 2024
79af438
Fix: Update `STALK_BDV_PRECISION` to new decimals. (#1071)
nickkatsios Sep 11, 2024
4762ac3
Fix: Set `excessFeeRefundAddress` to L2 receiver rather than L1 `msg.…
nickkatsios Sep 11, 2024
8ed014f
Fix: Incorrect Plot issuance in case `activeField` is updated before …
nickkatsios Sep 11, 2024
171f013
Fix: Temperature if ladder incorrect value for `delta=1` (#1062)
nickkatsios Sep 11, 2024
2b3122c
Merge branch 'dr-t-remediations' into reseed-mint-l2-bcm-beans
nickkatsios Sep 11, 2024
24d922e
Fix: Mint bean sided liquidity to the L2 BCM (#1061)
nickkatsios Sep 11, 2024
551d1db
Merge remote-tracking branch 'origin/dr-t-remediations' into reseed-f…
nickkatsios Sep 11, 2024
18bccc2
prettier auto formatting changes
nickkatsios Sep 11, 2024
1773bde
Merge branch 'dr-remediations' into dr-t-remediations
nickkatsios Sep 11, 2024
a43aa48
prettier auto formatting changes
nickkatsios Sep 11, 2024
e31fe16
fix merge conflicts
nickkatsios Sep 11, 2024
ed1df60
ressed related merge fixes
nickkatsios Sep 11, 2024
e92e76a
Reseed Fert Fix (#1074)
nickkatsios Sep 11, 2024
bb2d630
Add external oracle tester contract test
pizzaman1337 Sep 11, 2024
6364f82
isMillion support for external contracts
pizzaman1337 Sep 11, 2024
254d3b1
Remove unused code
pizzaman1337 Sep 11, 2024
0b0e433
feat: update create well flow
Space-Bean Sep 11, 2024
17bc03f
feat: update Wells Pages
Space-Bean Sep 11, 2024
2e00da5
feat: update well component queries
Space-Bean Sep 11, 2024
2efb4fc
feat: add mainnet setup for examples
Space-Bean Sep 11, 2024
e14f991
feat: update re-fetch wells on create
Space-Bean Sep 11, 2024
a49b1d5
WIP: update Basin + Wells SDK (#1070)
Space-Bean Sep 11, 2024
883ac1a
Merge branch 'dr-t-remediations' into beanstalk3-ui-sdks
Space-Bean Sep 11, 2024
ce76dae
remove mock in reseed whitelist
nickkatsios Sep 12, 2024
5c600ec
fix: setting of underlying to unripe tokens and balances
nickkatsios Sep 12, 2024
6c8cd20
prettier auto formatting changes
nickkatsios Sep 12, 2024
74f6084
Merge branch 'dr-t-remediations' into external-oracle-test
pizzaman1337 Sep 12, 2024
b666a2f
Add external oracle tester contract test (#1081)
pizzaman1337 Sep 12, 2024
75089f0
Update decimal check from < 8 to <= 8
pizzaman1337 Sep 12, 2024
7fe3b5c
Merge branch 'dr-t-remediations' into beanstalk3-ui-sdks
Space-Bean Sep 12, 2024
902acf6
fix: update projects/examples setup
Space-Bean Sep 12, 2024
89319f0
feat: update sdk silo
Space-Bean Sep 12, 2024
29c329e
feat: update BasinWell class
Space-Bean Sep 12, 2024
332a662
feat: minor updates to UI
Space-Bean Sep 12, 2024
6d849fd
update gql schema
Space-Bean Sep 12, 2024
f0cc526
WIP update reseed whitelist json dynamically
pizzaman1337 Sep 12, 2024
dd63044
Add gaugePoints and optimalPercentDepositedBdv
pizzaman1337 Sep 13, 2024
0782b2a
update exports with new well addresses to the latest block
nickkatsios Sep 13, 2024
ccb8024
fix well addresses in test scripts
nickkatsios Sep 13, 2024
9aad54d
deploy claimFacet from reseed10
nickkatsios Sep 13, 2024
e1bba2d
add missing linked library in ClaimFacet
nickkatsios Sep 13, 2024
a4313d5
Add arb mainnet to networks in hardhat config
nickkatsios Sep 13, 2024
b4bdafd
reorder pragma and import in lsd oracle
nickkatsios Sep 13, 2024
0060f62
Update system storage json, cleanup convertWhitelist
pizzaman1337 Sep 13, 2024
bd8c7c4
Merge branch 'reseed-final-fixes' into update-reseed-whitelist-json
pizzaman1337 Sep 13, 2024
5dffa3f
add liqWeight, gaugePoint slectors in r9-whitelist
nickkatsios Sep 13, 2024
e8cc422
feat: minor updates to UI
Space-Bean Sep 13, 2024
0009bc1
Merge branch 'reseed-final-fixes' into beanstalk3-ui-sdks
Space-Bean Sep 13, 2024
4f64d1e
Merge branch 'beanstalk3-ui-sdks' into spacebean/bs3/gen-convert
Space-Bean Sep 13, 2024
7e13f98
feat: update reseed jsons
Space-Bean Sep 13, 2024
05657a7
feat: update ABIs
Space-Bean Sep 13, 2024
c7c1584
feat: re-update reseed exports
Space-Bean Sep 13, 2024
13a8fa2
feat: update cli anvil names
Space-Bean Sep 13, 2024
32bef9e
feat: convert pools updater to use multicall
Space-Bean Sep 14, 2024
003488c
feat: update Price ABI
Space-Bean Sep 14, 2024
71020be
feat: update Silo/Overview
Space-Bean Sep 14, 2024
89558d5
feat: update UI
Space-Bean Sep 14, 2024
4ad7138
Spacebean/bs3/UI v2 (#1087)
Space-Bean Sep 14, 2024
7c4afdb
rename user to account in InternalBalanceMigrated
nickkatsios Sep 14, 2024
4c56b54
parse initial supplies + well reserves
nickkatsios Sep 14, 2024
4b29e87
update libUsdOracle
Brean0 Sep 14, 2024
72fa75e
update libUsdOracle (#1089)
Brean0 Sep 14, 2024
079bc90
update comment
Brean0 Sep 14, 2024
7bb1ab6
fix implementation order.
Brean0 Sep 14, 2024
bb6bbec
Merge branch 'reseed-final-fixes' into update-reseed-whitelist-json
Brean0 Sep 14, 2024
963fd08
update evaluation parameter jsons.
Brean0 Sep 14, 2024
0940c69
update evaluation parameters parsing + data
nickkatsios Sep 14, 2024
911347b
Merge branch 'reseed-final-fixes' of https://github.com/BeanstalkFarm…
nickkatsios Sep 14, 2024
c7e560e
update global
Brean0 Sep 14, 2024
e38861c
Update reseed whitelist json (#1086)
Brean0 Sep 14, 2024
0f47c5a
Merge branch 'reseed-final-fixes' into reseed-global-fix
Brean0 Sep 14, 2024
790a660
update subgraph functions + envs
Space-Bean Sep 14, 2024
7b21d24
Merge branch 'reseed-final-fixes' into beanstalk3-ui-sdks
Space-Bean Sep 14, 2024
6592e70
add updated json.
Brean0 Sep 14, 2024
f3dafe2
feat: cleanup for testing
Space-Bean Sep 14, 2024
9533cd7
feat: re-update cli + blockchain utils for testing
Space-Bean Sep 14, 2024
e0ed2e5
feat: update storage-system 20736200
Space-Bean Sep 14, 2024
60a3c7a
feat: update subgraph-urls for dex-ui
Space-Bean Sep 14, 2024
0ecc97e
feat: update dex-ui graphql + settings
Space-Bean Sep 14, 2024
deb672c
feat: update sdk + sdk-wells subgraph implementations
Space-Bean Sep 14, 2024
ee4f108
feat: update bean-ui gql endpoints implementation
Space-Bean Sep 14, 2024
7edc3ec
feat: update sdks w/ incorrect chainId initialization + updaters w/ o…
Space-Bean Sep 15, 2024
d472fdf
feat: update useSeedGauge + remove logs
Space-Bean Sep 15, 2024
ccfe6ff
feat: update chain explorer links
Space-Bean Sep 15, 2024
9c70ed2
Merge branch 'reseed-final-fixes' into add-reseed-supply
nickkatsios Sep 15, 2024
d78c489
Reseed global fix (#1090)
nickkatsios Sep 15, 2024
dd6b041
add exact bean and non bean amounts in addliquidityAndTransfer
nickkatsios Sep 15, 2024
fe3f07c
Add data and parsing for initial supplies and well balances (#1088)
nickkatsios Sep 15, 2024
9b60f54
Merge branch 'reseed-final-fixes' into beanstalk3-ui-sdks
Space-Bean Sep 15, 2024
afe897a
feat: Fix price button + add fetch for all underlying + update pools …
Space-Bean Sep 16, 2024
8c466f7
feat: slight refactor to PriceButton
Space-Bean Sep 16, 2024
25444dc
feat: add bnjs devtools utils + remove logs
Space-Bean Sep 16, 2024
fdf3b41
whitelist milestone season ifx
nickkatsios Sep 16, 2024
7886ad9
Whitelist Milestone Season Fix (#1091)
nickkatsios Sep 16, 2024
c24dcd8
fix ratios and lsd chainlink oracle address
nickkatsios Sep 16, 2024
d812f74
update stalkIssuedPerBdv precision in convertWhitelist
nickkatsios Sep 16, 2024
ca970be
Update deltaStalkEarnedPerSeason to int32
pizzaman1337 Sep 16, 2024
80035b1
Add back modifiers
pizzaman1337 Sep 16, 2024
52e44a2
Increase wsteth amounts for testing
pizzaman1337 Sep 16, 2024
9249efd
Update types
pizzaman1337 Sep 16, 2024
5fffd26
Update bean/nonbean amounst
pizzaman1337 Sep 16, 2024
64125be
Merge branch 'reseed-final-fixes' into beanstalk3-ui-sdks
Space-Bean Sep 16, 2024
d8105fd
Add sunriseArb hardhat task
pizzaman1337 Sep 16, 2024
cb3196b
Update deltaStalkEarnedPerSeason to int32 (#1092)
pizzaman1337 Sep 16, 2024
0f6474e
Include pipeline convert facet, update method sig in beanstalk interface
pizzaman1337 Sep 16, 2024
3b92018
Include pipeline convert facet, update method sig in beanstalk interf…
pizzaman1337 Sep 16, 2024
04927f7
Merge branch 'reseed-final-fixes' into beanstalk3-ui-sdks
Space-Bean Sep 16, 2024
6ca70e8
Update contract deposit data from data dump
pizzaman1337 Sep 17, 2024
3d14da2
Update fert, internal balances, plots and pod orders owned by contracts
pizzaman1337 Sep 17, 2024
fe9ce8f
Update merkles
pizzaman1337 Sep 17, 2024
4394365
make a few secs pass in sunrise arb to avoid pump NoTimePassed() when…
nickkatsios Sep 17, 2024
48a980e
update whitelist mocks
nickkatsios Sep 17, 2024
3a436b2
fix wellBdv encode type for BEAN:USDC and add l2bcm address
nickkatsios Sep 17, 2024
c99920d
getGaugePointsPerBdvForWell avoid div by 0
nickkatsios Sep 17, 2024
36e9bb3
Revert "getGaugePointsPerBdvForWell avoid div by 0"
nickkatsios Sep 17, 2024
d65a4a2
avoid div by 0 in getGaugePointsPerBdvForWell
nickkatsios Sep 17, 2024
fde66f7
Merge branch 'reseed-final-fixes' into beanstalk3-ui-sdks
Space-Bean Sep 17, 2024
1b5af42
Update test_L2MigrateDeposits to pass with snapshot data
pizzaman1337 Sep 17, 2024
fc3ec56
Update all L1RecieverFacets so they pass
pizzaman1337 Sep 17, 2024
63024f1
Expose calculateDeltaBFromReserves
pizzaman1337 Sep 17, 2024
c1d1fa0
Use raw text list of contract addresses
pizzaman1337 Sep 18, 2024
1766e6e
Update comments in LibFertilizer
pizzaman1337 Sep 18, 2024
6952873
wip: fix broken gauge tests
nickkatsios Sep 18, 2024
d518423
Avoid division by 0 in `getGaugePointsPerBdvForWell` when no bdv is d…
nickkatsios Sep 18, 2024
8cf8002
Fix encode type setting for BEAN:USDC and add L2 BCM address as owner…
nickkatsios Sep 18, 2024
9b959be
Merge remote-tracking branch 'origin/reseed-final-fixes' into reseed-…
nickkatsios Sep 18, 2024
1aad363
Add testnet deployment setup
nickkatsios Sep 18, 2024
fefdb01
fix gauge point test.
Brean0 Sep 18, 2024
56488af
prettier auto formatting changes
Brean0 Sep 18, 2024
b2a58e2
split Gauge functions into GaugeGettersFacet.
Brean0 Sep 18, 2024
f94704e
update rpc url
nickkatsios Sep 18, 2024
fd003b1
Add reseedArb sync network
nickkatsios Sep 18, 2024
2577302
make functions external, add support for libLibrary linking
Brean0 Sep 18, 2024
0aba217
remove LibWell external
Brean0 Sep 18, 2024
a65b660
Merge branch 'reseed-final-fixes' into beanstalk3-ui-sdks
Space-Bean Sep 18, 2024
029da8f
fix contract size limits (#1100)
Brean0 Sep 18, 2024
196607c
fix gauge point test. (#1099)
Brean0 Sep 18, 2024
10ed009
Merge branch 'reseed-final-fixes' into comment-fixes
Brean0 Sep 18, 2024
489ef5a
Expose calculateDeltaBFromReserves (#1097)
Brean0 Sep 18, 2024
ed622a0
Update comments in LibFertilizer (#1098)
Brean0 Sep 18, 2024
c27dfaf
Merge branch 'reseed-final-fixes' into beanstalk3-ui-sdks
Space-Bean Sep 18, 2024
6b71f11
update convertGlobal.js to properly reorder.
Brean0 Sep 19, 2024
1ce83da
prettier auto formatting changes
Brean0 Sep 19, 2024
b0e76f5
add 0.6 to prevent invariable break.
Brean0 Sep 19, 2024
af2ab68
adds task, updates bean supply for invariant breakage.
Brean0 Sep 19, 2024
285a21a
Merge branch 'reseed-final-fixes' into reseed-testnet-deployment
Brean0 Sep 19, 2024
1955c97
Test all contracts migrating deposits
pizzaman1337 Sep 19, 2024
60d9b61
update arb Sunrise task
Brean0 Sep 19, 2024
49228f6
Cleanup
pizzaman1337 Sep 19, 2024
45a777a
Exercise contracts migrating all owned plots
pizzaman1337 Sep 19, 2024
8ff1786
Support for internal balances checking for all contracts
pizzaman1337 Sep 19, 2024
dc79a22
Merge branch 'reseed-testnet-deployment' into beanstalk3-ui-sdks
Space-Bean Sep 19, 2024
a7d1d8d
Support for testing migrating all contract's fert
pizzaman1337 Sep 19, 2024
f6f74a2
feat: misc updates
Space-Bean Sep 19, 2024
af46737
feat: remove fork block number from package.json
Space-Bean Sep 19, 2024
ec5d64c
feat: update gql schema
Space-Bean Sep 19, 2024
4060572
update reseedAddLiqudityAndTransfer
Brean0 Sep 19, 2024
6e4818c
Merge remote-tracking branch 'origin/beanstalk3-ui-sdks' into reseed-…
Brean0 Sep 19, 2024
f96416d
Merge branch 'reseed-global-fix2' into reseed-testnet-deployment
Brean0 Sep 19, 2024
8b2e3fa
feat: add zerox api to SDK
Space-Bean Sep 19, 2024
7fa0e32
feat: add generated files
Space-Bean Sep 19, 2024
ddae95b
Allow only the 435 highest value plots per contract
pizzaman1337 Sep 19, 2024
065307e
feat: add .env args + well LP token logos
Space-Bean Sep 19, 2024
f5498e3
Add group sums calculations
pizzaman1337 Sep 19, 2024
052a88f
update convertGlobal.js to properly reorder. (#1101)
Brean0 Sep 19, 2024
dd69969
Contract reseed fixes (#1094)
Brean0 Sep 19, 2024
80cc334
Merge remote-tracking branch 'origin/reseed-final-fixes' into reseed-…
Brean0 Sep 19, 2024
ab390f2
Update contracts list, merkles, etc
pizzaman1337 Sep 20, 2024
5329312
update various json values, update % of wells,
Brean0 Sep 20, 2024
aff6543
add global, remove rpc from hardhat.config
Brean0 Sep 20, 2024
5e45a66
Update contracts list, merkles, tests (#1103)
Brean0 Sep 20, 2024
8849e46
Merge branch 'reseed-final-fixes' into reseed-testnet-deployment
Brean0 Sep 20, 2024
bb1b9cf
update jsons, update order
Brean0 Sep 20, 2024
2ad6fbf
Merge branch 'reseed-testnet-deployment' into beanstalk3-ui-sdks
Space-Bean Sep 20, 2024
5149425
fix: 0x quote params
Space-Bean Sep 20, 2024
34672c3
feat: add base convert implementation
Space-Bean Sep 20, 2024
fa004c7
feat: add base convert + update gql schema
Space-Bean Sep 20, 2024
40cdbee
feat: create tenderly api
Space-Bean Sep 20, 2024
54466a3
feat: update .env files
Space-Bean Sep 20, 2024
bfcd29c
fix: update redirect error + update vite.config + update piplineconve…
Space-Bean Sep 20, 2024
ef563dd
feat: add tenderly to csp + vite config
Space-Bean Sep 20, 2024
ef62d74
feat: finish pipeline-convert equal<>equal logic
Space-Bean Sep 20, 2024
e82d806
feat: remove pipeline recipient check
Space-Bean Sep 20, 2024
d63f18f
feat: update pipeconvert display values
Space-Bean Sep 20, 2024
c753aeb
feat: update pipe convert form
Space-Bean Sep 20, 2024
b9d231c
add try catch to reseed. update sunrise arb task.
Brean0 Sep 20, 2024
6a8c6a8
Merge remote-tracking branch 'origin/beanstalk3-ui-sdks' into reseed-…
Brean0 Sep 20, 2024
9c721db
Test removing all deposits
pizzaman1337 Sep 20, 2024
15863c8
Ensure stalk/roots/etc all zero after full removal
pizzaman1337 Sep 20, 2024
ec8ffac
Verify stalk:roots ratio is 1:1 upon reseed
pizzaman1337 Sep 20, 2024
9423ed7
update block files.
Brean0 Sep 20, 2024
b2db46b
update reseed files.
Brean0 Sep 20, 2024
2d7a155
WellPrice
Brean0 Sep 21, 2024
e182d9f
WellPrice (#1105)
Brean0 Sep 21, 2024
178fbae
add small buffer
Brean0 Sep 21, 2024
abf9fb1
fix reseedstate test.
Brean0 Sep 21, 2024
17f6a0b
update beanstalkPrice address.
Brean0 Sep 21, 2024
72494bc
Plot test
pizzaman1337 Sep 21, 2024
5586fa0
feat: update pipe convert ui
Space-Bean Sep 21, 2024
19f58f1
revise chunks, reduce timeout and increase attempts
Brean0 Sep 21, 2024
c965493
adjust misc contract deployments
nickkatsios Sep 21, 2024
15c3630
Merge remote-tracking branch 'origin/reseed-testnet-deployment' into …
nickkatsios Sep 21, 2024
46ba7ef
reset plot chunks
nickkatsios Sep 21, 2024
137348a
update lamda_lambda UI
Brean0 Sep 21, 2024
d25218e
remove logs
Brean0 Sep 21, 2024
8f07060
update lamda_lambda UI (#1107)
Brean0 Sep 21, 2024
8bb53eb
fix order, increase plot size temp
Brean0 Sep 21, 2024
48ca4e3
revert ordering change
Brean0 Sep 21, 2024
21fda7c
Modify misc contract deployments (#1106)
Brean0 Sep 22, 2024
363c498
updates to pipeline convert + lambda convert
Space-Bean Sep 22, 2024
99835db
feat: update lambda convert
Space-Bean Sep 22, 2024
81863f6
feat: update lambda convert styling
Space-Bean Sep 22, 2024
6739596
Merge branch 'reseed-testnet-deployment' into spacebean/bs3/testnet-ui
Space-Bean Sep 22, 2024
88c7e5a
Update comments
pizzaman1337 Sep 22, 2024
ba5a167
Test removing all deposits (#1104)
pizzaman1337 Sep 22, 2024
2055385
update comments in LibWellMinting and update price contract.
Brean0 Sep 22, 2024
cd0bed6
remove parameter.
Brean0 Sep 22, 2024
d9f6ffc
Pipeline convert updates to be able to handle zero liquidity wells
pizzaman1337 Sep 22, 2024
e4031e1
Merge branch 'reseed-testnet-deployment' into pipeline-convert-try-catch
Brean0 Sep 22, 2024
6d29fce
update wellPrice
Brean0 Sep 22, 2024
bd8735e
Merge branch 'reseed-testnet-deployment' into pipeline-convert-try-catch
Brean0 Sep 22, 2024
32d6d7b
Pipeline convert updates to be able to handle zero liquidity wells (#…
Brean0 Sep 22, 2024
4e54ee1
Merge branch 'reseed-testnet-deployment' into spacebean/bs3/testnet-ui
Space-Bean Sep 22, 2024
0e5a060
Add a check in LibEvaluate for wells with no reserves.
Brean0 Sep 22, 2024
a602a56
change chunks to 500
Brean0 Sep 23, 2024
0cb7518
update accounts, reseed scripts.
Brean0 Sep 23, 2024
2d07841
Update reseedGlobal to emit event.
Brean0 Sep 23, 2024
4785f57
Try catch on calcReserveAtRatioSwap in calculateDeltaBAtBeanIndex
pizzaman1337 Sep 23, 2024
98cb874
Try catch on calcReserveAtRatioSwap in calculateDeltaBAtBeanIndex (#1…
Brean0 Sep 23, 2024
6d645e1
Merge branch 'reseed-testnet-deployment' of github.com:BeanstalkFarms…
Brean0 Sep 23, 2024
d5714c8
add tryCatch to LibDeltaB
Brean0 Sep 23, 2024
ac9e05a
Add a low liquidity convert test
pizzaman1337 Sep 23, 2024
e3d9cc1
Merge branch 'reseed-testnet-deployment' into spacebean/bs3/testnet-ui
Space-Bean Sep 23, 2024
b450f51
change PipelineConvert implementation
Space-Bean Sep 23, 2024
6eb415f
feat: Update price contract address
Space-Bean Sep 23, 2024
2ff384f
feat: update pipeline convert calls
Space-Bean Sep 23, 2024
2edebc5
improve pipeline convert
Space-Bean Sep 23, 2024
712c367
feat: return pipe calls from quote
Space-Bean Sep 23, 2024
cbd6571
feat: update pipelineconvert + basinWell sdk
Space-Bean Sep 23, 2024
5dc7859
feat: update sdk pools
Space-Bean Sep 23, 2024
33c3454
fix pipe convert in UI
Space-Bean Sep 23, 2024
9862d19
feat: remove pipeline convert class from ui
Space-Bean Sep 23, 2024
50692ad
feat: pipeconvert integration finish
Space-Bean Sep 23, 2024
1bf7494
[WIP]: Converts (#1108)
Space-Bean Sep 23, 2024
df10214
Add a low liquidity convert test (#1112)
Brean0 Sep 23, 2024
d1ebf4e
Reseed testnet deployment (#1110)
Brean0 Sep 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,18 @@
"sdk:prettier": "yarn prettier projects/sdk -w",
"sdk:publish": "yarn workspace @beanstalk/sdk publish",
"sdk:version": "yarn workspace @beanstalk/sdk version",
"dex-ui:dev": "yarn workspace dex-ui dev",
"dex-ui:build": "yarn workspace dex-ui build",
"dex-ui:generate": "yarn workspace dex-ui generate",
"ui:generate": "yarn workspace ui generate",
"ui:dev": "yarn workspace ui dev",
"ui:start": "yarn workspace ui start",
"ui:build": "yarn workspace ui build",
"ui:test": "yarn workspace ui test",
"test:browser": "yarn workspace tests test:browser",
"ex": "yarn workspace @beanstalk/examples x",
"anvil-arbitrum": "yarn cli:anvil-arbitrum",
"anvil-eth-mainnet": "yarn cli:anvil-eth-mainnet",
"anvil": "anvil --fork-url https://eth-mainnet.g.alchemy.com/v2/5ubn94zT7v7DnB5bNW1VOnoIbX5-AG2N --chain-id 1337",
"anvil4tests": "anvil --fork-url https://eth-mainnet.g.alchemy.com/v2/Kk7ktCQL5wz4v4AG8bR2Gun8TAASQ-qi --chain-id 1337 --fork-block-number 18629000"
},
Expand Down
5 changes: 5 additions & 0 deletions projects/cli/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# DEV API key
DEV_ALCHEMY_API_KEY=""

# Test API key
DEV_TEST_ALCHEMY_API_KEY=""
2 changes: 2 additions & 0 deletions projects/cli/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
node_modules
build

.env
48 changes: 48 additions & 0 deletions projects/cli/anvil.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/bash

source .env

# Set variables based on arguments
keyType="$1"
chainIdType="$2"

# Set chain IDs
mainnet_local_chain_id=1338

arbitrum_local_chain_id=1337

# Determine which API key to use
if [ "$keyType" = "test" ]; then
apiKey="$DEV_TEST_ALCHEMY_API_KEY"
else
apiKey="$DEV_ALCHEMY_API_KEY"
fi

# Determine which chain ID to use. Defaults to arbitrum local host
if [ "$chainIdType" = "eth-mainnet" ]; then
chainId=$mainnet_local_chain_id
prefix="eth"
port=9545
else
chainId=$arbitrum_local_chain_id
prefix="arb"
port=8545
fi

# Check if required variables are set
if [ -z "$prefix" ] || [ -z "$apiKey" ] || [ -z "$chainId" ]; then
echo "Error: Missing required variables. Please set keyType and chainIdType."
exit 1
fi

anvil \
--fork-url "https://$prefix-mainnet.g.alchemy.com/v2/$apiKey" \
--chain-id "$chainId" \
--port "$port" \
"${@:3}"

# Check if Anvil exited with an error
if [ $? -ne 0 ]; then
echo "Error: Anvil exited with a non-zero status."
exit 1
fi
8 changes: 6 additions & 2 deletions projects/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@beanstalk/cli",
"version": "0.0.10",
"version": "0.0.20",
"description": "Beanstalk protocol development cli tool",
"license": "MIT",
"repository": {
Expand All @@ -16,7 +16,11 @@
"scripts": {
"cli:publish": "yarn cli:build && yarn npm publish --access public",
"cli:build": "rimraf build && tsc && chmod u+x build/cli.js",
"g:bean": "yarn ts-node-esm src/cli.ts"
"g:bean": "yarn ts-node-esm src/cli.ts",
"cli:anvil-eth-mainnet": "bash anvil.sh dev eth-mainnet",
"cli:anvil-arbitrum": "bash anvil.sh dev arbitrum-mainnet",
"cli:anvil4tests-mainnet": "bash anvil.sh test eth-mainnet --fork-block-number 18629000",
"cli:anvil4tests-arbitrum": "bash anvil.sh test arbitrum-mainnet --fork-block-number 18629000"
},
"devDependencies": {
"@types/command-line-args": "^5.2.3",
Expand Down
33 changes: 24 additions & 9 deletions projects/cli/src/commands/balance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,21 @@ export const balance = async (sdk, { account, symbol }) => {
[
"ETH",
"WETH",
"WSTETH",
"WEETH",
"WBTC",
"BEAN",
"USDT",
"USDC",
"DAI",
"CRV3",
"UNRIPE_BEAN",
"UNRIPE_BEAN_wstETH",
"BEAN_CRV3_LP",
"BEAN_ETH_WELL_LP",
"ROOT"
"USDC",
"USDT",
"urBEAN",
"urBEANWSTETH",
"BEANWETH",
"BEANWEETH",
"BEANWEETH",
"BEANWBTC",
"BEANUSDC",
"BEANUSDT"
].map((s) => getBal(sdk, s, account))
);
res.push(...bals);
Expand All @@ -32,7 +37,17 @@ export const balance = async (sdk, { account, symbol }) => {
};

async function getBal(sdk, symbol: string, account: string) {
const token = sdk.tokens[symbol];
let token = sdk.tokens[symbol];
if (!token) {
if (symbol === "urBEAN") token = sdk.tokens.UNRIPE_BEAN;
if (symbol === "urBEANWSTETH") token = sdk.tokens.UNRIPE_BEAN_WSTETH;
if (symbol === "BEANWETH") token = sdk.tokens.BEAN_ETH_WELL_LP;
if (symbol === "BEANWEETH") token = sdk.tokens.BEAN_WEETH_WELL_LP;
if (symbol === "BEANWSTETH") token = sdk.tokens.BEAN_WSTETH_WELL_LP;
if (symbol === "BEANWBTC") token = sdk.tokens.BEAN_WBTC_WELL_LP;
if (symbol === "BEANUSDC") token = sdk.tokens.BEAN_USDC_WELL_LP;
if (symbol === "BEANUSDT") token = sdk.tokens.BEAN_USDT_WELL_LP;
}
if (!token) throw new Error(`No token found: ${symbol}`);

try {
Expand Down
33 changes: 22 additions & 11 deletions projects/cli/src/commands/setbalance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,21 @@ export const setbalance = async (sdk, chain, { account, symbol, amount }) => {
const symbols = [
"ETH",
"WETH",
"WSTETH",
"WEETH",
"WBTC",
"BEAN",
"USDT",
"USDC",
"DAI",
"CRV3",
"BEAN3CRV",
"BEANWETH",
"USDC",
"USDT",
"urBEAN",
"urBEANwstETH",
"ROOT"
"urBEANWSTETH",
"BEANWETH",
"BEANWSTETH",
"BEANWEETH",
"BEANWBTC",
"BEANUSDC",
"BEANUSDT"
];
if (!symbols.includes(symbol)) {
console.log(
Expand All @@ -33,10 +38,16 @@ export const setbalance = async (sdk, chain, { account, symbol, amount }) => {
process.exit(-1);
}
let t = sdk.tokens[symbol] as Token;
if (symbol === "urBEAN") t = sdk.tokens.UNRIPE_BEAN;
if (symbol === "urBEANwstETH") t = sdk.tokens.UNRIPE_BEAN_WSTETH;
if (symbol === "BEAN3CRV") t = sdk.tokens.BEAN_CRV3_LP;
if (symbol === "BEANWETH") t = sdk.tokens.BEAN_ETH_WELL_LP;
if (!t) {
if (symbol === "urBEAN") t = sdk.tokens.UNRIPE_BEAN;
if (symbol === "urBEANWSTETH") t = sdk.tokens.UNRIPE_BEAN_WSTETH;
if (symbol === "BEANWETH") t = sdk.tokens.BEAN_ETH_WELL_LP;
if (symbol === "BEANWEETH") t = sdk.tokens.BEAN_WEETH_WELL_LP;
if (symbol === "BEANWSTETH") t = sdk.tokens.BEAN_WSTETH_WELL_LP;
if (symbol === "BEANWBTC") t = sdk.tokens.BEAN_WBTC_WELL_LP;
if (symbol === "BEANUSDC") t = sdk.tokens.BEAN_USDC_WELL_LP;
if (symbol === "BEANUSDT") t = sdk.tokens.BEAN_USDT_WELL_LP;
}
if (typeof chain[`set${symbol}Balance`] !== "function")
throw new Error(`${symbol} is not a valid token or the method ${chalk.bold.whiteBright("")}`);

Expand Down
14 changes: 7 additions & 7 deletions projects/cli/src/commands/setprice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ export const setPrice = async (sdk: BeanstalkSDK, chain: TestUtils.BlockchainUti
console.log(beanInput, crv3Input);

const newBeanAmount = (beanInput ? beanInput : 20) * 1_000_000;
const newCrv3Amount = (crv3Input ? crv3Input : beanInput ? beanInput : 20) * 1_000_000;
// const newCrv3Amount = (crv3Input ? crv3Input : beanInput ? beanInput : 20) * 1_000_000;

const newBean = sdk.tokens.BEAN.amount(newBeanAmount);
const newCrv3 = sdk.tokens.CRV3.amount(newCrv3Amount);
// const newBean = sdk.tokens.BEAN.amount(newBeanAmount);
// const newCrv3 = sdk.tokens.CRV3.amount(newCrv3Amount);

////// Set the new balance
console.log(`New Balances: ${newBean.toHuman()} ${newCrv3.toHuman()}`);
// console.log(`New Balances: ${newBean.toHuman()} ${newCrv3.toHuman()}`);
// update the array tracking balances
await setBalance(sdk, POOL_ADDRESS, BALANCE_SLOT, newBean, newCrv3);
// await setBalance(sdk, POOL_ADDRESS, BALANCE_SLOT, newBean, newCrv3);
// actually give the pool the ERC20's
await chain.setBEANBalance(POOL_ADDRESS, newBean);
await chain.setCRV3Balance(POOL_ADDRESS, newCrv3);
// await chain.setBEANBalance(POOL_ADDRESS, newBean);
// await chain.setCRV3Balance(POOL_ADDRESS, newCrv3);

// Curve also keeps track of the previous balance, so we just copy the existing current to old.
await setBalance(sdk, POOL_ADDRESS, PREV_BALANCE_SLOT, currentBean, currentCrv3);
Expand Down
8 changes: 5 additions & 3 deletions projects/dex-ui/.env.local.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
VITE_AQUIFER_ADDRESS=local/fork deployed address
VITE_AQUIFER_ADDRESS_ETH="deployed address here"
VITE_AQUIFER_ADDRESS_ARBITRUM="deployed address here"
VITE_ALCHEMY_API_KEY="your key here"
VITE_THEGRAPH_API_KEY="your key here"
VITE_WALLET_CONNECT_PROJECT_ID="project key here"
VITE_WELLS_ORIGIN_BLOCK=17138465
VITE_LOAD_HISTORY_FROM_GRAPH=0
VITE_WALLET_CONNECT_PROJECT_ID="project key here"
VITE_LOAD_HISTORY_FROM_GRAPH=0
7 changes: 6 additions & 1 deletion projects/dex-ui/.env.production
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
// DO NOT ACTUALLY SAVE THINGS HERE
// ONLY USE THIS FILE TO TRACK WHAT ENV VARS NEED TO
// BE ADDED TO NETLIFY CONFIG
VITE_AQUIFER_ADDRESS_ETH=""
VITE_AQUIFER_ADDRESS_ARBITRUM=""
VITE_ALCHEMY_API_KEY=""
VITE_WALLET_CONNECT_PROJECT_ID=""
VITE_THEGRAPH_API_KEY=""
VITE_WALLET_CONNECT_PROJECT_ID=""
VITE_WELLS_ORIGIN_BLOCK=""
VITE_LOAD_HISTORY_FROM_GRAPH=""
56 changes: 47 additions & 9 deletions projects/dex-ui/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,21 @@
"settings": {
"react": {
"version": "detect"
},
"import/resolver": {
"typescript": {},
"node": {
"paths": ["src"],
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
},
"extends": [
"plugin:react/recommended",
"plugin:jsx-a11y/recommended",
// "plugin:@typescript-eslint/recommended",
// "plugin:import/errors",
// "plugin:import/warnings",
"plugin:import/typescript"
],
"parser": "@typescript-eslint/parser",
Expand All @@ -18,13 +27,7 @@
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"react",
"react-hooks",
"@typescript-eslint",
"import",
"jsx-a11y"
],
"plugins": ["react", "react-hooks", "@typescript-eslint", "import", "jsx-a11y"],
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
Expand All @@ -39,6 +42,41 @@
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/prop-types": 0,
"react/display-name": 0
"react/display-name": 0,
"import/order": [
"warn",
{
"groups": [
"builtin",
"external",
"internal",
["parent", "sibling", "index"],
"object",
"type"
],
"pathGroups": [
{
"pattern": "react",
"group": "external",
"position": "before"
},
{
"pattern": "@beanstalk/sdk*",
"group": "external",
"position": "after"
},
{
"pattern": "src/**",
"group": "internal"
}
],
"pathGroupsExcludedImportTypes": ["react", "@beanstalk/sdk*"],
"alphabetize": {
"order": "asc",
"caseInsensitive": true
},
"newlines-between": "always"
}
]
}
}
}
3 changes: 2 additions & 1 deletion projects/dex-ui/codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ const config: CodegenConfig = {
schema: [
"graphql.schema.json",
// beanstalk subgraph
"https://graph.node.bean.money/subgraphs/name/beanstalk"
"https://graph.bean.money/beanstalk",
"https://graph.bean.money/beanstalk_eth"
],
documents: "src/**/*.graphql",
ignoreNoDocuments: true,
Expand Down
1 change: 1 addition & 0 deletions projects/dex-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"connectkit": "1.7.2",
"ethers": "^5.7.2",
"graphql-request": "5.2.0",
"jotai": "2.9.3",
"lightweight-charts": "4.1.3",
"prettier": "3.2.5",
"react": "^18.2.0",
Expand Down
30 changes: 30 additions & 0 deletions projects/dex-ui/src/assets/images/tokens/ARB.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions projects/dex-ui/src/assets/images/tokens/WBTC.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading