Trouble getting snip-20 view key

Having trouble obtaining a view key for a snip-20 token contract. I have done this before with other snip-20 token contracts, but I’m getting back a long list of messages with no obvious view key shown. I’m not quite sure what the issue is. Any help would be appreciated.

I instantiated a snip-20 token (configurable-snip20) on holodeck 2 and I’m attempting to generate a view key with the secretcli. I issued the following:

secretcli tx compute execute secret15m0feupa7nrk3gl8kzep38vecxr7lzuhv6dyfg '{"create_viewing_key": {"entropy": "thisIsaTest123456789"}}' --from me --gas 3000000
{"chain_id":"holodeck-2","account_number":"9360","sequence":"2","fee":{"amount":[{"denom":"uscrt","amount":"750000"}],"gas":"3000000"},"msgs":[{"type":"wasm/MsgExecuteContract","value":{"sender":"secret1a7n82r546um39e8wydrhd633kd80sgmprd7j7z","contract":"secret15m0feupa7nrk3gl8kzep38vecxr7lzuhv6dyfg","msg":"l5rNdCjubEwM1Fh1ik8o6zkfDwKi7Mjq5AyzjDVHgqfQ45TFGBj6iA6xJUJ58BJysY/6m7EUTOGVawfCjjipJ5lMeeg5qWnRknI/YyEuFA+l0RwP5WNe8qLptsm424PFG8Krxwwhz1ovsID1HJuqRr2Zgu9q17DM5uZ1FrcitxLPbUrG6Ii90JOrOJNLXgRZ8UgEf50h+la4ytDIrGzFZj3dZOs1IOBOneQ9xYSQMF7qn2WBhFnkfl3UPq/Q2RKvZSSnMWsy1v8/bKE=","callback_code_hash":"","sent_funds":[],"callback_sig":null}}],"memo":""}
confirm transaction before signing and broadcasting [y/N]: y
height: 0
txhash: 9F186F8F6209DF33425ACF2883D5B1AC373FEE99A841D1B033A9AFF5AEE1CC21
codespace: ""
code: 0
data: ""
rawlog: '[]'
logs: []
info: ""
gaswanted: 0
gasused: 0
tx: null
timestamp: ""

THEN:

secretcli query tx 9F186F8F6209DF33425ACF2883D5B1AC373FEE99A841D1B033A9AFF5AEE1CC21
height: 2711775
txhash: 9F186F8F6209DF33425ACF2883D5B1AC373FEE99A841D1B033A9AFF5AEE1CC21
codespace: ""
code: 0
data: B5224879ABD17BF25C133EC1304CCE24629812CFCAB4299F285B1CBF5F2DE21A8DDDDB1D9C4E9A408B92FA8AE53815D3736BA096D69FE055FC212A45A2511EE13B86726E8E53106471D7D39263A55178E60544D8C6D40B96370C7B10877F823C5E8F3AFCBE05A21CFCC544220B135A952E7BD6FA6CCB7A0791FC3DE1B0D62ABADDA83D5408767F33C55D02D45255BEC696260CD717BB288D189528E550E253525D886CAB3EB47332D051F56CE4158F998EA0DE5605FA4F35C799340E383B2C436AA028BCB9D1297FD1185C1041FA0658BFFF7CAB4430C5BACEDC8A8B435C6C8B8A848D214F2A4D5E7532C73FE33C09F76626357C9F193D7C36D7A9213960131E7C4F72051EBF43704A433CC8F8E59B608F354A81C974723B70569F0765E44EBDD5939590E56FFEB9B55AFD6FAB9B33162D7385301A0C864239AE11A36E2761D4771669705141735AEC4BF473F03C5683B593982EAE95A4906A8249BB81B7F97B97A797D12188AFAC
rawlog: '[{"msg_index":0,"log":"","events":[{"type":"message","attributes":[{"key":"action","value":"execute"},{"key":"module","value":"compute"},{"key":"signer","value":"secret1a7n82r546um39e8wydrhd633kd80sgmprd7j7z"},{"key":"contract_address","value":"secret15m0feupa7nrk3gl8kzep38vecxr7lzuhv6dyfg"}]}]}]'
logs:
- msgindex: 0
  log: ""
  events:
  - type: message
    attributes:
    - key: action
      value: execute
    - key: module
      value: compute
    - key: signer
      value: secret1a7n82r546um39e8wydrhd633kd80sgmprd7j7z
    - key: contract_address
      value: secret15m0feupa7nrk3gl8kzep38vecxr7lzuhv6dyfg
