コード例 #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;
 }
コード例 #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;
        }
コード例 #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
        }
コード例 #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;
 }
コード例 #5
0
 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;
 }
コード例 #6
0
 public SmartContractWalletTests()
 {
     this.methodParameterStringSerializer = new MethodParameterStringSerializer(new SmartContractsRegTest());
 }
コード例 #7
0
 public TestChain()
 {
     this.chain           = new PoAMockChain(2, SharedWalletMnemonic);
     this.paramSerializer = new MethodParameterStringSerializer(new SmartContractsPoARegTest()); // TODO: Inject
 }