Settings

Blockchain
Network
Unit
Language
Theme
Sound New Block

Transaction

a7e79d4b3d944bc6d634e130e5f2e76f489e145fadaeb93bb78200788e9dd44c
Timestamp (utc)
2020-10-11 13:24:30
Fee Paid
0.00003024 BSV
(
0.00107839 BSV
-
0.00104815 BSV
)
Fee Rate
500 sat/KB
Version
1
Confirmations
337,558
Size Stats
6,047 B

3 Outputs

Total Output:
0.00104815 BSV
  • jrun b1b605103eMœ{"in":0,"ref":["native://Jig","60fc8bb664cbd7b922a98f6397d3f1384f854f037b77458e254e8ef94be16f78_o2"],"out":["ad6b04c1e1e743f2a4e51b974f7965b13a16239db496665548712cb31a973673"],"del":[],"cre":["mnqB5aH7DjAGEncNWEdjctr4udq9e6qckU"],"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, then this value will be overriden by the first mult published\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 // important to init at 0, used for check in publish()\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\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 //\r\n // all parameters checks passed\r\n //\r\n // if we only have the \"default\" mult of 1 from init(), let's override it (because it's useless and better for backups to not have many \"1\"s)\r\n if( this.list.length == 1 && this.action_count == 0 ) {\r\n this.list = []\r\n this.timestamps = []\r\n this.list_action_numbers = []\r\n }\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 // we want to insert directly at the right index in the array to keep sorted timestamps\r\n //\r\n var insert_index = this._findInsertBefore(this.timestamps, timestamp)\r\n /*\r\n this.list_action_numbers.push(this.action_count) // as an array for practicality\r\n this.list.push(newmult)\r\n this.timestamps.push(timestamp)\r\n */\r\n this._insertInArray(this.action_count, this.list_action_numbers, insert_index) // as an array for practicality\r\n this._insertInArray(newmult, this.list, insert_index)\r\n this._insertInArray(timestamp, this.timestamps, insert_index)\r\n //\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 _insertInArray (item, array, before) {\r\n if (!item) return;\r\n if (before == null || before < 0 || before > array.length - 1) {\r\n array.push(item);\r\n return array;\r\n }\r\n array.splice(before, 0, item);\r\n return array\r\n }\r\n _findInsertBefore (timestamps_array, new_timestamp) {\r\n if(!new_timestamp) throw \"new_timestamp is \"+new_timestamp\r\n if(!timestamps_array) throw \"timestamps_array is \"+timestamps_array\r\n if(timestamps_array.length == 0) return 0\r\n // timestamps_array.length > 0 from here\r\n for(var i=0; i < timestamps_array.length; i++){\r\n if(timestamps_array[i] > new_timestamp){\r\n return i\r\n }\r\n }\r\n return timestamps_array.length\r\n }\r\n}",{"deps":{"Jig":{"$jig":0},"expect":{"$jig":1}},"sealed":true}]}]}
    https://whatsonchain.com/tx/a7e79d4b3d944bc6d634e130e5f2e76f489e145fadaeb93bb78200788e9dd44c