public AccountServiceWeb3(IStateManager stateManager, ISnapshotIndexRepository snapshotIndexer, IContractRegisterer contractRegisterer, ISystemContractReader systemContractReader, ITransactionPool transactionPool) { _stateManager = stateManager; _snapshotIndexer = snapshotIndexer; _contractRegisterer = contractRegisterer; _systemContractReader = systemContractReader; _transactionPool = transactionPool; }
public BlockchainService( ITransactionManager transactionManager, IBlockManager blockManager, ITransactionPool transactionPool, IStateManager stateManager, IBlockSynchronizer blockSynchronizer, ISystemContractReader systemContractReader ) { _transactionPool = transactionPool; _transactionManager = transactionManager; _blockManager = blockManager; _stateManager = stateManager; _blockSynchronizer = blockSynchronizer; _systemContractReader = systemContractReader; }
public void Setup() { _container?.Dispose(); TestUtils.DeleteTestChainData(); var containerBuilder = new SimpleInjectorContainerBuilder(new ConfigManager( Path.Join(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "config2.json"), new RunOptions() )); containerBuilder.RegisterModule <BlockchainModule>(); containerBuilder.RegisterModule <ConfigModule>(); containerBuilder.RegisterModule <StorageModule>(); _container = containerBuilder.Build(); _configManager = _container.Resolve <IConfigManager>(); _stateManager = _container.Resolve <IStateManager>(); _contractRegisterer = _container.Resolve <IContractRegisterer>(); _privateWallet = _container.Resolve <IPrivateWallet>(); _snapshotIndexer = _container.Resolve <ISnapshotIndexRepository>(); _systemContractReader = _container.Resolve <ISystemContractReader>(); _transactionManager = _container.Resolve <ITransactionManager>(); _transactionBuilder = _container.Resolve <ITransactionBuilder>(); _transactionSigner = _container.Resolve <ITransactionSigner>(); _transactionPool = _container.Resolve <ITransactionPool>(); _blockManager = _container.Resolve <IBlockManager>(); // set chainId from config if (TransactionUtils.ChainId(false) == 0) { var chainId = _configManager.GetConfig <NetworkConfig>("network")?.ChainId; var newChainId = _configManager.GetConfig <NetworkConfig>("network")?.ChainId; TransactionUtils.SetChainId((int)chainId !, (int)newChainId !); HardforkHeights.SetHardforkHeights(_configManager.GetConfig <HardforkConfig>("hardfork") ?? throw new InvalidOperationException()); } ServiceBinder.BindService <GenericParameterAttributes>(); _apiService = new AccountServiceWeb3(_stateManager, _snapshotIndexer, _contractRegisterer, _systemContractReader, _transactionPool); _transactionApiService = new TransactionServiceWeb3(_stateManager, _transactionManager, _transactionBuilder, _transactionSigner, _transactionPool, _contractRegisterer, _privateWallet); _blockManager.TryBuildGenesisBlock(); }
public FrontEndService( IStateManager stateManager, ITransactionPool transactionPool, ITransactionSigner transactionSigner, ISystemContractReader systemContractReader, ILocalTransactionRepository localTransactionRepository, IValidatorStatusManager validatorStatusManager, IPrivateWallet privateWallet, ITransactionManager transactionManager ) { _stateManager = stateManager; _transactionPool = transactionPool; _transactionSigner = transactionSigner; _systemContractReader = systemContractReader; _localTransactionRepository = localTransactionRepository; _validatorStatusManager = validatorStatusManager; _privateWallet = privateWallet; _transactionManager = transactionManager; }
public ConsoleManager( ITransactionBuilder transactionBuilder, ITransactionPool transactionPool, ITransactionManager transactionManager, ITransactionSigner transactionSigner, IBlockManager blockManager, IStateManager stateManager, ISystemContractReader systemContractReader, IValidatorStatusManager validatorStatusManager ) { _blockManager = blockManager; _transactionBuilder = transactionBuilder; _transactionPool = transactionPool; _transactionManager = transactionManager; _transactionSigner = transactionSigner; _stateManager = stateManager; _systemContractReader = systemContractReader; _validatorStatusManager = validatorStatusManager; }
public RpcManager( ITransactionManager transactionManager, IBlockManager blockManager, IConfigManager configManager, IStateManager stateManager, ISnapshotIndexRepository snapshotIndexer, ITransactionPool transactionPool, IVirtualMachine virtualMachine, IContractRegisterer contractRegisterer, IValidatorStatusManager validatorStatusManager, ISystemContractReader systemContractReader, IBlockSynchronizer blockSynchronizer, ILocalTransactionRepository localTransactionRepository, ITransactionSigner transactionSigner, IPrivateWallet privateWallet, ITransactionBuilder transactionBuilder, IBlockchainEventFilter blockchainEventFilter, INetworkManager networkManager, INodeRetrieval nodeRetrieval, IConsensusManager consensusManager ) { _transactionManager = transactionManager; _blockManager = blockManager; _configManager = configManager; _stateManager = stateManager; _snapshotIndexer = snapshotIndexer; _transactionPool = transactionPool; _contractRegisterer = contractRegisterer; _validatorStatusManager = validatorStatusManager; _systemContractReader = systemContractReader; _blockSynchronizer = blockSynchronizer; _localTransactionRepository = localTransactionRepository; _transactionSigner = transactionSigner; _transactionBuilder = transactionBuilder; _privateWallet = privateWallet; _blockchainEventFilter = blockchainEventFilter; _networkManager = networkManager; _nodeRetrieval = nodeRetrieval; _consensusManager = consensusManager; }
public BlockchainServiceWeb3( ITransactionManager transactionManager, IBlockManager blockManager, ITransactionPool transactionPool, IStateManager stateManager, ISnapshotIndexRepository snapshotIndexer, INetworkManager networkManager, INodeRetrieval nodeRetrieval, ISystemContractReader systemContractReader, IConsensusManager consensusManager) { _transactionPool = transactionPool; _transactionManager = transactionManager; _blockManager = blockManager; _stateManager = stateManager; _snapshotIndexer = snapshotIndexer; _networkManager = networkManager; _nodeRetrieval = nodeRetrieval; _systemContractReader = systemContractReader; _consensusManager = consensusManager; }
public ValidatorStatusManager( ITransactionPool transactionPool, ITransactionSigner transactionSigner, ITransactionBuilder transactionBuilder, IPrivateWallet privateWallet, IStateManager stateManager, IValidatorAttendanceRepository validatorAttendanceRepository, ISystemContractReader systemContractReader ) { _transactionPool = transactionPool; _transactionSigner = transactionSigner; _transactionBuilder = transactionBuilder; _privateWallet = privateWallet; _stateManager = stateManager; _validatorAttendanceRepository = validatorAttendanceRepository; _systemContractReader = systemContractReader; _withdrawTriggered = false; _started = false; _thread = null; _stopRequested = false; }
public ConsoleCommands( ITransactionBuilder transactionBuilder, ITransactionPool transactionPool, ITransactionManager transactionManager, ITransactionSigner transactionSigner, IBlockManager blockManager, IStateManager stateManager, ISystemContractReader systemContractReader, IValidatorStatusManager validatorStatusManager, EcdsaKeyPair keyPair ) { _blockManager = blockManager; _transactionBuilder = transactionBuilder; _transactionPool = transactionPool; _transactionManager = transactionManager; _transactionSigner = transactionSigner; _stateManager = stateManager; _systemContractReader = systemContractReader; _validatorStatusManager = validatorStatusManager; _keyPair = keyPair; }
public KeyGenManager( IBlockManager blockManager, ITransactionManager transactionManager, ITransactionBuilder transactionBuilder, IPrivateWallet privateWallet, ITransactionPool transactionPool, ITransactionSigner transactionSigner, IKeyGenRepository keyGenRepository, IBlockSynchronizer blockSynchronizer, ISystemContractReader systemContractReader ) { _blockManager = blockManager; _transactionManager = transactionManager; _transactionBuilder = transactionBuilder; _privateWallet = privateWallet; _transactionPool = transactionPool; _transactionSigner = transactionSigner; _keyGenRepository = keyGenRepository; _blockSynchronizer = blockSynchronizer; _systemContractReader = systemContractReader; _blockManager.OnSystemContractInvoked += BlockManagerOnSystemContractInvoked; }