You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/utxo-coredao/src/opReturn.ts
+2-20Lines changed: 2 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -56,8 +56,6 @@ export function createCoreDaoOpReturnOutputScript({
56
56
*
57
57
* The OP_RETURN output should contain all staking information in order, and be composed in the following format:
58
58
*
59
-
* OP_RETURN: identifier 0x6a
60
-
* LENGTH: which represents the total byte length after the OP_RETURN opcode. Note that all data has to be pushed with its appropriate size byte(s). [1]
61
59
* Satoshi Plus Identifier: (SAT+) 4 bytes
62
60
* Version: (0x01) 1 byte
63
61
* Chain ID: (0x045b (1115) for Core Testnet and 0x045c (1116) for Core Mainnet) 2 bytes
@@ -67,13 +65,12 @@ export function createCoreDaoOpReturnOutputScript({
67
65
* (Optional) RedeemScript
68
66
* (Optional) Timelock: 4 bytes
69
67
*
70
-
* [1] Any bytes bigger than or equal to 0x4c is pushed by using 0x4c (ie. OP_PUSHDATA)
71
-
* followed by the length followed by the data (byte[80] -> OP_PUSHDATA + 80 + byte[80])
72
-
*
73
68
* Either RedeemScript or Timelock must be available, the purpose is to allow relayer to
74
69
* obtain the RedeemScript and submit transactions on Core. If a RedeemScript is provided,
75
70
* relayer will use it directly. Otherwise, relayer will construct the redeem script based
76
71
* on the timelock and the information in the transaction inputs.
72
+
*
73
+
* Note that any length > 80 bytes wont be relayed by nodes and therefore we will throw an error.
77
74
*/
78
75
if(version<0||version>255){
79
76
thrownewError('Invalid version - out of range');
@@ -197,18 +194,3 @@ export function parseCoreDaoOpReturnOutputScript(script: Buffer): OpReturnParams
0 commit comments