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

Neo.VM.3.0.0-CI00958 #274

Merged
merged 4 commits into from
Jun 29, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
fix
  • Loading branch information
Luchuan committed Jun 24, 2020
commit 3133bd724606ad3c8bc0cb2ae6d89cf5292669cf
2 changes: 1 addition & 1 deletion src/LevelDBStore/LevelDBStore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Neo" Version="3.0.0-CI00935" />
<PackageReference Include="Neo" Version="3.0.0-CI00955" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/RocksDBStore/RocksDBStore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Neo" Version="3.0.0-CI00935" />
<PackageReference Include="Neo" Version="3.0.0-CI00955" />
<PackageReference Include="RocksDbNative" Version="6.2.2" />
<PackageReference Include="RocksDbSharp" Version="6.2.2" />
</ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions src/RpcClient/Nep5API.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public Nep5API(RpcClient rpcClient) : base(rpcClient) { }
/// <returns></returns>
public BigInteger BalanceOf(UInt160 scriptHash, UInt160 account)
{
BigInteger balance = TestInvoke(scriptHash, "balanceOf", account).Stack.Single().ToStackItem().GetBigInteger();
BigInteger balance = TestInvoke(scriptHash, "balanceOf", account).Stack.Single().ToStackItem().GetInteger();
return balance;
}

Expand Down Expand Up @@ -61,7 +61,7 @@ public string Symbol(UInt160 scriptHash)
/// <returns></returns>
public byte Decimals(UInt160 scriptHash)
{
return (byte)TestInvoke(scriptHash, "decimals").Stack.Single().ToStackItem().GetBigInteger();
return (byte)TestInvoke(scriptHash, "decimals").Stack.Single().ToStackItem().GetInteger();
}

/// <summary>
Expand All @@ -71,7 +71,7 @@ public byte Decimals(UInt160 scriptHash)
/// <returns></returns>
public BigInteger TotalSupply(UInt160 scriptHash)
{
return TestInvoke(scriptHash, "totalSupply").Stack.Single().ToStackItem().GetBigInteger();
return TestInvoke(scriptHash, "totalSupply").Stack.Single().ToStackItem().GetInteger();
}

/// <summary>
Expand All @@ -92,8 +92,8 @@ public RpcNep5TokenInfo GetTokenInfo(UInt160 scriptHash)
{
Name = result[0].ToStackItem().GetString(),
Symbol = result[1].ToStackItem().GetString(),
Decimals = (byte)result[2].ToStackItem().GetBigInteger(),
TotalSupply = result[3].ToStackItem().GetBigInteger()
Decimals = (byte)result[2].ToStackItem().GetInteger(),
TotalSupply = result[3].ToStackItem().GetInteger()
};
}

Expand Down
6 changes: 3 additions & 3 deletions src/RpcClient/PolicyAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public PolicyAPI(RpcClient rpcClient) : base(rpcClient) { }
/// <returns></returns>
public uint GetMaxTransactionsPerBlock()
{
return (uint)TestInvoke(scriptHash, "getMaxTransactionsPerBlock").Stack.Single().ToStackItem().GetBigInteger();
return (uint)TestInvoke(scriptHash, "getMaxTransactionsPerBlock").Stack.Single().ToStackItem().GetInteger();
}

/// <summary>
Expand All @@ -32,7 +32,7 @@ public uint GetMaxTransactionsPerBlock()
/// <returns></returns>
public uint GetMaxBlockSize()
{
return (uint)TestInvoke(scriptHash, "getMaxBlockSize").Stack.Single().ToStackItem().GetBigInteger();
return (uint)TestInvoke(scriptHash, "getMaxBlockSize").Stack.Single().ToStackItem().GetInteger();
}

/// <summary>
Expand All @@ -41,7 +41,7 @@ public uint GetMaxBlockSize()
/// <returns></returns>
public long GetFeePerByte()
{
return (long)TestInvoke(scriptHash, "getFeePerByte").Stack.Single().ToStackItem().GetBigInteger();
return (long)TestInvoke(scriptHash, "getFeePerByte").Stack.Single().ToStackItem().GetInteger();
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/RpcClient/RpcClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Neo" Version="3.0.0-CI00935" />
<PackageReference Include="Neo" Version="3.0.0-CI00955" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/RpcClient/WalletAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public decimal GetUnclaimedGas(UInt160 account)
{
UInt160 scriptHash = NativeContract.NEO.Hash;
BigInteger balance = nep5API.TestInvoke(scriptHash, "unclaimedGas", account, rpcClient.GetBlockCount() - 1)
.Stack.Single().ToStackItem().GetBigInteger();
.Stack.Single().ToStackItem().GetInteger();
return ((decimal)balance) / (long)NativeContract.GAS.Factor;
}

Expand Down
4 changes: 2 additions & 2 deletions src/RpcNep5Tracker/RpcNep5Tracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ private void HandleNotification(StoreView snapshot, IVerifiable scriptContainer,
}
if (scriptContainer is Transaction transaction)
{
RecordTransferHistory(snapshot, scriptHash, from, to, amountItem.GetBigInteger(), transaction.Hash, ref transferIndex);
RecordTransferHistory(snapshot, scriptHash, from, to, amountItem.GetInteger(), transaction.Hash, ref transferIndex);
}
}

Expand Down Expand Up @@ -182,7 +182,7 @@ public void OnPersist(StoreView snapshot, IReadOnlyList<Blockchain.ApplicationEx
{
if (engine.State.HasFlag(VMState.FAULT)) continue;
if (engine.ResultStack.Count <= 0) continue;
nep5BalancePair.Value.Balance = engine.ResultStack.Pop().GetBigInteger();
nep5BalancePair.Value.Balance = engine.ResultStack.Pop().GetInteger();
}
nep5BalancePair.Value.LastUpdatedBlock = snapshot.Height;
if (nep5BalancePair.Value.Balance == 0)
Expand Down
2 changes: 1 addition & 1 deletion src/RpcServer/RpcServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.ResponseCompression" Version="2.2.0" />
<PackageReference Include="Neo" Version="3.0.0-CI00935" />
<PackageReference Include="Neo" Version="3.0.0-CI00955" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/StatesDumper/StatesDumper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Neo" Version="3.0.0-CI00935" />
<PackageReference Include="Neo" Version="3.0.0-CI00955" />
<PackageReference Include="Neo.ConsoleService" Version="1.0.0" />
</ItemGroup>

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 @@ -32,7 +32,7 @@ public void TestInvoke()
ContractClient contractClient = new ContractClient(rpcClientMock.Object);
var result = contractClient.TestInvoke(NativeContract.GAS.Hash, "balanceOf", UInt160.Zero);

Assert.AreEqual(30000000000000L, (long)result.Stack[0].ToStackItem().GetBigInteger());
Assert.AreEqual(30000000000000L, (long)result.Stack[0].ToStackItem().GetInteger());
}

[TestMethod]
Expand Down