Transaction

88d34ffa3ea33d75a4fbe901b4b839cc763549edcddb9280b1f8da3dde0e0d9a
Timestamp (utc)
2021-08-06 13:55:50
Fee Paid
0.00005657 BSV
(
0.00014461 BSV
-
0.00008804 BSV
)
Fee Rate
1,000 sat/KB
Version
1
Confirmations
237,435
Size Stats
5,655 B

3 Outputs

Total Output:
0.00008804 BSV
  • jrun b1b605103eM{"in":0,"ref":["native://Jig","45189b6b541d0807725c9489a18b5d99460b444f5fbfb983e9c78fef7dd18200_o2","71fba386341b932380ec5bfedc3a40bce43d4974decdc94c419a94a8ce5dfc23_o1"],"out":["a9759b54e9fc7b65f79fc8cf1d18265a6cd3308ef39b057b9f0d21d255602f6f"],"del":[],"cre":["1755Z4HoyVCpBLxg7bBAsndYSzefvE7vQx"],"exec":[{"op":"DEPLOY","data":["class Blacklist extends Jig {\r\n \r\n init(timestamp) {\r\n this.classname = \"Blacklist: \"\r\n const function_id = this.classname+\"init(): \"\r\n\r\n if(!timestamp) throw SmartContractError(401, 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 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 SmartContractError(402, 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 blacklist(address, timestamp) {\r\n const function_id = this.classname+\"blacklist(): \"\r\n\r\n // checks\r\n if(!this.admincounter) throw SmartContractError(403, function_id+\" no admincounter contract found, please link one before blacklisting\")\r\n //\r\n\r\n if(this.admincounter.isRevoked()) throw SmartContractError(404, function_id+\"token contract has been revoked (admincounter)\")\r\n if(this.admincounter.isBackedup()) throw SmartContractError(405, function_id+\"token contract has been backedup (admincounter)\")\r\n if(this.admincounter.isFrozen()) throw SmartContractError(406, function_id+\"token contract has been frozen (admincounter)\") // check frozen as last always!\r\n\r\n if(!timestamp) throw SmartContractError(407, function_id+\": publish: timestamp missing: \"+timestamp)\r\n this._checkTimestamp(timestamp)\r\n\r\n if(this.owner != this.constructor.owner) throw SmartContractError(408, function_id+\" Only \"+this.classname+\" owner may manage blacklist\")\r\n if(typeof address != \"string\") throw SmartContractError(409, function_id+' address to blacklist must be a string: '+address)\r\n if(address == this.owner) throw SmartContractError(410, function_id+\" you cannot blacklist your own administration address\")\r\n if(address.length < 26) throw SmartContractError(411, function_id+\" address is too short: \"+address.length)\r\n if(!address.match(\"^[A-Za-z0-9]+$\")) throw SmartContractError(412, function_id+\" wrong character in address: \"+address)\r\n if(this.list.includes(address)) throw SmartContractError(413, function_id+\" address is already in blacklist\")\r\n\r\n // all parameters checks passed\r\n if(!this.admincounter){\r\n throw SmartContractError(414, function_id+\" no admincounter contract found, please link one before publishing\")\r\n }\r\n else {\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(address)\r\n this.timestamps.push(timestamp)\r\n this.action=\"blacklist\"\r\n }\r\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\r\n //remove(address){\r\n // expect(address).toBeString(this.classname+': address to blacklist must be a string')\r\n // if(!this.list.has(address)) throw SmartContractError(ADD NUMBER,this.classname+\": address to remove is not in blacklist\") // replace by SmartContractError\r\n // this.list.delete(address)\r\n //}\r\n isBlacklisted(address){\r\n if(this.list.includes(address)) return true\r\n else return false\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 SmartContractError(415, function_id+'number is not a number : '+number) // throw gives better error trace than expect()\r\n if (!(number > 0)) throw SmartContractError(416, function_id+'number must be positive : '+number)\r\n if (number > Number.MAX_SAFE_INTEGER) throw SmartContractError(417, 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 SmartContractError(418, function_id+e) }\r\n if (!Number.isInteger(timestamp)) throw SmartContractError(419, function_id+'timestamp must be an integer : '+timestamp) //necessary because _checkNum doesn't do it\r\n if( !(timestamp > 1600939295117) ) throw SmartContractError(420, 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},"SmartContractError":{"$jig":1},"expect":{"$jig":2}},"sealed":true}]}]}
    https://whatsonchain.com/tx/88d34ffa3ea33d75a4fbe901b4b839cc763549edcddb9280b1f8da3dde0e0d9a