Пример #1
0
 public Settings()
 {
     App     = new AppSettings();
     Interop = new InteropSettings();
     Net     = new NetSettings();
     PAC     = new PACSettings();
     Groups  = new List <Group>();
 }
        public ETHCompatibleClientProvider(IETHClient ethClient, IBNBClient bnbClient, InteropSettings interopSettings)
        {
            this.supportedChains = new Dictionary <DestinationChain, IETHClient>()
            {
                { DestinationChain.ETH, ethClient },
                { DestinationChain.BNB, bnbClient },
            };

            this.interopSettings = interopSettings;
        }
Пример #3
0
 public InteropController(Network network,
                          IConversionRequestRepository conversionRequestRepository,
                          IInteropTransactionManager interopTransactionManager,
                          IETHCompatibleClientProvider ethCompatibleClientProvider,
                          InteropSettings interopSettings)
 {
     this.network = network;
     this.conversionRequestRepository = conversionRequestRepository;
     this.interopTransactionManager   = interopTransactionManager;
     this.ethCompatibleClientProvider = ethCompatibleClientProvider;
     this.interopSettings             = interopSettings;
     this.logger = LogManager.GetCurrentClassLogger();
 }
Пример #4
0
        public EthereumClientBase(InteropSettings interopSettings)
        {
            this.interopSettings = interopSettings;

            if (!this.interopSettings.Enabled)
            {
                return;
            }

            var account = new ManagedAccount(interopSettings.EthereumAccount, interopSettings.EthereumPassphrase);

            // TODO: Support loading offline accounts from keystore JSON directly?
            this.web3 = !string.IsNullOrWhiteSpace(interopSettings.EthereumClientUrl) ? new Web3(account, interopSettings.EthereumClientUrl) : new Web3(account);
        }
Пример #5
0
        public ETHClient(InteropSettings interopSettings)
        {
            this.SetupConfiguration(interopSettings);

            if (!this.settings.InteropEnabled)
            {
                return;
            }

            var account = new ManagedAccount(this.settings.Account, this.settings.Passphrase);

            // TODO: Support loading offline accounts from keystore JSON directly?
            this.web3 = !string.IsNullOrWhiteSpace(this.settings.ClientUrl) ? new Web3(account, this.settings.ClientUrl) : new Web3(account);
        }
 public InteropController(
     Network network,
     IConversionRequestCoordinationService conversionRequestCoordinationService,
     IConversionRequestRepository conversionRequestRepository,
     IETHCompatibleClientProvider ethCompatibleClientProvider,
     IFederationManager federationManager,
     InteropSettings interopSettings)
 {
     this.conversionRequestCoordinationService = conversionRequestCoordinationService;
     this.conversionRequestRepository          = conversionRequestRepository;
     this.ethCompatibleClientProvider          = ethCompatibleClientProvider;
     this.federationManager = federationManager;
     this.interopSettings   = interopSettings;
     this.logger            = LogManager.GetCurrentClassLogger();
     this.network           = network;
 }
Пример #7
0
 public BNBClient(InteropSettings interopSettings) : base(interopSettings)
 {
 }
Пример #8
0
 protected override void SetupConfiguration(InteropSettings interopSettings)
 {
     this.settings = interopSettings.BNBSettings;
 }
Пример #9
0
 protected virtual void SetupConfiguration(InteropSettings interopSettings)
 {
     this.settings = interopSettings.ETHSettings;
 }