Exemplo n.º 1
0
        public NeoInterop(TokenSwapper swapper, string wif, BigInteger blockHeight, NeoScanAPI neoscanAPI, Logger logger) : base(swapper, wif, "neo")
        {
            this._blockHeight = blockHeight;

            this.neoscanAPI = neoscanAPI;

            this.logger = logger;
        }
Exemplo n.º 2
0
        protected ChainWatcher(TokenSwapper swapper, string wif, string platformName)
        {
            Swapper           = swapper;
            this.PlatformName = platformName;
            this.LocalAddress = swapper.FindAddress(platformName);

            if (string.IsNullOrEmpty(LocalAddress))
            {
                throw new SwapException($"Invalid address for {platformName} swaps");
            }

            var localKeys = GetAvailableAddress(wif);

            if (localKeys == LocalAddress)
            {
                Swapper.logger.Message($"Listening for {platformName} swaps at address {LocalAddress}");
            }
            else
            {
                Swapper.logger.Error($"Expected {platformName} keys to {LocalAddress}, instead got keys to {localKeys}");
            }
        }
Exemplo n.º 3
0
 public EthereumInterop(TokenSwapper swapper, string wif, BigInteger currentBlock) : base(swapper, wif, "ethereum")
 {
 }