Skip to content

Commit

Permalink
implement Addresses.GetAccountAddressOfBalance() method
Browse files Browse the repository at this point in the history
  • Loading branch information
boscohyun committed Oct 14, 2024
1 parent 7397fd3 commit 7c61b90
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Lib9c/Addresses.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Security.Cryptography;
using Libplanet.Common;
using Libplanet.Crypto;
using Libplanet.Types.Assets;
using Nekoyume.Action;
using Nekoyume.Model.State;
using Nekoyume.TableData;
Expand Down Expand Up @@ -96,6 +97,8 @@ public static Address GetGuildBanAccountAddress(Address guildAddress) =>

#endregion

public static Address GetAccountAddressOfBalance(Currency currency) => new(currency.Hash.ToByteArray());

public static Address GetSheetAddress<T>() where T : ISheet => GetSheetAddress(typeof(T).Name);

public static Address GetSheetAddress(string sheetName) => TableSheet.Derive(sheetName);
Expand Down

0 comments on commit 7c61b90

Please sign in to comment.