private async void DeployButton_ClickAsync(object sender, RoutedEventArgs e)
        {
            var deployment = new DrugShipmentDeployment();

            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 ManufacturerVM;
            await ViewModel.DeployCommand(deployment);
        }
Exemplo n.º 2
0
 public static Task <string> DeployContractAsync(Nethereum.Web3.Web3 web3, DrugShipmentDeployment drugShipmentDeployment)
 {
     return(web3.Eth.GetContractDeploymentHandler <DrugShipmentDeployment>().SendRequestAsync(drugShipmentDeployment));
 }
Exemplo n.º 3
0
        public static async Task <DrugShipmentService> DeployContractAndGetServiceAsync(Nethereum.Web3.Web3 web3, DrugShipmentDeployment drugShipmentDeployment, CancellationTokenSource cancellationTokenSource = null)
        {
            var receipt = await DeployContractAndWaitForReceiptAsync(web3, drugShipmentDeployment, cancellationTokenSource);

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