Skip to content

Commit 21b0b44

Browse files
committed
Merge commit 'b9a5eecfe9f6735af5e0a213219ba4f7684877a4'
2 parents 38c460c + b9a5eec commit 21b0b44

20 files changed

Lines changed: 9 additions & 338 deletions

File tree

commands.json

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,6 @@
7676
"deps": ["build"],
7777
"cmd": ["node", "--require=dotenv/config", "--require=tsconfig-paths/register", "lib/main-os.js"]
7878
},
79-
"process:plume": {
80-
"description": "Load .env and start the squid processor",
81-
"deps": ["build"],
82-
"cmd": ["node", "--require=dotenv/config", "--require=tsconfig-paths/register", "lib/main-plume.js"]
83-
},
8479
"process:oeth": {
8580
"description": "Load .env and start the squid processor",
8681
"deps": ["build"],
@@ -135,12 +130,6 @@
135130
"cmd": ["node", "--require=tsconfig-paths/register", "lib/main-os.js"],
136131
"hidden": true
137132
},
138-
"process:plume:prod": {
139-
"description": "Start the squid processor",
140-
"deps": ["migration:apply"],
141-
"cmd": ["node", "--require=tsconfig-paths/register", "lib/main-plume.js"],
142-
"hidden": true
143-
},
144133
"process:oeth:prod": {
145134
"description": "Start the squid processor",
146135
"deps": ["migration:apply"],

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
"process:oethb": "sqd process:oethb",
2323
"process:ousd": "sqd process:ousd",
2424
"process:ogv": "sqd process:ogv",
25-
"process:plume": "sqd process:plume",
2625
"process:mainnet": "sqd process:mainnet",
2726
"process:test": "sqd process:test",
2827
"process": "sqd process",

scripts/create-db-dump.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ type ProcessorName =
1818
| 'oethb-processor'
1919
| 'sonic-processor'
2020
| 'os-processor'
21-
| 'plume-processor'
2221

2322
function parseArgs() {
2423
const args = process.argv.slice(2)
@@ -61,8 +60,6 @@ function getRpcEndpointEnvName(processorName: ProcessorName): string {
6160
case 'sonic-processor':
6261
case 'os-processor':
6362
return process.env['RPC_SONIC_ENV']!
64-
case 'plume-processor':
65-
return process.env['RPC_PLUME_ENV']!
6663
// mainnet family
6764
case 'mainnet-processor':
6865
case 'oeth-processor':

squid.yaml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ deploy:
2424
- RPC_ARBITRUM_ENV
2525
- RPC_SONIC_ENDPOINT
2626
- RPC_SONIC_ENV
27-
- RPC_PLUME_ENDPOINT
28-
- RPC_PLUME_ENV
2927
- NOTION_SECRET
3028
- AWS_ACCESS_KEY_ID
3129
- AWS_SECRET_ACCESS_KEY
@@ -143,19 +141,6 @@ deploy:
143141
# # RPC_SONIC_ENDPOINT: https://virtual.base.rpc.tenderly.co/103020a8-b59a-4d51-9f8b-b156564e9fb8
144142
# ### Time Travel Fix
145143
# # BLOCK_FROM: 20919091
146-
########## PLUME NETWORK ##########
147-
- name: plume-processor
148-
cmd: ['sqd', 'process:plume:prod']
149-
# env:
150-
# ### Fork Setup Stage 1
151-
# ARCHIVE_ONLY: 'true'
152-
# BLOCK_TO: 21527081
153-
# ### Fork Setup Stage 2
154-
# # DISABLE_ARCHIVE: 'true'
155-
# # RPC_SONIC_ENV: RPC_SONIC_ENDPOINT
156-
# # RPC_SONIC_ENDPOINT: https://virtual.base.rpc.tenderly.co/103020a8-b59a-4d51-9f8b-b156564e9fb8
157-
# ### Time Travel Fix
158-
# # BLOCK_FROM: 20919091
159144
api:
160145
cmd:
161146
- npx

src/main-plume.ts

Lines changed: 0 additions & 34 deletions
This file was deleted.

src/main.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import oeth from './main-oeth'
99
import oethb from './main-oethb'
1010
import ogv from './main-ogv'
1111
import ousd from './main-ousd'
12-
import plume from './main-plume'
1312
import sonic from './main-sonic'
1413

1514
Promise.all([
@@ -22,7 +21,6 @@ Promise.all([
2221
initProcessorFromDump(ogv),
2322
initProcessorFromDump(ousd),
2423
initProcessorFromDump(sonic),
25-
initProcessorFromDump(plume),
2624
]).catch((err) => {
2725
throw err
2826
})

src/mainnet/processors/protocol/protocol.ts

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import {
1919
} from '@originprotocol/squid-utils'
2020
import { getLatestExchangeRateForDate } from '@shared/post-processors/exchange-rates/exchange-rates'
2121
import { baseAddresses } from '@utils/addresses-base'
22-
import { plumeAddresses } from '@utils/addresses-plume'
2322
import { ProductName, armProducts, otokenProducts } from '@utils/products'
2423

2524
const startDate = '2022-01-01'
@@ -52,7 +51,7 @@ export const protocolProcessor = defineProcessor({
5251
const superTokenUpdatedDates = uniq([
5352
...otherOTokenDetailsArrays
5453
.flat()
55-
.filter((d) => d.product === 'superOETHb' || d.product === 'superOETHp')
54+
.filter((d) => d.product === 'superOETHb')
5655
.map((d) => d.date),
5756
])
5857

@@ -173,13 +172,11 @@ const getOTokenDetails = async (
173172
const last = await getLatestProtocolDailyStatDetail(ctx, product)
174173

175174
const lastDates = [last?.date ?? startDate]
176-
if (product === 'OETH' || product === 'superOETHb' || product === 'superOETHp') {
175+
if (product === 'OETH' || product === 'superOETHb') {
177176
const lastOETH = await getLatestProtocolDailyStatDetail(ctx, 'OETH')
178177
const lastSuperOETHb = await getLatestProtocolDailyStatDetail(ctx, 'superOETHb')
179-
const lastSuperOETHp = await getLatestProtocolDailyStatDetail(ctx, 'superOETHp')
180178
lastDates.push(lastOETH?.date ?? startDate)
181179
lastDates.push(lastSuperOETHb?.date ?? startDate)
182-
lastDates.push(lastSuperOETHp?.date ?? startDate)
183180
}
184181

185182
// For OETH variants, use the minimum date to ensure all interdependent records are recalculated
@@ -288,21 +285,6 @@ const calculateOTokenBasicStats = async (
288285
if (oethTvl !== 0n) {
289286
detail.revenue += (oethRevenue * woethBalance) / oethTvl
290287
}
291-
} else if (detail.product === 'superOETHp') {
292-
// Prefer in-memory OETH data computed earlier in this run to avoid races
293-
const detailOETH = opts?.oethCacheByDate?.[date] ?? (await getProtocolDailyStatDetail(ctx, date, 'OETH'))
294-
const superOETHpWrappedOETH = await getLatestStrategyBalance(
295-
ctx,
296-
plumeAddresses.superOETHp.strategies.bridgedWOETH,
297-
date,
298-
)
299-
const woethBalance = superOETHpWrappedOETH?.balanceETH ?? 0n
300-
detail.bridgedTvl = woethBalance
301-
const oethTvl = detailOETH?.tvl ?? 0n
302-
const oethRevenue = detailOETH?.revenue ?? 0n
303-
if (oethTvl !== 0n) {
304-
detail.revenue += (oethRevenue * woethBalance) / oethTvl
305-
}
306288
}
307289
}
308290

@@ -312,16 +294,11 @@ const calculateOETHInheritedStats = async (ctx: Context, detail: ProtocolDailySt
312294
baseAddresses.superOETHb.strategies.bridgedWOETH,
313295
date,
314296
)
315-
const superOETHpWrappedOETH = await getLatestStrategyBalance(
316-
ctx,
317-
plumeAddresses.superOETHp.strategies.bridgedWOETH,
318-
date,
319-
)
320297

321-
detail.inheritedTvl = (superOETHbWrappedOETH?.balanceETH ?? 0n) + (superOETHpWrappedOETH?.balanceETH ?? 0n)
298+
detail.inheritedTvl = superOETHbWrappedOETH?.balanceETH ?? 0n
322299
detail.inheritedYield = detail.earningTvl !== 0n ? (detail.yield * detail.inheritedTvl) / detail.earningTvl : 0n
323300
detail.inheritedRevenue = detail.earningTvl !== 0n ? (detail.revenue * detail.inheritedTvl) / detail.earningTvl : 0n
324-
detail.bridgedTvl = (superOETHbWrappedOETH?.balanceETH ?? 0n) + (superOETHpWrappedOETH?.balanceETH ?? 0n)
301+
detail.bridgedTvl = superOETHbWrappedOETH?.balanceETH ?? 0n
325302
}
326303

327304
const calculateForDates = async (

src/plume/erc20.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/plume/strategies.ts

Lines changed: 0 additions & 42 deletions
This file was deleted.

src/plume/super-oeth-p.ts

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)