@@ -1412,7 +1412,6 @@ public static Instruction updateMetadataPointer(final AccountMeta invokedTokenPr
14121412 final PublicKey mintAccount ,
14131413 final PublicKey authority ,
14141414 final PublicKey metadataAccount ) {
1415-
14161415 final var keys = List .of (
14171416 AccountMeta .createWrite (mintAccount ),
14181417 AccountMeta .createReadOnlySigner (authority )
@@ -1468,6 +1467,7 @@ private static byte[] buildInitializeTokenMetadataData(final String name, final
14681467 + Integer .BYTES + symbolBytes .length
14691468 + Integer .BYTES + uriBytes .length
14701469 ];
1470+
14711471 int offset = INITIALIZE_TOKEN_METADATA_DISCRIMINATOR .write (data , 0 );
14721472
14731473 ByteUtil .putInt32LE (data , offset , nameBytes .length );
@@ -1499,12 +1499,14 @@ public static Instruction initializeTransferHook(final AccountMeta invokedTokenP
14991499 final PublicKey authority ,
15001500 final PublicKey programAccount ) {
15011501 final var keys = List .of (AccountMeta .createWrite (mintAccount ));
1502+
15021503 final byte [] data = new byte [1 + 1 + 32 + 32 ];
15031504 data [0 ] = (byte ) TokenInstruction .TransferHookExtension .ordinal ();
15041505 data [1 ] = (byte ) 0 ;
15051506
15061507 authority .write (data , 2 );
15071508 programAccount .write (data , 34 );
1509+
15081510 return createInstruction (invokedTokenProgram , keys , data );
15091511 }
15101512
0 commit comments