diff --git a/src/neo/SmartContract/Native/NonfungibleToken.cs b/src/neo/SmartContract/Native/NonfungibleToken.cs index c572a3889d..fb1a560b67 100644 --- a/src/neo/SmartContract/Native/NonfungibleToken.cs +++ b/src/neo/SmartContract/Native/NonfungibleToken.cs @@ -123,14 +123,14 @@ public BigInteger BalanceOf(DataCache snapshot, UInt160 owner) } [ContractMethod(0_01000000, CallFlags.ReadStates)] - private IIterator Tokens(DataCache snapshot) + protected IIterator Tokens(DataCache snapshot) { - var results = snapshot.Find(new[] { Prefix_Token }).GetEnumerator(); + var results = snapshot.Find(CreateStorageKey(Prefix_Token).ToArray()).GetEnumerator(); return new StorageIterator(results, FindOptions.ValuesOnly | FindOptions.DeserializeValues | FindOptions.PickField1, null); } [ContractMethod(0_01000000, CallFlags.ReadStates)] - private IIterator TokensOf(DataCache snapshot, UInt160 owner) + protected IIterator TokensOf(DataCache snapshot, UInt160 owner) { NFTAccountState account = snapshot.TryGet(CreateStorageKey(Prefix_Account).Add(owner))?.GetInteroperable(); IReadOnlyList tokens = account?.Tokens ?? (IReadOnlyList)System.Array.Empty();