public BlockExecutionResultProcessingServiceTests()
 {
     _blockExecutionResultProcessingService = GetRequiredService <IBlockExecutionResultProcessingService>();
     _blockchainService     = GetRequiredService <IBlockchainService>();
     _kernelTestHelper      = GetRequiredService <KernelTestHelper>();
     _chainManager          = GetRequiredService <IChainManager>();
     _chainBlockLinkService = GetRequiredService <IChainBlockLinkService>();
 }
Ejemplo n.º 2
0
        public BlockExecutionResultProcessingService(IBlockchainService blockchainService,
                                                     IChainBlockLinkService chainBlockLinkService)
        {
            _blockchainService     = blockchainService;
            _chainBlockLinkService = chainBlockLinkService;

            LocalEventBus = NullLocalEventBus.Instance;
            Logger        = NullLogger <BlockExecutionResultProcessingService> .Instance;
        }
Ejemplo n.º 3
0
        public TransactionSizeFeeUnitProvider(ITokenContractReaderFactory tokenStTokenContractReaderFactory,
                                              IBlockchainService blockchainService,
                                              IChainBlockLinkService chainBlockLinkService)
        {
            _tokenStTokenContractReaderFactory = tokenStTokenContractReaderFactory;
            _blockchainService     = blockchainService;
            _chainBlockLinkService = chainBlockLinkService;

            Logger = NullLogger <TransactionSizeFeeUnitProvider> .Instance;
        }
Ejemplo n.º 4
0
 public WriteCalculateCostStrategy(ITokenContractReaderFactory tokenStTokenContractReaderFactory,
                                   IBlockchainService blockchainService,
                                   IChainBlockLinkService chainBlockLinkService,
                                   ICalculateFunctionCacheProvider functionCacheProvider)
 {
     CalculateAlgorithmService =
         new CalculateAlgorithmService(tokenStTokenContractReaderFactory, blockchainService,
                                       chainBlockLinkService, functionCacheProvider);
     CalculateAlgorithmService.CalculateAlgorithmContext.CalculateFeeTypeEnum = (int)FeeTypeEnum.Write;
 }
 public SymbolListToPayTxFeeService(ISymbolListToPayTxFeeCacheProvider cacheProvider,
                                    IChainBlockLinkService chainBlockLinkService,
                                    ITokenContractReaderFactory tokenStTokenContractReaderFactory,
                                    IBlockchainService blockchainService)
 {
     _cacheProvider                     = cacheProvider;
     _chainBlockLinkService             = chainBlockLinkService;
     _tokenStTokenContractReaderFactory = tokenStTokenContractReaderFactory;
     _blockchainService                 = blockchainService;
     Logger = new NullLogger <SymbolListToPayTxFeeService>();
 }
Ejemplo n.º 6
0
 public BlockTransactionLimitProvider(ISmartContractAddressService smartContractAddressService,
                                      ITransactionReadOnlyExecutionService transactionReadOnlyExecutionService,
                                      IBlockchainService blockchainService,
                                      IChainBlockLinkService chainBlockLinkService)
 {
     _transactionReadOnlyExecutionService = transactionReadOnlyExecutionService;
     _blockchainService           = blockchainService;
     _smartContractAddressService = smartContractAddressService;
     _chainBlockLinkService       = chainBlockLinkService;
     Logger = NullLogger <BlockTransactionLimitProvider> .Instance;
 }
Ejemplo n.º 7
0
 public CalculateAlgorithmService(ITokenContractReaderFactory tokenStTokenContractReaderFactory,
                                  IBlockchainService blockchainService,
                                  IChainBlockLinkService chainBlockLinkService,
                                  ICalculateFunctionCacheProvider cacheCacheProvider)
 {
     _tokenStTokenContractReaderFactory = tokenStTokenContractReaderFactory;
     _blockchainService     = blockchainService;
     _chainBlockLinkService = chainBlockLinkService;
     _cacheCacheProvider    = cacheCacheProvider;
     Logger = new NullLogger <CalculateAlgorithmService>();
 }
Ejemplo n.º 8
0
        public BlockAttachService(IBlockchainService blockchainService,
                                  IBlockchainExecutingService blockchainExecutingService,
                                  IChainBlockLinkService chainBlockLinkService,
                                  IBlockExecutionResultProcessingService blockExecutionResultProcessingService)
        {
            _blockchainService                     = blockchainService;
            _blockchainExecutingService            = blockchainExecutingService;
            _chainBlockLinkService                 = chainBlockLinkService;
            _blockExecutionResultProcessingService = blockExecutionResultProcessingService;

            Logger = NullLogger <BlockAttachService> .Instance;
        }
Ejemplo n.º 9
0
 public SmartContractExecutiveProvider(IDeployedContractAddressProvider deployedContractAddressProvider,
                                       IDefaultContractZeroCodeProvider defaultContractZeroCodeProvider,
                                       ISmartContractRunnerContainer smartContractRunnerContainer,
                                       IHostSmartContractBridgeContextService hostSmartContractBridgeContextService,
                                       IChainBlockLinkService chainBlockLinkService, IBlockchainService blockchainService)
 {
     _deployedContractAddressProvider       = deployedContractAddressProvider;
     _defaultContractZeroCodeProvider       = defaultContractZeroCodeProvider;
     _smartContractRunnerContainer          = smartContractRunnerContainer;
     _hostSmartContractBridgeContextService = hostSmartContractBridgeContextService;
     _chainBlockLinkService = chainBlockLinkService;
     _blockchainService     = blockchainService;
 }
