fix(pump): derive associated bonding curve

This commit is contained in:
smypmsa
2025-08-05 20:30:41 +00:00
parent 329266611c
commit a9c58faf9e
+9 -1
View File
@@ -177,7 +177,15 @@ class PumpFunAddressProvider(AddressProvider):
Returns:
Associated bonding curve address
"""
return get_associated_token_address(bonding_curve, mint)
derived_address, _ = Pubkey.find_program_address(
[
bytes(bonding_curve),
bytes(SystemAddresses.TOKEN_PROGRAM),
bytes(mint),
],
SystemAddresses.ASSOCIATED_TOKEN_PROGRAM,
)
return derived_address
def derive_creator_vault(self, creator: Pubkey) -> Pubkey:
"""Derive the creator vault address.