Exemplo 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));
Exemplo 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);
        }
Exemplo 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;
 }
Exemplo n.º 4
0
 public MevModuleFactory(IMevConfig mevConfig, IJsonRpcConfig jsonRpcConfig)
 {
     _mevConfig     = mevConfig;
     _jsonRpcConfig = jsonRpcConfig;
 }
Exemplo n.º 5
0
 public MevRpcModule(IMevConfig mevConfig, IJsonRpcConfig jsonRpcConfig)
 {
     _mevConfig     = mevConfig;
     _jsonRpcConfig = jsonRpcConfig;
 }