Skip to content

Commit 69f33f4

Browse files
committed
- Finishing off NFT integration into STAR CLI.
- Fixed bugs in MongoDBOASIS Provider. - Bumped STAR ODK version to v2.1.0.
1 parent 43bdfe3 commit 69f33f4

6 files changed

Lines changed: 67 additions & 56 deletions

File tree

NextGenSoftware.OASIS.API.Core/Interfaces/NFT/Requests/INFTWalletTransactionRequest.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33

44
namespace NextGenSoftware.OASIS.API.Core.Interfaces.NFT.Request
55
{
6-
public interface INFTWalletTransactionRequest //: IWalletTransactionRequest
6+
public interface INFTWalletTransactionRequest : IWalletTransactionRequest
77
{
88
public string MintWalletAddress { get; set; }
9-
public string FromWalletAddress { get; set; }
10-
public string ToWalletAddress { get; set; }
11-
//public string FromToken { get; set; }
12-
//public string ToToken { get; set; }
13-
//public ProviderType FromProviderType { get; set; }
14-
//public ProviderType ToProviderType { get; set; }
15-
//public decimal Amount { get; set; }
16-
public string MemoText { get; set; }
9+
//public string FromWalletAddress { get; set; }
10+
//public string ToWalletAddress { get; set; }
11+
////public string FromToken { get; set; }
12+
////public string ToToken { get; set; }
13+
////public ProviderType FromProviderType { get; set; }
14+
////public ProviderType ToProviderType { get; set; }
15+
////public decimal Amount { get; set; }
16+
//public string MemoText { get; set; }
1717
}
1818
}

NextGenSoftware.OASIS.API.Core/Objects/NFT/Requests/NFTWalletTransactionRequest.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44

55
namespace NextGenSoftware.OASIS.API.Core.Objects.NFT.Request
66
{
7-
public class NFTWalletTransactionRequest : INFTWalletTransactionRequest //: WalletTransactionRequest, INFTWalletTransactionRequest
7+
public class NFTWalletTransactionRequest : WalletTransactionRequest, INFTWalletTransactionRequest
88
{
99
public string MintWalletAddress { get; set; }
10-
public string FromWalletAddress { get; set; }
11-
public string ToWalletAddress { get; set; }
12-
//public string FromToken { get; set; }
13-
//public string ToToken { get; set; }
14-
// ProviderType FromProviderType { get; set; }
15-
//public ProviderType ToProviderType { get; set; }
16-
//public decimal Amount { get; set; }
17-
public string MemoText { get; set; }
10+
//public string FromWalletAddress { get; set; }
11+
//public string ToWalletAddress { get; set; }
12+
////public string FromToken { get; set; }
13+
////public string ToToken { get; set; }
14+
//// ProviderType FromProviderType { get; set; }
15+
////public ProviderType ToProviderType { get; set; }
16+
////public decimal Amount { get; set; }
17+
//public string MemoText { get; set; }
1818
}
1919
}

