public ReflectionSmartContractExecutorFactory(ILoggerFactory loggerFactory,
                                               IContractPrimitiveSerializer contractPrimitiveSerializer,
                                               ICallDataSerializer serializer,
                                               ISmartContractResultRefundProcessor refundProcessor,
                                               ISmartContractResultTransferProcessor transferProcessor,
                                               ISmartContractVirtualMachine vm)
 {
     this.loggerFactory     = loggerFactory;
     this.refundProcessor   = refundProcessor;
     this.transferProcessor = transferProcessor;
     this.vm = vm;
     this.contractPrimitiveSerializer = contractPrimitiveSerializer;
     this.serializer = serializer;
 }
 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 #3
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 #4
0
 public LocalExecutor(ILoggerFactory loggerFactory,
                      ICallDataSerializer serializer,
                      IStateRepositoryRoot stateRoot,
                      IStateFactory stateFactory,
                      IStateProcessor stateProcessor,
                      IContractPrimitiveSerializer contractPrimitiveSerializer)
 {
     this.logger         = loggerFactory.CreateLogger(this.GetType());
     this.stateRoot      = stateRoot;
     this.serializer     = serializer;
     this.stateFactory   = stateFactory;
     this.stateProcessor = stateProcessor;
     this.contractPrimitiveSerializer = contractPrimitiveSerializer;
 }
Example #5
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 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, this.loggerFactory, this.network);
     this.validator                 = new SmartContractValidator(new List <ISmartContractValidator>());
     this.vm         = new ReflectionVirtualMachine(this.validator, this.internalTxExecutorFactory, this.loggerFactory, this.network);
     this.serializer = CallDataSerializer.Default;
 }
Example #7
0
 public SmartContractPoACoinviewRule(
     IStateRepositoryRoot stateRepositoryRoot,
     IContractExecutorFactory executorFactory,
     ICallDataSerializer callDataSerializer,
     ISenderRetriever senderRetriever,
     IReceiptRepository receiptRepository,
     ICoinView coinView)
 {
     this.stateRepositoryRoot = stateRepositoryRoot;
     this.executorFactory     = executorFactory;
     this.callDataSerializer  = callDataSerializer;
     this.senderRetriever     = senderRetriever;
     this.receiptRepository   = receiptRepository;
     this.coinView            = coinView;
 }
