Settings

Blockchain
Network
Unit
Language
Theme
Sound New Block

Transaction

c1039f34f563a1dbe74be90e73dfba2f4ce51f4f43dd4b716d1f62ef2c2ce32e
Timestamp (utc)
2020-09-29 22:41:07
Fee Paid
0.00002315 BSV
(
0.00087950 BSV
-
0.00085635 BSV
)
Fee Rate
500.2 sat/KB
Version
1
Confirmations
342,270
Size Stats
4,628 B

3 Outputs

Total Output:
0.00085635 BSV
  • jrun b1b605103eM{"in":0,"ref":["native://Jig","5c6f4f0b6b62f4cdf7b78c07e6685028f508073f35b4b13196b4cbc3fdbcc893_o2"],"out":["975681fe217a849e63c94db55d71a5ce9b446ae4da9e288c008acdfe9ae4608f"],"del":[],"cre":["n2UeYD39YQ9pzxkbJfkDtNBRiV8PoNvLbq"],"exec":[{"op":"DEPLOY","data":["class RevokerContract extends Jig {\r\n\r\n init(){\r\n this.classname = \"RevokerContract: \"\r\n //\r\n this.is_frozen = false\r\n this.is_revoked = false\r\n this.is_backedup = false\r\n\r\n this.revoked_state = \"\"\r\n\r\n this.revoke_count = null\r\n this.new_token_contract = null\r\n }\r\n /* // if we add the send then we must absolutely send it immediately after creation\r\n // otherwise a hacker of the token contract would be able to send it to himself\r\n send(to) {\r\n this.owner = to\r\n }\r\n */\r\n backup(new_token_contract, timestamp){\r\n const function_id = this.classname+\"backup(): \"\r\n //\r\n this._checkContractState()\r\n this._checkNewTokenContract(new_token_contract)\r\n\r\n if(!timestamp) throw function_id+\"timestamp missing: \"+timestamp\r\n this._checkTimestamp(timestamp)\r\n\r\n this.timestamp = timestamp\r\n this.new_token_contract = new_token_contract\r\n this.is_backedup = true\r\n this.revoked_state = \"backed-up\"\r\n }\r\n freeze(timestamp){\r\n const function_id = this.classname+\"freeze(): \"\r\n //\r\n this._checkContractState()\r\n\r\n if(!timestamp) throw function_id+\"timestamp missing: \"+timestamp\r\n this._checkTimestamp(timestamp)\r\n\r\n // freezes all coins but doesn't give a new contract to exchange to\r\n // useful to end the network and/or reissue tokens on a new protocol after freezing it\r\n this.timestamp = timestamp\r\n this.is_frozen = true\r\n this.revoked_state = \"frozen\"\r\n }\r\n revoke(revoke_count, new_token_contract, timestamp){\r\n const function_id = this.classname+\"revoke(): \"\r\n //\r\n this._checkContractState()\r\n this._checkRevokeCount(revoke_count)\r\n this._checkNewTokenContract(new_token_contract)\r\n\r\n if(!timestamp) throw function_id+\"timestamp missing: \"+timestamp\r\n this._checkTimestamp(timestamp)\r\n\r\n this.timestamp = timestamp\r\n this.revoke_count = revoke_count\r\n this.new_token_contract = new_token_contract\r\n this.is_revoked = true\r\n this.revoked_state = \"revoked\"\r\n }\r\n _checkContractState(){\r\n const function_id = this.classname+\"_checkContractState(): \"\r\n if(this.is_revoked) throw function_id+\"contract is already revoked\"\r\n if(this.is_backedup) throw function_id+\"contract is already backed up\"\r\n if(this.is_frozen) throw function_id+\"contract is already frozen\"\r\n }\r\n _checkRevokeCount (revoke_count) { // check positive integer\r\n const function_id = this.classname+\": _checkRevokeCount(): \"\r\n if (typeof revoke_count !== 'number') throw(function_id+'revoke_count is not a number : '+revoke_count) // throw gives better error trace than expect()\r\n if (!(revoke_count > 0)) throw new Error(function_id+'revoke_count must be positive : '+revoke_count)\r\n if (revoke_count > Number.MAX_SAFE_INTEGER) throw new Error(function_id+'revoke_count too large : '+revoke_count)\r\n if (!Number.isInteger(revoke_count)) throw(function_id+'revoke_count must be an integer : '+revoke_count) \r\n }\r\n _checkNewTokenContract(new_token_contract) {\r\n const function_id = this.classname+\": _checkNewTokenContract(): \"\r\n expect(new_token_contract).toBeObject(function_id+': bad new_token_contract type, should be Object, is '+(typeof new_token_contract))\r\n expect(new_token_contract).toBeInstanceOf(Jig, function_id+': bad new_token_contract type, should be instance of Jig')\r\n }\r\n _checkTimestamp (timestamp) {\r\n const function_id = this.classname+\": _checkTimestamp(): \"\r\n if(!timestamp) throw function_id+\"timestamp missing: \"+timestamp\r\n try {\r\n this._checkRevokeCount(timestamp) // applies as well to timestamp: positive integer\r\n } catch(e) { throw(function_id+e) }\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/c1039f34f563a1dbe74be90e73dfba2f4ce51f4f43dd4b716d1f62ef2c2ce32e