Transaction

fef7c6417c65968305d6e0e4b9aec0a0352fe3826c14f537f324e5bfc68b0e50
( - )
132,121
2021-11-09 16:41:41
1
9,472 B

7 Outputs

Total Output:
  • jrunM€#{"in":0,"ref":["native://Jig"],"out":["6e28fc3d91873a95cf85b43c3dc706faf65d3573d7ac6537a5cc2b5e07d4a7a2","f332663d2083bd0ced14543221b05bf798285e755381c292f98502af6f25d6fc","64c43a23c2fe17a9a06dc9362094eb2f7ca7a9bbedcfc1e9c37b7949c0fc35ed","ce5a4d0f83560034272f75bc65573f50ea645bc299269459aa43fed27585bb58","81d2f054c0a586cf836fafeae7a48674d5705604f4fc246ba45155bbb9382842"],"del":[],"cre":["1Fm1tQpKfujhbBgCwhu9icL4yb9sDzMZte","1Gep92rDFqPUhdBtPappXBrLkHyfz45bWt","12BCb58bEwFfASywxE5UuT4aMfs17f3D1o","1F2Wu9iELJUW6ooZDSnuH6FXsYhH6UpvD","1P13st14Y2ianTj4Y4n74wRUfBjNqsga5Y"],"exec":[{"op":"DEPLOY","data":["class Master extends Jig {\n init(jigCount, maxE, className) {\n this.minted = {}\n this.collections = {}\n this.maxE = maxE\n this.maxN = jigCount\n this.maxX = 9\n this.e = 0\n this.n = 0\n this.x = 0\n this.spent = false\n this.claim = className\n }\n mint() {\n if (this.spent) return this\n if (parseInt(\"\" + this.n + this.x + (\"0\".repeat(this.maxE - this.e))) > this.maxN) {\n this.spent = true\n return this\n }\n this.newMinted = new Minter(this.e, this.n, this.x, this.maxE, this.maxN, this.maxX, this.claim, this.origin)\n this.minted[this.x] = true\n this.x = this.x + 1\n if (this.x > this.maxX) {\n this.spent = true\n }\n return this.minted[this.x - 1]\n }\n mintCollection(name, to) {\n Master.auth()\n if (this.collections[name]) {\n throw new Error('Collection already exists')\n }\n this.newCollection = new Collection(name, to, this.origin)\n this.collections[name] = true\n }\n retreive(x) {\n if (!this.minted[x]) throw new Error('Does not exist')\n return this.minted[x]\n }\n }",{"deps":{"Collection":{"$jig":2},"Derivative":{"$jig":3},"GameDrop":{"$jig":4},"Jig":{"$jig":0},"Minter":{"$jig":5}}},"class Collection extends Jig {\n init(name, to, master) {\n if (!(caller instanceof Master)) throw new Error('Only Master instances may create Collections.')\n this.minted = {}\n this.name = name\n this.master = master\n this.owner = to\n }\n send(to) {\n this.owner = to\n }\n retreive(id) {\n if (this.minted[id]) throw new Error('Does not exist')\n return this.minted[id]\n }\n mint(gameDrop, to) {\n if (gameDrop.master != this.master) throw new Error('Not a GameDrop from this Master.')\n // if (caller.origin != this.origin) throw new Error('Only Collection instances may create Derivatives.')\n if (this.minted[gameDrop.id]) throw new Error('Cannot mint twice')\n this.newMinted = new Derivative(gameDrop.id, this, to, this.master, this.name)\n this.minted[gameDrop.id] = true\n return this\n }\n update(derivitive, attributes) {\n if (!(derivitive instanceof Derivative)) throw new Error('Collections may only update Derivitives.')\n this.newUpdate = derivitive.update(attributes)\n return this\n }\n }",{"deps":{"Derivative":{"$dup":["1","deps","Derivative"]},"GameDrop":{"$dup":["1","deps","GameDrop"]},"Jig":{"$dup":["1","deps","Jig"]},"Master":{"$jig":1},"Minter":{"$dup":["1","deps","Minter"]}}},"class Derivative extends Jig {\n init(id, collection, to, master, name) {\n if (!(caller instanceof Collection)) throw new Error('Only Collection instances may create Derivatives.')\n this.id = id\n this.collection = collection.origin\n this.collectionName = name\n this.master = master\n this.owner = to\n this.attributes = {}\n }\n send(to) {\n this.owner = to\n }\n exists(name) {\n return (this[name]) ? true : false;\n }\n update(collection, attributes) {\n // collection.auth()\n if (collection.origin != this.collection) throw new Error('Only Collection instances may update Derivatives.')\n this.attributes = Object.assign(this.attributes, attributes);\n return this\n }\n }",{"deps":{"Collection":{"$dup":["1","deps","Collection"]},"GameDrop":{"$dup":["1","deps","GameDrop"]},"Jig":{"$dup":["1","deps","Jig"]},"Master":{"$dup":["3","deps","Master"]},"Minter":{"$dup":["1","deps","Minter"]}}},"class GameDrop extends Jig {\n init(n, x, claim, master) {\n if (!(caller instanceof Minter)) throw new Error('Only Minter instances may create GameDrops.')\n this.id = parseInt(\"\" + n + x)\n this.minted = {}\n this.claim = claim\n this.master = master\n }\n send(to) {\n this.owner = to\n }\n retreive(c) {\n if (this.minted[c]) throw new Error('Does not exist')\n return this.minted[c]\n }\n mint(collection, to) {\n if (!(collection instanceof Collection)) throw new Error('Gamedrops may only mint via Collections.')\n if (this.minted[collection.origin]) throw new Error('Cannot mint twice.')\n // return collection.mint(this.id, to)\n this.newMinted = collection.mint(this.id, to)\n this.minted[collection.origin] = true\n return this.newMinted\n }\n }",{"deps":{"Collection":{"$dup":["1","deps","Collection"]},"Derivative":{"$dup":["1","deps","Derivative"]},"Jig":{"$dup":["1","deps","Jig"]},"Master":{"$dup":["3","deps","Master"]},"Minter":{"$dup":["1","deps","Minter"]}}},"class Minter extends Jig {\n\n init(e, n, x, maxE, maxN, maxX, claim, master) {\n if (!(caller instanceof Master) && !(caller instanceof Minter)) throw new Error('Only Master and Minter classes can create minters')\n this.e = e + 1\n this.n = parseInt(\"\" + n + x)\n this.x = 0\n this.maxE = maxE\n this.maxN = maxN\n this.maxX = maxX\n this.minted = {}\n this.spent = false\n this.claim = claim\n this.master = master\n }\n mint() {\n if (this.spent) return this\n if (this.e == this.maxE) {\n if (parseInt(\"\" + this.n + this.x) > this.maxN) {\n this.spent = true\n return this\n }\n this.newMinted = new GameDrop(this.n, this.x, this.claim, this.master)\n this.minted[this.x] = true\n this.x = this.x + 1\n } else if (this.e < this.maxE) {\n if (parseInt(\"\" + this.n + this.x + (\"0\".repeat(this.maxE - this.e))) > this.maxN) {\n this.spent = true\n return this\n }\n this.newMinted = new Minter(this.e, this.n, this.x, this.maxE, this.maxN, this.maxX, this.claim, this.master)\n this.minted[this.x] = true\n this.x = this.x + 1\n }\n if (this.x > this.maxX) {\n this.spent = true\n }\n return this\n }\n retreive(x) {\n if (this.minted[x]) throw new Error('Does not exist')\n return this.minted[x]\n }\n }",{"deps":{"Collection":{"$dup":["1","deps","Collection"]},"Derivative":{"$dup":["1","deps","Derivative"]},"GameDrop":{"$dup":["1","deps","GameDrop"]},"Jig":{"$dup":["1","deps","Jig"]},"Master":{"$dup":["3","deps","Master"]}}}]}]}
    https://whatsonchain.com/tx/fef7c6417c65968305d6e0e4b9aec0a0352fe3826c14f537f324e5bfc68b0e50
Total Output: