From 7c61b90059f5942091a23bbf8b0529b212ab9839 Mon Sep 17 00:00:00 2001 From: Hyun Seungmin Date: Mon, 14 Oct 2024 14:31:37 +0900 Subject: [PATCH] implement Addresses.GetAccountAddressOfBalance() method --- Lib9c/Addresses.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib9c/Addresses.cs b/Lib9c/Addresses.cs index f5881717af..f4c94b4fb5 100644 --- a/Lib9c/Addresses.cs +++ b/Lib9c/Addresses.cs @@ -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; @@ -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() where T : ISheet => GetSheetAddress(typeof(T).Name); public static Address GetSheetAddress(string sheetName) => TableSheet.Derive(sheetName);