Esempio n. 1
0
 public static IEnumerable <Address> GetTrustedRelayAddresses(this IMevConfig mevConfig) =>
 mevConfig.TrustedRelays
 .Split(",")
 .Where(s => !string.IsNullOrWhiteSpace(s))
 .Select(s => s.Trim())
 .Distinct()
 .Select(s => new Address(s));
Esempio n. 2
0
        public Task Init(INethermindApi?nethermindApi)
        {
            _nethermindApi = nethermindApi ?? throw new ArgumentNullException(nameof(nethermindApi));
            _mevConfig     = _nethermindApi.Config <IMevConfig>();
            _logger        = _nethermindApi.LogManager.GetClassLogger();

            return(Task.CompletedTask);
        }
Esempio n. 3
0
 public MevModuleFactory(
     IMevConfig mevConfig,
     IJsonRpcConfig jsonRpcConfig,
     IBundlePool bundlePool,
     IBlockTree blockTree,
     IStateReader stateReader,
     ITracerFactory tracerFactory,
     ISpecProvider specProvider,
     ISigner?signer,
     ulong chainId)
 {
     _mevConfig     = mevConfig;
     _jsonRpcConfig = jsonRpcConfig;
     _bundlePool    = bundlePool;
     _blockTree     = blockTree;
     _stateReader   = stateReader;
     _tracerFactory = tracerFactory;
     _specProvider  = specProvider;
     _signer        = signer;
     _chainId       = chainId;
 }
Esempio n. 4
0
 public MevModuleFactory(IMevConfig mevConfig, IJsonRpcConfig jsonRpcConfig)
 {
     _mevConfig     = mevConfig;
     _jsonRpcConfig = jsonRpcConfig;
 }
Esempio n. 5
0
 public MevRpcModule(IMevConfig mevConfig, IJsonRpcConfig jsonRpcConfig)
 {
     _mevConfig     = mevConfig;
     _jsonRpcConfig = jsonRpcConfig;
 }