public static IRootstockServicesRegistrant AddRootstockNonceService( this IRootstockServicesRegistrant registrant) { registrant .Builder .Register ( ctx => new RootstockNonceService ( ctx.Resolve <IEthApiClient>() ) ) .As <INonceService>() .SingleInstance(); return(registrant); }
public static IRootstockServicesRegistrant AddRootstockBlockchainService( this IRootstockServicesRegistrant registrant) { registrant .AddRootstockNonceService(); registrant .Builder .UseRootstockDetectContractStrategy() .UseRootstockGetTransactionReceiptsStrategy() .UseRootstockTryGetTransactionErrorStrategy(); var settings = new DefaultBlockchainService.Settings { ConfirmationLevel = registrant.ConfirmationLevel, GasPriceRange = registrant.GasPriceRange }; registrant .Builder .Register ( ctx => new RootstockBlockchainService ( ctx.Resolve <IEthApiClient>(), ctx.Resolve <IDetectContractStrategy>(), ctx.Resolve <IGetTransactionReceiptsStrategy>(), ctx.Resolve <ITryGetTransactionErrorStrategy>(), settings ) ) .As <IBlockchainService>() .SingleInstance(); return(registrant); }