private async void DeployButton_ClickAsync(object sender, RoutedEventArgs e) { var deployment = new PharmacyDeployment(); deployment.Name = (string.IsNullOrEmpty(tokenName.Text) || string.IsNullOrWhiteSpace(tokenName.Text)) ? ViewModel.Name : tokenName.Text; deployment.Symbol = (string.IsNullOrEmpty(tokenSymbol.Text) || string.IsNullOrWhiteSpace(tokenSymbol.Text)) ? ViewModel.Symbol : tokenSymbol.Text; ViewModel = DataContext as PharmacyVM; await ViewModel.DeployCommand(deployment); }
public static Task <string> DeployContractAsync(Nethereum.Web3.Web3 web3, PharmacyDeployment pharmacyDeployment) { return(web3.Eth.GetContractDeploymentHandler <PharmacyDeployment>().SendRequestAsync(pharmacyDeployment)); }
public static async Task <PharmacyService> DeployContractAndGetServiceAsync(Nethereum.Web3.Web3 web3, PharmacyDeployment pharmacyDeployment, CancellationTokenSource cancellationTokenSource = null) { var receipt = await DeployContractAndWaitForReceiptAsync(web3, pharmacyDeployment, cancellationTokenSource); return(new PharmacyService(web3, receipt.ContractAddress)); }
public static Task <TransactionReceipt> DeployContractAndWaitForReceiptAsync(Nethereum.Web3.Web3 web3, PharmacyDeployment pharmacyDeployment, CancellationTokenSource cancellationTokenSource = null) { return(web3.Eth.GetContractDeploymentHandler <PharmacyDeployment>().SendRequestAndWaitForReceiptAsync(pharmacyDeployment, cancellationTokenSource)); }