BlockStudio.Project.BlockStudioProjectService.EstimateGas C# (CSharp) Method

EstimateGas() public method

public EstimateGas ( ) : void
return void
        public void EstimateGas()
        {
            var account = BlockStudioProject.DefaultAccount;

            var bin = GetFile(SolcProjectFileType.Bin);

            var transaction = new Transaction()
            {
                From = account.Address,
                Data = bin.Value
            };

            var estimatedGas = BlockStudioProject.Connection.EthereumService.EstimateGas(transaction);
            _txtEstimatedGas.Text = estimatedGas.ToString();
        }