-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add copy of client for now. uncomment gh workflow to test dockerhub p…
…ublish
- Loading branch information
1 parent
cbb924a
commit 864cac1
Showing
27 changed files
with
13,713 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { clusterApiUrl } from '@solana/web3.js'; | ||
import { Connection } from '@solana/web3.js'; | ||
|
||
const HELIUS_API_KEY = process.env.FUTARCHY_HELIUS_API_KEY; | ||
const heliusRPCEnpoint = `https://mainnet.helius-rpc.com/?api-key=${HELIUS_API_KEY}`; | ||
//export const rpc = clusterApiUrl(heliusRPCEnpoint); | ||
export const RPC_ENDPOINT = `https://mainnet.helius-rpc.com/?api-key=${HELIUS_API_KEY}`; | ||
export const connection = new Connection(RPC_ENDPOINT); |
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,4 +1,4 @@ | ||
import { connection } from './connection'; | ||
|
||
|
||
|
||
console.log(heliusRPCEnpoint); | ||
const latestBlockHash = await connection.getLatestBlockhash(); | ||
console.log(latestBlockHash); |
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,4 +1,4 @@ | ||
|
||
async function getProposals(connection: ) { | ||
async function getProposals() { | ||
|
||
} |
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,6 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig-base.json", | ||
"compilerOptions": { | ||
"module": "ESNext", | ||
"target": "ESNext", | ||
"moduleResolution": "bundler", | ||
"types": ["node"] | ||
} | ||
} |
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 @@ | ||
Temporarily copying the client code from [the frontend](https://github.com/metaDAOproject/meta-dao-frontend/tree/a8c7f14a371fbc16a8cc399366d61ff3978d7361/lib) until we decide between multi vs monorepo |
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,31 @@ | ||
import { PublicKey } from '@solana/web3.js'; | ||
import { BN } from '@coral-xyz/anchor'; | ||
import { AutocratProgram, ProgramVersion } from './types'; | ||
|
||
export const OPENBOOK_PROGRAM_ID = new PublicKey('opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb'); | ||
export const OPENBOOK_TWAP_PROGRAM_ID = new PublicKey( | ||
'TWAPrdhADy2aTKN5iFZtNnkQYXERD9NvKjPFVPMSCNN', | ||
); | ||
|
||
export const NUMERAL_FORMAT = '0,0.00'; | ||
export const BASE_FORMAT = '0,0'; | ||
export const SLOTS_PER_10_SECS: number = 25; | ||
export const TEN_DAYS_IN_SLOTS: number = 10 * 24 * 60 * 6 * SLOTS_PER_10_SECS; | ||
export const QUOTE_LOTS = 0.0001; | ||
export const BN_0 = new BN(0); | ||
|
||
const AUTOCRAT_V0_IDL: AutocratProgram = require('@/lib/idl/autocrat_v0.json'); | ||
const AUTOCRAT_V0_1_IDL: AutocratProgram = require('@/lib/idl/autocrat_v0.1.json'); | ||
|
||
export const AUTOCRAT_VERSIONS: ProgramVersion[] = [ | ||
{ | ||
label: 'V0.1', | ||
programId: new PublicKey('metaX99LHn3A7Gr7VAcCfXhpfocvpMpqQ3eyp3PGUUq'), | ||
idl: AUTOCRAT_V0_1_IDL, | ||
}, | ||
{ | ||
label: 'V0', | ||
programId: new PublicKey('meta3cxKzFBmWYgCVozmvCQAS3y9b3fGxrG9HkHL7Wi'), | ||
idl: AUTOCRAT_V0_IDL, | ||
}, | ||
]; |
Oops, something went wrong.