Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

Commit

Permalink
updated invokecontract features (#26)
Browse files Browse the repository at this point in the history
* added string support to param editor
* added textbox to show invoke results (rather than messagebox)
  • Loading branch information
birmingh authored Oct 7, 2017
1 parent fa7cfd3 commit d1cc879
Show file tree
Hide file tree
Showing 6 changed files with 207 additions and 262 deletions.
8 changes: 8 additions & 0 deletions neo-gui/UI/InvokeContractDialog.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion neo-gui/UI/InvokeContractDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,8 @@ private void btnTestScript_Click(object sender, EventArgs e)
sb.AppendLine($"VM State: {engine.State}");
sb.AppendLine($"Gas Consumed: {engine.GasConsumed}");
sb.AppendLine($"Evaluation Stack: {new JArray(engine.EvaluationStack.Select(p => p.ToParameter().ToJson()))}");
MessageBox.Show(sb.ToString());
txtInvokeOutput.Text = sb.ToString();

if (!engine.State.HasFlag(VMState.FAULT))
{
tx.Gas = engine.GasConsumed - Fixed8.FromDecimal(10);
Expand Down Expand Up @@ -351,6 +352,7 @@ public string GetParameterValueDisplayValue(ContractParameterType paramType, obj
{
case ContractParameterType.Signature:
case ContractParameterType.ByteArray:
case ContractParameterType.String:
return System.Text.Encoding.UTF8.GetString((byte[])paramValue);
case ContractParameterType.Boolean:
case ContractParameterType.Integer:
Expand Down
Loading

0 comments on commit d1cc879

Please sign in to comment.