Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add some programs #278

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 4 additions & 1 deletion keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -694,22 +694,25 @@ func FindProgramAddress(seed [][]byte, programID PublicKey) (PublicKey, uint8, e
func FindAssociatedTokenAddress(
wallet PublicKey,
mint PublicKey,
tokenProgram PublicKey,
) (PublicKey, uint8, error) {
return findAssociatedTokenAddressAndBumpSeed(
wallet,
mint,
tokenProgram,
SPLAssociatedTokenAccountProgramID,
)
}

func findAssociatedTokenAddressAndBumpSeed(
walletAddress PublicKey,
splTokenMintAddress PublicKey,
tokenProgram PublicKey,
programID PublicKey,
) (PublicKey, uint8, error) {
return FindProgramAddress([][]byte{
walletAddress[:],
TokenProgramID[:],
tokenProgram[:],
splTokenMintAddress[:],
},
programID,
Expand Down
136 changes: 136 additions & 0 deletions programs/address-lookup-table/closelookuptable.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions programs/address-lookup-table/closelookuptable_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading