OCamlPro / tzscan

The TzScan block explorer for Tezos
http://tzscan.io
Apache License 2.0
12 stars 2 forks source link

`-1` values for smart contract transations?? #4

Open smondet opened 5 years ago

smondet commented 5 years ago

screenshot-20181212-102858

If not implemented yet, why not a :warning: emoji with a "Not implemented" tooltip?

It's this bloc: https://tzscan.io/BMURxEzALwiFf8czWf4Ezc1FBA7UtjEJ7J7oWkiYwVCnTgyTE79

And this data

curl 'https://rpc.tzbeta.net/chains/main/blocks/BMURxEzALwiFf8czWf4Ezc1FBA7UtjEJ7J7oWkiYwVCnTgyTE79' | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7798  100  7798    0     0  18835      0 --:--:-- --:--:-- --:--:-- 18835
{
  "protocol": "PtCJ7pwoxe8JasnHY8YonnLYjcVHmhiARPJvqcC6VfHT5s8k8sY",
  "chain_id": "NetXdQprcVkpaWU",
  "hash": "BMURxEzALwiFf8czWf4Ezc1FBA7UtjEJ7J7oWkiYwVCnTgyTE79",
  "header": {
    "level": 24298,
    "proto": 1,
    "predecessor": "BLnW4cKNfnE6DUZQ83xnQEJ2U35MD2CRtnpaDBa5bDFQFoagqnA",
    "timestamp": "2018-07-18T23:15:42Z",
    "validation_pass": 4,
    "operations_hash": "LLoaUVC1zyCv63zrni4DNvnunJMn7fqeJhZjW93nWAMw3PTxf5Mb9",
    "fitness": [
      "00",
      "000000000006c543"
    ],
    "context": "CoUuT1287DEs2MwBSiEh1dFiSDKVWQHzTBTbMyTVZGAZmquModLX",
    "priority": 0,
    "proof_of_work_nonce": "835e382d96ca1d6f",
    "signature": "sigNtEf8oXrbMTUknQs3YJgWb2sDHQYrubFVnAnFSjcVxLr7NJrLrdPHDEXJdu7qXYTrBaJBYci6upvwFmHssegx3ZwLaFUj"
  },
  "metadata": {
    "protocol": "PtCJ7pwoxe8JasnHY8YonnLYjcVHmhiARPJvqcC6VfHT5s8k8sY",
    "next_protocol": "PtCJ7pwoxe8JasnHY8YonnLYjcVHmhiARPJvqcC6VfHT5s8k8sY",
    "test_chain_status": {
      "status": "not_running"
    },
    "max_operations_ttl": 60,
    "max_operation_data_length": 16384,
    "max_block_header_length": 238,
    "max_operation_list_length": [
      {
        "max_size": 32768,
        "max_op": 32
      },
      {
        "max_size": 32768
      },
      {
        "max_size": 135168,
        "max_op": 132
      },
      {
        "max_size": 524288
      }
    ],
    "baker": "tz3NExpXn9aPNZPorRE4SdjJ2RGrfbJgMAaV",
    "level": {
      "level": 24298,
      "level_position": 24297,
      "cycle": 5,
      "cycle_position": 3817,
      "voting_period": 0,
      "voting_period_position": 24297,
      "expected_commitment": false
    },
    "voting_period_kind": "proposal",
    "nonce_hash": null,
    "consumed_gas": "114336",
    "deactivated": [],
    "balance_updates": [
      {
        "kind": "contract",
        "contract": "tz3NExpXn9aPNZPorRE4SdjJ2RGrfbJgMAaV",
        "change": "-40000000"
      },
      {
        "kind": "freezer",
        "category": "deposits",
        "delegate": "tz3NExpXn9aPNZPorRE4SdjJ2RGrfbJgMAaV",
        "level": 5,
        "change": "40000000"
      }
    ]
  },
  "operations": [
    [],
    [],
    [],
    [
      {
        "protocol": "PtCJ7pwoxe8JasnHY8YonnLYjcVHmhiARPJvqcC6VfHT5s8k8sY",
        "chain_id": "NetXdQprcVkpaWU",
        "hash": "oorKTsFJ7k9ZUiuvyLpNN7sQCy2caXNzG2FckABBtVQ6kpMGfgk",
        "branch": "BLnW4cKNfnE6DUZQ83xnQEJ2U35MD2CRtnpaDBa5bDFQFoagqnA",
        "contents": [
          {
            "kind": "transaction",
            "source": "tz1RXwDDhrSKPorSPPJFy3tD9Rj341ihCvbv",
            "fee": "50000",
            "counter": "37119",
            "gas_limit": "113415",
            "storage_limit": "0",
            "amount": "0",
            "destination": "KT1EWLAQGPMF2uhtVRPaCH2vtFVN36Njdr6z",
            "parameters": {
              "prim": "Left",
              "args": [
                {
                  "prim": "Pair",
                  "args": [
                    {
                      "prim": "Left",
                      "args": [
                        {
                          "prim": "Left",
                          "args": [
                            {
                              "prim": "Pair",
                              "args": [
                                {
                                  "string": "tz3NExpXn9aPNZPorRE4SdjJ2RGrfbJgMAaV"
                                },
                                {
                                  "int": "2999999000000"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    [
                      [
                        {
                          "prim": "None"
                        },
                        {
                          "prim": "Some",
                          "args": [
                            {
                              "string": "edsigtj584m672A9pbPzuLGp7FArw3yibiP8zyWe6G1nLqrfRfzbKzfhcAXQm6jqHYAKxuELq23VyDAPpX8Z5xReUXE9NbW3NAc"
                            }
                          ]
                        },
                        {
                          "prim": "Some",
                          "args": [
                            {
                              "string": "edsigtesFwqqL33yE5SKmYA1L3MYb7Sjgf5N6GwEUyWukqyafLhsaQ4NQUUVLuP2kyX3G8xtxV9yssqD636F9reK2EKCVXUSDY2"
                            }
                          ]
                        },
                        {
                          "prim": "None"
                        }
                      ],
                      [
                        {
                          "prim": "Some",
                          "args": [
                            {
                              "string": "edsigtq3Nhd8dmpNoFNDS4M1GoSSQjZynVwy5HcJh1aBemsKS4Lx4XC9GHWJBU3ps5yVAo7xLmsazahKkSrueKxARgKKFWiUWR4"
                            }
                          ]
                        },
                        {
                          "prim": "None"
                        },
                        {
                          "prim": "Some",
                          "args": [
                            {
                              "string": "edsigu6oJJEbufw3WFQfkt8x5s9Z7ZgFchGC3FDWaivN5ubxwhSfMVabRviRDN2gDeiw3UgMiiVEzcWvNqJ1b5FVQtxZ3iLEL9G"
                            }
                          ]
                        },
                        {
                          "prim": "Some",
                          "args": [
                            {
                              "string": "edsigtuoyv55LxncCEfZ9cUaXduG6K9LjWh4esb23x3hNK6vWyw3DfzgtisvPn1Sey79DwdY3pQ3MqKesupoqBKvKEQCsbmHrS1"
                            }
                          ]
                        }
                      ],
                      [
                        {
                          "prim": "Some",
                          "args": [
                            {
                              "string": "edsigtmzgwBRYXTjyAZdR9eAfpmKg1FtfQYFQCuYpdUpdwVj5gkXwADaJzbot9synbdnvdJ43Q5np66Ayb7L7P4RVoQo9prV4uk"
                            }
                          ]
                        },
                        {
                          "prim": "Some",
                          "args": [
                            {
                              "string": "edsigtYHqr4kuk75ZgqSjWmbHPV5YCEoKHppshf7VfKC1WPZLCdzmd8tcyt8Sfbv47gaseriWy1i5hZ78og9KHSzJqGh49KZZj3"
                            }
                          ]
                        },
                        {
                          "prim": "Some",
                          "args": [
                            {
                              "string": "edsigtk11zyQX37yHuwH1YsgH78eVq5UoBHEh5c4UU5d2HqaVnD6MD2AoWV2S1wS1KMTyUqcZZRkPMZ6XQYbErPsmZtzgmTnpFj"
                            }
                          ]
                        },
                        {
                          "prim": "Some",
                          "args": [
                            {
                              "string": "edsigtc9Fr5JPY6fyFeU36T8YxFKZaMfJ7sz175xu9S46795hUdZPa2oLFH3DVWrXZbztyxiPDAbRXCW283m62jfcjyMvbZAmcy"
                            }
                          ]
                        }
                      ],
                      [
                        {
                          "prim": "None"
                        },
                        {
                          "prim": "None"
                        },
                        {
                          "prim": "None"
                        },
                        {
                          "prim": "None"
                        }
                      ],
                      [
                        {
                          "prim": "None"
                        },
                        {
                          "prim": "None"
                        },
                        {
                          "prim": "None"
                        },
                        {
                          "prim": "None"
                        }
                      ],
                      [
                        {
                          "prim": "None"
                        },
                        {
                          "prim": "None"
                        },
                        {
                          "prim": "Some",
                          "args": [
                            {
                              "string": "edsigu57fgXXPan3gk8TWMZQDr8pr8UXf6A4A8ugxMRGDyh7rvKgscZUbczn8fsqXTP4TutMZe3e4TPiVovrH9rj5QMJEmmyaxq"
                            }
                          ]
                        },
                        {
                          "prim": "Some",
                          "args": [
                            {
                              "string": "edsigtaYLXPt6FgPudbRA7ZZZRLtr11ahMbEWHDQiyK4HpRHDtS3Dj3HgAsYKxcLTeWNLnW8sVo858XYiETaBFpkdTTJRgJpJvC"
                            }
                          ]
                        }
                      ],
                      [
                        {
                          "prim": "None"
                        },
                        {
                          "prim": "None"
                        },
                        {
                          "prim": "None"
                        },
                        {
                          "prim": "None"
                        }
                      ]
                    ]
                  ]
                }
              ]
            },
            "metadata": {
              "balance_updates": [
                {
                  "kind": "contract",
                  "contract": "tz1RXwDDhrSKPorSPPJFy3tD9Rj341ihCvbv",
                  "change": "-50000"
                },
                {
                  "kind": "freezer",
                  "category": "fees",
                  "delegate": "tz3NExpXn9aPNZPorRE4SdjJ2RGrfbJgMAaV",
                  "level": 5,
                  "change": "50000"
                }
              ],
              "operation_result": {
                "status": "applied",
                "storage": {
                  "prim": "Pair",
                  "args": [
                    {
                      "prim": "Pair",
                      "args": [
                        {
                          "int": "7002"
                        },
                        {
                          "prim": "Pair",
                          "args": [
                            [
                              {
                                "prim": "Pair",
                                "args": [
                                  [
                                    {
                                      "bytes": "005a7029cab4bdba8dd74eae263c005074b07cba18e383609ad5e1c7ed7f894cf4"
                                    },
                                    {
                                      "bytes": "007016b6866fc4ed5b78387b6edae38b12e3503cd1ca6879a5c717b4446c956674"
                                    },
                                    {
                                      "bytes": "00b382cb7e6450a57e06cdb34bccce2cf26031eec4575bd806f959d801a3093e6f"
                                    },
                                    {
                                      "bytes": "00aff44ee0e850445261e7ecd788cbc4a7fa8789778dc3cf2d0a5d2d5464a807f9"
                                    }
                                  ],
                                  {
                                    "int": "2"
                                  }
                                ]
                              },
                              {
                                "prim": "Pair",
                                "args": [
                                  [
                                    {
                                      "bytes": "00bb5c419a9318eee67eb0e1a74898bbd34df91713a8551a537d01dd87cebd2cbc"
                                    },
                                    {
                                      "bytes": "006bf1bd9e8be4d358432bb906336a7abbcf589c095b47d5ec4d8ab1f724ae8509"
                                    },
                                    {
                                      "bytes": "0041beab6bc5895426bef0541a6ca99716c4b9a17606cec8154658c0f01b1df54c"
                                    },
                                    {
                                      "bytes": "00a16e87df233e23a2f0c1cbf8d3e691919d2eede882a86d20f9dc7ff8822e3b8b"
                                    }
                                  ],
                                  {
                                    "int": "2"
                                  }
                                ]
                              },
                              {
                                "prim": "Pair",
                                "args": [
                                  [
                                    {
                                      "bytes": "002d7ba9bae09e61e187c682d662a0be94f793156891acc6740cd6cf33af7361e6"
                                    },
                                    {
                                      "bytes": "009a23810cc10eb132a1540dd89874fd031fa479b04b46e7a707be034e112bd702"
                                    },
                                    {
                                      "bytes": "000b56db20513f65556507297bce7c445d65a2b3222d1141eb99c6fea1844cdbe3"
                                    },
                                    {
                                      "bytes": "008a84b8992f8370aa332f0a51ad8b32169aeeb381dba4e6f57e3cbe646e138622"
                                    }
                                  ],
                                  {
                                    "int": "2"
                                  }
                                ]
                              },
                              {
                                "prim": "Pair",
                                "args": [
                                  [
                                    {
                                      "bytes": "00aa2ad8f6b4b4ac9674303f5be2a708882dc4e84ed0b3decef8646b274322529f"
                                    },
                                    {
                                      "bytes": "00f1698ad1e42196bda0c587c2298f3c006df211b6ecb5d00651c3a85246b9ca89"
                                    },
                                    {
                                      "bytes": "00ac1deb05451a41b62e6f84653327b5a5bb8d2fd49aba85ac3b149e44d182282f"
                                    },
                                    {
                                      "bytes": "00e7f786d39784f2cdd9e03e6002eb3b9fb46c156b3445933b92d67b512c0810a6"
                                    }
                                  ],
                                  {
                                    "int": "2"
                                  }
                                ]
                              },
                              {
                                "prim": "Pair",
                                "args": [
                                  [
                                    {
                                      "bytes": "00ebcf82872f4942052704e95dc4bfa0538503dbece27414a39b6650bcecbff896"
                                    },
                                    {
                                      "bytes": "000f8150460b207d5afec26dfb408c3ef65982885fcc9b1163d490d5bcc3349a0b"
                                    },
                                    {
                                      "bytes": "007f1c1e068e8b5f07a1b616839233206925e24ff33cdd38c013be9ea825730f70"
                                    },
                                    {
                                      "bytes": "0060842d4ba23a9940ef5dcf4404fdaa430cfaaccb5029fad06cb5ea894e4562ae"
                                    }
                                  ],
                                  {
                                    "int": "2"
                                  }
                                ]
                              },
                              {
                                "prim": "Pair",
                                "args": [
                                  [
                                    {
                                      "bytes": "0092a40995af2345df1f514839f1a58fdf6674007eb1c845c5df7c7ce5f67ac31a"
                                    },
                                    {
                                      "bytes": "006931f497f22b5a81c00401d0cf84d976f4779c864cf1805201407f97342b0501"
                                    },
                                    {
                                      "bytes": "00f7bda18081d73103c6da76151a15e6ab4b0bca788006481c2062b0df028ed8ac"
                                    },
                                    {
                                      "bytes": "0093864ae21cf745b009dd411fc6ae8e2a3dd71f286cd5b130cf0a0d811e3fcdd6"
                                    }
                                  ],
                                  {
                                    "int": "2"
                                  }
                                ]
                              },
                              {
                                "prim": "Pair",
                                "args": [
                                  [
                                    {
                                      "bytes": "00c683b30a69c31b5bd033c924b7be490583541283ceca8b1cd4a5e4a2d477aa2f"
                                    },
                                    {
                                      "bytes": "000b56ca03acd4e09e924cb7f935dcf4592604f94f8c93acc4071d17943a3683dc"
                                    },
                                    {
                                      "bytes": "007bf4a18d9d121494f4aaf7282daa9cb998417a29b496cb70d35b6193674dcdb7"
                                    },
                                    {
                                      "bytes": "00b0fe3d47c96bc0300b40d23ddb76c6640e7c37f47aae61142a13bb00d05a10f1"
                                    }
                                  ],
                                  {
                                    "int": "2"
                                  }
                                ]
                              }
                            ],
                            {
                              "int": "4"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "prim": "Pair",
                      "args": [
                        {
                          "prim": "Pair",
                          "args": [
                            {
                              "prim": "Pair",
                              "args": [
                                {
                                  "int": "197000000000000"
                                },
                                {
                                  "int": "125396019986"
                                }
                              ]
                            },
                            {
                              "prim": "Pair",
                              "args": [
                                {
                                  "int": "1530298800"
                                },
                                {
                                  "int": "2629800"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "prim": "None"
                        }
                      ]
                    }
                  ]
                },
                "consumed_gas": "113208",
                "storage_size": "5091"
              },
              "internal_operation_results": [
                {
                  "kind": "transaction",
                  "source": "KT1EWLAQGPMF2uhtVRPaCH2vtFVN36Njdr6z",
                  "nonce": 0,
                  "amount": "2999999000000",
                  "destination": "tz3NExpXn9aPNZPorRE4SdjJ2RGrfbJgMAaV",
                  "parameters": {
                    "prim": "Unit"
                  },
                  "result": {
                    "status": "applied",
                    "balance_updates": [
                      {
                        "kind": "contract",
                        "contract": "KT1EWLAQGPMF2uhtVRPaCH2vtFVN36Njdr6z",
                        "change": "-2999999000000"
                      },
                      {
                        "kind": "contract",
                        "contract": "tz3NExpXn9aPNZPorRE4SdjJ2RGrfbJgMAaV",
                        "change": "2999999000000"
                      }
                    ],
                    "consumed_gas": "107"
                  }
                }
              ]
            }
          }
        ],
        "signature": "sigpYbY1Wt5kc3JkDL37j8stMa3VXBojbuLTLjatvqFzTjfonE3Qiwju4i9ENUY6JuhhngTbpWmxBn57DDsxXYab7yBQEAAg"
      }
    ]
  ]
}
maxtori commented 5 years ago

Should be fixed in next update: internal transaction, origination... use the storage, gas, counter use the the ones from the operation they are included in.