Deploy solidity contract with c#

Deploy solidity contract with c#

I am developing an application on&nbsp;<strong><em>Ethereum</em></strong>&nbsp;blockchain. I use&nbsp;<strong><em>Solidity</em></strong>&nbsp;for contract and&nbsp;<strong><em>Nethereum c#</em></strong>&nbsp;library to connect to the contract. I am somehow new in Ethereum and it is my first app in blockchain!! I want to deploy my app in one&nbsp;<strong><em>TESTChain</em></strong>&nbsp;first,

I am developing an application on Ethereum blockchain. I use Solidity for contract and Nethereum c# library to connect to the contract. I am somehow new in Ethereum and it is my first app in blockchain!! I want to deploy my app in one TESTChain first,

The problem is that The C# code does not reply anything after send request for deploying of contract. here is my code

the contract is created well on remix and in running tab it works

  public class DeploymentTest : ContractDeploymentMessage
        {
      public static string BYTECODE = @"0x....";// removed it because of long string

  public DeploymentTest() : base(BYTECODE) { }
    }

  public async Task ConnectToTest()
        {
            var url = "https://github.com/Nethereum/TestChains";
            var pass = "0xb5b1870957d373ef0eeffecc6e4812c0fd08f554b37b233526acc331bf1544f7";
            var acc = new Account(pass);
            var chain = new Web3(acc, url);
            var deploymentMessage = new DeploymentTest();
            var deploymentHandler =  chain.Eth.GetContractDeploymentHandler&lt;DeploymentTest&gt;();

             // this point just waited and does not return anything
            var transactionReceipt = await deploymentHandler.SendRequestAndWaitForReceiptAsync(deploymentMessage);
            var contractAddress = transactionReceipt.ContractAddress;

            }

Can any one help me, I don't insist in deploying with code, it can be happened by anyway but after deploying I need to connect it and call some functions. Thanks

EDITED

I downloaded the TESTChain network for windows and it works fine, it seems the default port is 8545 for http:localhost. but it still does not connect to chain

    var web3test = new Web3(); // also tried new Web3(http://localhost:8545);
    var isMining = await web3test.Eth.Mining.IsMining.SendRequestAsync();
    var accounts = await web3test.Eth.Accounts.SendRequestAsync();

is that problem with my connection? I disabled my MacAfee firewall completely.

EDITED 2

I changed my machine and it works on my another laptop, I cannot find the problem. I do not know if I just Uninstall the mcaffe will it be ok or not? has anybody any idea about the firewall prolems or other issues?


Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Learning Solidity

Solidity is a high-level language used to implement smart contracts. This is an object oriented language designed to target the Ethereum Virtual Machine. Let's explore it!

how to initialize Empty array in stuct [Solidity]

I am suffering to initialize an empty array for struct when a struct is made.

Can Blockchain and Privacy Save Facebook?

There’s no doubt that Facebook is going big with private communication. But to truly succeed with this new business model, the company must rethink the way it monetizes content across its platform.