@@ -2,12 +2,14 @@ package pyth_feed
22
33import (
44 "encoding/hex"
5+ "math/big"
56
67 "github.com/Gearbox-protocol/sdk-go/artifacts/multicall"
78 "github.com/Gearbox-protocol/sdk-go/core"
89 "github.com/Gearbox-protocol/sdk-go/core/schemas"
910 "github.com/Gearbox-protocol/sdk-go/log"
1011 "github.com/Gearbox-protocol/sdk-go/pkg"
12+ "github.com/Gearbox-protocol/sdk-go/utils"
1113 "github.com/Gearbox-protocol/third-eye/ds"
1214 "github.com/Gearbox-protocol/third-eye/models/aggregated_block_feed/base_price_feed"
1315 "github.com/ethereum/go-ethereum/common"
@@ -45,6 +47,15 @@ func (adapter *PythPriceFeed) ProcessResult(blockNum int64, results []multicall.
4547 ts := adapter .Repo .SetAndGetBlock (blockNum ).Timestamp
4648 obj , err := pkg .GetPythPrice (adapter .DetailsDS .Underlyings [0 ], int64 (ts ))
4749 if err != nil {
50+ if adapter .Address == "0x258b53A9eAe313ca83E42C444ff2799781fC791E" {
51+ price := big .NewInt (126_000_000 )
52+ return & schemas.PriceFeed {
53+ RoundId : 0 ,
54+ PriceBI : (* core .BigInt )(price ),
55+ Price : utils .GetFloat64Decimal (price , 8 ),
56+ BlockNumber : blockNum ,
57+ }
58+ }
4859 log .Fatal ("Pyth price feed" , adapter .GetAddress (), " failed at block: " , blockNum , err )
4960 }
5061 return & schemas.PriceFeed {
0 commit comments