-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Global matching in ui wrapper (#110)
* global matching in ui wrapper * global utils in ts --------- Co-authored-by: Maximilian Schneider <[email protected]>
- Loading branch information
1 parent
d1c69f5
commit 0197c60
Showing
9 changed files
with
364 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { PROGRAM_ID } from '../manifest/index'; | ||
|
||
import { PublicKey } from '@solana/web3.js'; | ||
|
||
export function getGlobalAddress(mint: PublicKey): PublicKey { | ||
const [globalAddress, _unusedBump] = PublicKey.findProgramAddressSync( | ||
[Buffer.from('global'), mint.toBuffer()], | ||
PROGRAM_ID, | ||
); | ||
return globalAddress; | ||
} | ||
|
||
export function getGlobalVaultAddress(mint: PublicKey): PublicKey { | ||
const [globalVaultAddress, _unusedBump] = PublicKey.findProgramAddressSync( | ||
[Buffer.from('global-vault'), mint.toBuffer()], | ||
PROGRAM_ID, | ||
); | ||
return globalVaultAddress; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.