Transaction

38ac0ebf10e7006e0ba15fddf12f39d6bf0b9e6b1e19a284363d1df7e791df57
2023-05-07 23:54:22
0.00000320 BSV
(
0.04908498 BSV
-
0.04908178 BSV
)
50.05 sat/KB
1
116,680
6,393 B

5 Outputs

Total Output:
0.04908178 BSV
  • jrunM½{"in":0,"ref":["native://Jig"],"out":["fae6ad746b6c0f09519f6e478d6784782e193fd6d5ff983bbb58adc6776e55d9","7b9c6ebe0653ca20e74effdf8017012dad84d2d8655b4a0cc4cfef20d0500a67","5055e93e171f77026f38ece4b38f029048d493c862d3d823fa818c852da78830"],"del":[],"cre":["18vGoyYHcioiEgs9Pkyz6wUcq5EiG5pevj","1G5aAL5MgFxAXQ4gVWXUthTp7hpDoLj2yM","1DCcRSktRCuZwYgHgWWMw3GupJtDU3UJxq"],"exec":[{"op":"DEPLOY","data":["class Collection extends Jig {\n init(jigCount, maxE, collectionName, to) {\n this.minted = {};\n this.maxE = maxE;\n this.maxN = jigCount;\n this.maxX = 10;\n this.e = 0;\n this.n = 0;\n this.x = 0;\n this.spent = false;\n this.collectionName = collectionName;\n this.owner = to;\n }\n mint(to) {\n if (this.spent)\n return this;\n if (parseInt(`${this.n}${this.x}${'0'.repeat(this.maxE - this.e)}`, 10) >= 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.collectionName, this.origin, to);\n this.minted[this.x] = true;\n this.x += 1;\n if (this.x >= this.maxX) {\n this.spent = true;\n }\n return this.minted[this.x - 1];\n }\n retrieve(x) {\n if (!this.minted[x])\n throw new Error('Does not exist');\n return this.minted[x];\n }\n }",{"deps":{"Jig":{"$jig":0},"Minter":{"$jig":2},"NFT":{"$jig":3}}},"class Minter extends Jig {\n init(e, n, x, maxE, maxN, maxX, collectionName, collection, to) {\n if (!(caller instanceof Collection) && !(caller instanceof Minter))\n throw new Error('Only Collection and Minter classes can create minters');\n this.e = e + 1;\n this.n = parseInt(`${n}${x}`, 10);\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.collectionName = collectionName;\n this.collection = collection;\n this.owner = to;\n }\n mint(to) {\n if (this.spent)\n return this;\n if (this.e === this.maxE) {\n if (parseInt(`${this.n}${this.x}`, 10) >= this.maxN) {\n this.spent = true;\n return this;\n }\n this.newMinted = new NFT(this.n, this.x, this.collectionName, this.collection, to);\n this.minted[this.x] = true;\n this.x += 1;\n }\n else if (this.e < this.maxE) {\n if (parseInt(`${this.n}${this.x}${'0'.repeat(this.maxE - this.e)}`, 10) >= 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.collectionName, this.collection, to);\n this.minted[this.x] = true;\n this.x += 1;\n }\n if (this.x >= this.maxX) {\n this.spent = true;\n }\n return this;\n }\n retrieve(x) {\n if (this.minted[x])\n throw new Error('Does not exist');\n return this.minted[x];\n }\n }",{"deps":{"Collection":{"$jig":1},"Jig":{"$dup":["1","deps","Jig"]},"NFT":{"$dup":["1","deps","NFT"]}}},"class NFT extends Jig {\n init(n, x, collectionName, collection, to) {\n if (!(caller instanceof Minter))\n throw new Error('Only Minter instances may create NFTs.');\n this.serial = parseInt(`${n}${x}`, 10);\n this.minted = {};\n this.properties = {};\n this.collectionName = collectionName;\n this.collection = collection;\n this.owner = to;\n }\n send(to) {\n this.owner = to;\n }\n retrieve(c) {\n if (this.minted[c])\n throw new Error('Does not exist');\n return this.minted[c];\n }\n update(collection, properties, to) {\n if (collection.origin !== this.collection)\n throw new Error('Only Collection instances may update NFTs.');\n this.properties = Object.assign(this.properties, properties);\n this.owner = to;\n return this;\n }\n }",{"deps":{"Collection":{"$dup":["3","deps","Collection"]},"Jig":{"$dup":["1","deps","Jig"]},"Minter":{"$dup":["1","deps","Minter"]}}}]}]}
    https://whatsonchain.com/tx/38ac0ebf10e7006e0ba15fddf12f39d6bf0b9e6b1e19a284363d1df7e791df57