Skip to content

Commit 949ac63

Browse files
committed
feat: gear for mainnet
1 parent 775d516 commit 949ac63

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.23
55
// toolchain go1.23.2
66

77
require (
8-
github.com/Gearbox-protocol/sdk-go v0.0.0-20250515050146-74e6c8e5dfad
8+
github.com/Gearbox-protocol/sdk-go v0.0.0-20250517173314-c323931a15cc
99
github.com/ethereum/go-ethereum v1.13.14
1010
github.com/go-playground/validator/v10 v10.4.1
1111
github.com/google/go-cmp v0.6.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ
66
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
77
github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ=
88
github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo=
9-
github.com/Gearbox-protocol/sdk-go v0.0.0-20250515050146-74e6c8e5dfad h1:wRcGkN6RVzmxWD8lew22b4mjsddrWCCpmGGsy0xDZKQ=
10-
github.com/Gearbox-protocol/sdk-go v0.0.0-20250515050146-74e6c8e5dfad/go.mod h1:MZsiiSAwDdnHY6GEILYtHEqhb9wmbUUE34UBQgNlUyM=
9+
github.com/Gearbox-protocol/sdk-go v0.0.0-20250517173314-c323931a15cc h1:FIH9ZW6myPIcPgqTAHR6SyjdAZHqg+7/a0uyFbQ1DZ8=
10+
github.com/Gearbox-protocol/sdk-go v0.0.0-20250517173314-c323931a15cc/go.mod h1:MZsiiSAwDdnHY6GEILYtHEqhb9wmbUUE34UBQgNlUyM=
1111
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
1212
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
1313
github.com/OffchainLabs/go-ethereum v1.13.4-0.20240313010929-e5d8587e7227 h1:+/3TrD+q+BP36jGj2Bycdmrc/joKLNbc5ImePQzKRLM=

models/aggregated_block_feed/dependency.go

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,13 @@ func (q *QueryPFDependencies) getChainlinkBasedQueryUpdates(clearExtraBefore int
8484
}
8585

8686
var base = []string{"WETH", "WBTC", "DAI", "USDC", "USDT", "USDC", "OHM"}
87-
var combo = map[string][]string{
88-
"3crv": {"DAI", "USDC", "USDT"},
87+
var combo = map[string]struct {
88+
data []string
89+
onlymainnet bool
90+
}{
91+
"3crv": {data: []string{"DAI", "USDC", "USDT"}},
92+
"wstETH": {data: []string{"stETH"}, onlymainnet: true},
93+
"rstETH": {data: []string{"stETH"}, onlymainnet: true},
8994
}
9095

9196
// {"USDT": {"3crv:address"}, "USDC": {"3crv:address"}, "DAI": {"3crv:address"}, "FRAX": {"crvFRAX"}}
@@ -103,9 +108,13 @@ func (q *QueryPFDependencies) GetChainlinkTokenToUpdateToken() map[string][]stri
103108
if strings.Contains(token.Symbol, sym) && token.Symbol != sym {
104109
ans[token.Symbol] = append(ans[token.Symbol], token.Address)
105110
}
106-
if strings.Contains(strings.ToLower(token.Symbol), "3crv") {
107-
for _, underlyingsym := range combo["3crv"] {
108-
ans[underlyingsym] = append(ans[underlyingsym], token.Address)
111+
}
112+
for collection, underlyingSyms := range combo {
113+
if strings.Contains(strings.ToLower(token.Symbol), strings.ToLower(collection)) { // 3crv
114+
if (core.GetBaseChainId(q.client) == 1 && underlyingSyms.onlymainnet) || !underlyingSyms.onlymainnet {
115+
for _, underlyingsym := range underlyingSyms.data {
116+
ans[underlyingsym] = append(ans[underlyingsym], token.Address)
117+
}
109118
}
110119
}
111120
}

0 commit comments

Comments
 (0)