Skip to content

Commit

Permalink
fix address for withdrawals
Browse files Browse the repository at this point in the history
  • Loading branch information
apexearth committed Oct 28, 2024
1 parent 7c0b38e commit dbe7144
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/base/super-oeth-b.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const otokenActivityProcessor = createOTokenActivityProcessor({

const otokenWithdrawalsProcessor = createOTokenWithdrawalsProcessor({
oTokenAddress: baseAddresses.superOETHb.address,
oTokenVaultAddress: baseAddresses.superOETHb.vault,
from: 21544908,
})

Expand Down
6 changes: 5 additions & 1 deletion src/main-oeth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ export const processor = {
balancerMetaPoolStrategy,
strategies,
exchangeRates,
createOTokenWithdrawalsProcessor({ oTokenAddress: addresses.oeth.address, from: 20428558 }),
createOTokenWithdrawalsProcessor({
oTokenAddress: addresses.oeth.address,
oTokenVaultAddress: addresses.oeth.vault,
from: 20428558,
}),
],
postProcessors: [exchangeRatesPostProcessor, dailyStats, processStatus('oeth')],
validators: [validateOeth],
Expand Down
14 changes: 11 additions & 3 deletions src/templates/withdrawals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,22 @@ interface ProcessResult {
withdrawalRequests: Map<string, OTokenWithdrawalRequest>
}

export const createOTokenWithdrawalsProcessor = ({ oTokenAddress, from }: { oTokenAddress: string; from: number }) => {
export const createOTokenWithdrawalsProcessor = ({
oTokenAddress,
oTokenVaultAddress,
from,
}: {
oTokenAddress: string
oTokenVaultAddress: string
from: number
}) => {
const withdrawalRequestedFilter = logFilter({
address: [oTokenAddress],
address: [oTokenVaultAddress],
topic0: [oethVault.events.WithdrawalRequested.topic],
range: { from },
})
const withdrawalClaimedFilter = logFilter({
address: [oTokenAddress],
address: [oTokenVaultAddress],
topic0: [oethVault.events.WithdrawalClaimed.topic],
range: { from },
})
Expand Down

0 comments on commit dbe7144

Please sign in to comment.