diff --git a/config/config.yaml b/config/config.yaml index d99b81d..c823057 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -25,13 +25,11 @@ logger: nep17: - contract: "gas" - label: "GAS" # allows to return the total token supply currently available. # totalSupply: true balanceOf: - 3c3f4b84773ef0141576e48c3ff60e5078235891 - contract: "NEO" - label: "neo" balanceOf: - NSPCCpw8YmgNDYWiBfXJHRfz38NDjv6WW3 - NSPCCa2T6nc2kYcgWC2k68boyGgc9YdKsj diff --git a/pkg/model/metric.go b/pkg/model/metric.go index 8452ada..df5a707 100644 --- a/pkg/model/metric.go +++ b/pkg/model/metric.go @@ -2,7 +2,6 @@ package model // Nep17Balance describes universal balance task configuration. type Nep17Balance struct { - Label string `yaml:"label"` Contract string `yaml:"contract"` TotalSupply bool `yaml:"totalSupply"` BalanceOf []string `yaml:"balanceOf"` diff --git a/pkg/monitor/metrics.go b/pkg/monitor/metrics.go index bd1a238..e18b73d 100644 --- a/pkg/monitor/metrics.go +++ b/pkg/monitor/metrics.go @@ -175,7 +175,7 @@ var ( Help: "NEP-17 balance of contract and account", }, []string{ - "label", "symbol", "contract", "account", + "symbol", "contract", "account", }, ) @@ -186,7 +186,7 @@ var ( Help: "NEP-17 total supply of contract", }, []string{ - "label", "symbol", "contract", + "symbol", "contract", }, ) ) diff --git a/pkg/monitor/nep17.go b/pkg/monitor/nep17.go index 09bd66c..d1a3342 100644 --- a/pkg/monitor/nep17.go +++ b/pkg/monitor/nep17.go @@ -20,7 +20,6 @@ type ( // Item describes task for [Nep17tracker]. Item struct { - Label string Symbol string Hash util.Uint160 Accounts []util.Uint160 @@ -45,7 +44,6 @@ func ParseNep17Tasks(balanceFetcher Nep17BalanceFetcher, items []model.Nep17Bala ) task := Item{ - Label: it.Label, Total: it.TotalSupply, Accounts: make([]util.Uint160, 0, len(it.BalanceOf)), } @@ -73,7 +71,6 @@ func ParseNep17Tasks(balanceFetcher Nep17BalanceFetcher, items []model.Nep17Bala zap.L().Error( "parse nep17 account", zap.Error(err), - zap.String("label", it.Label), zap.String("contract", contract.StringLE()), zap.String("balanceOf", balanceOf), ) diff --git a/pkg/monitor/nep17tracker.go b/pkg/monitor/nep17tracker.go index a5ea155..f0b7e41 100644 --- a/pkg/monitor/nep17tracker.go +++ b/pkg/monitor/nep17tracker.go @@ -38,7 +38,6 @@ func (n *Nep17tracker) Process(metric *prometheus.GaugeVec, metricTotal *prometh } metric.WithLabelValues( - item.Label, item.Symbol, item.Hash.StringLE(), address.Uint160ToString(acc), @@ -57,7 +56,6 @@ func (n *Nep17tracker) Process(metric *prometheus.GaugeVec, metricTotal *prometh } metricTotal.WithLabelValues( - item.Label, item.Symbol, item.Hash.StringLE(), ).Set(balance)