info: ""
gaswanted: 3000000
gasused: 106307
tx:
  msg:
  - sender: secret1a7n82r546um39e8wydrhd633kd80sgmprd7j7z
    contract: secret15m0feupa7nrk3gl8kzep38vecxr7lzuhv6dyfg
    msg:
    - 151
    - 154
    - 205
    - 116
    - 40
    - 238
    - 108
    - 76
    - 12
    - 212
    - 88
    - 117
    - 138
    - 79
    - 40
    - 235
    - 57
    - 31
    - 15
    - 2
    - 162
    - 236
    - 200
    - 234
    - 228
    - 12
    - 179
    - 140
    - 53
    - 71
    - 130
    - 167
    - 208
    - 227
    - 148
    - 197
    - 24
    - 24
    - 250
    - 136
    - 14
    - 177
    - 37
    - 66
    - 121
    - 240
    - 18
    - 114
    - 177
    - 143
    - 250
    - 155
    - 177
    - 20
    - 76
    - 225
    - 149
    - 107
    - 7
    - 194
    - 142
    - 56
    - 169
    - 39
    - 153
    - 76
    - 121
    - 232
    - 57
    - 169
    - 105
    - 209
    - 146
    - 114
    - 63
    - 99
    - 33
    - 46
    - 20
    - 15
    - 165
    - 209
    - 28
    - 15
    - 229
    - 99
    - 94
    - 242
    - 162
    - 233
    - 182
    - 201
    - 184
    - 219
    - 131
    - 197
    - 27
    - 194
    - 171
    - 199
    - 12
    - 33
    - 207
    - 90
    - 47
    - 176
    - 128
    - 245
    - 28
    - 155
    - 170
    - 70
    - 189
    - 153
    - 130
    - 239
    - 106
    - 215
    - 176
    - 204
    - 230
    - 230
    - 117
    - 22
    - 183
    - 34
    - 183
    - 18
    - 207
    - 109
    - 74
    - 198
    - 232
    - 136
    - 189
    - 208
    - 147
    - 171
    - 56
    - 147
    - 75
    - 94
    - 4
    - 89
    - 241
    - 72
    - 4
    - 127
    - 157
    - 33
    - 250
    - 86
    - 184
    - 202
    - 208
    - 200
    - 172
    - 108
    - 197
    - 102
    - 61
    - 221
    - 100
    - 235
    - 53
    - 32
    - 224
    - 78
    - 157
    - 228
    - 61
    - 197
    - 132
    - 144
    - 48
    - 94
    - 234
    - 159
    - 101
    - 129
    - 132
    - 89
    - 228
    - 126
    - 93
    - 212
    - 62
    - 175
    - 208
    - 217
    - 18
    - 175
    - 101
    - 36
    - 167
    - 49
    - 107
    - 50
    - 214
    - 255
    - 63
    - 108
    - 161
    callback_code_hash: ""
    sent_funds: []
    callback_sig: []
  fee:
    amount:
    - denom: uscrt
      amount: "750000"
    gas: 3000000
  signatures:
  - |
    pubkey: secretpub1addwnpepq2m20tvpsjkkfnld7adp7su8qcal84xn3etculcd77qvly2azv2pwrtljz5
    signature: !!binary |
      hA26pw40X0JVeQ4ikzod4vV/6OYPoDdbYOj2vDhcwBc3wLbuAoLSkh5rH11jAd+0P7QDkn
      UM3hUJty8h4emJWg==
  memo: ""
timestamp: "2021-05-03T15:05:59Z"

please run these commands to make the output show up as json which is easier to use than the current yaml output:

secretcli config output json
secretcli config indent true

and then run this command to see the encrypted error message from the contract:

secretcli query compute tx 9F186F8F6209DF33425ACF2883D5B1AC373FEE99A841D1B033A9AFF5AEE1CC21

That worked! I can now see the view key.

Thank you!

awesome, you’re welcome :muscle: