Exemplo n.º 1
0
        public static void DisplayBalance()
        {
            var wallet     = WalletHelper.LoadWallet();
            var getBalance = GetBalance.Create(WalletHelper.TestNetUrl);
            var balance    = getBalance.Invoke(wallet.Address).Result;

            Console.WriteLine($"Your current ICX balance for {wallet.Address} is : {Utils.Loop2ICX(balance)} ICX");
        }
Exemplo n.º 2
0
        public static void SendICX()
        {
            var wallet = WalletHelper.LoadWallet();

            Console.WriteLine();
            Console.WriteLine("How much ICX do you want to send?");
            var        amount       = BigInteger.Parse(Console.ReadLine());
            BigInteger amountToSend = amount * Consts.ICX2Loop;

            Console.WriteLine($"Enter the public address to send {amount}");
            var toAddress = Console.ReadLine();

            BigInteger stepLimit = NumericsHelper.ICX2Loop("0.000000001");
            Hash32     result    = WalletHelper.Transfer(toAddress, wallet.PrivateKey, amountToSend, stepLimit, WalletHelper.TestNetUrl);

            Console.WriteLine($"Transfer successful tx: {result}");
        }