Code Monkey home page Code Monkey logo

tzcomet's People

Contributors

marklnichols avatar smondet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tzcomet's Issues

View stack-overflow on webkit (chromium/brave)

(works on firefox)

Try the view from below (github does not let me attach JSON files…) on the storage of KT1HrSsJ8ut8iNLLL1frS5H5KkewSvv3zALh

{
  "name": "Multi-sign Administrator",
  "version": "1",
  "description": "Multi-sign administrator for the price feed aggregator",
  "source": { "tools": [ "SmartPy" ] },
  "interfaces": [ "TZIP-016" ],
  "views": [
    {
      "name": "listActiveProposals",
      "pure": true,
      "description": "List active proposals",
      "implementations": [
        {
          "michelsonStorageView": {
            "returnType": {
              "prim": "list",
              "args": [
                {
                  "prim": "pair",
                  "args": [
                    {
                      "prim": "pair",
                      "args": [
                        {
                          "prim": "list",
                          "args": [
                            {
                              "prim": "or",
                              "args": [
                                {
                                  "prim": "list",
                                  "args": [
                                    {
                                      "prim": "or",
                                      "args": [
                                        { "prim": "or", "args": [ { "prim": "nat", "annots": [ "%changeQuorum" ] }, { "prim": "address", "annots": [ "%changeTarget" ] } ] },
                                        {
                                          "prim": "or",
                                          "args": [
                                            { "prim": "int", "annots": [ "%changeTimeout" ] },
                                            {
                                              "prim": "pair",
                                              "args": [
                                                {
                                                  "prim": "list",
                                                  "args": [
                                                    { "prim": "pair", "args": [ { "prim": "address", "annots": [ "%addr" ] }, { "prim": "key", "annots": [ "%publicKey" ] } ] }
                                                  ],
                                                  "annots": [ "%added" ]
                                                },
                                                { "prim": "set", "args": [ { "prim": "nat" } ], "annots": [ "%removed" ] }
                                              ],
                                              "annots": [ "%changeVoters" ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ],
                                  "annots": [ "%selfAdmin" ]
                                },
                                {
                                  "prim": "list",
                                  "args": [
                                    {
                                      "prim": "or",
                                      "args": [
                                        { "prim": "or", "args": [ { "prim": "bool", "annots": [ "%changeActive" ] }, { "prim": "address", "annots": [ "%changeAdmin" ] } ] },
                                        {
                                          "prim": "or",
                                          "args": [
                                            {
                                              "prim": "pair",
                                              "args": [
                                                {
                                                  "prim": "list",
                                                  "args": [
                                                    {
                                                      "prim": "pair",
                                                      "args": [
                                                        { "prim": "address" },
                                                        {
                                                          "prim": "pair",
                                                          "args": [
                                                            { "prim": "address", "annots": [ "%adminAddress" ] },
                                                            {
                                                              "prim": "pair",
                                                              "args": [
                                                                { "prim": "option", "args": [ { "prim": "nat" } ], "annots": [ "%endingRound" ] },
                                                                { "prim": "nat", "annots": [ "%startingRound" ] }
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ],
                                                  "annots": [ "%added" ]
                                                },
                                                { "prim": "list", "args": [ { "prim": "address" } ], "annots": [ "%removed" ] }
                                              ],
                                              "annots": [ "%changeOracles" ]
                                            },
                                            {
                                              "prim": "pair",
                                              "args": [
                                                {
                                                  "prim": "pair",
                                                  "args": [ { "prim": "nat", "annots": [ "%maxSubmissions" ] }, { "prim": "nat", "annots": [ "%minSubmissions" ] } ]
                                                },
                                                {
                                                  "prim": "pair",
                                                  "args": [
                                                    { "prim": "nat", "annots": [ "%oraclePayment" ] },
                                                    { "prim": "pair", "args": [ { "prim": "nat", "annots": [ "%restartDelay" ] }, { "prim": "nat", "annots": [ "%timeout" ] } ] }
                                                  ]
                                                }
                                              ],
                                              "annots": [ "%updateFutureRounds" ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ],
                                  "annots": [ "%targetAdmin" ]
                                }
                              ]
                            }
                          ],
                          "annots": [ "%batchs" ]
                        },
                        { "prim": "pair", "args": [ { "prim": "nat", "annots": [ "%initiatorId" ] }, { "prim": "nat", "annots": [ "%initiatorProposalId" ] } ] }
                      ]
                    },
                    {
                      "prim": "pair",
                      "args": [
                        { "prim": "set", "args": [ { "prim": "nat" } ], "annots": [ "%nay" ] },
                        { "prim": "pair", "args": [ { "prim": "timestamp", "annots": [ "%startedAt" ] }, { "prim": "set", "args": [ { "prim": "nat" } ], "annots": [ "%yay" ] } ] }
                      ]
                    }
                  ]
                }
              ]
            },
            "code": [
              { "prim": "DUP" },
              { "prim": "CDR" },
              { "prim": "CAR" },
              { "prim": "CDR" },
              { "prim": "CAR" },
              {
                "prim": "NIL",
                "args": [
                  {
                    "prim": "pair",
                    "args": [
                      {
                        "prim": "pair",
                        "args": [
                          {
                            "prim": "list",
                            "args": [
                              {
                                "prim": "or",
                                "args": [
                                  {
                                    "prim": "list",
                                    "args": [
                                      {
                                        "prim": "or",
                                        "args": [
                                          { "prim": "or", "args": [ { "prim": "nat", "annots": [ "%changeQuorum" ] }, { "prim": "address", "annots": [ "%changeTarget" ] } ] },
                                          {
                                            "prim": "or",
                                            "args": [
                                              { "prim": "int", "annots": [ "%changeTimeout" ] },
                                              {
                                                "prim": "pair",
                                                "args": [
                                                  {
                                                    "prim": "list",
                                                    "args": [
                                                      { "prim": "pair", "args": [ { "prim": "address", "annots": [ "%addr" ] }, { "prim": "key", "annots": [ "%publicKey" ] } ] }
                                                    ],
                                                    "annots": [ "%added" ]
                                                  },
                                                  { "prim": "set", "args": [ { "prim": "nat" } ], "annots": [ "%removed" ] }
                                                ],
                                                "annots": [ "%changeVoters" ]
                                              }
                                            ]
                                          }
                                        ]
                                      }
                                    ],
                                    "annots": [ "%selfAdmin" ]
                                  },
                                  {
                                    "prim": "list",
                                    "args": [
                                      {
                                        "prim": "or",
                                        "args": [
                                          { "prim": "or", "args": [ { "prim": "bool", "annots": [ "%changeActive" ] }, { "prim": "address", "annots": [ "%changeAdmin" ] } ] },
                                          {
                                            "prim": "or",
                                            "args": [
                                              {
                                                "prim": "pair",
                                                "args": [
                                                  {
                                                    "prim": "list",
                                                    "args": [
                                                      {
                                                        "prim": "pair",
                                                        "args": [
                                                          { "prim": "address" },
                                                          {
                                                            "prim": "pair",
                                                            "args": [
                                                              { "prim": "address", "annots": [ "%adminAddress" ] },
                                                              {
                                                                "prim": "pair",
                                                                "args": [
                                                                  { "prim": "option", "args": [ { "prim": "nat" } ], "annots": [ "%endingRound" ] },
                                                                  { "prim": "nat", "annots": [ "%startingRound" ] }
                                                                ]
                                                              }
                                                            ]
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "annots": [ "%added" ]
                                                  },
                                                  { "prim": "list", "args": [ { "prim": "address" } ], "annots": [ "%removed" ] }
                                                ],
                                                "annots": [ "%changeOracles" ]
                                              },
                                              {
                                                "prim": "pair",
                                                "args": [
                                                  {
                                                    "prim": "pair",
                                                    "args": [ { "prim": "nat", "annots": [ "%maxSubmissions" ] }, { "prim": "nat", "annots": [ "%minSubmissions" ] } ]
                                                  },
                                                  {
                                                    "prim": "pair",
                                                    "args": [
                                                      { "prim": "nat", "annots": [ "%oraclePayment" ] },
                                                      { "prim": "pair", "args": [ { "prim": "nat", "annots": [ "%restartDelay" ] }, { "prim": "nat", "annots": [ "%timeout" ] } ] }
                                                    ]
                                                  }
                                                ],
                                                "annots": [ "%updateFutureRounds" ]
                                              }
                                            ]
                                          }
                                        ]
                                      }
                                    ],
                                    "annots": [ "%targetAdmin" ]
                                  }
                                ]
                              }
                            ],
                            "annots": [ "%batchs" ]
                          },
                          { "prim": "pair", "args": [ { "prim": "nat", "annots": [ "%initiatorId" ] }, { "prim": "nat", "annots": [ "%initiatorProposalId" ] } ] }
                        ]
                      },
                      {
                        "prim": "pair",
                        "args": [
                          { "prim": "set", "args": [ { "prim": "nat" } ], "annots": [ "%nay" ] },
                          {
                            "prim": "pair",
                            "args": [ { "prim": "timestamp", "annots": [ "%startedAt" ] }, { "prim": "set", "args": [ { "prim": "nat" } ], "annots": [ "%yay" ] } ]
                          }
                        ]
                      }
                    ]
                  }
                ]
              },
              { "prim": "DUP", "args": [ { "int": "3" } ] },
              { "prim": "CDR" },
              { "prim": "CAR" },
              { "prim": "CAR" },
              { "prim": "PUSH", "args": [ { "prim": "nat" }, { "int": "0" } ] },
              { "prim": "DUP" },
              { "prim": "DUP", "args": [ { "int": "3" } ] },
              { "prim": "COMPARE" },
              { "prim": "GT" },
              {
                "prim": "LOOP",
                "args": [
                  [
                    { "prim": "DUP", "args": [ { "int": "4" } ] },
                    { "prim": "SWAP" },
                    { "prim": "DUP" },
                    { "prim": "DUG", "args": [ { "int": "2" } ] },
                    { "prim": "MEM" },
                    {
                      "prim": "IF",
                      "args": [
                        [
                          { "prim": "DUP", "args": [ { "int": "5" } ] },
                          { "prim": "CDR" },
                          { "prim": "CAR" },
                          { "prim": "CDR" },
                          { "prim": "CAR" },
                          { "prim": "SWAP" },
                          { "prim": "DUP" },
                          { "prim": "DUG", "args": [ { "int": "2" } ] },
                          { "prim": "GET" },
                          { "prim": "IF_NONE", "args": [ [ { "prim": "PUSH", "args": [ { "prim": "int" }, { "int": "264" } ] }, { "prim": "FAILWITH" } ], [] ] },
                          { "prim": "DUP" },
                          { "prim": "CAR" },
                          { "prim": "CDR" },
                          { "prim": "CAR" },
                          {
                            "prim": "IF",
                            "args": [
                              [ { "prim": "PUSH", "args": [ { "prim": "bool" }, { "prim": "False" } ] } ],
                              [
                                { "prim": "DUP", "args": [ { "int": "6" } ] },
                                { "prim": "CDR" },
                                { "prim": "CAR" },
                                { "prim": "CDR" },
                                { "prim": "CDR" },
                                { "prim": "SWAP" },
                                { "prim": "DUP" },
                                { "prim": "DUG", "args": [ { "int": "2" } ] },
                                { "prim": "GET", "args": [ { "int": "6" } ] },
                                { "prim": "SIZE" },
                                { "prim": "DUP", "args": [ { "int": "3" } ] },
                                { "prim": "GET", "args": [ { "int": "3" } ] },
                                { "prim": "SIZE" },
                                { "prim": "ADD" },
                                { "prim": "COMPARE" },
                                { "prim": "LT" }
                              ]
                            ]
                          },
                          {
                            "prim": "IF",
                            "args": [
                              [
                                { "prim": "DIG", "args": [ { "int": "3" } ] },
                                { "prim": "SWAP" },
                                { "prim": "DUP" },
                                { "prim": "GET", "args": [ { "int": "6" } ] },
                                { "prim": "SWAP" },
                                { "prim": "DUP" },
                                { "prim": "DUG", "args": [ { "int": "3" } ] },
                                { "prim": "GET", "args": [ { "int": "5" } ] },
                                { "prim": "PAIR", "annots": [ "%startedAt", "%yay" ] },
                                { "prim": "DUP", "args": [ { "int": "3" } ] },
                                { "prim": "GET", "args": [ { "int": "3" } ] },
                                { "prim": "PAIR", "annots": [ "%nay" ] },
                                { "prim": "DUP", "args": [ { "int": "3" } ] },
                                { "prim": "CAR" },
                                { "prim": "CDR" },
                                { "prim": "CDR" },
                                { "prim": "DUP", "args": [ { "int": "5" } ] },
                                { "prim": "PAIR", "annots": [ "%initiatorId", "%initiatorProposalId" ] },
                                { "prim": "DIG", "args": [ { "int": "3" } ] },
                                { "prim": "CAR" },
                                { "prim": "CAR" },
                                { "prim": "PAIR", "annots": [ "%batchs" ] },
                                { "prim": "PAIR" },
                                { "prim": "CONS" },
                                { "prim": "DUG", "args": [ { "int": "2" } ] }
                              ],
                              [ { "prim": "DROP" } ]
                            ]
                          }
                        ],
                        []
                      ]
                    },
                    { "prim": "PUSH", "args": [ { "prim": "nat" }, { "int": "1" } ] },
                    { "prim": "ADD" },
                    { "prim": "DUP" },
                    { "prim": "DUP", "args": [ { "int": "3" } ] },
                    { "prim": "COMPARE" },
                    { "prim": "GT" }
                  ]
                ]
              },
              { "prim": "DROP", "args": [ { "int": "2" } ] },
              { "prim": "SWAP" },
              { "prim": "DROP" },
              { "prim": "SWAP" },
              { "prim": "DROP" }
            ]
          }
        }
      ]
    }
  ]
}

Integrate tzProfiles SDK

This would allow for the retrieval of public verifiable credentials related to a Tezos address through Tezos profiles to add more verifications.

GitHub link incoming.

Florence net issue: calling view or fetching token metadata

I have this FA2 for testing purposes on florence : KT1C7xFhKsnXPzD9hAQUBpGFuXChXd3nuE3a

I have pretty much the same on edo also : KT1XMnfo3J9fR6SbPkvabqsTiNWGo3a8dWJh

On edo, with TZComet, everything works fine (extracting metadata, calling views, exploring tokens), but on florence, if I try to call a view, or explore tokens, I always end up with this error :

failed with with return code 400:
Failed to parse the request body: Missing object field balance

when it calls the run_code endpoint.

I don't know if it's a Node issue or a TzComet issue, so sorry if I'm generating noise here.

TZComet doesn't support text/html as MIME type

Using the token explorer to browse KT1WmAHNFxV1JzoGxQYEkE1aFKvNNNSj73sX, for example token id 10000000003 fails to display the html content.

eg https://tzcomet.io/#/token/KT1WmAHNFxV1JzoGxQYEkE1aFKvNNNSj73sX/10000000003%3Fexplorer-input%3DKT1WmAHNFxV1JzoGxQYEkE1aFKvNNNSj73sX - expanding "show logs" it seems that the URL https://mainnet.live.endlessways.net/10000000003 has been correctly discovered, but it does not render, presumably because the MIME type is text/html.

(What would be expected/ideal in this case is an iframe that renders the content!)

Florencenet issue: contract has no valid %metadata big-map

For testing purposes I've deployed an FA1.2 implementation contract including metadata to both Edonet and Florencenet.

Edonet: KT1NYauuJhVC35VeTsogNDyMWMivCVe9Kcn4
Florencenet: KT1CJrUYJwVrJna7SgTGC9PPRKTnggHESpiq

For the contract on Edonet, TZComet shows metadata contents as expected:
https://tzcomet.io/#/explorer%3Fexplorer-input%3DKT1NYauuJhVC35VeTsogNDyMWMivCVe9Kcn4

For the same contract on Florencenet, however, TZComet shows the following error:
https://tzcomet.io/#/explorer%3Fexplorer-input%3DKT1CJrUYJwVrJna7SgTGC9PPRKTnggHESpiq
Error: Failure: Contract has no valid %metadata big-map!

Looking into the contracts on chain, I realized that the key order in the metadata bigmaps is different (flipped around):
Edonet: https://api.edo.tzstats.com/explorer/bigmap/75983/keys
Florencenet: https://api.florence.tzstats.com/explorer/bigmap/23640/keys

This, I assume, is the reason TZComet doesn't recognize the metadata bigmap as valid

stack overflow if contract JSON tzip-16 metadata points to `tezos-storage:<key>`

tzcomet gives a "stack overflow" when a contract's tzip-16 JSON contract metadata url key is tezos-storage:<key>

example: https://tqtezos.github.io/TZComet/#/explorer%3Fgo%3Dtrue%26explorer-input%3DKT1NSfdaD4Q6kVvBWKxYz1Dg6dJV5sJ3BN6D

contract source code: SmartPy link

(relevant lines from contract:

contract_metadata_json = sp.utils.bytes_of_string("{ ... tzip-16 metadata ... }")
METADATA_URL = "tezos-storage:contract_metadata_json"
metadata = sp.big_map({"" : sp.utils.bytes_of_string(METADATA_URL),
  "contract_metadata_json": contract_metadata_json})
...
sp.add_compilation_target("test_tzip12", TestTaquitoTzip12TokenMetadata(metadata = metadata))

Cannot check token metadata for token ids >INT32

I'm trying to get the token metadata for two tokens on my contract, 10000000000 and 10000000001 but TZComet's UI seems to be limiting me to Int32 token ids. Since FA1.2/FA2 uses NAT token ids, this ought to work.

to reproduce: go to https://tqtezos.github.io/TZComet/#/explorer%3Fgo%3Dtrue%26explorer-input%3DKT1Cu1o3JFwLRHkgS9R4rAf9Ph9MZERtPhMd , expand "explore tokens", un-tick "Use the all_tokens off-chain-view", attempt to type 10000000000 in the Search Parameters box.

Note error message: Wrong format: 10000000000: The string "10000000000" is not an integer.

Settings/nodes: button for node "full test"

On top of the automatic heartbeat ping, we'd want to be able to manually run a test of the node:

  • all RPCs that we use are available
  • some extra boostrapped / livelyness checks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.