Example #8
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 ReflectionExecutorFactory(ILoggerFactory loggerFactory,
                                  ICallDataSerializer serializer,
                                  IContractRefundProcessor refundProcessor,
                                  IContractTransferProcessor transferProcessor,
                                  IStateFactory stateFactory,
                                  IStateProcessor stateProcessor,
                                  IContractPrimitiveSerializer contractPrimitiveSerializer)
 {
     this.loggerFactory               = loggerFactory;
     this.refundProcessor             = refundProcessor;
     this.transferProcessor           = transferProcessor;
     this.serializer                  = serializer;
     this.stateFactory                = stateFactory;
     this.stateProcessor              = stateProcessor;
     this.contractPrimitiveSerializer = contractPrimitiveSerializer;
 }
 protected SmartContractCoinviewRule(Network network,
                                     IStateRepositoryRoot stateRepositoryRoot,
                                     IContractExecutorFactory executorFactory,
                                     ICallDataSerializer callDataSerializer,
                                     ISenderRetriever senderRetriever,
                                     IReceiptRepository receiptRepository,
                                     ICoinView coinView)
 {
     this.network             = network;
     this.stateRepositoryRoot = stateRepositoryRoot;
     this.executorFactory     = executorFactory;
     this.callDataSerializer  = callDataSerializer;
     this.senderRetriever     = senderRetriever;
     this.receiptRepository   = receiptRepository;
     this.coinView            = coinView;
 }
 public SignedContractPoARuleRegistration(Network network,
                                          IStateRepositoryRoot stateRepositoryRoot,
                                          IContractExecutorFactory executorFactory,
                                          ICallDataSerializer callDataSerializer,
                                          ISenderRetriever senderRetriever,
                                          IReceiptRepository receiptRepository,
                                          ICoinView coinView)
 {
     this.network             = network;
     this.stateRepositoryRoot = stateRepositoryRoot;
     this.executorFactory     = executorFactory;
     this.callDataSerializer  = callDataSerializer;
     this.senderRetriever     = senderRetriever;
     this.receiptRepository   = receiptRepository;
     this.coinView            = coinView;
 }
 public SmartContractCoinViewRuleLogic(IStateRepositoryRoot stateRepositoryRoot,
                                       IContractExecutorFactory executorFactory,
                                       ICallDataSerializer callDataSerializer,
                                       ISenderRetriever senderRetriever,
                                       IReceiptRepository receiptRepository,
                                       ICoinView coinView)
 {
     this.stateRepositoryRoot = stateRepositoryRoot;
     this.executorFactory     = executorFactory;
     this.callDataSerializer  = callDataSerializer;
     this.senderRetriever     = senderRetriever;
     this.receiptRepository   = receiptRepository;
     this.coinView            = coinView;
     this.refundCounter       = 1;
     this.blockTxsProcessed   = new List <Transaction>();
     this.receipts            = new List <Receipt>();
 }
 public ContractExecutor(
     ICallDataSerializer serializer,
     IStateRepository stateRoot,
     IContractRefundProcessor refundProcessor,
     IContractTransferProcessor transferProcessor,
     IStateFactory stateFactory,
     IStateProcessor stateProcessor,
     IContractPrimitiveSerializer contractPrimitiveSerializer)
 {
     this.stateRoot                   = stateRoot;
     this.refundProcessor             = refundProcessor;
     this.transferProcessor           = transferProcessor;
     this.serializer                  = serializer;
     this.stateFactory                = stateFactory;
     this.stateProcessor              = stateProcessor;
     this.contractPrimitiveSerializer = contractPrimitiveSerializer;
 }
        public SmartContractMempoolValidator(ITxMempool memPool, MempoolSchedulerLock mempoolLock,
                                             IDateTimeProvider dateTimeProvider, MempoolSettings mempoolSettings, ConcurrentChain chain,
                                             ICoinView coinView, ILoggerFactory loggerFactory, NodeSettings nodeSettings,
                                             IConsensusRuleEngine consensusRules, ICallDataSerializer callDataSerializer, Network network,
                                             IStateRepositoryRoot stateRepositoryRoot)
            : base(memPool, mempoolLock, dateTimeProvider, mempoolSettings, chain, coinView, loggerFactory, nodeSettings, consensusRules)
        {
            // Dirty hack, but due to AllowedScriptTypeRule we don't need to check for standard scripts on any network, even live.
            // TODO: Remove ASAP. Ensure RequireStandard isn't used on SC mainnets, or the StandardScripts check is modular.
            mempoolSettings.RequireStandard = false;

            this.callDataSerializer  = callDataSerializer;
            this.stateRepositoryRoot = stateRepositoryRoot;

            var p2pkhRule = new P2PKHNotContractRule(stateRepositoryRoot);

            var scriptTypeRule = new AllowedScriptTypeRule(network);

            scriptTypeRule.Initialize();

            this.preTxRules = new List <ISmartContractMempoolRule>
            {
                new MempoolOpSpendRule(),
                new TxOutSmartContractExecRule(),
                scriptTypeRule,
                p2pkhRule
            };

            // TODO: Tidy this up. Rules should be injected? Shouldn't be generating here based on Network.
            var txChecks = new List <IContractTransactionValidationLogic>
            {
                new SmartContractFormatLogic()
            };

            if (network is ISignedCodePubKeyHolder holder)
            {
                txChecks.Add(new ContractSignedCodeLogic(new ContractSigner(), holder.SigningContractPubKey));
            }


            this.feeTxRules = new List <ISmartContractMempoolRule>()
            {
                new ContractTransactionValidationRule(this.callDataSerializer, txChecks)
            };
        }
