Skip to content

Commit

Permalink
v3.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashuaidehao committed Aug 19, 2022
1 parent 9498d0f commit 545e8fb
Show file tree
Hide file tree
Showing 34 changed files with 817 additions and 988 deletions.
2 changes: 1 addition & 1 deletion neo
Submodule neo updated 379 files
10 changes: 8 additions & 2 deletions neo3-gui/neo3-gui.sln
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29409.12
# Visual Studio Version 17
VisualStudioVersion = 17.2.32630.192
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "neo3-gui", "neo3-gui\neo3-gui.csproj", "{2B09B051-9848-4631-81A1-34A81D2E8103}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "neo", "..\neo\src\neo\neo.csproj", "{883A2CF9-BCF3-4B03-895C-63AE54CF292F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "neo3-gui.tests", "neo3-gui.tests\neo3-gui.tests.csproj", "{2F439926-5E57-46FB-979C-43037F95ECC8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Neo.Json", "..\neo\src\Neo.Json\Neo.Json.csproj", "{88C3A94F-B476-48E3-9205-D92B6FFFFCCF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -27,6 +29,10 @@ Global
{2F439926-5E57-46FB-979C-43037F95ECC8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2F439926-5E57-46FB-979C-43037F95ECC8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2F439926-5E57-46FB-979C-43037F95ECC8}.Release|Any CPU.Build.0 = Release|Any CPU
{88C3A94F-B476-48E3-9205-D92B6FFFFCCF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{88C3A94F-B476-48E3-9205-D92B6FFFFCCF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{88C3A94F-B476-48E3-9205-D92B6FFFFCCF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{88C3A94F-B476-48E3-9205-D92B6FFFFCCF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
94 changes: 94 additions & 0 deletions neo3-gui/neo3-gui.tests/JsonConverter_Test.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Neo;
using Neo.SmartContract;
using Neo.VM;
using Neo.VM.Types;

namespace neo3_gui.tests
{
[TestClass]
public class JsonConverter_Test
{
[TestMethod]
public void Test()
{
var data = "1234".HexToBytes();
StackItem item = new ByteString(data);
var json = item.SerializeJson();
Console.WriteLine(json);
StackItem item2 = json.DeserializeJson<StackItem>();
Assert.AreEqual(json,item2.SerializeJson());

item = new Neo.VM.Types.Buffer(data);
json = item.SerializeJson();
Console.WriteLine(json);
item2 = json.DeserializeJson<StackItem>();
Assert.AreEqual(json, item2.SerializeJson());


item = new Integer(20);
json = item.SerializeJson();
Console.WriteLine(json);
item2 = json.DeserializeJson<StackItem>();
Assert.AreEqual(json, item2.SerializeJson());


item = true;
json = item.SerializeJson();
Console.WriteLine(json);
item2 = json.DeserializeJson<StackItem>();
Assert.AreEqual(json, item2.SerializeJson());


item = new Pointer(data, 1);
json = item.SerializeJson();
Console.WriteLine(json);
item2 = json.DeserializeJson<StackItem>();
Assert.AreEqual(json, item2.SerializeJson());


item = StackItem.Null;
json = item.SerializeJson();
Console.WriteLine(json);
item2 = json.DeserializeJson<StackItem>();
Assert.AreEqual(json, item2.SerializeJson());


var list = new List<StackItem>()
{
1, 2, true, false, data,StackItem.Null
};
item = new Neo.VM.Types.Array(list);
json = item.SerializeJson();
Console.WriteLine(json);
item2 = json.DeserializeJson<StackItem>();
Assert.AreEqual(json, item2.SerializeJson());


item = new Neo.VM.Types.Struct(list);
json = item.SerializeJson();
Console.WriteLine(json);
item2 = json.DeserializeJson<StackItem>();
Assert.AreEqual(json, item2.SerializeJson());


var map = new Neo.VM.Types.Map();
map[1] = true;
map[2] = false;
map["a"] = "A";
map["b"] = StackItem.Null;

item=map;
json = item.SerializeJson();
Console.WriteLine(json);
item2 = json.DeserializeJson<StackItem>();
Assert.AreEqual(json, item2.SerializeJson());

}
}
}
4 changes: 2 additions & 2 deletions neo3-gui/neo3-gui/ClientApp/package-lock.json

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

2 changes: 1 addition & 1 deletion neo3-gui/neo3-gui/ClientApp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "neo-gui",
"version": "1.4.2",
"version": "1.4.3",
"private": true,
"main": "main.js",
"homepage": "./",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Advanced extends React.Component {
<Col span={6}>
<a
className="ml3"
onClick={this.openUrl("https://neowish.ngd.network/neo3/")}
onClick={this.openUrl("https://n3t5wish.ngd.network/")}
>
<PaperClipOutlined /> {t("advanced.test coin")}
</a>
Expand Down
Loading

0 comments on commit 545e8fb

Please sign in to comment.