This repository has been archived by the owner on Feb 9, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e59572a
commit 6805a03
Showing
5 changed files
with
583 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from './nftVoter/client'; | ||
export * from './gateway/client'; | ||
export * from './realmVoter/client'; | ||
export * from './quadraticVoter/client'; |
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,23 @@ | ||
import { Program, Provider } from '@project-serum/anchor'; | ||
import { PublicKey } from '@solana/web3.js'; | ||
import { Quadratic, IDL } from './quadratic'; | ||
|
||
export const QUADRATIC_PLUGIN_ID = new PublicKey( | ||
'quadCSapU8nTdLg73KHDnmdxKnJQsh7GUbu5tZfnRRr' | ||
); | ||
|
||
export class QuadraticClient { | ||
constructor(public program: Program<Quadratic>, public devnet?: boolean) {} | ||
|
||
static async connect( | ||
provider: Provider, | ||
devnet?: boolean, | ||
): Promise<QuadraticClient> { | ||
const idl = IDL; | ||
|
||
return new QuadraticClient( | ||
new Program<Quadratic>(idl, QUADRATIC_PLUGIN_ID, provider), | ||
devnet, | ||
); | ||
} | ||
} |
Oops, something went wrong.