Example #15
0
        /// <summary>
        /// Adds the smart contract feature to the node.
        /// </summary>
        public static IFullNodeBuilder AddSmartContracts(this IFullNodeBuilder fullNodeBuilder)
        {
            LoggingConfiguration.RegisterFeatureNamespace <SmartContractFeature>("smartcontracts");

            fullNodeBuilder.ConfigureFeature(features =>
            {
                features
                .AddFeature <SmartContractFeature>()
                .FeatureServices(services =>
                {
                    // STATE ----------------------------------------------------------------------------
                    services.AddSingleton <DBreezeContractStateStore>();
                    services.AddSingleton <NoDeleteContractStateSource>();
                    services.AddSingleton <IStateRepositoryRoot, StateRepositoryRoot>();

                    // CONSENSUS ------------------------------------------------------------------------
                    services.AddSingleton <IMempoolValidator, SmartContractMempoolValidator>();
                    services.AddSingleton <StandardTransactionPolicy, SmartContractTransactionPolicy>();

                    // CONTRACT EXECUTION ---------------------------------------------------------------
                    services.AddSingleton <IInternalExecutorFactory, InternalExecutorFactory>();
                    services.AddSingleton <IVirtualMachine, ReflectionVirtualMachine>();
                    services.AddSingleton <IAddressGenerator, AddressGenerator>();
                    services.AddSingleton <ILoader, ContractAssemblyLoader>();
                    services.AddSingleton <IContractModuleDefinitionReader, ContractModuleDefinitionReader>();
                    services.AddSingleton <IStateFactory, StateFactory>();
                    services.AddSingleton <SmartContractTransactionPolicy>();
                    services.AddSingleton <IStateProcessor, StateProcessor>();
                    services.AddSingleton <ISmartContractStateFactory, SmartContractStateFactory>();

                    // RECEIPTS -------------------------------------------------------------------------
                    services.AddSingleton <IReceiptRepository, PersistentReceiptRepository>();

                    // UTILS ----------------------------------------------------------------------------
                    services.AddSingleton <ISenderRetriever, SenderRetriever>();
                    services.AddSingleton <IVersionProvider, SmartContractVersionProvider>();

                    ICallDataSerializer callDataSerializer = CallDataSerializer.Default;
                    services.AddSingleton(callDataSerializer);
                    services.Replace(new ServiceDescriptor(typeof(IScriptAddressReader), new SmartContractScriptAddressReader(new ScriptAddressReader(), callDataSerializer)));
                });
            });

            return(fullNodeBuilder);
        }
Example #16
0
 public SmartContractWalletController(
     IBroadcasterManager broadcasterManager,
     ICallDataSerializer callDataSerializer,
     IConnectionManager connectionManager,
     ILoggerFactory loggerFactory,
     Network network,
     IReceiptRepository receiptRepository,
     IWalletManager walletManager)
 {
     this.broadcasterManager = broadcasterManager;
     this.callDataSerializer = callDataSerializer;
     this.connectionManager  = connectionManager;
     this.coinType           = (CoinType)network.Consensus.CoinType;
     this.logger             = loggerFactory.CreateLogger(this.GetType().FullName);
     this.network            = network;
     this.receiptRepository  = receiptRepository;
     this.walletManager      = walletManager;
 }
Example #17
0
 public TestFederatedPegBlockDefinition(
     IBlockBufferGenerator blockBufferGenerator,
     ICoinView coinView,
     IConsensusManager consensusManager,
     IDateTimeProvider dateTimeProvider,
     IContractExecutorFactory executorFactory,
     ILoggerFactory loggerFactory,
     ITxMempool mempool,
     MempoolSchedulerLock mempoolLock,
     Network network,
     ISenderRetriever senderRetriever,
     IStateRepositoryRoot stateRoot,
     IBlockExecutionResultCache executionCache,
     ICallDataSerializer callDataSerializer,
     MinerSettings minerSettings)
     : base(blockBufferGenerator, coinView, consensusManager, dateTimeProvider, executorFactory, loggerFactory, mempool, mempoolLock, network, senderRetriever, stateRoot, executionCache, callDataSerializer, minerSettings)
 {
 }
Example #18
0
 public SmartContractWalletController(
     IBroadcasterManager broadcasterManager,
     ICallDataSerializer callDataSerializer,
     IConnectionManager connectionManager,
     ILoggerFactory loggerFactory,
     Network network,
     IReceiptRepository receiptRepository,
     IWalletManager walletManager,
     ISmartContractTransactionService smartContractTransactionService)
 {
     this.broadcasterManager = broadcasterManager;
     this.callDataSerializer = callDataSerializer;
     this.connectionManager  = connectionManager;
     this.logger             = loggerFactory.CreateLogger("Impleum.Bitcoin.Fullnode");
     this.network            = network;
     this.receiptRepository  = receiptRepository;
     this.walletManager      = walletManager;
     this.smartContractTransactionService = smartContractTransactionService;
 }
