Skip to content

Commit c75ca6c

Browse files
committed
rename to ContractSearch, tidy
1 parent 3cc1953 commit c75ca6c

9 files changed

+43
-54
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// SPDX-FileCopyrightText: 2025 Demerzel Solutions Limited
2+
// SPDX-License-Identifier: LGPL-3.0-only
3+
4+
namespace Nethermind.ContractSearch.Plugin;
5+
6+
public class ContractSearchConfig : IContractSearchConfig
7+
{
8+
public bool Enabled { get; set; }
9+
public string? File { get; set; }
10+
}

src/Nethermind/Nethermind.Search.Plugin/SearchPlugin.cs src/Nethermind/Nethermind.ContractSearch.Plugin/ContractSearchPlugin.cs

+10-19
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,19 @@
1-
2-
// SPDX-FileCopyrightText: 2022 Demerzel Solutions Limited
1+
// SPDX-FileCopyrightText: 2025 Demerzel Solutions Limited
32
// SPDX-License-Identifier: LGPL-3.0-only
4-
using System;
5-
using System.Threading.Tasks;
3+
64
using Nethermind.Api;
75
using Nethermind.Api.Extensions;
8-
using Nethermind.Core;
9-
using Nethermind.JsonRpc.Client;
10-
using Nethermind.JsonRpc;
11-
using Nethermind.Network;
12-
using Nethermind.Consensus;
13-
using Nethermind.KeyStore.Config;
14-
using System.Configuration;
156
using Nethermind.Logging;
16-
using System.IO.Abstractions;
177

18-
namespace Nethermind.Search.Plugin;
19-
public class SearchPlugin : INethermindPlugin
8+
namespace Nethermind.ContractSearch.Plugin;
9+
10+
public class ContractSearchPlugin : INethermindPlugin
2011
{
21-
public string Name => "Search";
22-
public string Description => "";
12+
public string Name => "ContractSearch";
13+
public string Description => "Search smart contracts for magic numbers";
2314
public string Author => "Nethermind";
2415
private INethermindApi _api = null!;
25-
private ISearchConfig _config = null!;
16+
private IContractSearchConfig _config = null!;
2617
private ILogManager _logManager = null!;
2718
private ILogger _logger;
2819
private bool Enabled => _config?.Enabled == true;
@@ -31,8 +22,8 @@ public Task Init(INethermindApi nethermindApi)
3122
{
3223
_api = nethermindApi;
3324
_logManager = _api.LogManager;
34-
_config = _api.Config<ISearchConfig>();
35-
_logger = _logManager.GetClassLogger<SearchPlugin>();
25+
_config = _api.Config<IContractSearchConfig>();
26+
_logger = _logManager.GetClassLogger<ContractSearchPlugin>();
3627
return Task.CompletedTask;
3728
}
3829

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// SPDX-FileCopyrightText: 2025 Demerzel Solutions Limited
2+
// SPDX-License-Identifier: LGPL-3.0-only
3+
4+
using Nethermind.Config;
5+
6+
namespace Nethermind.ContractSearch.Plugin;
7+
8+
public interface IContractSearchConfig : IConfig
9+
{
10+
[ConfigItem(
11+
Description = "Activates or Deactivates Search Plugin",
12+
DefaultValue = "false")]
13+
bool Enabled { get; set; }
14+
15+
[ConfigItem(
16+
Description = "Sets the file to which the search results are dumped",
17+
DefaultValue = "null")]
18+
string? File { get; set; }
19+
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
32
<PropertyGroup>
43
<ImplicitUsings>enable</ImplicitUsings>
54
<Nullable>enable</Nullable>
@@ -10,5 +9,4 @@
109
<ProjectReference Include="..\Nethermind.Api\Nethermind.Api.csproj" />
1110
<ProjectReference Include="..\Nethermind.Config\Nethermind.Config.csproj" />
1211
</ItemGroup>
13-
14-
</Project>
12+
</Project>

src/Nethermind/Nethermind.Runner/Nethermind.Runner.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
<ProjectReference Include="..\Nethermind.Specs\Nethermind.Specs.csproj" />
6363
<ProjectReference Include="..\Nethermind.Synchronization\Nethermind.Synchronization.csproj" />
6464
<ProjectReference Include="..\Nethermind.UPnP.Plugin\Nethermind.UPnP.Plugin.csproj" />
65-
<ProjectReference Include="..\Nethermind.Search.Plugin\Nethermind.Search.Plugin.csproj" />
65+
<ProjectReference Include="..\Nethermind.ContractSearch.Plugin\Nethermind.ContractSearch.Plugin.csproj" />
6666
</ItemGroup>
6767

6868
<ItemGroup>

src/Nethermind/Nethermind.Search.Plugin/ISearchConfig.cs

-18
This file was deleted.

src/Nethermind/Nethermind.Search.Plugin/SearchConfig.cs

-11
This file was deleted.

src/Nethermind/Nethermind.sln

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nethermind.Serialization.Ss
230230
EndProject
231231
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nethermind.Serialization.SszGenerator.Test", "Nethermind.Serialization.SszGenerator.Test\Nethermind.Serialization.SszGenerator.Test.csproj", "{E11DA65F-7F52-40DA-BBF4-E6E90932EB68}"
232232
EndProject
233-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nethermind.Search.Plugin", "Nethermind.Search.Plugin\Nethermind.Search.Plugin.csproj", "{E4451E87-5A91-4108-94B2-24CA837CD8DE}"
233+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nethermind.ContractSearch.Plugin", "Nethermind.ContractSearch.Plugin\Nethermind.ContractSearch.Plugin.csproj", "{E4451E87-5A91-4108-94B2-24CA837CD8DE}"
234234
EndProject
235235
Global
236236
GlobalSection(SolutionConfigurationPlatforms) = preSolution

src/bench_precompiles

0 commit comments

Comments
 (0)