Settings

Blockchain
Network
Unit
Language
Theme
Sound New Block

Transaction

fdbfc8e5d598d70fa7c710ed0509e2f7bd3b1fae192598358e0c26f70fd99480
Timestamp (utc)
2021-06-05 16:35:07
Fee Paid
0.00004684 BSV
(
0.07523443 BSV
-
0.07518759 BSV
)
Fee Rate
500.1 sat/KB
Version
1
Confirmations
296,361
Size Stats
9,366 B

6 Outputs

Total Output:
0.07518759 BSV
  • jrunM8#{"in":0,"ref":["native://Jig","f97d4ac2a3d6f5ed09fad4a4f341619dc5a3773d9844ff95c99c5d4f8388de2f_o1"],"out":["e93e093bf3c9b561b3ceb9c6033bc76b9dfb6c69fdec0102cb035c7a0de50d9f","1276cd092c66daabfc6d02c0604daada14fe94e8094ac9ea802e55e0258e4b73","6a6e5dc5eca2f3eb56cffa34d3be15e3c7e594e008e32ec9bca684886f997c35","b2b1ab0facf5b3acd1af40e63d6aa1cac01fa32045bf6a32e969288805bae1b2"],"del":[],"cre":["mzrgrGpxHoKgWB7b5g3Dj8GRS1V1Qtjywn","mzrgrGpxHoKgWB7b5g3Dj8GRS1V1Qtjywn","mzrgrGpxHoKgWB7b5g3Dj8GRS1V1Qtjywn","mzrgrGpxHoKgWB7b5g3Dj8GRS1V1Qtjywn"],"exec":[{"op":"DEPLOY","data":["class MLBasicJig extends Jig {\n init(opts) {\n super.init()\n this.className = \"MLBasicJig\";\n this.name = opts.name || \"\";\n this.setTitle(opts.title, opts.description);\n }\n id(){ return this.origin; }\n setTitle(t, d){\n this.title = t || \"\";\n this.description = d || \"\";\n }\n deposit(val){\n this.satoshis += val || 0;\n }\n withdraw(val){\n this.satoshis -= val || 0;\n }\n balance(){\n return this.satoshis || 0;\n }\n send(to){\n this.owner = to;\n }\n}",{"deps":{"Jig":{"$jig":0}},"title":"MLBasicJig","version":"0.0.1"},"class MLJigger1 extends MLBasicJig {\n init(opts) {\n super.init(opts);\n this.className = \"MLJigger1\";\n this.children = [];\n }\n newChild(opts, dsp_to){\n const jig = new MLJigger2(opts, dsp_to || opts.dsp_to || \"\");\n this.children.push(jig)\n return jig;\n }\n\n getChild(idx){\n return this.children[idx];\n }\n\n debugChild(idx) {\n console.log(\"MLJigger1 debug child: \", idx);\n this.children[idx].debug();\n }\n\n send() {\n throw new Error(\"transfer can corrupt ownership\")\n }\n\n deposit() {\n throw new Error(\"cant deposit\")\n }\n\n withdraw() {\n throw new Error(\"cant withdraw\")\n }\n\n debug() {\n console.log(\"MLJigger1 debug\");\n console.log(\"caller\", caller);\n console.log(\"this\", this);\n }\n}",{"deps":{"MLBasicJig":{"$jig":2},"MLJigger2":{"$jig":4},"expect":{"$jig":1}},"title":"MLJigger1","version":"0.0.1"},"class MLJigger2 extends MLBasicJig {\n init(opts, dsp_to) {\n opts = opts || {};\n super.init(opts);\n\n // Constants\n this.className = \"MLJigger2\";\n\n // Expectations\n expect(caller).toBeInstanceOf(MLJigger1)\n expect(opts.c_at).toBeInteger(\"not integer\")\n\n //\n this.parent = {\n origin: caller.origin,\n location: caller.location,\n owner: caller.owner\n };\n\n // Configurations\n this.cnf(opts);\n\n // Privates\n this._c_at = opts.c_at;\n this._a_at = null;\n this._vrf_at = null;\n this._cy = 0;\n this._p_h = [];\n this._p_l_a = -1;\n this._p_c_x_at = -1;\n this._x_at = -1;\n \n if (dsp_to > \"\") this.dispatch(dsp_to);\n\n }\n\n cnf(opts){\n // Validations\n if (!opts.c_id) throw new Error(\"Missing c_id\");\n if (!opts.p_ad) throw new Error(\"Missing p_ad\");\n if (!Array.isArray(opts.p_ad)) throw new Error(\"p_ad array\");\n \n // Configuration\n this.setTitle(opts.title, opts.description);\n this.c_id = opts.c_id || \"\";\n this.c_lft = opts.c_lft || -1;\n this.cclb = opts.cclb === false ? false : true;\n this.trsf = opts.trsf === false ? false : true;\n this.verfbl = opts.verfbl === true ? true : false;\n //\n this.p_ad = opts.p_ad || [\"\", 1.0];\n this.p_c_max = opts.p_c_max || -1;\n this.p_c_tu = opts.p_c_tu || 60 * 60;\n this.p_c_pr = opts.p_c_pr || 1000;\n this.p_c_min = opts.p_c_min || 1;\n\n this.pld = opts.pld || {};\n }\n\n exp(){\n return {\n name: this.name,\n title: this.title,\n description: this.description,\n c_id: this.c_id,\n c_lft: this.c_lft,\n cclb: this.cclb,\n trsf: this.trsf,\n p_ad: this.p_ad,\n p_c_max: this.p_c_max,\n p_c_tu: this.p_c_tu,\n p_c_pr: this.p_c_pr,\n p_c_min: this.p_c_min,\n pld: this.pld,\n verfbl: this.verfbl\n }\n }\n\n // Values\n minDep() { return this.p_c_min * this.p_c_pr; }\n minTuSz() { return this.p_c_min * this.p_c_tu; }\n reqMinDep() {\n const dbt = (this.p_c_min - this._cy) * this.p_c_pr;\n return ( dbt < 0 ) ? 0 : dbt;\n }\n dbtSz() {\n const dpsz = this.reqMinDep() - this.satoshis;\n return dpsz < 0 ? 0 : dpsz;\n }\n life(cdt) { \n const lf = this._p_c_x_at - cdt; \n return (lf < 0) ? 0 : lf;\n }\n\n // Conditions\n isParOwn() { return this.owner == this.parent.owner; }\n isA(cdt) { return this._a_at > 0 && this._a_at < cdt; }\n isX(cdt) { return this._x_at > 0 && this._x_at < cdt; }\n isPCX(cdt) { return this._p_c_x_at > 0 && this._p_c_x_at < cdt; }\n isGteMin() { return this._cy >= this.p_c_min; }\n isLtMax() { return this.p_c_max <= 0 || this._cy < this.p_c_max; }\n isLteMax() { return this.p_c_max <= 0 || this._cy <= this.p_c_max; }\n hasPayBal() {\n return this.isGteMin() ? this.satoshis >= this.p_c_pr : this.satoshis >= this.minDep();\n }\n isValid(cdt){\n return this.isA(cdt) && !this.isX(cdt) && !this.isPCX(cdt) && this.isLteMax();\n }\n \n _ensureNotPCX(cdt, msg) { if (this.isPCX(cdt)) throw new Error(msg || \"c exp\"); }\n _ensureNotX(cdt, msg) { if (this.isX(cdt)) throw new Error(msg || \"exp\"); }\n _ensureGteMin(msg) { if (!this.isGteMin()) throw new Error(msg || \"lic\"); }\n _ensureLtMax(msg) { if (!this.isLtMax()) throw new Error(msg || \"pax pay r\"); }\n \n _next() { \n this._ensureLtMax();\n this._cy++;\n }\n\n //\n\n dispatch(newOwner) {\n expect(this.owner).toBe(this.parent.owner, \"only create\")\n expect(this._a_at).toBe(null, \"cant dispatch\")\n this.owner = newOwner;\n }\n\n //\n\n deposit(cdt, val) {\n expect(this.owner).not.toBe(this.parent.owner, \"cant deposit\")\n this._ensureNotX(cdt);\n this.satoshis += val;\n }\n\n withdraw() {\n if (this.satoshis == 0) throw new Error(\"No balance\");\n if (this.isParOwn()){\n this.satoshis = 0;\n return;\n }\n const dsz = this.reqMinDep();\n if (this.satoshis <= dsz) {\n throw new Error(\"Balance below minimum\");\n }\n this.satoshis = (dsz > 0) ? dsz : 0;\n }\n\n activate(cdt, pld) {\n expect(this.owner).not.toBe(this.parent.owner, \"cant activate\")\n expect(this._a_at).toBe(null, \"already activated\")\n if (this.dbtSz() > 0) throw new Error(\"needs minimum deposit\");\n //\n this._a_at = cdt;\n this._x_at = cdt + this.c_lft;\n this.pld = pld;\n //\n this._payExec(cdt, this.reqMinDep());\n }\n\n pay(cdt) {\n expect(this.owner).not.toBe(this.parent.owner, \"cant pay\")\n this._ensureNotX(cdt);\n this._ensureLtMax(\"cant pay max reach\");\n this._payExec(cdt, this.p_c_pr);\n }\n\n _payExec(cdt, value) {\n if (!this.hasPayBal()) throw new Error(\"no balance\")\n this.satoshis -= value;\n this._p_h.push([cdt, this.p_c_pr]);\n this._p_l_a = cdt;\n this._p_c_x_at = cdt + this.p_c_tu;\n this._next();\n }\n\n send(cdt, addr) {\n expect(this.owner).not.toBe(this.parent.owner, \"use dispatch\")\n this._ensureNotX(cdt);\n if (!this.trsf) throw new Error(\"no transf\");\n this.owner = addr;\n if (this.verfbl) this._vrf_at = null;\n }\n\n cancel(cdt) {\n this._ensureNotX(cdt);\n if (!this.cclb) throw new Error(\"not cclb\");\n this._ensureGteMin(\"can not\");\n \n let penaltyFee = Math.floor(this.satoshis / 2);\n const payIssuer = new SimplePayment(this.parent.owner, penaltyFee)\n this.satoshis = 0;\n this.owner = this.parent.owner;\n }\n\n destroy(){\n throw new Error(\"Cant destroy jigger2\")\n }\n\n debug() {\n console.log(\"MLJigger2 DEBUG1\", this)\n console.log(\"caller\", caller);\n console.log(\"this\", this);\n console.log(\"parent\", this.parent);\n }\n\n debug2(cdt){\n console.log(\"MLJigger2 DEBUG2\", this)\n //\n console.log(\"minDep\",this.minDep())\n console.log(\"minTuSz\",this.minTuSz())\n console.log(\"reqMinDep\",this.reqMinDep())\n console.log(\"dbtSz\",this.dbtSz())\n //\n console.log(\"isParOwn\",this.isParOwn())\n console.log(\"isA\",this.isA())\n console.log(\"isX\",this.isX(cdt))\n console.log(\"isPCX\",this.isPCX(cdt))\n console.log(\"isGteMin\",this.isGteMin())\n console.log(\"isLtMax\",this.isLtMax())\n console.log(\"isLteMax\",this.isLteMax())\n console.log(\"hasPayBal\",this.hasPayBal())\n console.log(\"life\",this.life(cdt))\n console.log(\"isValid\",this.isValid(cdt))\n //\n }\n \n}",{"deps":{"MLBasicJig":{"$dup":["3","deps","MLBasicJig"]},"MLJigger1":{"$jig":3},"SimplePayment":{"$jig":5},"expect":{"$dup":["3","deps","expect"]}},"title":"MLJigger2","version":"0.0.1"},"class SimplePayment extends Jig {\n init(owner, satoshis) {\n this.className = \"SimplePayment\";\n this.owner = owner\n this.satoshis = satoshis\n }\n redeem(){\n this.satoshis = 0;\n this.destroy();\n }\n}",{"deps":{"Jig":{"$dup":["1","deps","Jig"]}}}]}]}
    https://whatsonchain.com/tx/fdbfc8e5d598d70fa7c710ed0509e2f7bd3b1fae192598358e0c26f70fd99480
Total Output:
0.07518759 BSV