Difference between revisions of "Testnet-technical"

From Ravencoin Wiki
Jump to navigationJump to search
(add asset script)
 
 
Line 29: Line 29:
 
|has ipfs (1 byte) (01 yes: 00 no) || 01
 
|has ipfs (1 byte) (01 yes: 00 no) || 01
 
|-
 
|-
|ipfs Bytelength (34 bytes) || 22
+
|ipfs Bytelength (1 byte) || 22
 
|-
 
|-
 
|IPFS hash decoded from base58 to hex || 122086d85921a971bab5d727bca0feb2a3f1336c4c5bf0453cc4c0104984c8cecfeb
 
|IPFS hash decoded from base58 to hex || 122086d85921a971bab5d727bca0feb2a3f1336c4c5bf0453cc4c0104984c8cecfeb

Latest revision as of 14:02, 4 August 2018

Anatomy of a Ravencoin Asset transaction Script

EXAMPLE HEX:c03872766e7105544553545900743ba40b00000008010122122086d85921a971bab5d727bca0feb2a3f1336c4c5bf0453cc4c0104984c8cecfeb75

EXAMPLE ASM:OP_RVN_ASSET 72766e 71 05 5445535459 00743ba40b000000 08 01 01 22 122086d85921a971bab5d727bca0feb2a3f1336c4c5bf0453cc4c0104984c8cecfeb OP_DROP

Description Value
OP_RVN_ASSET c0
Bytelength of script(1 byte) 38
Asset_type Header(rvn) 72766e
Asset_type (transfer(t)=74 or new(q)=71 or owner(o)=6f or 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 (1 byte) 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.