Transaction

35f899f0be21f49d73eb6d8945b0b3affa5acc11dfd420eaa6d0fdd60ab6a02f
( - )
189,246
2021-05-02 15:09:31
1
6,995 B

9 Outputs

Total Output:
  • jrunMü{"in":1,"ref":["8f2526306493cff5f5429c0c38b2c668696b3af2e9f6d332c451c41e50183334_o2","f97d4ac2a3d6f5ed09fad4a4f341619dc5a3773d9844ff95c99c5d4f8388de2f_o1"],"out":["9b8a547513e06d7574dd6b7ad3c9c0ee8befe9eb54782c08c7c5d1f9b221526b","a7c7a0f5ea44213ca30b807add412ba5369d6054e147ba959dc1c6731c096da7","47d49e824f7d0d14ccf0be4889b16ac11957a57fef8e1e31111fb4d0a490a749","ff485a213d702180ba86ec95df207971c5bf74f21f455b76703b816bd6a28171","e22a11a92de45610f5074e3636520cfb67a7f40478bf4c214bc0645d2bad5e90","d9d59605a0d2d629d07e01c0987332d0ce280b6ed3df1c803077de93f03fb821","97dccc803914d02958011775e0e4d56ad2654c50ef699a6b61d9db7b601fd32a"],"del":[],"cre":["mu97FuDfo5pg7w7rufebTJdfFKBekSkLJA","mu97FuDfo5pg7w7rufebTJdfFKBekSkLJA","mu97FuDfo5pg7w7rufebTJdfFKBekSkLJA","mu97FuDfo5pg7w7rufebTJdfFKBekSkLJA","mu97FuDfo5pg7w7rufebTJdfFKBekSkLJA","mu97FuDfo5pg7w7rufebTJdfFKBekSkLJA"],"exec":[{"op":"DEPLOY","data":["class Offer extends Jig {\n init(args) {\n const { amount, pubKey, mediaItem, listingPost = null, } = args;\n expect(caller).toBeInstanceOf(OfferManager);\n expect(amount).toBeNumber();\n expect(mediaItem).toBeInstanceOf(MediaItem);\n if (listingPost) {\n expect(listingPost).toBeInstanceOf(ListingPost);\n }\n this.data = {\n amount,\n transaction: '',\n requesterPubKey: pubKey,\n listingPost,\n messages: [],\n };\n this.owner = mediaItem.owner;\n }\n accept(transaction, message = '') {\n expect(transaction).toBeString();\n expect(message).toBeString();\n this.data.transaction = transaction;\n this.send(this.data.requesterPubKey, message);\n }\n decline(message = '') {\n expect(message).toBeString();\n this.send(this.data.requesterPubKey, message);\n }\n send(to, message = '') {\n expect(message).toBeString();\n if (message) {\n this.data.messages.push({\n sender: this.owner,\n message,\n });\n }\n this.owner = to;\n }\n}",{"deps":{"Jig":{"$jig":0},"ListingPost":{"$jig":4},"MediaItem":{"$jig":1},"OfferManager":{"$jig":7},"OfferRemovalHandle":{"$jig":8},"expect":{"$jig":2}}},"class ListingPost extends Jig {\n init(ownerPubKey, props) {\n const { message, price, mediaItem, boardOrigin, requesterPubKey, } = props;\n expect(caller).toBeInstanceOf(ListingManager);\n expect(message).toBeString();\n expect(price).toBeNumber();\n expect(boardOrigin).toBeString();\n expect(requesterPubKey).toBeString();\n expect(mediaItem).toBeInstanceOf(MediaItem);\n this.data = {\n message,\n price,\n boardOrigin,\n mediaItem,\n requesterPubKey,\n approved: false,\n removalHandle: new ListingPostRemovalHandle(this),\n };\n this.owner = ownerPubKey;\n }\n setApproved(approved) {\n this.data.approved = approved;\n }\n postTo(to) {\n this.owner = to;\n }\n}",{"deps":{"Jig":{"$dup":["1","deps","Jig"]},"ListingManager":{"$jig":5},"ListingPostRemovalHandle":{"$jig":6},"MediaItem":{"$dup":["1","deps","MediaItem"]},"expect":{"$dup":["1","deps","expect"]}}},"class ListingManager extends Jig {\n init(pubKey) {\n this.data = {\n listings: [],\n pubKey,\n };\n }\n createListing(ownerPubKey, listingProps) {\n const { message, price, mediaItem, boardOrigin, } = listingProps;\n const newListing = new ListingPost(ownerPubKey, {\n message,\n price,\n mediaItem,\n boardOrigin,\n requesterPubKey: this.data.pubKey,\n });\n this.data.listings.push(newListing);\n }\n sendTo(to) {\n this.owner = to;\n }\n removeListingPost(listingPost) {\n expect(listingPost).toBeInstanceOf(ListingPost);\n this.data.listings = this.data.listings.filter(l => l.origin !== listingPost.origin);\n listingPost.data.removalHandle.destroy();\n }\n}",{"deps":{"Jig":{"$dup":["1","deps","Jig"]},"ListingPost":{"$dup":["1","deps","ListingPost"]},"expect":{"$dup":["1","deps","expect"]}}},"class ListingPostRemovalHandle extends Jig {\n init(post) {\n expect(caller).toBeInstanceOf(ListingPost);\n expect(post).toBeInstanceOf(ListingPost);\n this.data = {\n post,\n };\n }\n}",{"deps":{"Jig":{"$dup":["1","deps","Jig"]},"ListingPost":{"$dup":["1","deps","ListingPost"]},"expect":{"$dup":["1","deps","expect"]}}},"class OfferManager extends Jig {\n init(pubKey) {\n expect(pubKey).toBeString();\n this.data = {\n pubKey,\n offers: {},\n };\n }\n createOffer(amount, mediaItem, listingPost = null) {\n const { offers, pubKey, } = this.data;\n expect(offers[mediaItem.origin]).not.toBeDefined();\n expect(mediaItem.owner).not.toEqual(this.owner);\n if (listingPost) {\n expect(listingPost).toBeInstanceOf(ListingPost);\n }\n const newOffer = new Offer({\n amount,\n pubKey,\n mediaItem,\n listingPost,\n });\n offers[mediaItem.origin] = newOffer;\n return newOffer;\n }\n async rescindOffer(offerOrigin) {\n const { offers, } = this.data;\n const removedOffer = offers[offerOrigin] || null;\n if (removedOffer) {\n await removedOffer.destroy();\n delete offers[offerOrigin];\n }\n return removedOffer;\n }\n removeDeclinedOffer(offerOrigin) {\n const { offers, } = this.data;\n const removedOffer = offers[offerOrigin] || null;\n delete offers[offerOrigin];\n return removedOffer;\n }\n}",{"deps":{"Jig":{"$dup":["1","deps","Jig"]},"ListingPost":{"$dup":["1","deps","ListingPost"]},"Offer":{"$jig":3},"expect":{"$dup":["1","deps","expect"]}}},"class OfferRemovalHandle extends Jig {\n init(post) {\n expect(caller).toBeInstanceOf(Offer);\n expect(post).toBeInstanceOf(Offer);\n this.data = {\n post,\n };\n }\n}",{"deps":{"Jig":{"$dup":["1","deps","Jig"]},"Offer":{"$dup":["9","deps","Offer"]},"expect":{"$dup":["1","deps","expect"]}}}]}]}
    https://whatsonchain.com/tx/35f899f0be21f49d73eb6d8945b0b3affa5acc11dfd420eaa6d0fdd60ab6a02f
Total Output: