Transaction

0bcf66bb6c181315ef5dc9f7a53a40ddd00a6a272e1acd6c59c23e0b292f7333
( - )
224,025
2020-10-09 16:11:08
1
5,241 B

8 Outputs

Total Output:
  • jrun b1b605103eMĂȘ{"in":0,"ref":["native://Jig","7568e297feede5dbfc8a404aa14e3e97c6661700cf4434e6fd0ea6d1b9463cc3_o2"],"out":["51655ecffb66c2a8fcd4090bdcc344a8d9c7690188bcad1b3c6bac4f8f088e63"],"del":[],"cre":["mwG9KT17nu9TDC5aWaCjWHfBGU5tqY4ciz"],"exec":[{"op":"DEPLOY","data":["class MultList extends Jig {\r\n\r\n init(timestamp) {\r\n this.classname = \"MultList: \"\r\n const function_id = this.classname+\"init(): \"\r\n\r\n if(!timestamp) throw function_id+\"timestamp missing: \"+timestamp \r\n this._checkTimestamp(timestamp)\r\n\r\n this.list = []\r\n this.timestamps = []\r\n this.list_action_numbers = []\r\n\r\n //init with a 1.0 value to make it easier to use\r\n //this.publish(1.0, timestamp) // BEWARE THIS WILL NOT WORK because this isn't deployed yet (no owner & location) so you need to do it step-by-step in init() too\r\n this.list.push(1.0)\r\n this.timestamps.push(timestamp)\r\n this.action_count = 0\r\n this.list_action_numbers.push(this.action_count)\r\n this.action=\"init\"\r\n }\r\n \r\n linkAdminCounter(admincounter){\r\n /* this should be done right after creation, we need it separate from init() because we first need to link multlist to the tokencontract and then the other way */\r\n if(this.admincounter) throw this.classname+\": already an admincounter linked: \"+this.admincounter.origin\r\n this.admincounter = admincounter\r\n this.action= \"linkAdminCounter\"\r\n }\r\n \r\n publish(newmult, timestamp) {\r\n const function_id = this.classname+\"publish(): \"\r\n\r\n if(!this.admincounter) throw(function_id+\" no admincounter contract found, please link one before publishing\")\r\n //\r\n if(this.admincounter.isRevoked()) throw new Error(function_id+\"token contract has been revoked (admincounter)\")\r\n if(this.admincounter.isBackedup()) throw new Error(function_id+\"token contract has been backedup (admincounter)\")\r\n if(this.admincounter.isFrozen()) throw new Error(function_id+\"token contract has been frozen (admincounter)\") // check frozen as last always!\r\n //\r\n if(this.owner != this.constructor.owner) throw function_id+\": Only \"+this.classname+\"'s owner may publish\"\r\n if(!timestamp) throw function_id+\"timestamp missing: \"+timestamp\r\n this._checkTimestamp(timestamp)\r\n\r\n this._checkNum(newmult)\r\n\r\n if(isNaN(newmult)) throw function_id+\" Error: newmult is NaN: \"+newmult\r\n if(!isFinite(newmult)) throw function_id+\" Error: newmult is not Finite: \"+newmult\r\n\r\n // all parameters checks passed\r\n\r\n this.admincounter.auth() //ensures only the tokencontract owner can publish // for run 0.6\r\n this.action_count = this.admincounter.nonce // for run 0.6\r\n \r\n this.list_action_numbers.push(this.action_count) // as an array for practicality\r\n\r\n this.list.push(newmult)\r\n this.timestamps.push(timestamp)\r\n this.action=\"publish\"\r\n\r\n }\r\n _checkNum (number) { // check that number is a positive number (but can be float)\r\n const function_id = this.classname+\": _checkNum(): \"\r\n if (typeof number !== 'number') throw(function_id+'number is not a number : '+number) // throw gives better error trace than expect()\r\n if (!(number > 0)) throw new Error(function_id+'number must be positive : '+number)\r\n if (number > Number.MAX_SAFE_INTEGER) throw new Error(function_id+'number too large : '+number)\r\n }\r\n _checkTimestamp (timestamp) {\r\n const function_id = this.classname+\": _checkTimestamp(): \"\r\n try {\r\n this._checkNum(timestamp) // applies as well to timestamp\r\n } catch(e) { throw(function_id+e) }\r\n if (!Number.isInteger(timestamp)) throw(function_id+'timestamp must be an integer : '+timestamp) //necessary because _checkNum doesn't do it\r\n if( !(timestamp > 1600939295117) ) throw(function_id+': timestamp must be older than 1600939295117 : '+timestamp) // make sure the timestamp here is in ms!!\r\n }\r\n}",{"deps":{"Jig":{"$jig":0},"expect":{"$jig":1}},"sealed":true}]}]}
    https://whatsonchain.com/tx/0bcf66bb6c181315ef5dc9f7a53a40ddd00a6a272e1acd6c59c23e0b292f7333
Total Output: