oxheadalpha / tzcomet Goto Github PK
View Code? Open in Web Editor NEWContract Metadata Viewer on Tezos
Home Page: https://www.oxheadalpha.com/TZComet/
License: MIT License
Contract Metadata Viewer on Tezos
Home Page: https://www.oxheadalpha.com/TZComet/
License: MIT License
Find the right s/.0/.1/
s, add 4.13, remove a couple of older ones (?).
Maybe this should partially go to tezos-client
too (at some point?).
Seems there has been a regression of #71 at some point - it's not possible to look at metadata for a single token on KT1WmAHNFxV1JzoGxQYEkE1aFKvNNNSj73sX
, eg token with id 10000000003
- i have to use the all_tokens
checkbox and get metadata for everything
(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" }
]
}
}
]
}
]
}
Seems that a temporary debug changed got pushed …
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.
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.
Should not need a KT1 (and valid parameters) just to check types.
We're in the process of migrating DNS/hosting, use https://tqtezos.github.io/TZComet/ for now …
Maybe just for IPFS or node-RPC errors …
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!)
For the generic multisig in tezos-client
of course.
Some of the code is still there: src/client/text_editor.ml
but unused.
Then or in parallel more things can be tried:
vim-mode
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
maybe with a button to actually make it happen
In the metadata editor: minimize JSON → bytes
→ size in bytes
tzcomet gives a "stack overflow" when a contract's tzip-16 JSON contract metadata url key is tezos-storage:<key>
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))
Should be user-initiated because of performance but we should be able to get the “ground truth” for serialization.
/yolo
part to the URL (right now it's a long-name option)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.
The field "author" is incorrectly checked as it warns even if the field has a valid email address:
The author "[email protected]" has a wrong format, it should look like Print Name <contact-url-or-email>.
Maybe a quicker “first step” can be to alternate (or fallback) between the current one (on ipfs.io
) and https://cloudflare-ipfs.com/ipfs/
When an off-chain-view is wrong it only displays the wrong type, not the
expected one.
Related to #17.
On top of the automatic heartbeat ping, we'd want to be able to manually run a test of the node:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.