added PMM

This commit is contained in:
KS
2024-03-10 20:28:00 +03:00
parent 184f66bf17
commit 6f5b537c47
13 changed files with 408 additions and 10 deletions

View File

@@ -12,6 +12,7 @@ import {
pairStatusSchema,
pricesWithQuoteAssetSchema,
referralDataSchema,
pmmSchema
} from './schemas/index.js';
import type redeemOrderSchema from '../Aggregator/schemas/redeemOrderSchema.js';
import { sourceAtomicHistorySchema, targetAtomicHistorySchema } from './schemas/atomicHistorySchema.js';
@@ -82,6 +83,7 @@ class BlockchainService {
this.getAuthToken = this.getAuthToken.bind(this);
this.getCirculatingSupply = this.getCirculatingSupply.bind(this);
this.getInfo = this.getInfo.bind(this);
this.getPmmInfo = this.getPmmInfo.bind(this);
this.getPoolsConfig = this.getPoolsConfig.bind(this);
this.getPoolsInfo = this.getPoolsInfo.bind(this);
this.getPoolsLpAndStaked = this.getPoolsLpAndStaked.bind(this);
@@ -176,6 +178,8 @@ class BlockchainService {
getInfo = () => fetchWithValidation(`${this.apiUrl}/api/info`, infoSchema);
getPmmInfo = () => fetchWithValidation(`${this.apiUrl}/api/pmm-info`, pmmSchema);
getPoolsConfig = () => fetchWithValidation(
`${this.apiUrl}/api/pools/config`,
poolsConfigSchema,

View File

@@ -13,5 +13,6 @@ export { default as poolsLpAndStakedSchema } from './poolsLpAndStakedSchema.js';
export { default as userVotesSchema } from './userVotesSchema.js';
export { default as userEarnedSchema } from './userEarnedSchema.js';
export { default as poolsV3InfoSchema } from './poolsV3InfoSchema.js';
export { default as pmmSchema } from './pmmSchema.js';
export { pricesWithQuoteAssetSchema } from './pricesWithQuoteAssetSchema.js';
export { referralDataSchema } from './referralDataSchema.js';

View File

@@ -0,0 +1,7 @@
import { z } from 'zod';
const pmmSchema = z.object({
orionPMMRouterContractAddress: z.string()
});
export default pmmSchema