NextGenSoftware.OASIS.API.Providers.MongoOASIS/Repositories/HolonRepository.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,10 +383,14 @@ public async Task<OASISResult<IEnumerable<Holon>>> GetAllHolonsForParentByMetaDa
383383
try
384384
{
385385
//result.Result = await _dbContext.Holon.FindAsync(BuildFilterForGetHolonsForParentByMetaData(metaKey, metaValue, holonType)).Result.ToListAsync();
386-
var documents = _dbContext.Holon.Find(Builders<Holon>.Filter.Empty).ToList();
386+
var documents = _dbContext.Holon.FindAsync(Builders<Holon>.Filter.Empty).Result.ToListAsync();
387+
//var documents = await _dbContext.Holon.FindAsync(_ => true).ToList();
388+
389+
//var documents2 = _dbContext.Holon.AsQueryable().ToList();
390+
387391
List<Holon> matchedHolons = new List<Holon>();
388392

389-
foreach (Holon holon in documents)
393+
foreach (Holon holon in documents.Result)
390394
{
391395
if (holon.MetaData.ContainsKey(metaKey) && holon.MetaData[metaKey] != null && holon.MetaData[metaKey].ToString() == metaValue)
392396
matchedHolons.Add(holon);

NextGenSoftware.OASIS.OASISBootLoader/OASISBootLoader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static class OASISBootLoader
3939

4040
public static string OASISVersion { get; set; } = "v3.2.2";
4141
public static string COSMICVersion { get; set; } = "v2.0.1";
42-
public static string STARODKVersion { get; set; } = "v2.0.1";
42+
public static string STARODKVersion { get; set; } = "v2.1.0";
4343

4444
//public static string OASISVersion
4545
//{

NextGenSoftware.OASIS.STAR.CLI.Lib/STARCLI.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,7 @@ public static async Task PlaceGeoNFTAsync()
416416

417417
public static async Task ListGeoNFTsAsync()
418418
{
419+
CLIEngine.ShowWorkingMessage("Loading Geo-NFTs...");
419420
OASISResult<IEnumerable<IOASISGeoSpatialNFT>> nfts = await STAR.OASISAPI.NFTs.LoadAllGeoNFTsForAvatarAsync(STAR.BeamedInAvatar.Id);
420421

421422
if (nfts != null && !nfts.IsError && nfts.Result != null)
@@ -471,6 +472,7 @@ public static async Task ListGeoNFTsAsync()
471472

472473
public static async Task ListNFTsAsync()
473474
{
475+
CLIEngine.ShowWorkingMessage("Loading NFTs...");
474476
OASISResult<IEnumerable<IOASISNFT>> nfts = await STAR.OASISAPI.NFTs.LoadAllNFTsForAvatarAsync(STAR.BeamedInAvatar.Id);
475477

476478
if (nfts != null && !nfts.IsError && nfts.Result != null)

NextGenSoftware.OASIS.STAR.CLI/Program.cs

Lines changed: 40 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -518,34 +518,6 @@ private static async Task ReadyPlayerOne()
518518
}
519519
break;
520520

521-
case "enablecosmicdetailedoutput":
522-
{
523-
STAR.IsDetailedCOSMICOutputsEnabled = true;
524-
CLIEngine.ShowMessage("Detailed COSMIC Output Enabled.");
525-
}
526-
break;
527-
528-
case "disablecosmicdetailedoutput":
529-
{
530-
STAR.IsDetailedCOSMICOutputsEnabled = false;
531-
CLIEngine.ShowMessage("Detailed COSMIC Output Disabled.");
532-
}
533-
break;
534-
535-
case "enablestarstatusdetailedoutput":
536-
{
537-
STAR.IsDetailedStatusUpdatesEnabled = true;
538-
CLIEngine.ShowMessage("Detailed STAR ODK Status Output Enabled.");
539-
}
540-
break;
541-
542-
case "disablestarstatusdetailedoutput":
543-
{
544-
STAR.IsDetailedStatusUpdatesEnabled = false;
545-
CLIEngine.ShowMessage("Detailed STAR ODK Status Output Disabled.");
546-
}
547-
break;
548-
549521
case "listoapps":
550522
{
551523
CLIEngine.ShowMessage("Coming soon...");
@@ -712,15 +684,47 @@ private static async Task ReadyPlayerOne()
712684
await STARCLI.MintGeoNFTAsync();
713685
break;
714686

687+
case "placegeonft":
688+
await STARCLI.PlaceGeoNFTAsync();
689+
break;
690+
715691
case "shownfts":
692+
await STARCLI.ListNFTsAsync();
693+
break;
694+
695+
case "showgeonfts":
696+
await STARCLI.ListGeoNFTsAsync();
697+
break;
698+
699+
case "sendnft":
700+
await STARCLI.SendNFTAsync();
701+
break;
702+
703+
case "enablecosmicdetailedoutput":
716704
{
717-
CLIEngine.ShowMessage("Coming soon...");
705+
STAR.IsDetailedCOSMICOutputsEnabled = true;
706+
CLIEngine.ShowMessage("Detailed COSMIC Output Enabled.");
718707
}
719708
break;
720709

721-
case "showgeonfts":
710+
case "disablecosmicdetailedoutput":
722711
{
723-
CLIEngine.ShowMessage("Coming soon...");
712+
STAR.IsDetailedCOSMICOutputsEnabled = false;
713+
CLIEngine.ShowMessage("Detailed COSMIC Output Disabled.");
714+
}
715+
break;
716+
717+
case "enablestarstatusdetailedoutput":
718+
{
719+
STAR.IsDetailedStatusUpdatesEnabled = true;
720+
CLIEngine.ShowMessage("Detailed STAR ODK Status Output Enabled.");
721+
}
722+
break;
723+
724+
case "disablestarstatusdetailedoutput":
725+
{
726+
STAR.IsDetailedStatusUpdatesEnabled = false;
727+
CLIEngine.ShowMessage("Detailed STAR ODK Status Output Disabled.");
724728
}
725729
break;
726730

@@ -768,8 +772,7 @@ private static async Task ReadyPlayerOne()
768772
break;
769773

770774
default:
771-
CLIEngine.ShowMessage("Unknown Command.", ConsoleColor.Green);
772-
//Console.WriteLine("");
775+
CLIEngine.ShowErrorMessage("Unknown Command.");
773776
break;
774777
}
775778
}
@@ -2427,10 +2430,12 @@ private static void ShowCommands()
24272430
Console.WriteLine(" star showkeys = Shows the keys for the current beamed in avatar.");
24282431
Console.WriteLine(" star showwallets = Shows the wallets for the current beamed in avatar.");
24292432
Console.WriteLine(" star search = Seaches The OASIS for the given seach parameters.");
2430-
Console.WriteLine(" star mintnft = Mints a NFT for the current beamed in avatar.");
2431-
Console.WriteLine(" star mintgeonft = Mints a Geo-NFT for the current beamed in avatar.");
2433+
Console.WriteLine(" star mintnft = Mints a OASIS NFT for the current beamed in avatar.");
2434+
Console.WriteLine(" star mintgeonft = Mints a OASIS Geo-NFT and places in Our World/AR World for the current beamed in avatar.");
2435+
Console.WriteLine(" star placegeonft = Places an existing OASIS NFT in Our World/AR World for the current beamed in avatar.");
24322436
Console.WriteLine(" star shownfts = Shows the NFT's that belong to current beamed in avatar.");
24332437
Console.WriteLine(" star showgeonfts = Shows the Geo-NFT's that belong to current beamed in avatar.");
2438+
Console.WriteLine(" star sendnft = Send a NFT to another wallet cross-chain.");
24342439
Console.WriteLine(" star enablecosmicdetailedoutput = Enables COSMIC Detailed Output.");
24352440
Console.WriteLine(" star disablecosmicdetailedoutput = Disables COSMIC Detailed Output.");
24362441
Console.WriteLine(" star enablestarstatusdetailedoutput = Enables STAR ODK Detailed Output.");

0 commit comments

Comments
 (0)