Ejemplo n.º 10
0
 public NewIrreversibleBlockFoundEventHandler(ITaskQueueManager taskQueueManager,
                                              IBlockchainStateService blockchainStateService,
                                              IBlockchainService blockchainService,
                                              ITransactionBlockIndexService transactionBlockIndexService,
                                              IForkCacheService forkCacheService,
                                              IChainBlockLinkService chainBlockLinkService)
 {
     _taskQueueManager             = taskQueueManager;
     _blockchainStateService       = blockchainStateService;
     _blockchainService            = blockchainService;
     _transactionBlockIndexService = transactionBlockIndexService;
     _forkCacheService             = forkCacheService;
     _chainBlockLinkService        = chainBlockLinkService;
     Logger = NullLogger <NewIrreversibleBlockFoundEventHandler> .Instance;
 }
Ejemplo n.º 11
0
 public NewIrreversibleBlockFoundEventHandler(ITaskQueueManager taskQueueManager,
                                              IBlockchainStateService blockchainStateService,
                                              IBlockchainService blockchainService,
                                              ITransactionBlockIndexService transactionBlockIndexService,
                                              IChainBlockLinkService chainBlockLinkService,
                                              ISmartContractExecutiveService smartContractExecutiveService)
 {
     _taskQueueManager              = taskQueueManager;
     _blockchainStateService        = blockchainStateService;
     _blockchainService             = blockchainService;
     _transactionBlockIndexService  = transactionBlockIndexService;
     _chainBlockLinkService         = chainBlockLinkService;
     _smartContractExecutiveService = smartContractExecutiveService;
     Logger        = NullLogger <NewIrreversibleBlockFoundEventHandler> .Instance;
     LocalEventBus = NullLocalEventBus.Instance;
 }
Ejemplo n.º 12
0
 public TestingSmartContractExecutiveService(IDeployedContractAddressProvider deployedContractAddressProvider,
                                             IDefaultContractZeroCodeProvider defaultContractZeroCodeProvider,
                                             ISmartContractRunnerContainer smartContractRunnerContainer,
                                             IHostSmartContractBridgeContextService hostSmartContractBridgeContextService,
                                             IChainBlockLinkService chainBlockLinkService, IBlockchainService blockchainService,
                                             ISmartContractCodeHistoryService smartContractCodeHistoryService,
                                             ISmartContractRegistrationCacheProvider smartContractRegistrationCacheProvider,
                                             ISmartContractExecutiveProvider smartContractExecutiveProvider) : base(deployedContractAddressProvider,
                                                                                                                    defaultContractZeroCodeProvider,
                                                                                                                    smartContractRunnerContainer,
                                                                                                                    hostSmartContractBridgeContextService,
                                                                                                                    chainBlockLinkService,
                                                                                                                    blockchainService,
                                                                                                                    smartContractCodeHistoryService,
                                                                                                                    smartContractRegistrationCacheProvider,
                                                                                                                    smartContractExecutiveProvider)
 {
 }
        public SmartContractExecutiveService(IDeployedContractAddressProvider deployedContractAddressProvider,
                                             IDefaultContractZeroCodeProvider defaultContractZeroCodeProvider,
                                             ISmartContractRunnerContainer smartContractRunnerContainer,
                                             IHostSmartContractBridgeContextService hostSmartContractBridgeContextService,
                                             IChainBlockLinkService chainBlockLinkService, IBlockchainService blockchainService,
                                             ISmartContractCodeHistoryService smartContractCodeHistoryService,
                                             ISmartContractRegistrationCacheProvider smartContractRegistrationCacheProvider,
                                             ISmartContractExecutiveProvider smartContractExecutiveProvider)
        {
            _deployedContractAddressProvider       = deployedContractAddressProvider;
            _defaultContractZeroCodeProvider       = defaultContractZeroCodeProvider;
            _smartContractRunnerContainer          = smartContractRunnerContainer;
            _hostSmartContractBridgeContextService = hostSmartContractBridgeContextService;
            _chainBlockLinkService                  = chainBlockLinkService;
            _blockchainService                      = blockchainService;
            _smartContractCodeHistoryService        = smartContractCodeHistoryService;
            _smartContractRegistrationCacheProvider = smartContractRegistrationCacheProvider;
            _smartContractExecutiveProvider         = smartContractExecutiveProvider;

            Logger = new NullLogger <SmartContractExecutiveService>();
        }
Ejemplo n.º 14
0
 public ForkCacheService(IServiceContainer <IForkCacheHandler> forkCacheHandlers,
                         IChainBlockLinkService chainBlockLinkService)
 {
     _chainBlockLinkService = chainBlockLinkService;
     _forkCacheHandlers     = forkCacheHandlers.ToLookup(p => p.GetType()).Select(coll => coll.First()).ToList();
 }
Ejemplo n.º 15
0
        public DeployedContractAddressProvider(IChainBlockLinkService chainBlockLinkService)
        {
            _chainBlockLinkService = chainBlockLinkService;

            Logger = new NullLogger <DeployedContractAddressProvider>();
        }