Skip to content

Commit

Permalink
Remove non-hubble code
Browse files Browse the repository at this point in the history
  • Loading branch information
peroxy committed Sep 13, 2024
1 parent 4529da6 commit 0a1be4c
Show file tree
Hide file tree
Showing 72 changed files with 2 additions and 2,032 deletions.
7 changes: 1 addition & 6 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
node_modules
dist

# auto-generated rpc clients
kamino-client
whirpools-client
meteora_client
dist
13 changes: 0 additions & 13 deletions deps/Gnt27xtC473ZT2Mw5u8wZ68Z3gULkSTb5DuxJy7eJotD.json

This file was deleted.

Binary file removed deps/kamino.so
Binary file not shown.
Binary file removed deps/metaplex.so
Binary file not shown.
Binary file removed deps/raydium.so
Binary file not shown.
Binary file removed deps/scope.so
Binary file not shown.
Binary file removed deps/whirlpool.so
Binary file not shown.
2 changes: 0 additions & 2 deletions integration.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ WORKDIR /hubble-common
RUN npm install && npx lerna bootstrap && npx lerna run build

RUN npm test

RUN npm run start-with-test-validator
7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@
"clean": "npx lerna clean -y && rm -rf node_modules",
"publish": "npx lerna publish",
"test": "npx ts-mocha 'packages/hubble-sdk/tests/sdk.test.ts'",
"integration-test": "npm run airdrop-test-admin",
"format": "prettier --write '{**/*,*}.{js,ts,jsx,tsx}'",
"format:check": "prettier --check '{**/*,*}.{js,ts,jsx,tsx}'",
"start-with-test-validator": "npm run dump-kamino-programs && start-server-and-test 'npm run start-validator' http://localhost:8899/health 'npm run integration-test'",
"start-validator": "npm run dump-kamino-programs && solana-test-validator -u m ---bpf-program whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc deps/whirlpool.so --bpf-program devi51mZmdwUJGU9hjN27vEz64Gps7uUefqxg27EAtH deps/raydium.so --bpf-program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s deps/metaplex.so --clone 3NJYftD5sjVfxSnUdZ1wVML8f3aC6mp1CXCL6L7TnU8C --clone GKnHiWh3RRrE1zsNzWxRkomymHc374TvJPSTv2wPeYdB --account Gnt27xtC473ZT2Mw5u8wZ68Z3gULkSTb5DuxJy7eJotD deps/Gnt27xtC473ZT2Mw5u8wZ68Z3gULkSTb5DuxJy7eJotD.json --bpf-program E6qbhrt4pFmCotNUSSEh6E5cRQCEJpMcd79Z56EG9KY deps/kamino.so --bpf-program HFn8GnPADiny6XqUoWE8uRPPxb29ikn4yTuPa9MF2fWJ deps/scope.so --clone GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ --reset --quiet",
"airdrop-test-admin": "solana airdrop 100 2KE5D8LPdhMhr2vaaXZByMPCbXTjr8MtWUggnzoMN3ji -u l",
"dump-kamino-programs": "mkdir -p deps && solana program dump E6qbhrt4pFmCotNUSSEh6E5cRQCEJpMcd79Z56EG9KY -u d deps/kamino.so && solana program dump -u m whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc deps/whirlpool.so && solana program dump -u m metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s deps/metaplex.so && solana program dump -u m HFn8GnPADiny6XqUoWE8uRPPxb29ikn4yTuPa9MF2fWJ deps/scope.so"
"format:check": "prettier --check '{**/*,*}.{js,ts,jsx,tsx}'"
},
"devDependencies": {
"@types/bn.js": "^5.1.5",
Expand Down
10 changes: 0 additions & 10 deletions packages/hubble-config/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { HubbleConfig, SolanaCluster } from './index';
import { HUBBLE_CONFIGS } from './constants/configs';
import { PublicKey } from '@solana/web3.js';

/**
* Get Hubble configuration for specific Solana cluster.
Expand All @@ -20,12 +19,3 @@ export const getConfigByCluster = (cluster: SolanaCluster): HubbleConfig => {
export const getAllConfigs = (): HubbleConfig[] => {
return HUBBLE_CONFIGS;
};

/**
* Get collateral mint from Kamino config
* @param address
* @param config
*/
export const getCollateralMintByAddress = (address: PublicKey, config: HubbleConfig) => {
return config.kamino.mints.find((x) => x.address.toBase58() === address.toBase58());
};
Loading

0 comments on commit 0a1be4c

Please sign in to comment.