private async Task <GameItemContract> GetGameItemContractByInterface(string contractAddress) { SupportsInterfaceWithLookupContract interfaceContract = (SupportsInterfaceWithLookupContract)BCComm.GetContract(typeof(SupportsInterfaceWithLookupContract), contractAddress); ContractInterfaceID currentInterfaceId = null; if (await interfaceContract.SupportsInterface(supportsInterfaceWithLookup.InterfaceID)) { foreach (ContractInterfaceID interfaceId in interfaceIDs) { if (await interfaceContract.SupportsInterface(interfaceId.InterfaceID)) { currentInterfaceId = interfaceId; } } } if (currentInterfaceId != null) { return(BCComm.GetGameItemContract(Game, contractAddress, currentInterfaceId.ContractType)); } return(null); }