public EthereumProvider( ILogger<EthereumProvider> logger, WalletOperationService walletOperationService, EventHistoryService eventHistoryService, RandomEntropyService randomEntropyService, VersionControl versionControl, IConfiguration configuration ) : base( ETH, logger, walletOperationService, eventHistoryService, randomEntropyService, versionControl, configuration) { _walletOperationService = walletOperationService; _eventHistoryService = eventHistoryService; _versionControl = versionControl; Web3Url = configuration["ETH:Web3Url"] ?? throw new ArgumentException("ETH:Web3Url"); _web3 = new Web3(Web3Url); _withdrawalGasPriceGwei = decimal.Parse( configuration["ETH:WithdrawalGasPriceGwei"] ?? throw new ArgumentException("ETH:WithdrawalGasPriceGwei")); if (GetType() == typeof(EthereumProvider)) { // Do not implicitly call in (mocked) subclasses ProviderLookup[ThisCoinSymbol] = this; } }
/// <param name="altCoinKeyNumber">https://github.com/satoshilabs/slips/blob/master/slip-0044.md</param> public BitcoinForkProvider( string thisCoinSymbol, int altCoinKeyNumber, Network network, ILogger logger, WalletOperationService walletOperationService, EventHistoryService eventHistoryService, RandomEntropyService randomEntropyService, VersionControl versionControl, IConfiguration configuration) : base( thisCoinSymbol, logger, walletOperationService, eventHistoryService, randomEntropyService, versionControl, configuration) { _walletOperationService = walletOperationService; AltCoinKeyNumber = altCoinKeyNumber; net = network; _withdrawalFee = decimal.Parse( configuration[$"{thisCoinSymbol}:WithdrawalFee"] ?? throw new ArgumentException($"{thisCoinSymbol}:WithdrawalFee")); ProviderLookup[ThisCoinSymbol] = this; }
public LitecoinProvider( ILogger <LitecoinProvider> logger, WalletOperationService walletOperationService, EventHistoryService eventHistoryService, RandomEntropyService randomEntropyService, VersionControl versionControl, IConfiguration configuration) : base( LTC, 2, NBitcoin.Altcoins.Litecoin.Instance.Testnet, logger, walletOperationService, eventHistoryService, randomEntropyService, versionControl, configuration) { //node = Node.Connect(net); //node.VersionHandshake(); //var chain = node.GetChain(); // TODO: process new blocks since last checkpoint - the Node.Connect doesn't work as it should, use local if (GetType() == typeof(EthereumProvider)) { // Do not implicitly call in (mocked) subclasses ProviderLookup[ThisCoinSymbol] = this; } }
public EthereumTokenProvider( string thisCoinSymbol, string contractAddress, int decimalPlaces, ILogger logger, WalletOperationService walletOperationService, EventHistoryService eventHistoryService, RandomEntropyService randomEntropyService, VersionControl versionControl, IConfiguration configuration) : base( thisCoinSymbol, logger, walletOperationService, eventHistoryService, randomEntropyService, versionControl, configuration) { _contractAddress = contractAddress; _decimalPlaces = decimalPlaces; _walletOperationService = walletOperationService; _eventHistoryService = eventHistoryService; Web3Url = configuration["ETH:Web3Url"] ?? throw new ArgumentException("ETH:Web3Url"); _web3 = new Web3(Web3Url); _withdrawalGasPriceGwei = decimal.Parse( configuration["ETH:WithdrawalGasPriceGwei"] ?? throw new ArgumentException("ETH:WithdrawalGasPriceGwei")); }
public MockedEthereumProvider( ILogger <MockedEthereumProvider> logger, WalletOperationService walletOperationService, EventHistoryService eventHistoryService, RandomEntropyService randomEntropyService, VersionControl versionControl, IConfiguration configuration) : base(logger, walletOperationService, eventHistoryService, randomEntropyService, versionControl, configuration) { ProviderLookup[ThisCoinSymbol] = this; }
protected SimpleProvider( string thisCoinSymbol, ILogger logger, WalletOperationService walletOperationService, EventHistoryService eventHistoryService, RandomEntropyService randomEntropyService, VersionControl versionControl, IConfiguration configuration ) : base(logger) { ThisCoinSymbol = thisCoinSymbol ?? throw new ArgumentNullException(nameof(thisCoinSymbol)); _walletOperationService = walletOperationService ?? throw new ArgumentNullException(nameof(walletOperationService)); _eventHistoryService = eventHistoryService ?? throw new ArgumentNullException(nameof(eventHistoryService)); _randomEntropyService = randomEntropyService ?? throw new ArgumentNullException(nameof(randomEntropyService)); _versionControl = versionControl ?? throw new ArgumentNullException(nameof(versionControl)); }
public XchangeCryptTokenProvider( ILogger <XchangeCryptTokenProvider> logger, WalletOperationService walletOperationService, EventHistoryService eventHistoryService, RandomEntropyService randomEntropyService, VersionControl versionControl, IConfiguration configuration) : base( "XCT", "0x59efc1a03a94b48cc2412065560909481c94b053", 18, logger, walletOperationService, eventHistoryService, randomEntropyService, versionControl, configuration) { if (GetType() == typeof(XchangeCryptTokenProvider)) { // Do not implicitly call in (mocked) subclasses ProviderLookup[ThisCoinSymbol] = this; } }
//private Node node; public BitcoinProvider( ILogger <BitcoinProvider> logger, WalletOperationService walletOperationService, EventHistoryService eventHistoryService, RandomEntropyService randomEntropyService, VersionControl versionControl, IConfiguration configuration) : base( BTC, 0, Network.TestNet, logger, walletOperationService, eventHistoryService, randomEntropyService, versionControl, configuration) { if (GetType() == typeof(BitcoinProvider)) { // Do not implicitly call in (mocked) subclasses ProviderLookup[ThisCoinSymbol] = this; } }