full feed configuration
This commit is contained in:
parent
cbd4d12685
commit
eaca2f2906
|
@ -63,11 +63,13 @@
|
|||
"trailingComma": "all"
|
||||
},
|
||||
"dependencies": {
|
||||
"@blockworks-foundation/mango-v4-settings": "0.14.15",
|
||||
"@blockworks-foundation/mangolana": "0.0.14",
|
||||
"@blockworks-foundation/mango-v4-settings": "0.14.24",
|
||||
"@blockworks-foundation/mangolana": "0.0.17",
|
||||
"@coral-xyz/anchor": "^0.28.1-beta.2",
|
||||
"@project-serum/serum": "0.13.65",
|
||||
"@pythnetwork/client": "~2.14.0",
|
||||
"@iarna/toml": "2.2.5",
|
||||
"@raydium-io/raydium-sdk": "^1.3.1-beta.57",
|
||||
"@solana/spl-token": "0.3.7",
|
||||
"@solana/web3.js": "^1.78.2",
|
||||
"@switchboard-xyz/on-demand": "^1.1.26",
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
import { LISTING_PRESETS } from '@blockworks-foundation/mango-v4-settings/lib/helpers/listingTools';
|
||||
import {
|
||||
LISTING_PRESETS,
|
||||
LISTING_PRESETS_KEY,
|
||||
tierSwitchboardSettings,
|
||||
tierToSwitchboardJobSwapValue,
|
||||
} from '@blockworks-foundation/mango-v4-settings/lib/helpers/listingTools';
|
||||
import {
|
||||
Cluster,
|
||||
Commitment,
|
||||
|
@ -22,18 +27,34 @@ import {
|
|||
AnchorProvider,
|
||||
Wallet,
|
||||
} from 'switchboard-anchor';
|
||||
// basic configuration
|
||||
const USDC_MINT = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';
|
||||
const SWAP_VALUE = '100';
|
||||
const TOKEN_MINT = 'MangoCzJ36AjZyKwVj3VnYU4GTonjfVEnJmvvWaxLac';
|
||||
const FALLBACK_POOL_NAME: 'orcaPoolAddress' | 'raydiumPoolAddress' =
|
||||
'raydiumPoolAddress';
|
||||
const FALLBACK_POOL = '34tFULRrRwh4bMcBLPtJaNqqe5pVgGZACi5sR8Xz95KC';
|
||||
const TOKEN_SYMBOL = 'MNGO';
|
||||
// basic configuration
|
||||
import { struct, u8, publicKey, u64, option } from '@raydium-io/raydium-sdk';
|
||||
import * as toml from '@iarna/toml';
|
||||
import { toNative } from '../src/utils';
|
||||
|
||||
const pythUsdOracle = 'Gnt27xtC473ZT2Mw5u8wZ68Z3gULkSTb5DuxJy7eJotD';
|
||||
const switchboardUsdDaoOracle = 'FwYfsmj5x8YZXtQBNo2Cz8TE7WRCMFqA6UTffK4xQKMH';
|
||||
// Configuration
|
||||
const TIER: LISTING_PRESETS_KEY = 'asset_250';
|
||||
const TOKEN_MINT = 'JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN';
|
||||
|
||||
// Tier based variables
|
||||
const swapValue = tierToSwitchboardJobSwapValue[TIER];
|
||||
const settingFromLib = tierSwitchboardSettings[TIER];
|
||||
const maxVariance = LISTING_PRESETS[TIER].oracleConfFilter * 100;
|
||||
const minResponses = settingFromLib!.minRequiredOracleResults;
|
||||
const numSignatures = settingFromLib!.minRequiredOracleResults + 1;
|
||||
const minSampleSize = settingFromLib!.minRequiredOracleResults;
|
||||
const maxStaleness =
|
||||
LISTING_PRESETS[TIER].maxStalenessSlots === -1
|
||||
? 10000
|
||||
: LISTING_PRESETS[TIER].maxStalenessSlots;
|
||||
|
||||
// Constants
|
||||
const JUPITER_PRICE_API_MAINNET = 'https://price.jup.ag/v4/';
|
||||
const JUPITER_TOKEN_API_MAINNET = 'https://token.jup.ag/all';
|
||||
const WRAPPED_SOL_MINT = 'So11111111111111111111111111111111111111112';
|
||||
const PYTH_SOL_ORACLE = 'H6ARHf6YXhGYeQfUzQNGk6rDNnLBQKrenN712K4AQJEG';
|
||||
const USDC_MINT = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';
|
||||
const PYTH_USDC_ORACLE = 'Gnt27xtC473ZT2Mw5u8wZ68Z3gULkSTb5DuxJy7eJotD';
|
||||
const SWITCHBOARD_USDC_ORACLE = 'FwYfsmj5x8YZXtQBNo2Cz8TE7WRCMFqA6UTffK4xQKMH';
|
||||
const CLUSTER: Cluster =
|
||||
(process.env.CLUSTER_OVERRIDE as Cluster) || 'mainnet-beta';
|
||||
const CLUSTER_URL =
|
||||
|
@ -59,6 +80,253 @@ async function setupAnchor() {
|
|||
return { userProvider, connection, user };
|
||||
}
|
||||
|
||||
async function getTokenPrice(mint: string): Promise<number> {
|
||||
const priceInfo = await (
|
||||
await fetch(`${JUPITER_PRICE_API_MAINNET}price?ids=${mint}`)
|
||||
).json();
|
||||
//Note: if listing asset that don't have price on jupiter remember to edit this 0 to real price
|
||||
//in case of using 0 openbook market can be wrongly configured ignore if openbook market is existing
|
||||
const price = priceInfo.data[mint]?.price || 0;
|
||||
if (!price) {
|
||||
console.log('Token price not found');
|
||||
throw 'Token price not found';
|
||||
}
|
||||
return price;
|
||||
}
|
||||
|
||||
async function getTokenInfo(mint: string): Promise<Token | undefined> {
|
||||
const response = await fetch(JUPITER_TOKEN_API_MAINNET);
|
||||
const data: Token[] = await response.json();
|
||||
const tokenInfo = data.find((x) => x.address === mint);
|
||||
if (!tokenInfo) {
|
||||
console.log('Token info not found');
|
||||
throw 'Token info not found';
|
||||
}
|
||||
return data.find((x) => x.address === mint);
|
||||
}
|
||||
|
||||
async function getPool(mint: string): Promise<
|
||||
| {
|
||||
pool: string;
|
||||
poolSource: 'raydium' | 'orca';
|
||||
isSolPool: boolean;
|
||||
isReveredSolPool: boolean;
|
||||
}
|
||||
| undefined
|
||||
> {
|
||||
const dex = await fetch(
|
||||
`https://api.dexscreener.com/latest/dex/search?q=${mint}`,
|
||||
);
|
||||
const resp = await dex.json();
|
||||
|
||||
if (!resp?.pairs?.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
const pairs = resp.pairs.filter(
|
||||
(x) => x.dexId.includes('raydium') || x.dexId.includes('orca'),
|
||||
);
|
||||
|
||||
const bestUsdcPool = pairs.find(
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
(x: any) => x.quoteToken.address === USDC_MINT,
|
||||
);
|
||||
|
||||
const bestSolPool = pairs.find(
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
(x: any) => x.quoteToken.address === WRAPPED_SOL_MINT,
|
||||
);
|
||||
|
||||
const bestReversedSolPool = pairs.find(
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
(x: any) => x.baseToken.address === WRAPPED_SOL_MINT,
|
||||
);
|
||||
|
||||
if (bestUsdcPool) {
|
||||
return {
|
||||
pool: bestUsdcPool.pairAddress,
|
||||
poolSource: bestUsdcPool.dexId.includes('raydium') ? 'raydium' : 'orca',
|
||||
isSolPool: false,
|
||||
isReveredSolPool: false,
|
||||
};
|
||||
}
|
||||
|
||||
if (bestSolPool) {
|
||||
return {
|
||||
pool: bestSolPool.pairAddress,
|
||||
poolSource: bestSolPool.dexId.includes('raydium') ? 'raydium' : 'orca',
|
||||
isSolPool: true,
|
||||
isReveredSolPool: false,
|
||||
};
|
||||
}
|
||||
|
||||
if (bestSolPool) {
|
||||
return {
|
||||
pool: bestReversedSolPool.pairAddress,
|
||||
poolSource: bestReversedSolPool.dexId.includes('raydium')
|
||||
? 'raydium'
|
||||
: 'orca',
|
||||
isSolPool: true,
|
||||
isReveredSolPool: true,
|
||||
};
|
||||
}
|
||||
|
||||
console.log('No orca or raydium pool found');
|
||||
throw 'No orca or raydium pool found';
|
||||
}
|
||||
|
||||
const getLstStakePool = async (
|
||||
connection: Connection,
|
||||
mint: string,
|
||||
): Promise<string> => {
|
||||
try {
|
||||
let poolAddress = '';
|
||||
let addresses: string[] = [];
|
||||
try {
|
||||
const tomlFile = await fetch(
|
||||
`https://raw.githubusercontent.com/${'igneous-labs'}/${'sanctum-lst-list'}/master/sanctum-lst-list.toml`,
|
||||
);
|
||||
|
||||
const tomlText = await tomlFile.text();
|
||||
const tomlData = toml.parse(tomlText) as unknown as {
|
||||
sanctum_lst_list: { pool: { pool: string } }[];
|
||||
};
|
||||
addresses = [
|
||||
...tomlData.sanctum_lst_list
|
||||
.map((x) => tryGetPubKey(x.pool.pool)?.toBase58())
|
||||
.filter((x) => x),
|
||||
] as string[];
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
|
||||
//remove duplicates
|
||||
const possibleStakePoolsAddresses = [...new Set(addresses)].map(
|
||||
(x) => new PublicKey(x),
|
||||
);
|
||||
|
||||
const accounts = await connection.getMultipleAccountsInfo(
|
||||
possibleStakePoolsAddresses,
|
||||
);
|
||||
for (const idx in accounts) {
|
||||
try {
|
||||
const acc = accounts[idx];
|
||||
const stakeAddressPk = possibleStakePoolsAddresses[idx];
|
||||
if (acc?.data) {
|
||||
const decoded = StakePoolLayout.decode(acc?.data);
|
||||
if (decoded.poolMint.toBase58() === mint && stakeAddressPk) {
|
||||
poolAddress = stakeAddressPk?.toBase58();
|
||||
break;
|
||||
}
|
||||
}
|
||||
// eslint-disable-next-line no-empty
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
return poolAddress;
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
return '';
|
||||
}
|
||||
};
|
||||
|
||||
const LSTExactIn = (
|
||||
inMint: string,
|
||||
nativeInAmount: string,
|
||||
stakePoolAddress: string,
|
||||
): string => {
|
||||
const template = `tasks:
|
||||
- conditionalTask:
|
||||
attempt:
|
||||
- httpTask:
|
||||
url: https://api.sanctum.so/v1/swap/quote?input=${inMint}&outputLstMint=So11111111111111111111111111111111111111112&amount=${nativeInAmount}&mode=ExactIn
|
||||
- jsonParseTask:
|
||||
path: $.outAmount
|
||||
- divideTask:
|
||||
scalar: ${nativeInAmount}
|
||||
onFailure:
|
||||
- splStakePoolTask:
|
||||
pubkey: ${stakePoolAddress}
|
||||
- cacheTask:
|
||||
cacheItems:
|
||||
- variableName: poolTokenSupply
|
||||
job:
|
||||
tasks:
|
||||
- jsonParseTask:
|
||||
path: $.uiPoolTokenSupply
|
||||
aggregationMethod: NONE
|
||||
- variableName: totalStakeLamports
|
||||
job:
|
||||
tasks:
|
||||
- jsonParseTask:
|
||||
path: $.uiTotalLamports
|
||||
aggregationMethod: NONE
|
||||
- valueTask:
|
||||
big: \${totalStakeLamports}
|
||||
- divideTask:
|
||||
big: \${poolTokenSupply}
|
||||
- multiplyTask:
|
||||
job:
|
||||
tasks:
|
||||
- oracleTask:
|
||||
pythAddress: H6ARHf6YXhGYeQfUzQNGk6rDNnLBQKrenN712K4AQJEG
|
||||
pythAllowedConfidenceInterval: 10`;
|
||||
return template;
|
||||
};
|
||||
|
||||
const LSTExactOut = (
|
||||
inMint: string,
|
||||
nativeOutSolAmount: string,
|
||||
stakePoolAddress: string,
|
||||
): string => {
|
||||
const template = `tasks:
|
||||
- conditionalTask:
|
||||
attempt:
|
||||
- cacheTask:
|
||||
cacheItems:
|
||||
- variableName: QTY
|
||||
job:
|
||||
tasks:
|
||||
- httpTask:
|
||||
url: https://api.sanctum.so/v1/swap/quote?input=${inMint}&outputLstMint=So11111111111111111111111111111111111111112&amount=${nativeOutSolAmount}&mode=ExactOut
|
||||
- jsonParseTask:
|
||||
path: $.inAmount
|
||||
- httpTask:
|
||||
url: https://api.sanctum.so/v1/swap/quote?input=${inMint}&outputLstMint=So11111111111111111111111111111111111111112&amount=\${QTY}&mode=ExactIn
|
||||
- jsonParseTask:
|
||||
path: $.outAmount
|
||||
- divideTask:
|
||||
big: \${QTY}
|
||||
onFailure:
|
||||
- splStakePoolTask:
|
||||
pubkey: ${stakePoolAddress}
|
||||
- cacheTask:
|
||||
cacheItems:
|
||||
- variableName: poolTokenSupply
|
||||
job:
|
||||
tasks:
|
||||
- jsonParseTask:
|
||||
path: $.uiPoolTokenSupply
|
||||
aggregationMethod: NONE
|
||||
- variableName: totalStakeLamports
|
||||
job:
|
||||
tasks:
|
||||
- jsonParseTask:
|
||||
path: $.uiTotalLamports
|
||||
aggregationMethod: NONE
|
||||
- valueTask:
|
||||
big: \${totalStakeLamports}
|
||||
- divideTask:
|
||||
big: \${poolTokenSupply}
|
||||
- multiplyTask:
|
||||
job:
|
||||
tasks:
|
||||
- oracleTask:
|
||||
pythAddress: H6ARHf6YXhGYeQfUzQNGk6rDNnLBQKrenN712K4AQJEG
|
||||
pythAllowedConfidenceInterval: 10`;
|
||||
return template;
|
||||
};
|
||||
|
||||
async function setupSwitchboard(userProvider: AnchorProvider) {
|
||||
const idl = await Anchor30Program.fetchIdl(SB_ON_DEMAND_PID, userProvider);
|
||||
const sbOnDemandProgram = new Anchor30Program(idl!, userProvider);
|
||||
|
@ -74,15 +342,26 @@ async function setupSwitchboard(userProvider: AnchorProvider) {
|
|||
}
|
||||
|
||||
(async function main(): Promise<void> {
|
||||
const tier = Object.values(LISTING_PRESETS).find(
|
||||
(x) => x.preset_name === 'C',
|
||||
);
|
||||
|
||||
const { userProvider, connection, user } = await setupAnchor();
|
||||
const [
|
||||
{ sbOnDemandProgram, crossbarClient, queue },
|
||||
poolInfo,
|
||||
price,
|
||||
tokeninfo,
|
||||
lstPool,
|
||||
] = await Promise.all([
|
||||
setupSwitchboard(userProvider),
|
||||
getPool(TOKEN_MINT),
|
||||
getTokenPrice(TOKEN_MINT),
|
||||
getTokenInfo(TOKEN_MINT),
|
||||
getLstStakePool(connection, TOKEN_MINT),
|
||||
]);
|
||||
|
||||
const { sbOnDemandProgram, crossbarClient, queue } = await setupSwitchboard(
|
||||
userProvider,
|
||||
);
|
||||
const FALLBACK_POOL_NAME: 'orcaPoolAddress' | 'raydiumPoolAddress' = `${
|
||||
poolInfo!.poolSource
|
||||
}PoolAddress`;
|
||||
const FALLBACK_POOL = poolInfo!.pool;
|
||||
const TOKEN_SYMBOL = tokeninfo!.symbol.toUpperCase();
|
||||
|
||||
const queueAccount = new Queue(sbOnDemandProgram, queue);
|
||||
try {
|
||||
|
@ -92,185 +371,256 @@ async function setupSwitchboard(userProvider: AnchorProvider) {
|
|||
return;
|
||||
}
|
||||
|
||||
let onFailureTaskDesc: { [key: string]: any }[];
|
||||
if (!poolInfo?.isReveredSolPool) {
|
||||
onFailureTaskDesc = [
|
||||
{
|
||||
lpExchangeRateTask: {
|
||||
[FALLBACK_POOL_NAME]: FALLBACK_POOL,
|
||||
},
|
||||
},
|
||||
];
|
||||
if (poolInfo?.isSolPool) {
|
||||
onFailureTaskDesc.push({
|
||||
multiplyTask: {
|
||||
job: {
|
||||
tasks: [
|
||||
{
|
||||
oracleTask: {
|
||||
pythAddress: PYTH_SOL_ORACLE,
|
||||
pythAllowedConfidenceInterval: 10,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
} else {
|
||||
onFailureTaskDesc = [
|
||||
{
|
||||
valueTask: {
|
||||
big: 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
divideTask: {
|
||||
job: {
|
||||
tasks: [
|
||||
{
|
||||
lpExchangeRateTask: {
|
||||
[FALLBACK_POOL_NAME]: FALLBACK_POOL,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
if (poolInfo.isSolPool) {
|
||||
onFailureTaskDesc.push({
|
||||
multiplyTask: {
|
||||
job: {
|
||||
tasks: [
|
||||
{
|
||||
oracleTask: {
|
||||
pythAddress: PYTH_SOL_ORACLE,
|
||||
pythAllowedConfidenceInterval: 10,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const txOpts = {
|
||||
commitment: 'finalized' as Commitment,
|
||||
skipPreflight: true,
|
||||
maxRetries: 0,
|
||||
};
|
||||
|
||||
console.log(tier);
|
||||
|
||||
const conf = {
|
||||
name: `${TOKEN_SYMBOL}/USD`, // the feed name (max 32 bytes)
|
||||
queue, // the queue of oracles to bind to
|
||||
maxVariance: 1, // allow 1% variance between submissions and jobs
|
||||
minResponses: 2, // minimum number of responses of jobs to allow
|
||||
numSignatures: 3, // number of signatures to fetch per update
|
||||
minSampleSize: 2, // minimum number of responses to sample
|
||||
maxStaleness:
|
||||
tier!.maxStalenessSlots == -1 ? 10000 : tier!.maxStalenessSlots!, // maximum staleness of responses in seconds to sample
|
||||
maxVariance: maxVariance!, // allow 1% variance between submissions and jobs
|
||||
minResponses: minResponses!, // minimum number of responses of jobs to allow
|
||||
numSignatures: numSignatures!, // number of signatures to fetch per update
|
||||
minSampleSize: minSampleSize!, // minimum number of responses to sample
|
||||
maxStaleness: maxStaleness!, // maximum staleness of responses in seconds to sample
|
||||
};
|
||||
|
||||
console.log('Initializing new data feed');
|
||||
// Generate the feed keypair
|
||||
const [pullFeed, feedKp] = PullFeed.generate(sbOnDemandProgram);
|
||||
const jobs = [
|
||||
OracleJob.fromObject({
|
||||
tasks: [
|
||||
{
|
||||
conditionalTask: {
|
||||
attempt: [
|
||||
{
|
||||
valueTask: {
|
||||
big: SWAP_VALUE,
|
||||
},
|
||||
},
|
||||
{
|
||||
divideTask: {
|
||||
job: {
|
||||
tasks: [
|
||||
{
|
||||
jupiterSwapTask: {
|
||||
inTokenAddress: USDC_MINT,
|
||||
outTokenAddress: TOKEN_MINT,
|
||||
baseAmountString: SWAP_VALUE,
|
||||
},
|
||||
},
|
||||
],
|
||||
lstPool
|
||||
? OracleJob.fromYaml(
|
||||
LSTExactIn(
|
||||
TOKEN_MINT,
|
||||
toNative(
|
||||
Math.ceil(Number(swapValue) / price),
|
||||
tokeninfo!.decimals,
|
||||
).toString(),
|
||||
lstPool,
|
||||
),
|
||||
)
|
||||
: OracleJob.fromObject({
|
||||
tasks: [
|
||||
{
|
||||
conditionalTask: {
|
||||
attempt: [
|
||||
{
|
||||
valueTask: {
|
||||
big: swapValue,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
onFailure: [
|
||||
{
|
||||
lpExchangeRateTask: {
|
||||
[FALLBACK_POOL_NAME]: FALLBACK_POOL,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
conditionalTask: {
|
||||
attempt: [
|
||||
{
|
||||
multiplyTask: {
|
||||
job: {
|
||||
tasks: [
|
||||
{
|
||||
oracleTask: {
|
||||
pythAddress: pythUsdOracle,
|
||||
pythAllowedConfidenceInterval: 10,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
onFailure: [
|
||||
{
|
||||
multiplyTask: {
|
||||
job: {
|
||||
tasks: [
|
||||
{
|
||||
oracleTask: {
|
||||
switchboardAddress: switchboardUsdDaoOracle,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
}),
|
||||
OracleJob.fromObject({
|
||||
tasks: [
|
||||
{
|
||||
conditionalTask: {
|
||||
attempt: [
|
||||
{
|
||||
cacheTask: {
|
||||
cacheItems: [
|
||||
{
|
||||
variableName: 'QTY',
|
||||
{
|
||||
divideTask: {
|
||||
job: {
|
||||
tasks: [
|
||||
{
|
||||
jupiterSwapTask: {
|
||||
inTokenAddress: USDC_MINT,
|
||||
outTokenAddress: TOKEN_MINT,
|
||||
baseAmountString: SWAP_VALUE,
|
||||
baseAmountString: swapValue,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
jupiterSwapTask: {
|
||||
inTokenAddress: TOKEN_MINT,
|
||||
outTokenAddress: USDC_MINT,
|
||||
baseAmountString: '${QTY}',
|
||||
},
|
||||
},
|
||||
{
|
||||
divideTask: {
|
||||
big: '${QTY}',
|
||||
},
|
||||
},
|
||||
],
|
||||
onFailure: [
|
||||
{
|
||||
lpExchangeRateTask: {
|
||||
[FALLBACK_POOL_NAME]: FALLBACK_POOL,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
conditionalTask: {
|
||||
attempt: [
|
||||
{
|
||||
multiplyTask: {
|
||||
job: {
|
||||
tasks: [
|
||||
{
|
||||
oracleTask: {
|
||||
pythAddress: pythUsdOracle,
|
||||
pythAllowedConfidenceInterval: 10,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
onFailure: onFailureTaskDesc,
|
||||
},
|
||||
],
|
||||
onFailure: [
|
||||
{
|
||||
multiplyTask: {
|
||||
job: {
|
||||
tasks: [
|
||||
{
|
||||
oracleTask: {
|
||||
switchboardAddress: switchboardUsdDaoOracle,
|
||||
},
|
||||
},
|
||||
{
|
||||
conditionalTask: {
|
||||
attempt: [
|
||||
{
|
||||
multiplyTask: {
|
||||
job: {
|
||||
tasks: [
|
||||
{
|
||||
oracleTask: {
|
||||
pythAddress: PYTH_USDC_ORACLE,
|
||||
pythAllowedConfidenceInterval: 10,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
onFailure: [
|
||||
{
|
||||
multiplyTask: {
|
||||
job: {
|
||||
tasks: [
|
||||
{
|
||||
oracleTask: {
|
||||
switchboardAddress: SWITCHBOARD_USDC_ORACLE,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
}),
|
||||
},
|
||||
],
|
||||
}),
|
||||
lstPool
|
||||
? OracleJob.fromYaml(
|
||||
LSTExactOut(
|
||||
TOKEN_MINT,
|
||||
toNative(
|
||||
Math.ceil(Number(swapValue) / price),
|
||||
tokeninfo!.decimals,
|
||||
).toString(),
|
||||
lstPool,
|
||||
),
|
||||
)
|
||||
: OracleJob.fromObject({
|
||||
tasks: [
|
||||
{
|
||||
conditionalTask: {
|
||||
attempt: [
|
||||
{
|
||||
cacheTask: {
|
||||
cacheItems: [
|
||||
{
|
||||
variableName: 'QTY',
|
||||
job: {
|
||||
tasks: [
|
||||
{
|
||||
jupiterSwapTask: {
|
||||
inTokenAddress: USDC_MINT,
|
||||
outTokenAddress: TOKEN_MINT,
|
||||
baseAmountString: swapValue,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
jupiterSwapTask: {
|
||||
inTokenAddress: TOKEN_MINT,
|
||||
outTokenAddress: USDC_MINT,
|
||||
baseAmountString: '${QTY}',
|
||||
},
|
||||
},
|
||||
{
|
||||
divideTask: {
|
||||
big: '${QTY}',
|
||||
},
|
||||
},
|
||||
],
|
||||
onFailure: onFailureTaskDesc,
|
||||
},
|
||||
},
|
||||
{
|
||||
conditionalTask: {
|
||||
attempt: [
|
||||
{
|
||||
multiplyTask: {
|
||||
job: {
|
||||
tasks: [
|
||||
{
|
||||
oracleTask: {
|
||||
pythAddress: PYTH_USDC_ORACLE,
|
||||
pythAllowedConfidenceInterval: 10,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
onFailure: [
|
||||
{
|
||||
multiplyTask: {
|
||||
job: {
|
||||
tasks: [
|
||||
{
|
||||
oracleTask: {
|
||||
switchboardAddress: SWITCHBOARD_USDC_ORACLE,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
}),
|
||||
];
|
||||
const decodedFeedHash = await crossbarClient
|
||||
.store(queue.toBase58(), jobs)
|
||||
|
@ -290,3 +640,61 @@ async function setupSwitchboard(userProvider: AnchorProvider) {
|
|||
const sig = await connection.sendTransaction(tx, txOpts);
|
||||
console.log(`Feed ${feedKp.publicKey} initialized: ${sig}`);
|
||||
})();
|
||||
|
||||
export type Token = {
|
||||
address: string;
|
||||
chainId: number;
|
||||
decimals: number;
|
||||
name: string;
|
||||
symbol: string;
|
||||
logoURI: string;
|
||||
extensions: {
|
||||
coingeckoId?: string;
|
||||
};
|
||||
tags: string[];
|
||||
};
|
||||
|
||||
const feeFields = [u64('denominator'), u64('numerator')];
|
||||
const StakePoolLayout = struct([
|
||||
u8('accountType'),
|
||||
publicKey('manager'),
|
||||
publicKey('staker'),
|
||||
publicKey('stakeDepositAuthority'),
|
||||
u8('stakeWithdrawBumpSeed'),
|
||||
publicKey('validatorList'),
|
||||
publicKey('reserveStake'),
|
||||
publicKey('poolMint'),
|
||||
publicKey('managerFeeAccount'),
|
||||
publicKey('tokenProgramId'),
|
||||
u64('totalLamports'),
|
||||
u64('poolTokenSupply'),
|
||||
u64('lastUpdateEpoch'),
|
||||
struct(
|
||||
[u64('unixTimestamp'), u64('epoch'), publicKey('custodian')],
|
||||
'lockup',
|
||||
),
|
||||
struct(feeFields, 'epochFee'),
|
||||
option(struct(feeFields), 'nextEpochFee'),
|
||||
option(publicKey(), 'preferredDepositValidatorVoteAddress'),
|
||||
option(publicKey(), 'preferredWithdrawValidatorVoteAddress'),
|
||||
struct(feeFields, 'stakeDepositFee'),
|
||||
struct(feeFields, 'stakeWithdrawalFee'),
|
||||
option(struct(feeFields), 'nextStakeWithdrawalFee'),
|
||||
u8('stakeReferralFee'),
|
||||
option(publicKey(), 'solDepositAuthority'),
|
||||
struct(feeFields, 'solDepositFee'),
|
||||
u8('solReferralFee'),
|
||||
option(publicKey(), 'solWithdrawAuthority'),
|
||||
struct(feeFields, 'solWithdrawalFee'),
|
||||
option(struct(feeFields), 'nextSolWithdrawalFee'),
|
||||
u64('lastEpochPoolTokenSupply'),
|
||||
u64('lastEpochTotalLamports'),
|
||||
]);
|
||||
|
||||
const tryGetPubKey = (pubkey: string | string[]) => {
|
||||
try {
|
||||
return new PublicKey(pubkey);
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
|
268
yarn.lock
268
yarn.lock
|
@ -37,23 +37,23 @@
|
|||
dependencies:
|
||||
regenerator-runtime "^0.14.0"
|
||||
|
||||
"@blockworks-foundation/mango-v4-settings@0.14.15":
|
||||
version "0.14.15"
|
||||
resolved "https://registry.yarnpkg.com/@blockworks-foundation/mango-v4-settings/-/mango-v4-settings-0.14.15.tgz#0ac04f2cffbd27a4129bc2086ec1418e29393880"
|
||||
integrity sha512-GBo43KCosdaohbtS3Rtz8e2zsLsiN3JqTfLKVtStRYO3f2tQLzeo/D2Khz07psw2egq6TCNZJH7+v32iGrPq0w==
|
||||
"@blockworks-foundation/mango-v4-settings@0.14.24":
|
||||
version "0.14.24"
|
||||
resolved "https://registry.yarnpkg.com/@blockworks-foundation/mango-v4-settings/-/mango-v4-settings-0.14.24.tgz#646b0802fb6222654e247bea7966106af9b7a970"
|
||||
integrity sha512-X3mY2x6XSZTySfB65b5DWuE7v/tffMlFGXQsgv+Zl+cgHdJn77vqdXvQFlR+544xsTjK+kWpWiHTHiSWRzG/4Q==
|
||||
dependencies:
|
||||
bn.js "^5.2.1"
|
||||
eslint-config-prettier "^9.0.0"
|
||||
|
||||
"@blockworks-foundation/mangolana@0.0.14":
|
||||
version "0.0.14"
|
||||
resolved "https://registry.yarnpkg.com/@blockworks-foundation/mangolana/-/mangolana-0.0.14.tgz#f2a0e164f2cbe6e0a0db4fc10267e81ef5d2f7ec"
|
||||
integrity sha512-KuA2+GdeKoHCBmx2HZnVb8IPomUP1w0ZiwQ1F10SLIypYfrylvPa+HSK2ak/+nzZCb8erS9Oub45UPV7cOh5ng==
|
||||
"@blockworks-foundation/mangolana@0.0.17":
|
||||
version "0.0.17"
|
||||
resolved "https://registry.yarnpkg.com/@blockworks-foundation/mangolana/-/mangolana-0.0.17.tgz#9f9a227c61faa3fba8c99a645b1897c46d8edea7"
|
||||
integrity sha512-k4YXV5DjzF3hUJS9NYJCtkPVYgLV/EuKv/XDLEmnWX66V3YopST7aHmdfzj1tb8QJDuE3t+aRC66WXOeGNTUpA==
|
||||
dependencies:
|
||||
"@solana/web3.js" "^1.88.0"
|
||||
"@solana/web3.js" "^1.91.6"
|
||||
bs58 "^5.0.0"
|
||||
isomorphic-ws "^5.0.0"
|
||||
node-fetch "2.6.11"
|
||||
node-fetch "3.3.2"
|
||||
ws "^8.16.0"
|
||||
|
||||
"@colors/colors@1.5.0":
|
||||
|
@ -275,6 +275,18 @@
|
|||
resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz#acad351d582d157bb145535db2a6ff53dd514b5c"
|
||||
integrity sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==
|
||||
|
||||
"@eslint-community/eslint-utils@^4.2.0":
|
||||
version "4.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59"
|
||||
integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==
|
||||
dependencies:
|
||||
eslint-visitor-keys "^3.3.0"
|
||||
|
||||
"@eslint-community/regexpp@^4.4.0":
|
||||
version "4.11.0"
|
||||
resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz#b0ffd0312b4a3fd2d6f77237e7248a5ad3a680ae"
|
||||
integrity sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==
|
||||
|
||||
"@eslint/eslintrc@^0.4.3":
|
||||
version "0.4.3"
|
||||
resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz"
|
||||
|
@ -329,6 +341,11 @@
|
|||
resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz"
|
||||
integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==
|
||||
|
||||
"@iarna/toml@2.2.5":
|
||||
version "2.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@iarna/toml/-/toml-2.2.5.tgz#b32366c89b43c6f8cefbdefac778b9c828e3ba8c"
|
||||
integrity sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==
|
||||
|
||||
"@jridgewell/resolve-uri@^3.0.3":
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78"
|
||||
|
@ -512,6 +529,22 @@
|
|||
"@coral-xyz/anchor" "^0.26.0"
|
||||
buffer "^6.0.1"
|
||||
|
||||
"@raydium-io/raydium-sdk@^1.3.1-beta.57":
|
||||
version "1.3.1-beta.57"
|
||||
resolved "https://registry.yarnpkg.com/@raydium-io/raydium-sdk/-/raydium-sdk-1.3.1-beta.57.tgz#ca498a2b0c54454cc444e9a55d7ac690f9ba094a"
|
||||
integrity sha512-oHp9/N4CUEUmxxupaYr+gbrgGiZci9QJ/UX146G2jd0tSkcXu046EV1SE2HSJRnQfMFiJUoxwZi7qzENWH6dDQ==
|
||||
dependencies:
|
||||
"@solana/buffer-layout" "^4.0.1"
|
||||
"@solana/spl-token" "^0.3.9"
|
||||
axios "^1.6.2"
|
||||
big.js "^6.2.1"
|
||||
bn.js "^5.2.1"
|
||||
decimal.js "^10.4.3"
|
||||
decimal.js-light "^2.5.1"
|
||||
fecha "^4.2.3"
|
||||
lodash "^4.17.21"
|
||||
toformat "^2.0.0"
|
||||
|
||||
"@solana/buffer-layout-utils@^0.2.0":
|
||||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@solana/buffer-layout-utils/-/buffer-layout-utils-0.2.0.tgz#b45a6cab3293a2eb7597cceb474f229889d875ca"
|
||||
|
@ -631,7 +664,7 @@
|
|||
buffer-layout "^1.2.0"
|
||||
dotenv "10.0.0"
|
||||
|
||||
"@solana/spl-token@^0.3.4":
|
||||
"@solana/spl-token@^0.3.4", "@solana/spl-token@^0.3.9":
|
||||
version "0.3.11"
|
||||
resolved "https://registry.yarnpkg.com/@solana/spl-token/-/spl-token-0.3.11.tgz#cdc10f9472b29b39c8983c92592cadd06627fb9a"
|
||||
integrity sha512-bvohO3rIMSVL24Pb+I4EYTJ6cL82eFpInEXD/I8K8upOGjpqHsKUoAempR/RnUlI1qSFNyFlWJfu6MNUgfbCQQ==
|
||||
|
@ -648,7 +681,7 @@
|
|||
dependencies:
|
||||
buffer "^6.0.3"
|
||||
|
||||
"@solana/web3.js@^1.17.0", "@solana/web3.js@^1.21.0", "@solana/web3.js@^1.22.0", "@solana/web3.js@^1.32.0", "@solana/web3.js@^1.36.0", "@solana/web3.js@^1.68.0", "@solana/web3.js@^1.78.2", "@solana/web3.js@^1.88.0":
|
||||
"@solana/web3.js@^1.17.0", "@solana/web3.js@^1.21.0", "@solana/web3.js@^1.22.0", "@solana/web3.js@^1.32.0", "@solana/web3.js@^1.36.0", "@solana/web3.js@^1.68.0", "@solana/web3.js@^1.78.2":
|
||||
version "1.88.0"
|
||||
resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.88.0.tgz#24e1482f63ac54914430b4ce5ab36eaf433ecdb8"
|
||||
integrity sha512-E4BdfB0HZpb66OPFhIzPApNE2tG75Mc6XKIoeymUkx/IV+USSYuxDX29sjgE/KGNYxggrOf4YuYnRMI6UiPL8w==
|
||||
|
@ -669,7 +702,7 @@
|
|||
rpc-websockets "^7.5.1"
|
||||
superstruct "^0.14.2"
|
||||
|
||||
"@solana/web3.js@^1.54.0", "@solana/web3.js@^1.91.1", "@solana/web3.js@^1.93.0":
|
||||
"@solana/web3.js@^1.54.0", "@solana/web3.js@^1.91.1", "@solana/web3.js@^1.91.6", "@solana/web3.js@^1.93.0":
|
||||
version "1.94.0"
|
||||
resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.94.0.tgz#f662ce046f59cb294e8304beeb4d549c3ff05d73"
|
||||
integrity sha512-wMiBebzu5I2fTSz623uj6VXpWFhl0d7qJKqPFK2I4IBLTNUdv+bOeA4H7OBM7Gworv7sOvB3xibRql6l61MeqA==
|
||||
|
@ -820,9 +853,9 @@
|
|||
"@types/node" "*"
|
||||
|
||||
"@types/json-schema@^7.0.9":
|
||||
version "7.0.11"
|
||||
resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz"
|
||||
integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==
|
||||
version "7.0.15"
|
||||
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841"
|
||||
integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==
|
||||
|
||||
"@types/json5@^0.0.29":
|
||||
version "0.0.29"
|
||||
|
@ -876,6 +909,11 @@
|
|||
dependencies:
|
||||
undici-types "~5.26.4"
|
||||
|
||||
"@types/semver@^7.3.12":
|
||||
version "7.5.8"
|
||||
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e"
|
||||
integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==
|
||||
|
||||
"@types/uuid@^8.3.4":
|
||||
version "8.3.4"
|
||||
resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.4.tgz#bd86a43617df0594787d38b735f55c805becf1bc"
|
||||
|
@ -896,83 +934,87 @@
|
|||
"@types/node" "*"
|
||||
|
||||
"@typescript-eslint/eslint-plugin@^5.32.0":
|
||||
version "5.32.0"
|
||||
resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.32.0.tgz"
|
||||
integrity sha512-CHLuz5Uz7bHP2WgVlvoZGhf0BvFakBJKAD/43Ty0emn4wXWv5k01ND0C0fHcl/Im8Td2y/7h44E9pca9qAu2ew==
|
||||
version "5.62.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db"
|
||||
integrity sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==
|
||||
dependencies:
|
||||
"@typescript-eslint/scope-manager" "5.32.0"
|
||||
"@typescript-eslint/type-utils" "5.32.0"
|
||||
"@typescript-eslint/utils" "5.32.0"
|
||||
"@eslint-community/regexpp" "^4.4.0"
|
||||
"@typescript-eslint/scope-manager" "5.62.0"
|
||||
"@typescript-eslint/type-utils" "5.62.0"
|
||||
"@typescript-eslint/utils" "5.62.0"
|
||||
debug "^4.3.4"
|
||||
functional-red-black-tree "^1.0.1"
|
||||
graphemer "^1.4.0"
|
||||
ignore "^5.2.0"
|
||||
regexpp "^3.2.0"
|
||||
natural-compare-lite "^1.4.0"
|
||||
semver "^7.3.7"
|
||||
tsutils "^3.21.0"
|
||||
|
||||
"@typescript-eslint/parser@^5.32.0":
|
||||
version "5.32.0"
|
||||
resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.32.0.tgz"
|
||||
integrity sha512-IxRtsehdGV9GFQ35IGm5oKKR2OGcazUoiNBxhRV160iF9FoyuXxjY+rIqs1gfnd+4eL98OjeGnMpE7RF/NBb3A==
|
||||
version "5.62.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.62.0.tgz#1b63d082d849a2fcae8a569248fbe2ee1b8a56c7"
|
||||
integrity sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==
|
||||
dependencies:
|
||||
"@typescript-eslint/scope-manager" "5.32.0"
|
||||
"@typescript-eslint/types" "5.32.0"
|
||||
"@typescript-eslint/typescript-estree" "5.32.0"
|
||||
"@typescript-eslint/scope-manager" "5.62.0"
|
||||
"@typescript-eslint/types" "5.62.0"
|
||||
"@typescript-eslint/typescript-estree" "5.62.0"
|
||||
debug "^4.3.4"
|
||||
|
||||
"@typescript-eslint/scope-manager@5.32.0":
|
||||
version "5.32.0"
|
||||
resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.32.0.tgz"
|
||||
integrity sha512-KyAE+tUON0D7tNz92p1uetRqVJiiAkeluvwvZOqBmW9z2XApmk5WSMV9FrzOroAcVxJZB3GfUwVKr98Dr/OjOg==
|
||||
"@typescript-eslint/scope-manager@5.62.0":
|
||||
version "5.62.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c"
|
||||
integrity sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "5.32.0"
|
||||
"@typescript-eslint/visitor-keys" "5.32.0"
|
||||
"@typescript-eslint/types" "5.62.0"
|
||||
"@typescript-eslint/visitor-keys" "5.62.0"
|
||||
|
||||
"@typescript-eslint/type-utils@5.32.0":
|
||||
version "5.32.0"
|
||||
resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.32.0.tgz"
|
||||
integrity sha512-0gSsIhFDduBz3QcHJIp3qRCvVYbqzHg8D6bHFsDMrm0rURYDj+skBK2zmYebdCp+4nrd9VWd13egvhYFJj/wZg==
|
||||
"@typescript-eslint/type-utils@5.62.0":
|
||||
version "5.62.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz#286f0389c41681376cdad96b309cedd17d70346a"
|
||||
integrity sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==
|
||||
dependencies:
|
||||
"@typescript-eslint/utils" "5.32.0"
|
||||
"@typescript-eslint/typescript-estree" "5.62.0"
|
||||
"@typescript-eslint/utils" "5.62.0"
|
||||
debug "^4.3.4"
|
||||
tsutils "^3.21.0"
|
||||
|
||||
"@typescript-eslint/types@5.32.0":
|
||||
version "5.32.0"
|
||||
resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.32.0.tgz"
|
||||
integrity sha512-EBUKs68DOcT/EjGfzywp+f8wG9Zw6gj6BjWu7KV/IYllqKJFPlZlLSYw/PTvVyiRw50t6wVbgv4p9uE2h6sZrQ==
|
||||
"@typescript-eslint/types@5.62.0":
|
||||
version "5.62.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f"
|
||||
integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==
|
||||
|
||||
"@typescript-eslint/typescript-estree@5.32.0":
|
||||
version "5.32.0"
|
||||
resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.32.0.tgz"
|
||||
integrity sha512-ZVAUkvPk3ITGtCLU5J4atCw9RTxK+SRc6hXqLtllC2sGSeMFWN+YwbiJR9CFrSFJ3w4SJfcWtDwNb/DmUIHdhg==
|
||||
"@typescript-eslint/typescript-estree@5.62.0":
|
||||
version "5.62.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b"
|
||||
integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "5.32.0"
|
||||
"@typescript-eslint/visitor-keys" "5.32.0"
|
||||
"@typescript-eslint/types" "5.62.0"
|
||||
"@typescript-eslint/visitor-keys" "5.62.0"
|
||||
debug "^4.3.4"
|
||||
globby "^11.1.0"
|
||||
is-glob "^4.0.3"
|
||||
semver "^7.3.7"
|
||||
tsutils "^3.21.0"
|
||||
|
||||
"@typescript-eslint/utils@5.32.0":
|
||||
version "5.32.0"
|
||||
resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.32.0.tgz"
|
||||
integrity sha512-W7lYIAI5Zlc5K082dGR27Fczjb3Q57ECcXefKU/f0ajM5ToM0P+N9NmJWip8GmGu/g6QISNT+K6KYB+iSHjXCQ==
|
||||
"@typescript-eslint/utils@5.62.0":
|
||||
version "5.62.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86"
|
||||
integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==
|
||||
dependencies:
|
||||
"@eslint-community/eslint-utils" "^4.2.0"
|
||||
"@types/json-schema" "^7.0.9"
|
||||
"@typescript-eslint/scope-manager" "5.32.0"
|
||||
"@typescript-eslint/types" "5.32.0"
|
||||
"@typescript-eslint/typescript-estree" "5.32.0"
|
||||
"@types/semver" "^7.3.12"
|
||||
"@typescript-eslint/scope-manager" "5.62.0"
|
||||
"@typescript-eslint/types" "5.62.0"
|
||||
"@typescript-eslint/typescript-estree" "5.62.0"
|
||||
eslint-scope "^5.1.1"
|
||||
eslint-utils "^3.0.0"
|
||||
semver "^7.3.7"
|
||||
|
||||
"@typescript-eslint/visitor-keys@5.32.0":
|
||||
version "5.32.0"
|
||||
resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.32.0.tgz"
|
||||
integrity sha512-S54xOHZgfThiZ38/ZGTgB2rqx51CMJ5MCfVT2IplK4Q7hgzGfe0nLzLCcenDnc/cSjP568hdeKfeDcBgqNHD/g==
|
||||
"@typescript-eslint/visitor-keys@5.62.0":
|
||||
version "5.62.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e"
|
||||
integrity sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "5.32.0"
|
||||
"@typescript-eslint/types" "5.62.0"
|
||||
eslint-visitor-keys "^3.3.0"
|
||||
|
||||
"@ungap/promise-all-settled@1.1.2":
|
||||
|
@ -1125,7 +1167,7 @@ axios@^1.1.3, axios@^1.4.0:
|
|||
form-data "^4.0.0"
|
||||
proxy-from-env "^1.1.0"
|
||||
|
||||
axios@^1.2.0, axios@^1.7.2:
|
||||
axios@^1.2.0, axios@^1.6.2, axios@^1.7.2:
|
||||
version "1.7.2"
|
||||
resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.2.tgz#b625db8a7051fbea61c35a3cbb3a1daa7b9c7621"
|
||||
integrity sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==
|
||||
|
@ -1473,6 +1515,11 @@ crypto-hash@^1.3.0:
|
|||
resolved "https://registry.npmjs.org/crypto-hash/-/crypto-hash-1.3.0.tgz"
|
||||
integrity sha512-lyAZ0EMyjDkVvz8WOeVnuCPvKVBXcMv1l5SVqO1yC7PzTwrD/pPje/BIRbWhMoPe436U+Y2nD7f5bFx0kt+Sbg==
|
||||
|
||||
data-uri-to-buffer@^4.0.0:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e"
|
||||
integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==
|
||||
|
||||
debug@4, debug@^4.0.1, debug@^4.1.1, debug@^4.3.4:
|
||||
version "4.3.4"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
|
||||
|
@ -1492,6 +1539,11 @@ decamelize@^4.0.0:
|
|||
resolved "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz"
|
||||
integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==
|
||||
|
||||
decimal.js-light@^2.5.1:
|
||||
version "2.5.1"
|
||||
resolved "https://registry.yarnpkg.com/decimal.js-light/-/decimal.js-light-2.5.1.tgz#134fd32508f19e208f4fb2f8dac0d2626a867934"
|
||||
integrity sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg==
|
||||
|
||||
decimal.js@^10.4.0, decimal.js@^10.4.3:
|
||||
version "10.4.3"
|
||||
resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23"
|
||||
|
@ -1672,13 +1724,6 @@ eslint-utils@^2.1.0:
|
|||
dependencies:
|
||||
eslint-visitor-keys "^1.1.0"
|
||||
|
||||
eslint-utils@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz"
|
||||
integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==
|
||||
dependencies:
|
||||
eslint-visitor-keys "^2.0.0"
|
||||
|
||||
eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz"
|
||||
|
@ -1849,6 +1894,19 @@ fastq@^1.6.0:
|
|||
dependencies:
|
||||
reusify "^1.0.4"
|
||||
|
||||
fecha@^4.2.3:
|
||||
version "4.2.3"
|
||||
resolved "https://registry.yarnpkg.com/fecha/-/fecha-4.2.3.tgz#4d9ccdbc61e8629b259fdca67e65891448d569fd"
|
||||
integrity sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==
|
||||
|
||||
fetch-blob@^3.1.2, fetch-blob@^3.1.4:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9"
|
||||
integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==
|
||||
dependencies:
|
||||
node-domexception "^1.0.0"
|
||||
web-streams-polyfill "^3.0.3"
|
||||
|
||||
file-entry-cache@^6.0.1:
|
||||
version "6.0.1"
|
||||
resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz"
|
||||
|
@ -1920,6 +1978,13 @@ form-data@^4.0.0:
|
|||
combined-stream "^1.0.8"
|
||||
mime-types "^2.1.12"
|
||||
|
||||
formdata-polyfill@^4.0.10:
|
||||
version "4.0.10"
|
||||
resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423"
|
||||
integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==
|
||||
dependencies:
|
||||
fetch-blob "^3.1.2"
|
||||
|
||||
fs.realpath@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
|
||||
|
@ -2012,6 +2077,11 @@ globby@^11.1.0:
|
|||
merge2 "^1.4.1"
|
||||
slash "^3.0.0"
|
||||
|
||||
graphemer@^1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6"
|
||||
integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==
|
||||
|
||||
growl@1.10.5:
|
||||
version "1.10.5"
|
||||
resolved "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz"
|
||||
|
@ -2508,6 +2578,11 @@ nanoid@3.3.1:
|
|||
resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz"
|
||||
integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==
|
||||
|
||||
natural-compare-lite@^1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4"
|
||||
integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==
|
||||
|
||||
natural-compare@^1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz"
|
||||
|
@ -2533,12 +2608,10 @@ node-cache@^5.1.2:
|
|||
dependencies:
|
||||
clone "2.x"
|
||||
|
||||
node-fetch@2.6.11, node-fetch@^2.6.1:
|
||||
version "2.6.11"
|
||||
resolved "https://registry.yarnpkg.com/@blockworks-foundation/node-fetch/-/node-fetch-2.6.11.tgz#fb536ef0e6a960e7b7993f3c1d3b3bba9bdfbc56"
|
||||
integrity sha512-HeDTxpIypSR4qCoqgUXGr8YL4OG1z7BbV4VhQ9iQs+pt2wV3MtqO+sQk2vXK3WDKu5C6BsbGmWE22BmIrcuOOw==
|
||||
dependencies:
|
||||
whatwg-url "^5.0.0"
|
||||
node-domexception@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5"
|
||||
integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==
|
||||
|
||||
node-fetch@2.6.7:
|
||||
version "2.6.7"
|
||||
|
@ -2547,6 +2620,22 @@ node-fetch@2.6.7:
|
|||
dependencies:
|
||||
whatwg-url "^5.0.0"
|
||||
|
||||
node-fetch@3.3.2:
|
||||
version "3.3.2"
|
||||
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.2.tgz#d1e889bacdf733b4ff3b2b243eb7a12866a0b78b"
|
||||
integrity sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==
|
||||
dependencies:
|
||||
data-uri-to-buffer "^4.0.0"
|
||||
fetch-blob "^3.1.4"
|
||||
formdata-polyfill "^4.0.10"
|
||||
|
||||
node-fetch@^2.6.1:
|
||||
version "2.6.11"
|
||||
resolved "https://registry.yarnpkg.com/@blockworks-foundation/node-fetch/-/node-fetch-2.6.11.tgz#fb536ef0e6a960e7b7993f3c1d3b3bba9bdfbc56"
|
||||
integrity sha512-HeDTxpIypSR4qCoqgUXGr8YL4OG1z7BbV4VhQ9iQs+pt2wV3MtqO+sQk2vXK3WDKu5C6BsbGmWE22BmIrcuOOw==
|
||||
dependencies:
|
||||
whatwg-url "^5.0.0"
|
||||
|
||||
node-fetch@^2.7.0:
|
||||
version "2.7.0"
|
||||
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d"
|
||||
|
@ -2735,7 +2824,7 @@ regenerator-runtime@^0.14.0:
|
|||
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45"
|
||||
integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==
|
||||
|
||||
regexpp@^3.1.0, regexpp@^3.2.0:
|
||||
regexpp@^3.1.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz"
|
||||
integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==
|
||||
|
@ -2831,13 +2920,18 @@ secp256k1@5.0.0:
|
|||
node-addon-api "^5.0.0"
|
||||
node-gyp-build "^4.2.0"
|
||||
|
||||
semver@^7.2.1, semver@^7.3.7:
|
||||
semver@^7.2.1:
|
||||
version "7.3.7"
|
||||
resolved "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz"
|
||||
integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==
|
||||
dependencies:
|
||||
lru-cache "^6.0.0"
|
||||
|
||||
semver@^7.3.7:
|
||||
version "7.6.2"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13"
|
||||
integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==
|
||||
|
||||
serialize-javascript@6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz"
|
||||
|
@ -3020,6 +3114,11 @@ to-regex-range@^5.0.1:
|
|||
dependencies:
|
||||
is-number "^7.0.0"
|
||||
|
||||
toformat@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/toformat/-/toformat-2.0.0.tgz#7a043fd2dfbe9021a4e36e508835ba32056739d8"
|
||||
integrity sha512-03SWBVop6nU8bpyZCx7SodpYznbZF5R4ljwNLBcTQzKOD9xuihRo/psX58llS1BMFhhAI08H3luot5GoXJz2pQ==
|
||||
|
||||
toml@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.npmjs.org/toml/-/toml-3.0.0.tgz"
|
||||
|
@ -3094,7 +3193,7 @@ tsconfig-paths@^3.5.0:
|
|||
|
||||
tslib@^1.8.1:
|
||||
version "1.14.1"
|
||||
resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz"
|
||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
|
||||
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
|
||||
|
||||
tslib@^2.0.3:
|
||||
|
@ -3109,7 +3208,7 @@ tslib@^2.4.0:
|
|||
|
||||
tsutils@^3.21.0:
|
||||
version "3.21.0"
|
||||
resolved "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz"
|
||||
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"
|
||||
integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==
|
||||
dependencies:
|
||||
tslib "^1.8.1"
|
||||
|
@ -3206,6 +3305,11 @@ vscode-textmate@5.2.0:
|
|||
resolved "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.2.0.tgz"
|
||||
integrity sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==
|
||||
|
||||
web-streams-polyfill@^3.0.3:
|
||||
version "3.3.3"
|
||||
resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz#2073b91a2fdb1fbfbd401e7de0ac9f8214cecb4b"
|
||||
integrity sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==
|
||||
|
||||
webidl-conversions@^3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871"
|
||||
|
|
Loading…
Reference in New Issue