public async Task GameEnd(uint totalScore, string nickname)
    {
        try
        {
            Debug.Log("GameEnd Start");
            await RankClient.ConnectToContract();

            await RankClient.EndGame(PlayerWallet.publicKey, totalScore); // Rank 점수 계산

            JsonRankState currentRankState = await RankClient.getRankList();

            if (currentRankState == null)
            {
                currentRankState = new JsonRankState();
            }
            // Top 100 Rank Update
            JsonRankState.Rank myRank;
            myRank.nickname = nickname;
            myRank.score    = totalScore;
            currentRankState.RankUpdate(myRank);
            await RankClient.setRankList(currentRankState);
        }
        catch (Exception e)
        {
            Debug.Log(e);
        }
    }
    public async Task getTop100RankPlayer()
    {
        try
        {
            await RankClient.ConnectToContract();

            jsonRankState = await RankClient.getRankList();

            foreach (JsonRankState.Rank rank in jsonRankState.Ranks)
            {
                Debug.Log(rank.nickname + ": " + rank.score);
            }
        }
        catch (Exception e)
        {
            Debug.Log(e);
        }
    }
    public async Task <JsonRankState> getRankList()
    {
        try
        {
            await ConnectToContract();

            getRankListOutput result = await this.contract.StaticCallDtoTypeOutputAsync <getRankListOutput>("getRankList");

            Debug.Log(result.state);
            JsonRankState jsonRankState = JsonUtility.FromJson <JsonRankState>(result.state);
            Debug.Log("getRankList");
            return(jsonRankState);
        }
        catch (Exception e)
        {
            Debug.Log(e);
            return(null);
        }
    }
    public async Task setRankList(JsonRankState jsonRankState)
    {
        try
        {
            await ConnectToContract();

            var    address     = CryptoUtils.LocalAddressFromPublicKey(publicKey);
            string str_address = BitConverter.ToString(address).Replace("-", "");

            string ranks = JsonUtility.ToJson(jsonRankState);
            await this.contract.CallAsync("setRankList", ranks);

            Debug.Log("setRankList");
        }
        catch (Exception e)
        {
            Debug.Log(e);
        }
    }