Skip to content

Commit 70e1d70

Browse files
authored
New deployment (#262)
* deployed new geysers * ran linter * deployed new geysers * updated frontend with new geysers * cache flush script * geyser slug * using global apy for geyser drip * showing most recent 3 programs if all have expired * disabling bootstrap * enabling new geysers
1 parent f26b522 commit 70e1d70

24 files changed

+1087
-154
lines changed

.openzeppelin/mainnet.json

Lines changed: 226 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,232 @@
226226
}
227227
}
228228
}
229+
},
230+
"f5994764c094d27dccc784eac5674d3f8721c6d83bed328d38defdf246f3e7d1": {
231+
"address": "0x49c3D3735084f5F69D4E214Fe2680A0c870Bbfe3",
232+
"txHash": "0xb7296e77121ef7e86ec989139197e0509cf172b90c671a0c1544d9439e28b7b9",
233+
"layout": {
234+
"storage": [
235+
{
236+
"contract": "Powered",
237+
"label": "_powerSwitch",
238+
"type": "t_address",
239+
"src": "contracts/PowerSwitch/Powered.sol:24"
240+
},
241+
{
242+
"contract": "Initializable",
243+
"label": "_initialized",
244+
"type": "t_bool",
245+
"src": "@openzeppelin/contracts/proxy/Initializable.sol:25"
246+
},
247+
{
248+
"contract": "Initializable",
249+
"label": "_initializing",
250+
"type": "t_bool",
251+
"src": "@openzeppelin/contracts/proxy/Initializable.sol:30"
252+
},
253+
{
254+
"contract": "ContextUpgradeable",
255+
"label": "__gap",
256+
"type": "t_array(t_uint256)50_storage",
257+
"src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31"
258+
},
259+
{
260+
"contract": "OwnableUpgradeable",
261+
"label": "_owner",
262+
"type": "t_address",
263+
"src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:20"
264+
},
265+
{
266+
"contract": "OwnableUpgradeable",
267+
"label": "__gap",
268+
"type": "t_array(t_uint256)49_storage",
269+
"src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:74"
270+
},
271+
{
272+
"contract": "Geyser",
273+
"label": "_geyser",
274+
"type": "t_struct(GeyserData)5791_storage",
275+
"src": "contracts/Geyser.sol:222"
276+
},
277+
{
278+
"contract": "Geyser",
279+
"label": "_vaults",
280+
"type": "t_mapping(t_address,t_struct(VaultData)5804_storage)",
281+
"src": "contracts/Geyser.sol:223"
282+
},
283+
{
284+
"contract": "Geyser",
285+
"label": "_bonusTokenSet",
286+
"type": "t_struct(AddressSet)4188_storage",
287+
"src": "contracts/Geyser.sol:224"
288+
},
289+
{
290+
"contract": "Geyser",
291+
"label": "_vaultFactorySet",
292+
"type": "t_struct(AddressSet)4188_storage",
293+
"src": "contracts/Geyser.sol:225"
294+
}
295+
],
296+
"types": {
297+
"t_struct(GeyserData)5791_storage": {
298+
"label": "struct IGeyser.GeyserData",
299+
"members": [
300+
{
301+
"label": "stakingToken",
302+
"type": "t_address"
303+
},
304+
{
305+
"label": "rewardToken",
306+
"type": "t_address"
307+
},
308+
{
309+
"label": "rewardPool",
310+
"type": "t_address"
311+
},
312+
{
313+
"label": "rewardScaling",
314+
"type": "t_struct(RewardScaling)5816_storage"
315+
},
316+
{
317+
"label": "rewardSharesOutstanding",
318+
"type": "t_uint256"
319+
},
320+
{
321+
"label": "totalStake",
322+
"type": "t_uint256"
323+
},
324+
{
325+
"label": "totalStakeUnits",
326+
"type": "t_uint256"
327+
},
328+
{
329+
"label": "lastUpdate",
330+
"type": "t_uint256"
331+
},
332+
{
333+
"label": "rewardSchedules",
334+
"type": "t_array(t_struct(RewardSchedule)5798_storage)dyn_storage"
335+
}
336+
]
337+
},
338+
"t_address": {
339+
"label": "address"
340+
},
341+
"t_struct(RewardScaling)5816_storage": {
342+
"label": "struct IGeyser.RewardScaling",
343+
"members": [
344+
{
345+
"label": "floor",
346+
"type": "t_uint256"
347+
},
348+
{
349+
"label": "ceiling",
350+
"type": "t_uint256"
351+
},
352+
{
353+
"label": "time",
354+
"type": "t_uint256"
355+
}
356+
]
357+
},
358+
"t_uint256": {
359+
"label": "uint256"
360+
},
361+
"t_array(t_struct(RewardSchedule)5798_storage)dyn_storage": {
362+
"label": "struct IGeyser.RewardSchedule[]"
363+
},
364+
"t_struct(RewardSchedule)5798_storage": {
365+
"label": "struct IGeyser.RewardSchedule",
366+
"members": [
367+
{
368+
"label": "duration",
369+
"type": "t_uint256"
370+
},
371+
{
372+
"label": "start",
373+
"type": "t_uint256"
374+
},
375+
{
376+
"label": "shares",
377+
"type": "t_uint256"
378+
}
379+
]
380+
},
381+
"t_mapping(t_address,t_struct(VaultData)5804_storage)": {
382+
"label": "mapping(address => struct IGeyser.VaultData)"
383+
},
384+
"t_struct(VaultData)5804_storage": {
385+
"label": "struct IGeyser.VaultData",
386+
"members": [
387+
{
388+
"label": "totalStake",
389+
"type": "t_uint256"
390+
},
391+
{
392+
"label": "stakes",
393+
"type": "t_array(t_struct(StakeData)5809_storage)dyn_storage"
394+
}
395+
]
396+
},
397+
"t_array(t_struct(StakeData)5809_storage)dyn_storage": {
398+
"label": "struct IGeyser.StakeData[]"
399+
},
400+
"t_struct(StakeData)5809_storage": {
401+
"label": "struct IGeyser.StakeData",
402+
"members": [
403+
{
404+
"label": "amount",
405+
"type": "t_uint256"
406+
},
407+
{
408+
"label": "timestamp",
409+
"type": "t_uint256"
410+
}
411+
]
412+
},
413+
"t_struct(AddressSet)4188_storage": {
414+
"label": "struct EnumerableSet.AddressSet",
415+
"members": [
416+
{
417+
"label": "_inner",
418+
"type": "t_struct(Set)3923_storage"
419+
}
420+
]
421+
},
422+
"t_struct(Set)3923_storage": {
423+
"label": "struct EnumerableSet.Set",
424+
"members": [
425+
{
426+
"label": "_values",
427+
"type": "t_array(t_bytes32)dyn_storage"
428+
},
429+
{
430+
"label": "_indexes",
431+
"type": "t_mapping(t_bytes32,t_uint256)"
432+
}
433+
]
434+
},
435+
"t_array(t_bytes32)dyn_storage": {
436+
"label": "bytes32[]"
437+
},
438+
"t_bytes32": {
439+
"label": "bytes32"
440+
},
441+
"t_mapping(t_bytes32,t_uint256)": {
442+
"label": "mapping(bytes32 => uint256)"
443+
},
444+
"t_array(t_uint256)49_storage": {
445+
"label": "uint256[49]"
446+
},
447+
"t_array(t_uint256)50_storage": {
448+
"label": "uint256[50]"
449+
},
450+
"t_bool": {
451+
"label": "bool"
452+
}
453+
}
454+
}
229455
}
230456
},
231457
"admin": {

README.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,23 @@ ethereum:
1515
proxyAdmin: 0xc70F5bc82ccb3de00400814ff8bD406C271db3c4
1616
geyserRegistry: 0xFc43803F203e3821213bE687120aD44C8a21A7e7
1717
geysers:
18-
- poolRef: "CHARM-WAMPL-WETH (Crystal V1)"
19-
deployment: 0xEac308Fa45A9b64cfb6965e8d1237B39016862e3
18+
- poolRef: "CHARM-SPOT-USDC (Bootstrap V1)"
19+
deployment: 0x569f042C54B094A10E6fe1b52515eEC507D8da06
2020

21-
- poolRef: "BB-SPOT-USDC (Steamboat V1)"
22-
deployment: 0xF0a45FA4fBec33A2A51E08058bEA92761c08D7D5
21+
- poolRef: "CHARM-WAMPL-WETH (Crystal V2)"
22+
deployment: 0x59d177f718e902e59CF3Cbd19519194bcC437FeF
2323

24-
- poolRef: "CHARM-SPOT-USDC (Great geyser V1)"
25-
deployment: 0x7B2e9353D3Bf71d9f9246B1291eE29DFB11B32C7
24+
- poolRef: "STAMPL (Riverside V1)"
25+
deployment: 0xa19604b951592170DDa857CBE46609B85AB00Dee
26+
27+
# - poolRef: "CHARM-WAMPL-WETH (Crystal V1)"
28+
# deployment: 0xEac308Fa45A9b64cfb6965e8d1237B39016862e3
29+
30+
# - poolRef: "BB-SPOT-USDC (Steamboat V1)"
31+
# deployment: 0xF0a45FA4fBec33A2A51E08058bEA92761c08D7D5
32+
33+
# - poolRef: "CHARM-SPOT-USDC (Great geyser V1)"
34+
# deployment: 0x7B2e9353D3Bf71d9f9246B1291eE29DFB11B32C7
2635

2736
# - poolRef: "UNI-ETH-AMPL-V2 (Beehive V7)"
2837
# deployment: 0x5Ec6f02D0b657E4a56d6020Bc21F19f2Ca13EcA9

frontend/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,4 +282,5 @@ To learn React, check out the [React documentation](https://reactjs.org/).
282282

283283
```
284284
./scripts/deploy-s3.sh
285+
./scripts/flush-cache-prod.sh DIST.cloudfront.net
285286
```

frontend/scripts/flush-cache-prod.sh

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Name: flush-cache-prod.sh
4+
#
5+
# Usage: ./flush-cache-prod.sh "<distribution-domain-name>"
6+
#
7+
# Description:
8+
# 1. Looks up a CloudFront distribution by matching the input domain name
9+
# (e.g., "d123abcxyz.cloudfront.net") to the distribution's DomainName field.
10+
# 2. Issues a cache invalidation for all files ("/*").
11+
# 3. Monitors the invalidation until it is completed.
12+
#
13+
# Requirements:
14+
# - AWS CLI installed and configured
15+
# - jq installed (for JSON parsing)
16+
# - A CloudFront distribution whose DomainName matches the supplied input
17+
18+
set -euo pipefail
19+
20+
if [ "$#" -ne 1 ]; then
21+
echo "Usage: $0 \"<distribution-domain-name>\""
22+
echo "Example: $0 \"d123abcxyz.cloudfront.net\""
23+
exit 1
24+
fi
25+
26+
DISTRIBUTION_DOMAIN="$1"
27+
28+
echo "Looking up the distribution by domain name: \"$DISTRIBUTION_DOMAIN\" ..."
29+
30+
# Step 1: Query the distribution list, matching the DomainName to DISTRIBUTION_DOMAIN
31+
DISTRIBUTION_ID=$(
32+
aws cloudfront list-distributions --output json \
33+
| jq -r --arg DOMAIN "$DISTRIBUTION_DOMAIN" '
34+
.DistributionList.Items[]
35+
| select(.DomainName == $DOMAIN)
36+
| .Id
37+
'
38+
)
39+
40+
if [ -z "$DISTRIBUTION_ID" ]; then
41+
echo "Error: No distribution found with domain name: \"$DISTRIBUTION_DOMAIN\""
42+
exit 1
43+
fi
44+
45+
echo "Found distribution ID: $DISTRIBUTION_ID"
46+
47+
# Step 2: Issue a cache invalidation for all files
48+
echo "Creating invalidation for all paths (/*) ..."
49+
INVALIDATION_JSON=$(
50+
aws cloudfront create-invalidation \
51+
--distribution-id "$DISTRIBUTION_ID" \
52+
--paths "/*"
53+
)
54+
55+
# Extract the invalidation ID from the result
56+
INVALIDATION_ID=$(echo "$INVALIDATION_JSON" | jq -r '.Invalidation.Id')
57+
58+
echo "Invalidation created. ID: $INVALIDATION_ID"
59+
60+
# Step 3: Monitor the invalidation until it completes
61+
echo "Monitoring invalidation status..."
62+
63+
while true; do
64+
STATUS=$(
65+
aws cloudfront get-invalidation \
66+
--distribution-id "$DISTRIBUTION_ID" \
67+
--id "$INVALIDATION_ID" \
68+
--output json \
69+
| jq -r '.Invalidation.Status'
70+
)
71+
72+
echo "Current status: $STATUS"
73+
74+
if [ "$STATUS" == "Completed" ]; then
75+
echo "Invalidation $INVALIDATION_ID has completed!"
76+
break
77+
fi
78+
79+
# Sleep for a few seconds before checking again (avoid spamming AWS)
80+
sleep 5
81+
done
82+
83+
echo "Cache flush complete."

frontend/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function App() {
2525
<Routes>
2626
<Route path="/" element={<Home />} />
2727
<Route
28-
path="/geysers/:ref"
28+
path="/geysers/:slug"
2929
element={
3030
<div>
3131
<DropdownsContainer showVaults showGeysers />

frontend/src/components/GeyserFirst/GeyserFirstContainer.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ import { GeyserStakeView } from './GeyserStakeView'
1313
import { GeyserStatsView } from './GeyserStatsView'
1414

1515
export const GeyserFirstContainer = () => {
16-
const { ref } = useParams()
16+
const { slug } = useParams()
1717
const { ready, validNetwork } = useContext(Web3Context)
1818
const {
1919
geyserAction,
2020
updateGeyserAction,
2121
selectedGeyserInfo: { isWrapped },
22-
selectGeyserByRef,
22+
selectGeyserBySlug,
2323
geysers,
2424
loading,
2525
} = useContext(GeyserContext)
@@ -29,13 +29,13 @@ export const GeyserFirstContainer = () => {
2929
const [geyserNotFound, setGeyserNotFound] = useState(false)
3030
useEffect(() => {
3131
const fetchGeyser = async () => {
32-
if (ref && geysers.length > 0) {
33-
const found = await selectGeyserByRef(ref)
32+
if (slug && geysers.length > 0) {
33+
const found = await selectGeyserBySlug(slug)
3434
setGeyserNotFound(!found)
3535
}
3636
}
3737
fetchGeyser()
38-
}, [ref, geysers, selectGeyserByRef])
38+
}, [slug, geysers, selectGeyserBySlug])
3939

4040
if (loading) return <PageLoader />
4141

0 commit comments

Comments
 (0)