Example #1
0
 public SmartContractResultRefundProcessorTests()
 {
     this.loggerFactory = new ExtendedLoggerFactory();
     this.loggerFactory.AddConsoleWithFilters();
     this.network         = new SmartContractsRegTest();
     this.refundProcessor = new SmartContractResultRefundProcessor(this.loggerFactory);
 }
 public ReflectionSmartContractExecutorFactory(ILoggerFactory loggerFactory,
                                               ICallDataSerializer serializer,
                                               ISmartContractResultRefundProcessor refundProcessor,
                                               ISmartContractResultTransferProcessor transferProcessor,
                                               ISmartContractVirtualMachine vm)
 {
     this.loggerFactory     = loggerFactory;
     this.refundProcessor   = refundProcessor;
     this.transferProcessor = transferProcessor;
     this.vm         = vm;
     this.serializer = serializer;
 }
 public SmartContractExecutorTests()
 {
     this.keyEncodingStrategy = BasicKeyEncodingStrategy.Default;
     this.loggerFactory       = new ExtendedLoggerFactory();
     this.loggerFactory.AddConsoleWithFilters();
     this.network                   = new SmartContractsRegTest();
     this.refundProcessor           = new SmartContractResultRefundProcessor(this.loggerFactory);
     this.state                     = new ContractStateRepositoryRoot(new NoDeleteSource <byte[], byte[]>(new MemoryDictionarySource()));
     this.transferProcessor         = new SmartContractResultTransferProcessor(this.loggerFactory, this.network);
     this.validator                 = new SmartContractValidator(new ISmartContractValidator[] { });
     this.internalTxExecutorFactory = new InternalTransactionExecutorFactory(this.keyEncodingStrategy, loggerFactory, this.network);
     this.vm = new ReflectionVirtualMachine(this.internalTxExecutorFactory, loggerFactory);
 }
 public ReflectionSmartContractExecutorFactory(ILoggerFactory loggerFactory,
                                               ICallDataSerializer serializer,
                                               ISmartContractResultRefundProcessor refundProcessor,
                                               ISmartContractResultTransferProcessor transferProcessor,
                                               Network network,
                                               IStateFactory stateFactory)
 {
     this.loggerFactory     = loggerFactory;
     this.refundProcessor   = refundProcessor;
     this.transferProcessor = transferProcessor;
     this.serializer        = serializer;
     this.network           = network;
     this.stateFactory      = stateFactory;
 }
Example #5
0
 public Executor(ILoggerFactory loggerFactory,
                 ICallDataSerializer serializer,
                 IContractStateRepository stateSnapshot,
                 ISmartContractResultRefundProcessor refundProcessor,
                 ISmartContractResultTransferProcessor transferProcessor,
                 ISmartContractVirtualMachine vm)
 {
     this.logger            = loggerFactory.CreateLogger(this.GetType());
     this.stateSnapshot     = stateSnapshot;
     this.refundProcessor   = refundProcessor;
     this.transferProcessor = transferProcessor;
     this.vm         = vm;
     this.serializer = serializer;
 }
Example #6
0
 public Executor(ILoggerFactory loggerFactory,
                 ICallDataSerializer serializer,
                 IContractStateRoot stateRoot,
                 ISmartContractResultRefundProcessor refundProcessor,
                 ISmartContractResultTransferProcessor transferProcessor,
                 Network network,
                 IStateFactory stateFactory)
 {
     this.logger            = loggerFactory.CreateLogger(this.GetType());
     this.stateRoot         = stateRoot;
     this.refundProcessor   = refundProcessor;
     this.transferProcessor = transferProcessor;
     this.serializer        = serializer;
     this.network           = network;
     this.stateFactory      = stateFactory;
 }
 public CallSmartContract(IKeyEncodingStrategy keyEncodingStrategy,
                          ILoggerFactory loggerFactory,
                          Network network,
                          IContractStateRepository stateSnapshot,
                          ISmartContractResultRefundProcessor refundProcessor,
                          ISmartContractResultTransferProcessor transferProcessor,
                          ISmartContractVirtualMachine vm)
 {
     this.logger              = loggerFactory.CreateLogger(this.GetType());
     this.loggerFactory       = loggerFactory;
     this.stateSnapshot       = stateSnapshot;
     this.network             = network;
     this.keyEncodingStrategy = keyEncodingStrategy;
     this.refundProcessor     = refundProcessor;
     this.transferProcessor   = transferProcessor;
     this.vm = vm;
 }
Example #8
0
 public ReflectionSmartContractExecutorFactory(
     IKeyEncodingStrategy keyEncodingStrategy,
     ILoggerFactory loggerFactory,
     Network network,
     ISmartContractResultRefundProcessor refundProcessor,
     ISmartContractResultTransferProcessor transferProcessor,
     SmartContractValidator validator,
     ISmartContractVirtualMachine vm)
 {
     this.keyEncodingStrategy = keyEncodingStrategy;
     this.loggerFactory       = loggerFactory;
     this.network             = network;
     this.refundProcessor     = refundProcessor;
     this.transferProcessor   = transferProcessor;
     this.validator           = validator;
     this.vm = vm;
 }