Last active
August 4, 2018 19:43
-
-
Save underdarkskies/87342708fbeb2dea8ccf397f8c38ee8d to your computer and use it in GitHub Desktop.
RVN ASSETS SCRIPT deepdive
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EXAMPLE HEX:c03872766e7105544553545900743ba40b00000008010122122086d85921a971bab5d727bca0feb2a3f1336c4c5bf0453cc4c0104984c8cecfeb75 | |
EXAMPLE ASM:OP_RVN_ASSET 72766e 71 05 5445535459 00743ba40b000000 08 01 01 22 122086d85921a971bab5d727bca0feb2a3f1336c4c5bf0453cc4c0104984c8cecfeb OP_DROP | |
OP_RVN_ASSET = c0 | |
Bytelength of script(1 byte) = 38 | |
Asset_type Header(rvn) = 72766e | |
Asset_type (transfer(t)=74 || new(q)=71 || owner(o)=6f || reissue(r) =72) = 74 | |
Bytelength of Asset_Name(1 byte) = 05 | |
Asset_Name (up to 31 bytes: 30 for normal, 31 for ownership) = 5445535459 | |
8 Bytes of Little Endian hex: Amount of assets in satoshis = 00743ba40b000000 | |
Divisible by (1 byte) range(01..08) = 08 | |
is reissueable (1 byte) (01 yes: 00 no) = 01 | |
has ipfs (1 byte) (01 yes: 00 no) = 01 | |
ipfs Bytelength (34 bytes) = 22 | |
IPFS hash decoded from base58 to hex = 122086d85921a971bab5d727bca0feb2a3f1336c4c5bf0453cc4c0104984c8cecfeb | |
OP_DROP = 75 | |
So in this example we have an OP_RVN_ASSET with a total bytelength of 38 bytes, with a transaction type rvnt(asset transfer). | |
The Bytelength of the Asset_Name is 5 and the Asset_Name is TESTY. The amount of the transaction is 500. | |
The Asset is divisible by up to 8 units(decimal places), and the Asset is marked as reissuable. | |
The Asset has an IPFS hash, of 34 bytes in length, and the base58 encoded hash is QmXR2gRJnYHFaYvSCKEy6mPeJAsTN8ab7AvGZeNRbycnXL. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment