Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Sync to CI01171 #726

Merged
merged 2 commits into from
Jan 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion neo-cli/CLI/MainService.Contracts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Neo.SmartContract.Native;
using System;
using System.Linq;
using System.Numerics;

namespace Neo.CLI
{
Expand Down Expand Up @@ -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);
}
Expand Down
3 changes: 2 additions & 1 deletion neo-cli/CLI/MainService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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()))}");
Expand Down
2 changes: 1 addition & 1 deletion neo-cli/neo-cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Neo" Version="3.0.0-CI01168" />
<PackageReference Include="Neo" Version="3.0.0-CI01171" />
</ItemGroup>

<ItemGroup>
Expand Down