Settings

Blockchain
Network
Unit
Language
Theme
Sound New Block

Transaction

71ca8d032e6aad31a60aee1033f53f88a67d3ff54c8927b3750b95f6d9e66279
Timestamp (utc)
2021-11-22 01:02:09
Fee Paid
0.00003501 BSV
(
0.11304091 BSV
-
0.11300590 BSV
)
Fee Rate
500.1 sat/KB
Version
1
Confirmations
270,976
Size Stats
7,000 B

3 Outputs

Total Output:
0.11300590 BSV
  • jrunPOKM]{"in":0,"ref":["native://Jig","d5bb2c10b41247614d418ed93ed0d99ebe501ea0fdc8bd68c06837b645ea6040_o1","3aff153ce0daca65112bd5c6a29059995a14604509061be0ad0f67fabe10d95e_o1"],"out":["8a8f7c13f72354dc0f017897219b9c9537b89b87cf26db3dd9a084912aca02ab"],"del":[],"cre":["mqDcJPM8EK7nBP1uioY4KQPnKc2x624XtZ"],"exec":[{"op":"DEPLOY","data":["class Pok extends Jig {\n\n init(metadata, owner) {\n\n const extended = this.constructor !== Pok\n if (!extended) throw new Error('FYI: Pok must be extended')\n\n const minting = caller === this.constructor\n if (!minting) throw new Error('FYI: Must create using mint()')\n\n if (owner) this.owner = owner\n\n this.setMetadata(metadata)\n\n }\n\n setMetadata(metadata) {\n \n expect(metadata).toBeObject('metadata')\n\n if (metadata.name) this.constructor.$validateText(metadata.name, 64, 'name')\n if (metadata.description) this.constructor.$validateText(metadata.description, 80, 'description')\n if (metadata.author) this.constructor.$validateText(metadata.author, 128, 'author')\n if (metadata.license) this.constructor.$validateText(metadata.license, 128, 'license')\n if (metadata.royalties) this.constructor.$validateRoyalties(metadata.royalties)\n if (metadata.traits) this.constructor.$validateTraits(metadata.traits)\n if (metadata.image) this.constructor.$validateImage(metadata.image)\n\n if (metadata.imageAttribution) {\n if (metadata.imageAttribution.author) this.constructor.$validateText(metadata.imageAttribution.author, 128, 'metadata.imageAttribution.author')\n if (metadata.imageAttribution.title) this.constructor.$validateText(metadata.imageAttribution.title, 128, 'metadata.imageAttribution.title')\n if (metadata.imageAttribution.source) this.constructor.$validateText(metadata.imageAttribution.source, 128, 'metadata.imageAttribution.source')\n if (metadata.imageAttribution.license) this.constructor.$validateText(metadata.imageAttribution.license, 128, 'metadata.imageAttribution.license')\n }\n\n this.metadata = {\n ...Pok.metadata,\n ...this.constructor.metadata,\n ...this.metadata,\n ...metadata\n }\n\n }\n\n send(to) {\n\n expect(to).toBeDefined('to')\n \n this.sender = this.owner\n this.owner = to\n \n }\n\n /**\n * \n * @param {\n * {\n * name: String; // String name to use in place of the class or function name\n * description: String; // Short sentence, less than 80 characters, that describes the jig for users\n * author: String; // Name of the creator for the code\n * license: String; // License for the code \n * royalties: {\n * percentageFee: Number;\n * payoutAddress: String; \n * }[];\n * traits: { \n * [key: String]: {\n * label: String;\n * type: Number | String | Boolean | Null | Undefined | Object | Array; \n * value: String;\n * hidden: Boolean;\n * } \n * };\n * image: String; // /^b:\\/\\/[a-fA-F0-9]{64}_o[0-9]+/\n * imageAttribution: {\n * author: String; // Creator of the image\n * title: String; // Title of the image\n * source: String; // URL where the image was found\n * license: String; // License for the image \n * }\n * }\n * } metadata\n * @param {String} owner \n * @returns Pok\n */\n static mint(metadata = {}, owner) {\n\n if (this === Pok) throw new Error(\"FYI: Pok must be extended\")\n\n this.total++\n\n metadata.number = this.total\n\n return new this(metadata, owner)\n\n }\n\n\n static setFriends(friends) {\n this.friends = friends\n }\n\n\n // Validations\n\n\n static $validateText(text, maxLength, label) {\n\n expect(text).toBeString(label)\n expect(text.length).toBeGreaterThan(0, label + '.length')\n expect(text.length).toBeLessThanOrEqualTo(maxLength, label + '.length')\n \n }\n\n\n static $validateTraits(traits) {\n\n expect(traits).toBeObject('traits')\n for (let [key, trait] of Object.entries(traits)) {\n this.$validateText(trait.label, 64, `traits[${key}].label`)\n expect(trait.value).toBeString(`traits[${key}].value`)\n expect(trait.hidden).toBeBoolean(`traits[${key}].hidden`)\n expect([\n 'Number',\n 'String',\n 'Boolean',\n 'Null',\n 'Undefined',\n 'Object',\n 'Array'\n ].includes(trait.type)).toBe(true, `traits[${key}].type must be on of {Number, String, Boolean, Null, Undefined, Object, Array}`)\n }\n\n }\n\n\n static $validateImage(image) {\n\n const regex = /^b:\\/\\/[a-fA-F0-9]{64}_o[0-9]+/\n expect(image).toBeString('image')\n expect(regex.test(image)).toBe(true, 'image string should match /^b:\\\\/\\\\/[a-fA-F0-9]{64}_o[0-9]+/')\n \n }\n\n\n static $validateRoyalties(royalties) {\n \n expect(royalties).toBeArray('royalties')\n let len = royalties.length\n while (len--) {\n expect(royalties[len].percentageFee).toBeNumber(`royalties[${len}].percentageFee`)\n expect(royalties[len].percentageFee).toBeGreaterThanOrEqualTo(this.minRoyaltyPercentageFee, `royalties[${len}].percentageFee`)\n expect(royalties[len].percentageFee).toBeLessThanOrEqualTo(this.maxRoyaltyPercentageFee, `royalties[${len}].percentageFee`)\n expect(royalties[len].payoutAddress).toBeString(`royalties[${len}].payoutAddress`)\n }\n\n }\n\n }",{"deps":{"Jig":{"$jig":0},"expect":{"$jig":1}},"friends":[{"$jig":2}],"maxRoyaltyPercentageFee":10,"metadata":{"author":"","description":"Pok Standard","imageAttribution":{},"license":"MIT","name":"Pok","royalties":[{"payoutAddress":"","percentageFee":0}],"traits":{}},"minRoyaltyPercentageFee":0,"sealed":false,"total":0}]}]}
    https://whatsonchain.com/tx/71ca8d032e6aad31a60aee1033f53f88a67d3ff54c8927b3750b95f6d9e66279