Example #1
0
        private static ITxFilter CreateBaseAuRaTxFilter(
            IMiningConfig miningConfig,
            AuRaNethermindApi api,
            IReadOnlyTxProcessorSource readOnlyTxProcessorSource,
            IDictionaryContractDataStore <TxPriorityContract.Destination>?minGasPricesContractDataStore)
        {
            ITxFilter gasPriceTxFilter = TxFilterBuilders.CreateStandardTxFilter(miningConfig);

            if (minGasPricesContractDataStore != null)
            {
                gasPriceTxFilter = new MinGasPriceContractTxFilter(gasPriceTxFilter, minGasPricesContractDataStore);
            }

            Address?registrar = api.ChainSpec?.Parameters.Registrar;

            if (registrar != null)
            {
                RegisterContract  registerContract  = new RegisterContract(api.AbiEncoder, registrar, readOnlyTxProcessorSource);
                CertifierContract certifierContract = new CertifierContract(api.AbiEncoder, registerContract, readOnlyTxProcessorSource);
                return(new TxCertifierFilter(certifierContract, gasPriceTxFilter, api.LogManager));
            }

            return(gasPriceTxFilter);
        }
 protected virtual ITxFilter CreateTxSourceFilter(ReadOnlyTxProcessingEnv readOnlyTxProcessingEnv, ReadOnlyTxProcessorSource readOnlyTxProcessorSource) =>
 TxFilterBuilders.CreateStandardTxFilter(_api.Config <IMiningConfig>());