Need help understanding the jpg.store tx metadata

Hi,

I hope this is the right category for this type op question.

I’m trying to understand the transacrtion meta data of jpg store.

This transaction Transaction 71c8f5a9d42aa74e984938a8c2e2ac4f05eb469cd47ca4df181a2f5524933bb4 - Cardanoscan f.e. is the listing of an asset for 239 ADA. But where is this information stored in the meta data? Do I have to decrypt the hashes in some way?

Hope someone can help me to understand this :smiley:

Kind regards

Looking at another sell on the same contract:
Offer: https://cardanoscan.io/transaction/102a6d8c0c5f91bb42f9470ddff0d3dc6b6a5c780ee44009cd6bd854ad6adda5
Sell: https://cardanoscan.io/transaction/7a6f53feed7d421ea487a84a6ab7fcc8f5467971cea55b45005f173dfaeccbf9
The strings in the metadata array of the offer are exactly the datum given to the smart contract later in the sell transaction.

According to https://github.com/jpg-store/contract-v2#specification, this should contain your public key hash, the asset, and the payout.

I tried to decode the things in your transaction with https://cbor.me/ and it gives me:

121([h'D536801A890A41B4CCCC9AD28F9E90010A34DD4B0C45F69823988207',
[121([121([121([h'2A6728F4DED4DDF1E7097E94B7A3303FD3B6433F6A21B41174BC7440']),
121([121([121([h'21BD9B422CE832842B1CFA9917C2C7CAB40C27A589B1E9E4F75EC699'])])])]), {h'': 121([0, {h'': 11950000}])}]),
121([121([121([h'70E60F3B5EA7153E0ACC7A803E4401D44B8ED1BAE1C7BAAAD1A62A72']),
121([121([121([h'1E78AAE7C90CC36D624F7B3BB6D86B52696DC84E490F343EBA89005F'])])])]), {h'': 121([0, {h'': 4780000}])}]),
121([121([121([h'D536801A890A41B4CCCC9AD28F9E90010A34DD4B0C45F69823988207']),
121([121([121([h'CDFEC174B3189F5CCB704F9184A3F1A5508AF0FF82699A8905A83FD6'])])])]), {h'': 121([0, {h'': 222270000}])}])]])

Could be an encoding for 222.27 ADA shall go to you, 11.95 ADA shall go as royalties to the creator, and 4.78 ADA are fees, which would exactly sum up to your 239 ADA.

(jpg.store is actually quite good in including the complete datum in the offer transaction. When I was looking at swap requests in SundaeSwap, there were no metadata other than the string “swap request”. They seem to manage those things off-chain, which also means that they are not really secured by a smart contract.)

EDIT: The addresses that are given in those datums can actually be found on Cardanoscan if you prepend 01 (for the type of address) and then concatenate the payment and the stake hash (converted to lower-case, since Cardanoscan can only handle that):
https://cardanoscan.io/address/012a6728f4ded4ddf1e7097e94b7a3303fd3b6433f6a21b41174bc744021bd9b422ce832842b1cfa9917c2c7cab40c27a589b1e9e4f75ec699 is the one set to receive 11.95 ADA and it receives a lot of mid-size ADA values in transactions, where BlockOwls are involved, which fits a royalty address.
https://cardanoscan.io/address/0170e60f3b5ea7153e0acc7a803e4401d44b8ed1bae1c7baaad1a62a721e78aae7c90cc36d624f7b3bb6d86b52696dc84e490f343eba89005f is the one set to receive 4.78 ADA and it receives a lot of such small transactions. It is obviously an address of jpg.store for collecting fees.
https://cardanoscan.io/address/01d536801a890a41b4cccc9ad28f9e90010a34dd4b0c45f69823988207cdfec174b3189f5ccb704f9184a3f1a5508af0ff82699a8905a83fd6 is your address set to receive 222.27 ADA.

The asset itself does not seem to be encoded in the datum. Maybe, it is another version of the contract.

1 Like

This analysis makes me think: It should be possible to manually construct and submit an offer without fees and royalties.

Would be interesting if it appears on their web interface and can be accepted by anyone through it.

Thank you so much for the detailed answer!

You went beyond my expectations :smiley: