diff --git a/src/test/java/com/lmax/solana4j/encoding/SolanaProgramDerivedAddressTest.java b/src/test/java/com/lmax/solana4j/encoding/SolanaProgramDerivedAddressTest.java index a14d4d55..d1933708 100644 --- a/src/test/java/com/lmax/solana4j/encoding/SolanaProgramDerivedAddressTest.java +++ b/src/test/java/com/lmax/solana4j/encoding/SolanaProgramDerivedAddressTest.java @@ -1,10 +1,6 @@ package com.lmax.solana4j.encoding; -import com.lmax.solana4j.Solana; import com.lmax.solana4j.api.ProgramDerivedAddress; -import com.lmax.solana4j.api.PublicKey; -import com.lmax.solana4j.api.Slot; -import com.lmax.solana4j.programs.AddressLookupTableProgram; import org.assertj.core.api.AssertionsForClassTypes; import org.bitcoinj.core.Base58; import org.junit.jupiter.api.Test; @@ -43,20 +39,4 @@ void shouldCalculateAProgramDerivedAddressFromMultipleSeeds() AssertionsForClassTypes.assertThat(programDerivedAddress.address().base58()).isEqualTo("FiZFCNEX1WJbP1UEyr2o4uyhtEFoZc3cMyYScf6LAYDx"); AssertionsForClassTypes.assertThat(programDerivedAddress.nonce()).isEqualTo(254); } - - @Test - void shouldCalculateAProgramDerivedAddressForAddressLookupTable() - { - final PublicKey authority = Solana.account(Base58.decode("EYB1g5R8beNtVqDpKpmkKWtLdhBY8Wh7q3QT3U3fbw7y")); - - final Slot recentSlot = Solana.slot(265008810); - - final ProgramDerivedAddress programDerivedAddress = SolanaProgramDerivedAddress.deriveProgramAddress( - List.of(authority.bytes(), recentSlot.bytes()), - AddressLookupTableProgram.PROGRAM_ACCOUNT - ); - - assertThat(programDerivedAddress.address().base58()).isEqualTo("DmTtM8rQMcqR56ksBkayLd9KuYiFaGYZEAPnh5iUtgVV"); - assertThat(programDerivedAddress.nonce()).isEqualTo(255); - } } diff --git a/src/test/java/com/lmax/solana4j/programs/AddressLookupTableProgramTest.java b/src/test/java/com/lmax/solana4j/programs/AddressLookupTableProgramTest.java index 142c0858..cc95cda1 100644 --- a/src/test/java/com/lmax/solana4j/programs/AddressLookupTableProgramTest.java +++ b/src/test/java/com/lmax/solana4j/programs/AddressLookupTableProgramTest.java @@ -11,7 +11,7 @@ class AddressLookupTableProgramTest { @Test - void derivesCorrectAddressLookupAddressAndBumpSeed() + void derivesCorrectProgramDerivedAddressForAddressLookupTableProgram() { final PublicKey authority = Solana.account(Base58.decode("EYB1g5R8beNtVqDpKpmkKWtLdhBY8Wh7q3QT3U3fbw7y")); final ProgramDerivedAddress programDerivedAddress = AddressLookupTableProgram.deriveAddress(authority, Solana.slot(265008810)); diff --git a/src/test/java/com/lmax/solana4j/programs/AssociatedTokenMetadataProgramTest.java b/src/test/java/com/lmax/solana4j/programs/AssociatedTokenMetadataProgramTest.java index 25a17286..55c05196 100644 --- a/src/test/java/com/lmax/solana4j/programs/AssociatedTokenMetadataProgramTest.java +++ b/src/test/java/com/lmax/solana4j/programs/AssociatedTokenMetadataProgramTest.java @@ -12,7 +12,7 @@ class AssociatedTokenMetadataProgramTest { @Test - void derivesCorrectTokenMetadataProgramAddress() + void derivesCorrectProgramDerivedAddressForTokenMetadataProgram() { final PublicKey mint = Solana.account(Base58.decode("HDLRMKW1FDz2q5Zg778CZx26UgrtnqpUDkNNJHhmVUFr")); final ProgramDerivedAddress metadataAddress = AssociatedTokenMetadataProgram.deriveAddress(mint);