Skip to content

Commit

Permalink
Merge pull request #805 from planetarium/release/211
Browse files Browse the repository at this point in the history
Release 211
  • Loading branch information
U-lis authored Nov 15, 2024
2 parents 3fd50b2 + c13de1d commit 9cfd97f
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -913,9 +913,9 @@ string network
{
fbAgents.Add(fbAvatarState.agentAddress.ToString());

if (fbOutputState.TryGetStakeStateV2(fbAvatarState.agentAddress, out StakeStateV2 fbStakeState2))
if (fbOutputState.TryGetStakeState(fbAvatarState.agentAddress, out StakeState fbStakeState2))
{
var fbStakeStateAddress = StakeStateV2.DeriveAddress(fbAvatarState.agentAddress);
var fbStakeStateAddress = StakeState.DeriveAddress(fbAvatarState.agentAddress);
var fbCurrency = fbOutputState.GetGoldCurrency();
var fbStakedBalance = fbOutputState.GetBalance(fbStakeStateAddress, fbCurrency);
_fbUsBulkFile.WriteLine(
Expand Down Expand Up @@ -1388,9 +1388,9 @@ string network
}
else
{
if (outputState.TryGetStakeStateV2(avatarState.agentAddress, out StakeStateV2 stakeState2))
if (outputState.TryGetStakeState(avatarState.agentAddress, out StakeState stakeState2))
{
var stakeStateAddress = StakeStateV2.DeriveAddress(avatarState.agentAddress);
var stakeStateAddress = StakeState.DeriveAddress(avatarState.agentAddress);
var currency = outputState.GetGoldCurrency();
var stakedBalance = outputState.GetBalance(stakeStateAddress, currency);
_usBulkFile.WriteLine(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,11 @@ public void Migration(
if (!agents.Contains(avatarState.agentAddress.ToString()))
{
agents.Add(avatarState.agentAddress.ToString());
if (outputState.TryGetStakeStateV2(
if (outputState.TryGetStakeState(
avatarState.agentAddress,
out var stakeStateV2))
{
var stakeAddress = StakeStateV2.DeriveAddress(avatarState.agentAddress);
var stakeAddress = StakeState.DeriveAddress(avatarState.agentAddress);
var currency = outputState.GetGoldCurrency();
var stakedBalance = outputState.GetBalance(stakeAddress, currency);
_usBulkFile.WriteLine(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ DateTimeOffset blockTime
{
long claimStakeStartBlockIndex;
long claimStakeEndBlockIndex;
if (previousStates.TryGetStakeStateV2(signer, out var prevStakeStateV2))
if (previousStates.TryGetStakeState(signer, out var prevStakeStateV2))
{
claimStakeStartBlockIndex = prevStakeStateV2.StartedBlockIndex;
claimStakeEndBlockIndex = prevStakeStateV2.ReceivedBlockIndex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ DateTimeOffset blockTime

var currency = previousStates.GetGoldCurrency();
var stakedAmount = 0 * currency;
if (previousStates.TryGetStakeStateV2(signer, out _))
if (previousStates.TryGetStakeState(signer, out _))
{
var stakeAddr = StakeStateV2.DeriveAddress(signer);
var stakeAddr = StakeState.DeriveAddress(signer);
stakedAmount = previousStates.GetBalance(stakeAddr, currency);
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static MigrateMonsterCollectionModel GetMigrateMonsterCollectionInfo(
DateTimeOffset blockTime
)
{
outputStates.TryGetStakeState(signer, out StakeState stakeState);
outputStates.TryGetStakeState(signer, out Nekoyume.Model.Stake.StakeState stakeState);
var agentState = previousStates.GetAgentState(signer);
if (agentState is null)
{
Expand Down
6 changes: 3 additions & 3 deletions NineChronicles.DataProvider/DataRendering/StakeData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ Guid actionId
)
{
var currency = outputStates.GetGoldCurrency();
var stakeAddress = StakeStateV2.DeriveAddress(signer);
var stakeAddress = StakeState.DeriveAddress(signer);
FungibleAssetValue previousAmount;
FungibleAssetValue newAmount;
long prevStakeStartBlockIndex;
long newStakeStartBlockIndex;
if (previousStates.TryGetStakeStateV2(signer, out var prevStakeStateV2))
if (previousStates.TryGetStakeState(signer, out var prevStakeStateV2))
{
previousAmount = previousStates.GetBalance(stakeAddress, currency);
prevStakeStartBlockIndex = prevStakeStateV2.StartedBlockIndex;
Expand All @@ -36,7 +36,7 @@ Guid actionId
prevStakeStartBlockIndex = 0;
}

if (outputStates.TryGetStakeStateV2(signer, out var stakeStateV2))
if (outputStates.TryGetStakeState(signer, out var stakeStateV2))
{
newAmount = outputStates.GetBalance(stakeAddress, currency);
newStakeStartBlockIndex = stakeStateV2.StartedBlockIndex;
Expand Down
2 changes: 1 addition & 1 deletion NineChronicles.Headless
Submodule NineChronicles.Headless updated 25 files
+1 −1 Lib9c
+43 −17 NineChronicles.Headless.Executable.Tests/Commands/ChainCommandTest.cs
+7 −8 NineChronicles.Headless.Executable.Tests/Commands/GenesisHelper.cs
+5 −0 NineChronicles.Headless.Executable.Tests/NineChronicles.Headless.Executable.Tests.csproj
+15 −0 NineChronicles.Headless.Executable.Tests/TableSheetsImporter.cs
+6 −3 NineChronicles.Headless.Executable/Commands/GenesisCommand.cs
+5 −3 NineChronicles.Headless.Executable/Commands/ReplayCommand.Privates.cs
+4 −16 NineChronicles.Headless.Tests/Action/ActionContext.cs
+1 −1 NineChronicles.Headless.Tests/Common/Fixtures.cs
+1 −1 NineChronicles.Headless.Tests/GraphQLTestUtils.cs
+2 −0 NineChronicles.Headless.Tests/GraphTypes/ActionQueryTest.cs
+18 −16 NineChronicles.Headless.Tests/GraphTypes/AddressQueryTest.cs
+6 −9 NineChronicles.Headless.Tests/GraphTypes/GraphQLTestBase.cs
+11 −10 NineChronicles.Headless.Tests/GraphTypes/StandaloneMutationTest.cs
+4 −0 NineChronicles.Headless.Tests/GraphTypes/StandaloneQueryTest.cs
+2 −2 NineChronicles.Headless.Tests/GraphTypes/States/Models/StakeAchievementsTypeTest.cs
+12 −12 NineChronicles.Headless.Tests/GraphTypes/States/Models/StakeStateTypeTest.cs
+23 −8 NineChronicles.Headless.Tests/GraphTypes/TransactionHeadlessQueryTest.cs
+2 −0 NineChronicles.Headless.Tests/GraphTypes/WorldBossScenarioTest.cs
+7 −0 NineChronicles.Headless/GraphTypes/ActionMutation.cs
+49 −5 NineChronicles.Headless/GraphTypes/ActionQuery.cs
+64 −2 NineChronicles.Headless/GraphTypes/StateQuery.cs
+1 −1 NineChronicles.Headless/GraphTypes/States/StakeAchievementsType.cs
+3 −3 NineChronicles.Headless/GraphTypes/States/StakeStateType.cs
+29 −0 NineChronicles.Headless/Utils/HallowActionContext.cs

0 comments on commit 9cfd97f

Please sign in to comment.