Пример #1
0
 public OrdersService(AbiProvider abiProvider, IOptions <EthereumSettings> ethSettings, ApplicationDbContext context)
 {
     _abiProvider     = abiProvider;
     _nethereumClient = new Web3(ethSettings.Value.EthereumRpcNodeUrl);
     _context         = context;
     _ethSettings     = ethSettings.Value;
 }
Пример #2
0
 public EthereumService(ApplicationDbContext context,
                        IOptions <EthereumSettings> ethSettings,
                        DbContextOptions <ApplicationDbContext> contextOptions,
                        ParametersService parametersService,
                        EtherscanService etherscanService,
                        ILogger <EthereumService> logger,
                        AbiProvider abiProvider, IOHCLService ohclService, IMemoryCache cache, IHubContext <OrderSignalR> ordersHubContext)
 {
     _context           = context;
     _contextOptions    = contextOptions;
     _parametersService = parametersService;
     _etherscanService  = etherscanService;
     _logger            = logger;
     _abiProvider       = abiProvider;
     _ohclService       = ohclService;
     _cache             = cache;
     _ordersHubContext  = ordersHubContext;
     _nethereumClient   = new Web3(ethSettings.Value.EthereumRpcNodeUrl);
     _ethSettings       = ethSettings.Value;
 }