Ejemplo n.º 1
0
 public SmartContractsController(IBroadcasterManager broadcasterManager,
                                 IBlockStore blockStore,
                                 ConcurrentChain chain,
                                 IConsensusManager consensus,
                                 IDateTimeProvider dateTimeProvider,
                                 ILoggerFactory loggerFactory,
                                 Network network,
                                 IStateRepositoryRoot stateRoot,
                                 IWalletManager walletManager,
                                 IWalletTransactionHandler walletTransactionHandler,
                                 IAddressGenerator addressGenerator,
                                 ISerializer serializer,
                                 IReceiptRepository receiptRepository,
                                 ICallDataSerializer callDataSerializer,
                                 IMethodParameterStringSerializer methodParameterStringSerializer,
                                 ILocalExecutor localExecutor)
 {
     this.stateRoot = stateRoot;
     this.walletTransactionHandler = walletTransactionHandler;
     this.logger             = loggerFactory.CreateLogger(this.GetType().FullName);
     this.network            = network;
     this.coinType           = (CoinType)network.Consensus.CoinType;
     this.chain              = chain;
     this.blockStore         = blockStore;
     this.walletManager      = walletManager;
     this.broadcasterManager = broadcasterManager;
     this.addressGenerator   = addressGenerator;
     this.serializer         = serializer;
     this.receiptRepository  = receiptRepository;
     this.callDataSerializer = callDataSerializer;
     this.methodParameterStringSerializer = methodParameterStringSerializer;
     this.localExecutor = localExecutor;
 }
Ejemplo n.º 2
0
        public SmartContractTransactionService(
            Network network,
            IWalletManager walletManager,
            IWalletTransactionHandler walletTransactionHandler,
            IMethodParameterStringSerializer methodParameterStringSerializer,
            ICallDataSerializer callDataSerializer,
            IAddressGenerator addressGenerator,
            IStateRepositoryRoot stateRoot,
            IReserveUtxoService reserveUtxoService,
            IBlockStore blockStore,
            ChainIndexer chainIndexer,
            IContractPrimitiveSerializer primitiveSerializer,
            IContractAssemblyCache contractAssemblyCache,
            IReceiptRepository receiptRepository
            )
        {
            this.network                         = network;
            this.walletManager                   = walletManager;
            this.walletTransactionHandler        = walletTransactionHandler;
            this.methodParameterStringSerializer = methodParameterStringSerializer;
            this.callDataSerializer              = callDataSerializer;
            this.addressGenerator                = addressGenerator;
            this.stateRoot                       = stateRoot;
            this.reserveUtxoService              = reserveUtxoService;

            this.blockStore            = blockStore;
            this.chainIndexer          = chainIndexer;
            this.primitiveSerializer   = primitiveSerializer;
            this.contractAssemblyCache = contractAssemblyCache;
            this.receiptRepository     = receiptRepository;
        }
Ejemplo n.º 3
0
        public TestChain()
        {
            var network = new SmartContractsPoARegTest();

            this.network         = network;
            this.builder         = SmartContractNodeBuilder.Create(this);
            this.nodeFactory     = (nodeIndex) => this.builder.CreateSmartContractPoANode(network, nodeIndex).Start();
            this.chain           = new PoAMockChain(2, nodeFactory, SharedWalletMnemonic);
            this.paramSerializer = new MethodParameterStringSerializer(network); // TODO: Inject
        }
Ejemplo n.º 4
0
 public SmartContractTransactionService(
     Network network,
     IWalletManager walletManager,
     IWalletTransactionHandler walletTransactionHandler,
     IMethodParameterStringSerializer methodParameterStringSerializer,
     ICallDataSerializer callDataSerializer,
     IAddressGenerator addressGenerator)
 {
     this.network                         = network;
     this.walletManager                   = walletManager;
     this.walletTransactionHandler        = walletTransactionHandler;
     this.methodParameterStringSerializer = methodParameterStringSerializer;
     this.callDataSerializer              = callDataSerializer;
     this.addressGenerator                = addressGenerator;
 }
 public SmartContractTransactionService(
     Network network,
     IWalletManager walletManager,
     IWalletTransactionHandler walletTransactionHandler,
     IMethodParameterStringSerializer methodParameterStringSerializer,
     ICallDataSerializer callDataSerializer,
     IAddressGenerator addressGenerator,
     IStateRepositoryRoot stateRoot,
     IReserveUtxoService reserveUtxoService
     )
 {
     this.network                         = network;
     this.walletManager                   = walletManager;
     this.walletTransactionHandler        = walletTransactionHandler;
     this.methodParameterStringSerializer = methodParameterStringSerializer;
     this.callDataSerializer              = callDataSerializer;
     this.addressGenerator                = addressGenerator;
     this.stateRoot                       = stateRoot;
     this.reserveUtxoService              = reserveUtxoService;
 }
Ejemplo n.º 6
0
 public SmartContractWalletTests()
 {
     this.methodParameterStringSerializer = new MethodParameterStringSerializer(new SmartContractsRegTest());
 }
Ejemplo n.º 7
0
 public TestChain()
 {
     this.chain           = new PoAMockChain(2, SharedWalletMnemonic);
     this.paramSerializer = new MethodParameterStringSerializer(new SmartContractsPoARegTest()); // TODO: Inject
 }