planetarium / libplanet-explorer

Libplanet Explorer now belongs to the Libplanet monorepo. This repository remains read-only as historical archive.
https://github.com/planetarium/libplanet/tree/main/Libplanet.Explorer
10 stars 20 forks source link

feat(#128): Allow ActionType's plain value to support IValue not only Dictionary #131

Closed moreal closed 3 years ago

moreal commented 3 years ago

See #128 for the implementation issue. But it doesn't resolve all tasks like test code. So the issue will not be closed if this pull request merged.

Example

Request

{
  transactionQuery {
    stagedTransactions(limit: 1) {
      actions {
        inspection
        raw(encode: "base64")
      }
    }
  }
}

Response

{
  "data": {
    "transactionQuery": {
      "stagedTransactions": [
        {
          "actions": [
            {
              "inspection": "{\n  \"type_id\": \"hack_and_slash2\",\n  \"values\": {\n    \"avatarAddress\": b\"\\x55\\x59\\xf5\\x2e\\xb4\\x03\\x26\\x63\\x47\\x09\\x1b\\x63\\x34\\x39\\xf5\\x4a\\x78\\xa0\\xcd\\xc3\",\n    \"costumes\": [],\n    \"equipments\": [b\"\\xb2\\x46\\x31\\xd3\\x8b\\x85\\x8f\\x42\\x87\\xa4\\xb3\\x3e\\x9c\\x3f\\x81\\x6a\"],\n    \"foods\": [],\n    \"id\": b\"\\xb9\\x94\\xf7\\xfc\\xf1\\x9f\\x41\\x4a\\xaf\\xc0\\x7d\\xc6\\x1a\\x58\\x39\\xb2\",\n    \"rankingMapAddress\": b\"\\x49\\x8c\\x9d\\x9a\\x6f\\x95\\x0f\\xaa\\xb0\\x5d\\x13\\x46\\x88\\x4a\\x1c\\xae\\x77\\x61\\xfe\\x92\",\n    \"stageId\": \"7\",\n    \"weeklyArenaAddress\": b\"\\x32\\xe6\\x0b\\x98\\xc4\\x8b\\xae\\xb4\\x39\\x0b\\x98\\x68\\x80\\x30\\x0c\\x94\\xcb\\x08\\xf3\\x81\",\n    \"worldId\": \"1\"\n  }\n}",
              "raw": "ZHU3OnR5cGVfaWR1MTU6aGFja19hbmRfc2xhc2gydTY6dmFsdWVzZHUxMzphdmF0YXJBZGRyZXNzMjA6VVn1LrQDJmNHCRtjNDn1SnigzcN1ODpjb3N0dW1lc2xldTEwOmVxdWlwbWVudHNsMTY6skYx04uFj0KHpLM+nD+BamV1NTpmb29kc2xldTI6aWQxNjq5lPf88Z9BSq/AfcYaWDmydTE3OnJhbmtpbmdNYXBBZGRyZXNzMjA6SYydmm+VD6qwXRNGiEocrndh/pJ1NzpzdGFnZUlkdTE6N3UxODp3ZWVrbHlBcmVuYUFkZHJlc3MyMDoy5guYxIuutDkLmGiAMAyUywjzgXU3OndvcmxkSWR1MToxZWU="
            }
          ]
        }
      ]
    }
  }
}