@@ -21,8 +21,8 @@ describe('Sol Confidential Mint Builder', () => {
2121 const validityContextStateAddress = '7Uxci7Cyi3M6utvAFP6uhzkH3yMzhfqshA4Uu4hqBfy8' ;
2222 const contextStateAuthorityAddress = authAccount . pub ;
2323
24- const hex36 = '00' . repeat ( 36 ) ;
25- const hex64 = '00' . repeat ( 64 ) ;
24+ const zeroBytes36 = '00' . repeat ( 36 ) ;
25+ const zeroBytes64 = '00' . repeat ( 64 ) ;
2626 const rangeProofHex = '00' . repeat ( 1000 ) ;
2727
2828 const confidentialMintBuilder = ( ) => {
@@ -39,7 +39,7 @@ describe('Sol Confidential Mint Builder', () => {
3939 tokenAddress,
4040 mintAddress,
4141 authorityAddress,
42- decryptableZeroBalance : hex36 ,
42+ decryptableZeroBalance : zeroBytes36 ,
4343 maximumPendingBalanceCreditCounter : '2' ,
4444 proofInstructionOffset : 0 ,
4545 } ) ;
@@ -51,7 +51,7 @@ describe('Sol Confidential Mint Builder', () => {
5151 instruction . data . length . should . equal ( 47 ) ;
5252 instruction . data [ 0 ] . should . equal ( 27 ) ; // ConfidentialTransferExtension discriminator
5353 instruction . data [ 1 ] . should . equal ( 2 ) ; // ConfigureConfidentialTransferAccount extension discriminator
54- instruction . data . slice ( 2 , 38 ) . toString ( 'hex' ) . should . equal ( hex36 ) ;
54+ instruction . data . slice ( 2 , 38 ) . toString ( 'hex' ) . should . equal ( zeroBytes36 ) ;
5555 instruction . data . readBigUInt64LE ( 38 ) . toString ( ) . should . equal ( '2' ) ;
5656 instruction . data [ 46 ] . should . equal ( 0 ) ;
5757
@@ -72,9 +72,9 @@ describe('Sol Confidential Mint Builder', () => {
7272 equalityContextStateAddress,
7373 validityContextStateAddress,
7474 contextStateAuthorityAddress,
75- newDecryptableSupply : hex36 ,
76- mintAmountAuditorCiphertextLo : hex64 ,
77- mintAmountAuditorCiphertextHi : hex64 ,
75+ newDecryptableSupply : zeroBytes36 ,
76+ mintAmountAuditorCiphertextLo : zeroBytes64 ,
77+ mintAmountAuditorCiphertextHi : zeroBytes64 ,
7878 rangeRecordData : rangeProofHex ,
7979 } ) ;
8080 const tx = await txBuilder . build ( ) ;
@@ -99,9 +99,9 @@ describe('Sol Confidential Mint Builder', () => {
9999 confidentialMintInstruction . data . length . should . equal ( 169 ) ;
100100 confidentialMintInstruction . data [ 0 ] . should . equal ( 42 ) ; // ConfidentialMint discriminator
101101 confidentialMintInstruction . data [ 1 ] . should . equal ( 3 ) ; // confidentialMintBurn extension discriminator
102- confidentialMintInstruction . data . slice ( 2 , 38 ) . toString ( 'hex' ) . should . equal ( hex36 ) ;
103- confidentialMintInstruction . data . slice ( 38 , 102 ) . toString ( 'hex' ) . should . equal ( hex64 ) ;
104- confidentialMintInstruction . data . slice ( 102 , 166 ) . toString ( 'hex' ) . should . equal ( hex64 ) ;
102+ confidentialMintInstruction . data . slice ( 2 , 38 ) . toString ( 'hex' ) . should . equal ( zeroBytes36 ) ;
103+ confidentialMintInstruction . data . slice ( 38 , 102 ) . toString ( 'hex' ) . should . equal ( zeroBytes64 ) ;
104+ confidentialMintInstruction . data . slice ( 102 , 166 ) . toString ( 'hex' ) . should . equal ( zeroBytes64 ) ;
105105 confidentialMintInstruction . data [ 166 ] . should . equal ( 5 ) ;
106106 confidentialMintInstruction . data [ 167 ] . should . equal ( 4 ) ;
107107 confidentialMintInstruction . data [ 168 ] . should . equal ( 3 ) ;
@@ -120,9 +120,9 @@ describe('Sol Confidential Mint Builder', () => {
120120 equalityContextStateAddress,
121121 validityContextStateAddress,
122122 contextStateAuthorityAddress,
123- newDecryptableSupply : hex36 ,
124- mintAmountAuditorCiphertextLo : hex64 ,
125- mintAmountAuditorCiphertextHi : hex64 ,
123+ newDecryptableSupply : zeroBytes36 ,
124+ mintAmountAuditorCiphertextLo : zeroBytes64 ,
125+ mintAmountAuditorCiphertextHi : zeroBytes64 ,
126126 rangeRecordData : part1 ,
127127 rangeRecordDataPart2 : part2 ,
128128 closeRecordAccount : true ,
@@ -153,7 +153,7 @@ describe('Sol Confidential Mint Builder', () => {
153153 tokenAddress,
154154 mintAddress,
155155 authorityAddress,
156- decryptableZeroBalance : hex36 ,
156+ decryptableZeroBalance : zeroBytes36 ,
157157 maximumPendingBalanceCreditCounter : '65536' ,
158158 } ) ;
159159 txBuilder . confidentialMint ( {
@@ -165,9 +165,9 @@ describe('Sol Confidential Mint Builder', () => {
165165 equalityContextStateAddress,
166166 validityContextStateAddress,
167167 contextStateAuthorityAddress,
168- newDecryptableSupply : hex36 ,
169- mintAmountAuditorCiphertextLo : hex64 ,
170- mintAmountAuditorCiphertextHi : hex64 ,
168+ newDecryptableSupply : zeroBytes36 ,
169+ mintAmountAuditorCiphertextLo : zeroBytes64 ,
170+ mintAmountAuditorCiphertextHi : zeroBytes64 ,
171171 rangeRecordData : rangeProofHex ,
172172 } ) ;
173173 const tx = await txBuilder . build ( ) ;
@@ -188,9 +188,9 @@ describe('Sol Confidential Mint Builder', () => {
188188 equalityContextStateAddress,
189189 validityContextStateAddress,
190190 contextStateAuthorityAddress,
191- newDecryptableSupply : hex36 ,
192- mintAmountAuditorCiphertextLo : hex64 ,
193- mintAmountAuditorCiphertextHi : hex64 ,
191+ newDecryptableSupply : zeroBytes36 ,
192+ mintAmountAuditorCiphertextLo : zeroBytes64 ,
193+ mintAmountAuditorCiphertextHi : zeroBytes64 ,
194194 rangeRecordData : '00' . repeat ( 64 ) ,
195195 } ) ;
196196 const tx = await txBuilder . build ( ) ;
@@ -211,9 +211,9 @@ describe('Sol Confidential Mint Builder', () => {
211211 equalityContextStateAddress,
212212 validityContextStateAddress,
213213 contextStateAuthorityAddress,
214- newDecryptableSupply : hex36 ,
215- mintAmountAuditorCiphertextLo : hex64 ,
216- mintAmountAuditorCiphertextHi : hex64 ,
214+ newDecryptableSupply : zeroBytes36 ,
215+ mintAmountAuditorCiphertextLo : zeroBytes64 ,
216+ mintAmountAuditorCiphertextHi : zeroBytes64 ,
217217 rangeRecordData : rangeProofHex ,
218218 } ) ;
219219 const tx = await txBuilder . build ( ) ;
@@ -245,9 +245,9 @@ describe('Sol Confidential Mint Builder', () => {
245245 equalityContextStateAddress,
246246 validityContextStateAddress,
247247 contextStateAuthorityAddress,
248- newDecryptableSupply : hex36 ,
249- mintAmountAuditorCiphertextLo : hex64 ,
250- mintAmountAuditorCiphertextHi : hex64 ,
248+ newDecryptableSupply : zeroBytes36 ,
249+ mintAmountAuditorCiphertextLo : zeroBytes64 ,
250+ mintAmountAuditorCiphertextHi : zeroBytes64 ,
251251 rangeRecordData : rangeProofHex ,
252252 } )
253253 ) . throwError ( / I n v a l i d o r m i s s i n g t o k e n A d d r e s s / ) ;
0 commit comments