예제 #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;
 }