Settings

Blockchain
Network
Unit
Language
Theme
Sound New Block

Transaction

2643d219ef73db78523ac4c1cf4d831bb06b14fff9bef6bd8d68ba1bc02f297f
Timestamp (utc)
2020-10-07 19:57:47
Fee Paid
0.00002476 BSV
(
0.00060293 BSV
-
0.00057817 BSV
)
Fee Rate
500.1 sat/KB
Version
1
Confirmations
342,258
Size Stats
4,951 B

3 Outputs

Total Output:
0.00057817 BSV
  • jrun b1b605103eMT{"in":0,"ref":["native://Jig","f745bdb3909cdf39e3e8c961b9d37dbc9cd07a1ac8d7c37c696d5a8ff1ffb648_o2"],"out":["8ab4769cfde2591b5980f67b7c850820179766dbf171edee103c013c2b661e59"],"del":[],"cre":["mr9zdspVwjQBCsRQ464ct8M2wJgaL7CcaQ"],"exec":[{"op":"DEPLOY","data":["class Blacklist extends Jig {\n init(timestamp) {\n this.classname = \"Blacklist: \";\n const function_id = this.classname + \"init(): \";\n if (!timestamp) throw function_id + \"timestamp missing: \" + timestamp;\n\n this._checkTimestamp(timestamp);\n\n this.list = [];\n this.timestamps = [];\n this.list_action_numbers = [];\n this.action = \"init\";\n }\n\n linkAdminCounter(admincounter) {\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 */\n if (this.admincounter) throw this.classname + \": already an admincounter linked: \" + this.admincounter.origin;\n this.admincounter = admincounter;\n this.action = \"linkAdminCounter\";\n }\n\n blacklist(address, timestamp) {\n const function_id = this.classname + \"blacklist(): \"; // checks\n\n if (!this.admincounter) throw function_id + \" no admincounter contract found, please link one before blacklisting\"; //\n\n if (this.admincounter.isRevoked()) throw new Error(function_id + \"token contract has been revoked (admincounter)\");\n if (this.admincounter.isBackedup()) throw new Error(function_id + \"token contract has been backedup (admincounter)\");\n if (this.admincounter.isFrozen()) throw new Error(function_id + \"token contract has been frozen (admincounter)\"); // check frozen as last always!\n\n if (!timestamp) throw this.classname + \": publish: timestamp missing: \" + timestamp;\n\n this._checkTimestamp(timestamp);\n\n if (this.owner != this.constructor.owner) throw function_id + \" Only \" + this.classname + \" owner may manage blacklist\";\n if (typeof address != \"string\") throw function_id + ' address to blacklist must be a string: ' + address;\n if (address == this.owner) throw function_id + \" you cannot blacklist your own administration address\";\n if (address.length < 26) throw function_id + \" address is too short: \" + address.length;\n if (!address.match(\"^[A-Za-z0-9]+$\")) throw function_id + \" wrong character in address: \" + address;\n if (this.list.includes(address)) throw function_id + \" address is already in blacklist\"; // all parameters checks passed\n\n if (!this.admincounter) {\n throw function_id + \" no admincounter contract found, please link one before publishing\";\n } else {\n this.admincounter.auth(); //ensures only the tokencontract owner can publish // for run 0.6\n\n this.action_count = this.admincounter.nonce; // for run 0.6\n }\n\n this.list_action_numbers.push(this.action_count); // as an array for practicality\n\n this.list.push(address);\n this.timestamps.push(timestamp);\n this.action = \"blacklist\";\n } // beware allowing remove introduces a security breach if an hacker can unblacklist his address and send some of his tokens to others to taint them\n //remove(address){\n // expect(address).toBeString(this.classname+': address to blacklist must be a string')\n // if(!this.list.has(address)) throw this.classname+\": address to remove is not in blacklist\" \n // this.list.delete(address)\n //}\n\n\n isBlacklisted(address) {\n if (this.list.includes(address)) return true;else return false;\n }\n\n _checkNum(number) {\n // check that number is a positive number (but can be float)\n const function_id = this.classname + \": _checkNum(): \";\n if (typeof number !== 'number') throw function_id + 'number is not a number : ' + number; // throw gives better error trace than expect()\n\n if (!(number > 0)) throw new Error(function_id + 'number must be positive : ' + number);\n if (number > Number.MAX_SAFE_INTEGER) throw new Error(function_id + 'number too large : ' + number);\n }\n\n _checkTimestamp(timestamp) {\n const function_id = this.classname + \": _checkTimestamp(): \";\n\n try {\n this._checkNum(timestamp); // applies as well to timestamp\n\n } catch (e) {\n throw function_id + e;\n }\n\n if (!Number.isInteger(timestamp)) throw function_id + 'timestamp must be an integer : ' + timestamp; //necessary because _checkNum doesn't do it\n\n if (!(timestamp > 1600939295117)) throw function_id + ': timestamp must be older than 1600939295117 : ' + timestamp; // make sure the timestamp here is in ms!!\n }\n\n}",{"deps":{"Jig":{"$jig":0},"expect":{"$jig":1}},"sealed":true}]}]}
    https://whatsonchain.com/tx/2643d219ef73db78523ac4c1cf4d831bb06b14fff9bef6bd8d68ba1bc02f297f