Skip to content

Commit 1b8e1f9

Browse files
committed
fix: mc for plasma
1 parent 598e937 commit 1b8e1f9

File tree

1 file changed

+11
-0
lines changed
  • models/pool_lmrewards/v3

1 file changed

+11
-0
lines changed

models/pool_lmrewards/v3/log.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ import (
44
"math/big"
55

66
"github.com/Gearbox-protocol/sdk-go/core"
7+
"github.com/Gearbox-protocol/sdk-go/core/schemas"
78
"github.com/Gearbox-protocol/sdk-go/log"
89
"github.com/Gearbox-protocol/sdk-go/pkg"
10+
"github.com/Gearbox-protocol/sdk-go/utils"
911
"github.com/Gearbox-protocol/third-eye/config"
1012
"github.com/Gearbox-protocol/third-eye/ethclient"
1113
"github.com/ethereum/go-ethereum/common"
@@ -102,6 +104,15 @@ func (mdl LMRewardsv3) OnLog(txLog types.Log) {
102104
if lastSync := mdl.poolsToSyncedTill[poolAddr]; lastSync >= blockNum {
103105
return
104106
}
107+
tokenDetails := mdl.Repo.GetToken(poolAddr.Hex())
108+
mdl.Repo.AddDieselTransfer(&schemas.DieselTransfer{
109+
LogId: int64(txLog.Index),
110+
BlockNum: int64(txLog.BlockNumber),
111+
TokenSymbol: tokenDetails.Symbol,
112+
From: from,
113+
To: to,
114+
Amount: utils.GetFloat64Decimal(amount, tokenDetails.Decimals),
115+
})
105116
mdl.updateDieselBalances(txLog, poolAddr, from, to, amount)
106117
// if to == "0x3E965117A51186e41c2BB58b729A1e518A715e5F" || from == "0x3E965117A51186e41c2BB58b729A1e518A715e5F" {
107118
// current :=ss{

0 commit comments

Comments
 (0)