From 9760ff5c5750cac5e2a0740451ffc39f6511ad69 Mon Sep 17 00:00:00 2001
From: superboyiii <573504781@qq.com>
Date: Sun, 24 Jan 2021 22:10:24 +0800
Subject: [PATCH 1/2] Sync to CI01171
---
neo-cli/CLI/MainService.Contracts.cs | 3 ++-
neo-cli/CLI/MainService.cs | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/neo-cli/CLI/MainService.Contracts.cs b/neo-cli/CLI/MainService.Contracts.cs
index 42e012687..281753efe 100644
--- a/neo-cli/CLI/MainService.Contracts.cs
+++ b/neo-cli/CLI/MainService.Contracts.cs
@@ -4,6 +4,7 @@
using Neo.SmartContract.Native;
using System;
using System.Linq;
+using System.Numerics;
namespace Neo.CLI
{
@@ -34,7 +35,7 @@ private void OnDeployCommand(string filePath, string manifestPath = null)
UInt160 hash = SmartContract.Helper.GetContractHash(tx.Sender, nef.CheckSum, manifest.Name);
Console.WriteLine($"Contract hash: {hash}");
- Console.WriteLine($"Gas: {new BigDecimal(tx.SystemFee, NativeContract.GAS.Decimals)}");
+ Console.WriteLine($"Gas: {new BigDecimal((BigInteger)tx.SystemFee, NativeContract.GAS.Decimals)}");
Console.WriteLine();
SignAndSendTx(tx);
}
diff --git a/neo-cli/CLI/MainService.cs b/neo-cli/CLI/MainService.cs
index f2efb2f0c..a89578e42 100644
--- a/neo-cli/CLI/MainService.cs
+++ b/neo-cli/CLI/MainService.cs
@@ -22,6 +22,7 @@
using System.IO.Compression;
using System.Linq;
using System.Net;
+using System.Numerics;
using System.Reflection;
using System.Text.RegularExpressions;
using System.Threading;
@@ -566,7 +567,7 @@ private bool OnInvokeWithResult(UInt160 scriptHash, string operation, out StackI
private void PrintExecutionOutput(ApplicationEngine engine, bool showStack = true)
{
Console.WriteLine($"VM State: {engine.State}");
- Console.WriteLine($"Gas Consumed: {new BigDecimal(engine.GasConsumed, NativeContract.GAS.Decimals)}");
+ Console.WriteLine($"Gas Consumed: {new BigDecimal((BigInteger)engine.GasConsumed, NativeContract.GAS.Decimals)}");
if (showStack)
Console.WriteLine($"Result Stack: {new JArray(engine.ResultStack.Select(p => p.ToJson()))}");
From c6c9050b01d0c6c36409e0e322b29fb16af6a0d9 Mon Sep 17 00:00:00 2001
From: superboyiii <573504781@qq.com>
Date: Sun, 24 Jan 2021 22:11:37 +0800
Subject: [PATCH 2/2] proj
---
neo-cli/neo-cli.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/neo-cli/neo-cli.csproj b/neo-cli/neo-cli.csproj
index ac974e9b0..148b124fc 100644
--- a/neo-cli/neo-cli.csproj
+++ b/neo-cli/neo-cli.csproj
@@ -28,7 +28,7 @@
-
+