Example #19
0
 public SmartContractPoACoinviewRule(
     IStateRepositoryRoot stateRepositoryRoot,
     IContractExecutorFactory executorFactory,
     ICallDataSerializer callDataSerializer,
     ISenderRetriever senderRetriever,
     IReceiptRepository receiptRepository,
     ICoinView coinView,
     IBlockExecutionResultCache executionCache,
     ILoggerFactory loggerFactory)
 {
     this.stateRepositoryRoot = stateRepositoryRoot;
     this.executorFactory     = executorFactory;
     this.callDataSerializer  = callDataSerializer;
     this.senderRetriever     = senderRetriever;
     this.receiptRepository   = receiptRepository;
     this.coinView            = coinView;
     this.executionCache      = executionCache;
     this.loggerFactory       = loggerFactory;
 }
 public SmartContractPoARuleRegistration(Network network,
                                         IStateRepositoryRoot stateRepositoryRoot,
                                         IContractExecutorFactory executorFactory,
                                         ICallDataSerializer callDataSerializer,
                                         ISenderRetriever senderRetriever,
                                         IReceiptRepository receiptRepository,
                                         ICoinView coinView,
                                         IEnumerable <IContractTransactionValidationLogic> validationRules)
 {
     this.baseRuleRegistration = new PoAConsensusRulesRegistration();
     this.network             = network;
     this.stateRepositoryRoot = stateRepositoryRoot;
     this.executorFactory     = executorFactory;
     this.callDataSerializer  = callDataSerializer;
     this.senderRetriever     = senderRetriever;
     this.receiptRepository   = receiptRepository;
     this.coinView            = coinView;
     this.validationRules     = validationRules;
 }
 public SmartContractPosRuleRegistration(Network network,
                                         IStateRepositoryRoot stateRepositoryRoot,
                                         IContractExecutorFactory executorFactory,
                                         ICallDataSerializer callDataSerializer,
                                         ISenderRetriever senderRetriever,
                                         IReceiptRepository receiptRepository,
                                         ICoinView coinView,
                                         IStakeChain stakeChain,
                                         IStakeValidator stakeValidator)
 {
     this.network             = network;
     this.stateRepositoryRoot = stateRepositoryRoot;
     this.executorFactory     = executorFactory;
     this.callDataSerializer  = callDataSerializer;
     this.senderRetriever     = senderRetriever;
     this.receiptRepository   = receiptRepository;
     this.coinView            = coinView;
     this.stakeChain          = stakeChain;
     this.stakeValidator      = stakeValidator;
 }
Example #22
0
 public ContractExecutor(ILoggerFactory loggerFactory,
                         ICallDataSerializer serializer,
                         IStateRepository stateRoot,
                         IContractRefundProcessor refundProcessor,
                         IContractTransferProcessor transferProcessor,
                         Network network,
                         IStateFactory stateFactory,
                         IStateProcessor stateProcessor,
                         IContractPrimitiveSerializer contractPrimitiveSerializer)
 {
     this.logger                      = loggerFactory.CreateLogger(this.GetType());
     this.stateRoot                   = stateRoot;
     this.refundProcessor             = refundProcessor;
     this.transferProcessor           = transferProcessor;
     this.serializer                  = serializer;
     this.network                     = network;
     this.stateFactory                = stateFactory;
     this.stateProcessor              = stateProcessor;
     this.contractPrimitiveSerializer = contractPrimitiveSerializer;
 }
 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;
 }
 public SmartContractPoABlockDefinition(
     IBlockBufferGenerator blockBufferGenerator,
     ICoinView coinView,
     IConsensusManager consensusManager,
     IDateTimeProvider dateTimeProvider,
     IContractExecutorFactory executorFactory,
     ILoggerFactory loggerFactory,
     ITxMempool mempool,
     MempoolSchedulerLock mempoolLock,
     Network network,
     ISenderRetriever senderRetriever,
     IStateRepositoryRoot stateRoot,
     IBlockExecutionResultCache executionCache,
     ICallDataSerializer callDataSerializer,
     MinerSettings minerSettings,
     NodeDeployments nodeDeployments)
     : base(blockBufferGenerator, coinView, consensusManager, dateTimeProvider, executorFactory, loggerFactory, mempool,
            mempoolLock, minerSettings, network, senderRetriever, stateRoot, executionCache, callDataSerializer, nodeDeployments)
 {
     // TODO: Fix gross MinerSettings injection ^^
 }
        public SmartContractMempoolValidator(ITxMempool memPool, MempoolSchedulerLock mempoolLock,
                                             IDateTimeProvider dateTimeProvider, MempoolSettings mempoolSettings, ChainIndexer chainIndexer,
                                             ICoinView coinView, ILoggerFactory loggerFactory, NodeSettings nodeSettings,
                                             IConsensusRuleEngine consensusRules, ICallDataSerializer callDataSerializer, Network network,
                                             IStateRepositoryRoot stateRepositoryRoot,
                                             IEnumerable <IContractTransactionFullValidationRule> txFullValidationRules)
            : base(memPool, mempoolLock, dateTimeProvider, mempoolSettings, chainIndexer, coinView, loggerFactory, nodeSettings, consensusRules)
        {
            // Dirty hack, but due to AllowedScriptTypeRule we don't need to check for standard scripts on any network, even live.
            // TODO: Remove ASAP. Ensure RequireStandard isn't used on SC mainnets, or the StandardScripts check is modular.
            mempoolSettings.RequireStandard = false;

            this.callDataSerializer  = callDataSerializer;
            this.stateRepositoryRoot = stateRepositoryRoot;

            var p2pkhRule = new P2PKHNotContractRule(stateRepositoryRoot);

            var scriptTypeRule = new AllowedScriptTypeRule(network);

            scriptTypeRule.Initialize();

            this.preTxRules = new List <ISmartContractMempoolRule>
            {
                new MempoolOpSpendRule(),
                new TxOutSmartContractExecRule(),
                scriptTypeRule,
                p2pkhRule
            };

            var txChecks = new List <IContractTransactionPartialValidationRule>()
            {
                new SmartContractFormatLogic()
            };

            this.feeTxRules = new List <ISmartContractMempoolRule>()
            {
                new ContractTransactionPartialValidationRule(this.callDataSerializer, txChecks),
                new ContractTransactionFullValidationRule(this.callDataSerializer, txFullValidationRules)
            };
        }
