Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: add evm_nfts_sapphire #550

Merged
merged 1 commit into from Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions cmd/analyzer/analyzer.go
Expand Up @@ -369,6 +369,19 @@ func NewService(cfg *config.AnalysisConfig) (*Service, error) { //nolint:gocyclo
return evmnfts.NewAnalyzer(common.RuntimeEmerald, cfg.Analyzers.EmeraldEvmNfts.ItemBasedAnalyzerConfig, sourceClient, ipfsClient, dbClient, logger)
})
}
if cfg.Analyzers.SapphireEvmNfts != nil {
analyzers, err = addAnalyzer(analyzers, err, func() (A, error) {
sourceClient, err1 := sources.Runtime(ctx, common.RuntimeSapphire)
if err1 != nil {
return nil, err1
}
ipfsClient, err1 := sources.IPFS(ctx)
if err1 != nil {
return nil, err1
}
return evmnfts.NewAnalyzer(common.RuntimeSapphire, cfg.Analyzers.SapphireEvmNfts.ItemBasedAnalyzerConfig, sourceClient, ipfsClient, dbClient, logger)
})
}
if cfg.Analyzers.EmeraldEvmTokenBalances != nil {
runtimeMetadata := cfg.Source.SDKParaTime(common.RuntimeEmerald)
analyzers, err = addAnalyzer(analyzers, err, func() (A, error) {
Expand Down
1 change: 1 addition & 0 deletions config/config.go
Expand Up @@ -131,6 +131,7 @@ type AnalyzersList struct {
EmeraldEvmTokens *EvmTokensAnalyzerConfig `koanf:"evm_tokens_emerald"`
SapphireEvmTokens *EvmTokensAnalyzerConfig `koanf:"evm_tokens_sapphire"`
EmeraldEvmNfts *EvmTokensAnalyzerConfig `koanf:"evm_nfts_emerald"`
SapphireEvmNfts *EvmTokensAnalyzerConfig `koanf:"evm_nfts_sapphire"`
EmeraldEvmTokenBalances *EvmTokensAnalyzerConfig `koanf:"evm_token_balances_emerald"`
SapphireEvmTokenBalances *EvmTokensAnalyzerConfig `koanf:"evm_token_balances_sapphire"`
EmeraldContractCode *EvmContractCodeAnalyzerConfig `koanf:"evm_contract_code_emerald"`
Expand Down