Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public static Task <string> DeployContractAsync(Nethereum.Web3.Web3 web3, PharmacyDeployment pharmacyDeployment)
 {
     return(web3.Eth.GetContractDeploymentHandler <PharmacyDeployment>().SendRequestAsync(pharmacyDeployment));
 }
Esempio n. 3
0
        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));
        }
Esempio n. 4
0
 public static Task <TransactionReceipt> DeployContractAndWaitForReceiptAsync(Nethereum.Web3.Web3 web3, PharmacyDeployment pharmacyDeployment, CancellationTokenSource cancellationTokenSource = null)
 {
     return(web3.Eth.GetContractDeploymentHandler <PharmacyDeployment>().SendRequestAndWaitForReceiptAsync(pharmacyDeployment, cancellationTokenSource));
 }