Skip to content

Commit 3fc5914

Browse files
committed
feat: add initial Lazer integration
1 parent c171cff commit 3fc5914

File tree

8 files changed

+536
-152
lines changed

8 files changed

+536
-152
lines changed

governance/xc_admin/packages/xc_admin_common/src/index.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ export * from "./deterministic_stake_accounts";
1515
export * from "./price_store";
1616
export { default as lazerIdl } from "./multisig_transaction/idl/lazer.json";
1717

18-
export {
19-
ProgramType,
20-
PROGRAM_TYPE_NAMES,
18+
export { ProgramType, PROGRAM_TYPE_NAMES } from "./programs/types";
19+
20+
export type {
2121
PriceRawConfig,
2222
ProductRawConfig,
2323
MappingRawConfig,
@@ -29,7 +29,13 @@ export {
2929
ProgramInstructionAccounts,
3030
InstructionAccountsTypeMap,
3131
ValidationResult,
32+
LazerState,
33+
LazerFeed,
34+
LazerPublisher,
35+
LazerFeedMetadata,
36+
LazerConfig,
3237
} from "./programs/types";
38+
3339
export {
3440
getProgramAddress,
3541
isAvailableOnCluster,

governance/xc_admin/packages/xc_admin_common/src/programs/core/core_functions.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
import {
88
AccountType,
99
PythCluster,
10-
getPythProgramKeyForCluster,
1110
parseBaseData,
1211
parseMappingData,
1312
parsePermissionData,
@@ -34,7 +33,6 @@ import {
3433
PriceRawConfig,
3534
RawConfig,
3635
ValidationResult,
37-
ProgramType,
3836
} from "../types";
3937
import { Program } from "@coral-xyz/anchor";
4038
import { PythOracle } from "@pythnetwork/client/lib/anchor";
@@ -103,7 +101,9 @@ const mapValues = <T, U>(
103101
/**
104102
* Sort configuration data for consistent output
105103
*/
106-
function sortData(data: DownloadableConfig): DownloadableConfig {
104+
function sortData(
105+
data: Record<string, DownloadableProduct>,
106+
): DownloadableConfig {
107107
return mapValues(data, (productData: DownloadableProduct) => ({
108108
address: productData.address,
109109
metadata: Object.fromEntries(
@@ -306,8 +306,8 @@ export function getDownloadableConfig(
306306
* Validate an uploaded configuration against the current configuration
307307
*/
308308
export function validateUploadedConfig(
309-
existingConfig: DownloadableConfig,
310-
uploadedConfig: DownloadableConfig,
309+
existingConfig: Record<string, DownloadableProduct>,
310+
uploadedConfig: Record<string, DownloadableProduct>,
311311
cluster: PythCluster,
312312
): ValidationResult {
313313
try {

0 commit comments

Comments
 (0)