Settings

Blockchain
Network
Unit
Language
Theme
Sound New Block

Transaction

0afd17bee00decbf2f9e7bb13c31370130e3956f726b9ba1fb31343fdbfef0cd
Timestamp (utc)
2021-11-18 19:43:04
Fee Paid
0.00002916 BSV
(
0.11416498 BSV
-
0.11413582 BSV
)
Fee Rate
500 sat/KB
Version
1
Confirmations
265,924
Size Stats
5,830 B

3 Outputs

Total Output:
0.11413582 BSV
  • jrunPOKMÊ{"in":0,"ref":[],"out":["d66354f95e8d9725ff710f96492a5a6b0a0c7e616561d121b92f96db124cb00c"],"del":[],"cre":["modopDhAN5GArLxEbBjWTPByqqzThLhL1C"],"exec":[{"op":"DEPLOY","data":["class OrderLock {\n constructor(address, satoshis) {\n if (typeof address !== \"string\" || address.length < 27) {\n throw new TypeError(\"Invalid address\");\n }\n if (typeof satoshis !== \"number\" || !Number.isInteger(satoshis)) {\n throw new Error(\"Invalid satoshis\");\n }\n if (satoshis > Number.MAX_SAFE_INTEGER) {\n throw new Error(\"Invalid. Max: \" + Number.MAX_SAFE_INTEGER);\n }\n if (satoshis < 546) {\n throw new Error(\"Dust\");\n }\n this.address = address;\n this.satoshis = satoshis;\n }\n script() {\n const output = this.serializeOutput(this.address, this.satoshis);\n const hashOutput = this.sha256sha256(output);\n return (\n OrderLock.scriptTemplate.slice(0, 2) +\n hashOutput +\n OrderLock.scriptTemplate.slice(66)\n );\n }\n serializeOutput(address, satoshis) {\n const satoshisHex = this.serializeSatoshis(satoshis);\n const satoshisHexBytes = Hex.stringToBytes(satoshisHex);\n const outputScriptBytes = Hex.stringToBytes(this.getP2PKHScript(address));\n const lengthBytes = [25];\n return satoshisHexBytes.concat(lengthBytes, outputScriptBytes);\n }\n serializeSatoshis(satoshis) {\n let numberHex = (\"0000000000000000\" + satoshis.toString(16)).slice(-16);\n return numberHex\n .match(/[a-fA-F0-9]{2}/g)\n .reverse()\n .join(\"\");\n }\n getP2PKHScript(address) {\n const decoded = Base58.decode(address);\n const hex = Hex.bytesToString(decoded);\n return asm(`OP_DUP OP_HASH160 ${hex} OP_EQUALVERIFY OP_CHECKSIG`);\n }\n sha256sha256(output) {\n return Hex.bytesToString(sha256(sha256(output)));\n }\n domain() {\n return 0;\n }\n }",{"deps":{},"scriptTemplate":"20000000000000000000000000000000000000000000000000000000000000000001c35279630142517a75547901687f7501447f77007901207f7504000000007e517951797e56797eaa577901247f75547f77876975756754795579827758947f75557982770128947f77527987696861547921cdb285cc49e5ff3eed6536e7b426e8a528b05bf9276bd05431a671743e651ceb002102dca1e194dd541a47f4c85fea6a4d45bb50f16ed2fddc391bf80b525454f8b40920f941a26b1c1802eaa09109701e4e632e1ef730b0b68c9517e7c19be2ba4c7d37202f282d163597a82d72c263b004695297aecb4d758dccd1dbf61e82a3360bde2c202cde0b36a3821ef6dbd1cc8d754dcbae97526904b063c2722da89735162d282f56795679aa616100790079517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e01007e81517a756157795679567956795679537956795479577995939521414136d08c5ed2bf3ba048afe6dcaebafeffffffffffffffffffffffffffffff0061517951795179517997527a75517a5179009f635179517993527a75517a685179517a75517a7561527a75517a517951795296a0630079527994527a75517a68537982775279827754527993517993013051797e527e53797e57797e527e52797e5579517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7e56797e0079517a75517a75517a75517a75517a75517a75517a75517a75517a75517a75517a75517a756100795779ac517a75517a75517a75517a75517a75517a75517a75517a75517a75617777777777","scrypt":"contract OrderLock {\n // double hash of designated output, i.e. hash256(satoshis + varint + output script)\n Sha256 hashOutput;\n\n // trailingPrevouts = concat all inputs (txid1 + vout1 + txid2 + vout2 + ...),\n // excluding first 2 inputs, i.e. cancel baton input and self input\n public function unlock(SigHashPreimage preimage, bytes trailingPrevouts, bool isCancel) {\n // c3 = SIGHASH_SINGLE | ANYONECANPAY, checks self input, self output\n SigHashType sigHashType = SigHashType(b'c3');\n if (isCancel) {\n // 42 = SIGHASH_NONE, checks all inputs, no outputs\n sigHashType = SigHashType(b'42');\n // token lock input txid + vout, 32 + 4 bytes\n bytes selfOutpoint = preimage[68 : 104];\n // cancel baton input, same locking tx as token lock input, vout must be 0\n bytes cancelOutpoint = selfOutpoint[: 32] + b'00000000';\n // reconstruct full prevouts, double hash, check against preimage hashPrevouts\n require(hash256(selfOutpoint + cancelOutpoint + trailingPrevouts) == preimage[4 : 36]);\n } else {\n // check against preimage hashOutputs, with SIGHASH_SINGLE, only self output is hashed\n require(preimage[len(preimage) - 40 : len(preimage) - 8] == this.hashOutput);\n }\n // check preimage\n require(Tx.checkPreimageAdvanced(\n preimage,\n PrivKey(0xeb1c653e7471a63154d06b27f95bb028a5e826b4e73665ed3effe549cc85b2cd),\n PubKey(b'02dca1e194dd541a47f4c85fea6a4d45bb50f16ed2fddc391bf80b525454f8b409'),\n 0x377d4cbae29bc1e717958cb6b030f71e2e634e1e700991a0ea02181c6ba241f9,\n 0x2cde0b36a3821ef6dbd1cc8d754dcbae97526904b063c2722da89735162d282f,\n b'2cde0b36a3821ef6dbd1cc8d754dcbae97526904b063c2722da89735162d282f',\n sigHashType\n ));\n }\n}","sealed":true,"upgradable":false}]}]}
    https://whatsonchain.com/tx/0afd17bee00decbf2f9e7bb13c31370130e3956f726b9ba1fb31343fdbfef0cd