-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Fix build errors in test projects or etc.
- Loading branch information
Showing
36 changed files
with
530 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using Bencodex.Types; | ||
using Libplanet.Action.State; | ||
using Libplanet.Crypto; | ||
|
||
namespace Libplanet.Action.Tests.Common | ||
{ | ||
public sealed class IncrementAction : IAction | ||
{ | ||
public static readonly Address IncrementAddress = | ||
new Address("0000000000000000000000000000000000000123"); | ||
|
||
public IncrementAction() | ||
{ | ||
} | ||
|
||
public IValue PlainValue => Bencodex.Types.Dictionary.Empty; | ||
|
||
public void LoadPlainValue(IValue plainValue) | ||
{ | ||
} | ||
|
||
public IWorld Execute(IActionContext ctx) | ||
{ | ||
IWorld states = ctx.PreviousState; | ||
IAccount account = states.GetAccount(ReservedAddresses.LegacyAccount); | ||
int value = 0; | ||
|
||
if (account.GetState(IncrementAddress) is Integer integer) | ||
{ | ||
value = (int)integer.Value + 1; | ||
} | ||
|
||
account = account.SetState(IncrementAddress, new Integer(value)); | ||
return states.SetAccount(ReservedAddresses.LegacyAccount, account); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.