2
votes
Accepted
archetype: how to remove the bytes that are prepended by the pack() routine
the slice builtin returns an option as mentioned here.
Hence you need to extract the value from the option, with ?= assignment instruction for example:
var byt2 ?= slice(str3, 0, 6) : "...
2
votes
Invalid Metadata on Smart Contract
Can you share your code?
What I can say at the moment:
Your metadata bigmap contains the value "https://example.com" which is invalid. Perhaps you forgot to change that or you are ...
1
vote
Accepted
Issue while generating NFT metadata
From what I see it's now working.
It may take quite some time for IPFS nodes to synchronize and/or explorer to gather them.
I suggest you to always test with tzcomet, that gives more info: https://...
1
vote
Invalid Metadata on Smart Contract
The metadata is invalid because it points to https://example.com, which has no content. You need to provide a link that points to valid json or store the encoded metadata in the storage.
Contract ...
1
vote
Accepted
When generating contract metadata with `sp.init_metadata` do you include or exclude on-chain views in the `views` array in the metadata?
Internally, the compiler interprets on-chain views the same way as off-chain views when it comes to metadata (not included in the contract code).
If the off-chain view has the same logic as the on-...
1
vote
Accepted
Can off-chain views call on-chain views?
Yes, you can call on-chain views from off-chain views. off-chain views use run_code RPC endpoint, which runs some instructions against a given context provided by you, similar to calling an entrypoint....
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
metadata × 6smart-contracts × 3
smartpy × 3
nft × 2
off-chain-views × 2
on-chain-views × 2
contract × 1
blockchain × 1
compile × 1
tzip16 × 1
views × 1
archetype × 1