public GanacheManager(EthereumSettings aEthereumSettings) { EthereumSettings = aEthereumSettings; var account = new Account(EthereumSettings.TestAccountPrivateKey); Web3 = new Web3(account, EthereumSettings.Endpoint); }
public OrdersService(AbiProvider abiProvider, IOptions <EthereumSettings> ethSettings, ApplicationDbContext context) { _abiProvider = abiProvider; _nethereumClient = new Web3(ethSettings.Value.EthereumRpcNodeUrl); _context = context; _ethSettings = ethSettings.Value; }
private void ConfigureServices(ServiceCollection aServiceCollection) { EthereumSettings ethereumSettings = Configuration.GetSection(nameof(EthereumSettings)).Get <EthereumSettings>(); aServiceCollection.AddSingleton(ethereumSettings); //aServiceCollection.AddSingleton<MultiplierSmartContract>(); aServiceCollection.AddSingleton <GanacheManager>(); }
public EthereumService ( ILogger <EthereumService> logger, IOptions <EthereumSettings> options, IRestClient restClient ) { this.logger = logger; ethereumSettings = options.Value; this.restClient = restClient; }
public EthereumBalanceProvider( EthereumSettings settings, IAssetsServiceWithCache assetsServiceClient) { _balanceProvider = new SamuraiBalanceProvider ( settings.SamuraiApiUrl, new BlockchainAsset("ETH", "ETH", "ETH"), assetsServiceClient ); AsyncInitialization = InitializeAsync(); }
public EthereumCommandHandler( [NotNull] ILogFactory logFactory, [NotNull] ISrvEthereumHelper srvEthereumHelper, [NotNull] IAssetsServiceWithCache assetsServiceWithCache, [NotNull] IBcnClientCredentialsRepository bcnClientCredentialsRepository, [NotNull] IEthereumTransactionRequestRepository ethereumTransactionRequestRepository, [NotNull] ITransactionService transactionService, [NotNull] EthereumSettings settings, TimeSpan retryTimeout) { _log = logFactory.CreateLog(this); _srvEthereumHelper = srvEthereumHelper ?? throw new ArgumentNullException(nameof(srvEthereumHelper)); _assetsServiceWithCache = assetsServiceWithCache ?? throw new ArgumentNullException(nameof(assetsServiceWithCache)); _bcnClientCredentialsRepository = bcnClientCredentialsRepository ?? throw new ArgumentNullException(nameof(bcnClientCredentialsRepository)); _ethereumTransactionRequestRepository = ethereumTransactionRequestRepository ?? throw new ArgumentNullException(nameof(ethereumTransactionRequestRepository)); _transactionService = transactionService ?? throw new ArgumentNullException(nameof(transactionService)); _settings = settings ?? throw new ArgumentNullException(nameof(settings)); _retryTimeout = retryTimeout; }
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; }
public CreateTemplateHandler(Web3ContractManager aWeb3ContractManager, EthereumSettings aEthereumSettings) { Web3ContractManager = aWeb3ContractManager; EthereumSettings = aEthereumSettings; }
public MintNftHandler(Web3ContractManager web3ContractManager, EthereumSettings ethereumSettings) { Web3ContractManager = web3ContractManager; EthereumSettings = ethereumSettings; }
public Connector(EthereumSettings settings) { this.settings = settings; web3 = new Web3(new Account(settings.PrivateKey)); }
public MultiplierTests(TestFixture aTestFixture) { GanacheManager = aTestFixture.GanacheManager; MultiplyContractService = aTestFixture.ServiceProvider.GetService <MultiplyContractService>(); EthereumSettings = aTestFixture.ServiceProvider.GetService <EthereumSettings>(); }
public GanacheManager(Web3ContractManager aWeb3ContractManager, EthereumSettings aEthereumSettings, MultiplierSmartContract aMultiplierSmartContract) { Web3ContractManager = aWeb3ContractManager; EthereumSettings = aEthereumSettings; MultiplierSmartContract = aMultiplierSmartContract; }
public ViewTokenDataServerServiceHandler(EthereumSettings ethereumSettings, Web3ContractManager web3ContractManager) { EthereumSettings = ethereumSettings; Web3ContractManager = web3ContractManager; }
public ParametersService(ApplicationDbContext context, IOptions <EthereumSettings> ethSettings) { _context = context; _ethSettings = ethSettings.Value; }
public BalanceHandler(Web3ContractManager aWeb3ContractManager, EthereumSettings aEthereumSettings) { EthereumSettings = aEthereumSettings; Web3ContractManager = aWeb3ContractManager; }