Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Net5.0 #434

Closed
wants to merge 2 commits into from
Closed
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
4 changes: 2 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PropertyGroup>
<VersionPrefix>3.0.0</VersionPrefix>
<VersionSuffix>preview4</VersionSuffix>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>Neo.Plugins</RootNamespace>
<Authors>The Neo Project</Authors>
<PackageTags>NEO;Blockchain</PackageTags>
Expand All @@ -15,7 +15,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Neo" Version="3.0.0-preview4" />
<PackageReference Include="Neo" Version="3.0.0-CI01121" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/RpcClient/ContractClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public async Task<Transaction> CreateDeployContractTxAsync(byte[] nefFile, Contr
byte[] script;
using (ScriptBuilder sb = new ScriptBuilder())
{
sb.EmitAppCall(NativeContract.Management.Hash, "deploy", nefFile, manifest.ToString());
sb.EmitAppCall(NativeContract.ContractManagement.Hash, "deploy", nefFile, manifest.ToString());
script = sb.ToArray();
}
UInt160 sender = Contract.CreateSignatureRedeemScript(key.PublicKey).ToScriptHash();
Expand Down
2 changes: 1 addition & 1 deletion src/RpcNep17Tracker/RpcNep17Tracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ public JObject GetNep17Balances(JArray _params)
foreach (var (key, value) in dbCache.Find(prefix))
{
JObject balance = new JObject();
if (NativeContract.Management.GetContract(snapshot, key.AssetScriptHash) is null)
if (NativeContract.ContractManagement.GetContract(snapshot, key.AssetScriptHash) is null)
continue;
balance["assethash"] = key.AssetScriptHash.ToString();
balance["amount"] = value.Balance.ToString();
Expand Down
4 changes: 2 additions & 2 deletions src/RpcServer/RpcServer.Blockchain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ protected virtual JObject GetContractState(JArray _params)
{
using SnapshotView snapshot = Blockchain.Singleton.GetSnapshot();
UInt160 script_hash = ToScriptHash(_params[0].AsString());
ContractState contract = NativeContract.Management.GetContract(snapshot, script_hash);
ContractState contract = NativeContract.ContractManagement.GetContract(snapshot, script_hash);
return contract?.ToJson() ?? throw new RpcException(-100, "Unknown contract");
}

Expand Down Expand Up @@ -170,7 +170,7 @@ protected virtual JObject GetStorage(JArray _params)
{
using SnapshotView snapshot = Blockchain.Singleton.GetSnapshot();
UInt160 script_hash = UInt160.Parse(_params[0].AsString());
ContractState contract = NativeContract.Management.GetContract(snapshot, script_hash);
ContractState contract = NativeContract.ContractManagement.GetContract(snapshot, script_hash);
if (contract == null) return null;
id = contract.Id;
}
Expand Down
2 changes: 1 addition & 1 deletion src/RpcServer/RpcServer.SmartContract.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private static Signers SignersFromJson(JArray _params)
private JObject GetVerificationResult(UInt160 scriptHash, ContractParameter[] args, Signers signers = null)
{
var snapshot = Blockchain.Singleton.GetSnapshot();
var contract = NativeContract.Management.GetContract(snapshot, scriptHash);
var contract = NativeContract.ContractManagement.GetContract(snapshot, scriptHash);
if (contract is null)
{
throw new RpcException(-100, "Unknown contract");
Expand Down
2 changes: 1 addition & 1 deletion tests/Neo.Network.RPC.Tests/Neo.Network.RPC.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>Neo.Network.RPC.Tests</RootNamespace>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions tests/Neo.Network.RPC.Tests/RpcTestCases.json
Original file line number Diff line number Diff line change
Expand Up @@ -1113,14 +1113,14 @@
"Request": {
"jsonrpc": "2.0",
"method": "invokescript",
"params": [ "EMMMCGRlY2ltYWxzDBQ7fTcRxvDM+bHcqQPRv6HYlvEjjEFifVtS" ],
"params": [ "HxDDDAhkZWNpbWFscwwUO303EcbwzPmx3KkD0b+h2JbxI4xB7vQM2w==" ],
"id": 1
},
"Response": {
"jsonrpc": "2.0",
"id": 1,
"result": {
"script": "EMMMCGRlY2ltYWxzDBQ7fTcRxvDM+bHcqQPRv6HYlvEjjEFifVtS",
"script": "HxDDDAhkZWNpbWFscwwUO303EcbwzPmx3KkD0b+h2JbxI4xB7vQM2w==",
"state": "HALT",
"gasconsumed": "0.0506156",
"stack": [
Expand Down
2 changes: 1 addition & 1 deletion tests/Neo.Network.RPC.Tests/UT_ContractClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public async Task TestDeployContract()
};
using (ScriptBuilder sb = new ScriptBuilder())
{
sb.EmitAppCall(NativeContract.Management.Hash, "deploy", new byte[1], manifest.ToString());
sb.EmitAppCall(NativeContract.ContractManagement.Hash, "deploy", new byte[1], manifest.ToString());
script = sb.ToArray();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>Neo.Plugins.StateService.Tests</RootNamespace>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>Neo.Plugins.Storage.Tests</RootNamespace>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down