Example #26
0
        /// <inheritdoc />
        public FederatedPegBlockDefinition(
            IBlockBufferGenerator blockBufferGenerator,
            ICoinView coinView,
            IConsensusManager consensusManager,
            IDateTimeProvider dateTimeProvider,
            IContractExecutorFactory executorFactory,
            ILoggerFactory loggerFactory,
            ITxMempool mempool,
            MempoolSchedulerLock mempoolLock,
            Network network,
            ISenderRetriever senderRetriever,
            IStateRepositoryRoot stateRoot,
            ICoinbaseSplitter premineSplitter,
            IBlockExecutionResultCache executionCache,
            ICallDataSerializer callDataSerializer,
            MinerSettings minerSettings,
            FederatedPegSettings federatedPegSettings)
            : base(blockBufferGenerator, coinView, consensusManager, dateTimeProvider, executorFactory, loggerFactory, mempool, mempoolLock, network, senderRetriever, stateRoot, executionCache, callDataSerializer, minerSettings)
        {
            this.payToMultisigScript = federatedPegSettings.MultiSigAddress.ScriptPubKey;

            this.premineSplitter = premineSplitter;
        }
        public ContractTransactionFullValidationRule(ICallDataSerializer serializer, IEnumerable <IContractTransactionFullValidationRule> internalRules)
        {
            this.transactionChecker = new ContractTransactionChecker(serializer);

            this.internalRules = internalRules;
        }
Example #28
0
 public SmartContractPowCoinviewRule(Network network, IStateRepositoryRoot stateRepositoryRoot,
                                     IContractExecutorFactory executorFactory, ICallDataSerializer callDataSerializer,
                                     ISenderRetriever senderRetriever, IReceiptRepository receiptRepository, ICoinView coinView)
     : base(network, stateRepositoryRoot, executorFactory, callDataSerializer, senderRetriever, receiptRepository, coinView)
 {
 }
Example #29
0
 public SmartContractPosCoinviewRule(Network network, IStateRepositoryRoot stateRepositoryRoot,
                                     IContractExecutorFactory executorFactory, ICallDataSerializer callDataSerializer,
                                     ISenderRetriever senderRetriever, IReceiptRepository receiptRepository, ICoinView coinView,
                                     IStakeChain stakeChain, IStakeValidator stakeValidator)
     : base(network, stateRepositoryRoot, executorFactory, callDataSerializer, senderRetriever, receiptRepository, coinView)
 {
     this.consensus      = network.Consensus;
     this.stakeChain     = stakeChain;
     this.stakeValidator = stakeValidator;
 }
 public ContractValidationRuleTest()
 {
     this.network            = new SmartContractsRegTest();
     this.callDataSerializer = new CallDataSerializer(new ContractPrimitiveSerializer(this.network));
 }