Exemplo n.º 1
0
 public static Task <string> DeployContractAsync(Nethereum.Web3.Web3 web3, CounterDeployment counterDeployment)
 {
     return(web3.Eth.GetContractDeploymentHandler <CounterDeployment>().SendRequestAsync(counterDeployment));
 }
Exemplo n.º 2
0
        public static async Task <CounterService> DeployContractAndGetServiceAsync(Nethereum.Web3.Web3 web3, CounterDeployment counterDeployment, CancellationTokenSource cancellationTokenSource = null)
        {
            var receipt = await DeployContractAndWaitForReceiptAsync(web3, counterDeployment, cancellationTokenSource);

            return(new CounterService(web3, receipt.ContractAddress));
        }
Exemplo n.º 3
0
 public static Task <TransactionReceipt> DeployContractAndWaitForReceiptAsync(Nethereum.Web3.Web3 web3, CounterDeployment counterDeployment, CancellationTokenSource cancellationTokenSource = null)
 {
     return(web3.Eth.GetContractDeploymentHandler <CounterDeployment>().SendRequestAndWaitForReceiptAsync(counterDeployment, cancellationTokenSource));
 }