/// <summary> /// Helper function to automatically register all contracts for given game /// </summary> public async Task RegisterHoardGameContracts() { string[] contracts = await BCComm.GetGameItemContracts(Game); if (contracts != null) { foreach (string c in contracts) { GameItemContract gameItemContract = await GetGameItemContractByInterface(c); if (gameItemContract != null) { RegisterGameItemContract(await gameItemContract.GetSymbol(), gameItemContract); } else { throw new HoardException("Invalid contract"); } } return; } throw new HoardException($"Cannot find any contracts for Game: {Game.ID}!"); }