diff --git a/package-lock.json b/package-lock.json index 8b1b931..b016490 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,8 +13,7 @@ "@alphafi/stsui-sdk": "^2.0.2", "@cetusprotocol/aggregator-sdk": "^1.5.5", "@cetusprotocol/common-sdk": "^1.3.7", - "@naviprotocol/lending": "2.0.3", - "@pythnetwork/pyth-sui-js": "^2.2.0", + "@naviprotocol/lending": "2.0.7", "bn.js": "^5.2.2", "decimal.js": "^10.6.0", "dotenv": "^17.2.3" @@ -2045,9 +2044,9 @@ } }, "node_modules/@naviprotocol/lending": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@naviprotocol/lending/-/lending-2.0.3.tgz", - "integrity": "sha512-pQuYaJDST7npkfl5YV5/QD4xERzo889OZmqRxPXeB+J7uHj2VbhWzSkd64FDbgL1L/RItxci0WCS3bP2QYjQAQ==", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@naviprotocol/lending/-/lending-2.0.7.tgz", + "integrity": "sha512-r1T3boQ44DCObzverDc+9P57OXlKTAopXLkDP3I/z2DVHY4yV6Pt7NwHUDpAibtP12FkF5IUm8/7TM+MKAf5+Q==", "license": "MIT", "dependencies": { "bignumber.js": "9.1.2", diff --git a/package.json b/package.json index 1ce70bd..b776316 100644 --- a/package.json +++ b/package.json @@ -45,8 +45,7 @@ "@alphafi/stsui-sdk": "^2.0.2", "@cetusprotocol/aggregator-sdk": "^1.5.5", "@cetusprotocol/common-sdk": "^1.3.7", - "@naviprotocol/lending": "2.0.3", - "@pythnetwork/pyth-sui-js": "^2.2.0", + "@naviprotocol/lending": "2.0.7", "bn.js": "^5.2.2", "decimal.js": "^10.6.0", "dotenv": "^17.2.3" diff --git a/scripts/testRun.ts b/scripts/testRun.ts index 3fd3494..347c343 100644 --- a/scripts/testRun.ts +++ b/scripts/testRun.ts @@ -13,7 +13,12 @@ import { StrategyContext, } from '../src/index.js'; import { AlphaVaultPoolLabel } from '../src/strategies/alphaVault.js'; -import { dryRunTransactionBlock, executeTransactionBlock, getExecStuff } from './utils.js'; +import { + dryRunTransactionBlock, + executeTransactionBlock, + getExecStuff, + getSuiClient, +} from './utils.js'; import fs from 'fs'; // async function test() { @@ -241,15 +246,15 @@ async function withdraw() { network: 'mainnet', }); const tx = await sdk.withdraw({ - poolId: '0xccda433a3324dc743478c7f79cce584628f6303501281167a3f4b386187c8c63', - withdrawMax: false, + poolId: '0x17743a10e89b108fd7c048e7737ce09082e3ef91f416ee93c2566c5dd3f438db', + withdrawMax: true, amount: '5_000_00', address, // coinType: '0xd1b72982e40348d069bb1ff701e634c117bb5f741f44dff91e472d3b01461e55::stsui::STSUI', }); tx.setGasBudget(2e8); - // dryRunTransactionBlock(tx); - executeTransactionBlock(tx); + dryRunTransactionBlock(tx); + // executeTransactionBlock(tx); } async function claimSlushWithdraw() { const { address, keypair, suiClient } = getExecStuff(); @@ -361,9 +366,9 @@ async function updatePool() { dryRunTransactionBlock(tx, address); // executeTransactionBlock(tx); } -updatePool(); +// updatePool(); // claimAirdrop(); -// withdraw(); +withdraw(); // poolsData(); // portfolioData(); // claimSlushWithdraw(); diff --git a/scripts/utils.ts b/scripts/utils.ts index 3d42c78..d840ea9 100644 --- a/scripts/utils.ts +++ b/scripts/utils.ts @@ -1,12 +1,17 @@ import { Ed25519Keypair } from '@mysten/sui/keypairs/ed25519'; import { fromBase64 } from '@mysten/bcs'; import { SuiJsonRpcClient as SuiClient } from '@mysten/sui/jsonRpc'; +import { SuiGraphQLClient } from '@mysten/sui/graphql'; import dotenv from 'dotenv'; import { Transaction } from '@mysten/sui/transactions'; dotenv.config(); +/** + * @deprecated Public fullnodes no longer serve JSON-RPC, so this client fails on any call. + * Use {@link getGqlClient} instead; it backs the simulate/execute helpers below. + */ export function getSuiClient(network: string) { const mainnetUrl = 'https://fullnode.mainnet.sui.io/'; const testnetUrl = 'https://fullnode.testnet.sui.io/'; @@ -24,6 +29,16 @@ export function getSuiClient(network: string) { }); } +/** GraphQL client — builds, simulates and executes server-side. */ +export function getGqlClient(network: string = process.env.NETWORK ?? 'mainnet') { + return new SuiGraphQLClient({ + url: + network === 'testnet' + ? 'https://graphql.testnet.sui.io/graphql' + : 'https://graphql.mainnet.sui.io/graphql', + }); +} + export function getExecStuff() { if (!process.env.PK_B64) { throw new Error('env var PK_B64 not configured'); @@ -48,45 +63,38 @@ export function getExecStuff() { } export async function dryRunTransactionBlock(txb: Transaction, add?: string) { - const { suiClient, address } = getExecStuff(); + const { address } = getExecStuff(); + txb.setSender(add ?? address); - add ? txb.setSender(add) : txb.setSender(address); - // txb.setGasBudget(1e9); try { - const serializedTxb = await txb.build({ client: suiClient }); - suiClient - .dryRunTransactionBlock({ - transactionBlock: serializedTxb, - }) - .then((res) => { - // console.log(JSON.stringify(res, null, 2)); - console.log(res.effects.status, res.balanceChanges, res.events.length); - }) - .catch((error) => { - console.error(error); - }); + const gql = getGqlClient(); + // Server-side build + gas resolution, so no separate txb.build() is needed. + const res = await gql.core.simulateTransaction({ + transaction: txb, + include: { effects: true, balanceChanges: true, events: true }, + }); + const txData = res.$kind === 'Transaction' ? res.Transaction : res.FailedTransaction; + console.log(txData?.effects?.status, txData?.balanceChanges, txData?.events?.length ?? 0); } catch (e) { console.log(e); } } + export async function executeTransactionBlock(txb: Transaction) { - const { keypair, suiClient } = getExecStuff(); + const { keypair, address } = getExecStuff(); + txb.setSenderIfNotSet(address); - await suiClient - .signAndExecuteTransaction({ - signer: keypair, - transaction: txb, - requestType: 'WaitForLocalExecution', - options: { - showEffects: true, - showBalanceChanges: true, - showObjectChanges: true, - }, - }) - .then((res) => { - console.log(JSON.stringify(res, null, 2)); - }) - .catch((error) => { - console.error(error); + try { + const gql = getGqlClient(); + const bytes = await txb.build({ client: gql }); + const { signature } = await keypair.signTransaction(bytes); + const res = await gql.core.executeTransaction({ + transaction: bytes, + signatures: [signature], + include: { effects: true }, }); + console.log(JSON.stringify(res, null, 2)); + } catch (error) { + console.error(error); + } } diff --git a/src/models/blockchain.ts b/src/models/blockchain.ts index f3b9a86..a351ffa 100644 --- a/src/models/blockchain.ts +++ b/src/models/blockchain.ts @@ -3,10 +3,10 @@ * * Reads and transaction simulation go through GraphQL (`gqlClient`), using * `gqlClient.core.simulateTransaction` for simulation (server-side build + gas - * resolution). A JSON-RPC client (`pythSuiClient`) is retained only for the - * Pyth `SuiPythClient` integration, which still requires it. A gRPC (v2 Core) - * client (`suiGrpcClient`) is used where a Core-capable client is required - * (e.g. the Navi reward `devInspect`). + * resolution). A JSON-RPC client (`pythSuiClient`) is retained for the admin + * helpers that still need JSON-RPC object reads. A gRPC (v2 Core) client + * (`suiGrpcClient`) is used where a Core-capable client is required (e.g. the + * Navi reward `devInspect`). */ import { SuiJsonRpcClient } from '@mysten/sui/jsonRpc'; @@ -27,7 +27,7 @@ export class Blockchain { network: Network; graphqlUrl: string; gqlClient: SuiGraphQLClient; - /** Retained only for the Pyth `SuiPythClient` integration (needs JSON-RPC). */ + /** Retained for admin helpers that still need JSON-RPC object reads. */ pythSuiClient: SuiJsonRpcClient; /** gRPC (v2 Core) client for reads needing a Core-capable client (e.g. Navi reward `devInspect`). */ suiGrpcClient: SuiGrpcClient; diff --git a/src/naviprotocol-lending.d.ts b/src/naviprotocol-lending.d.ts deleted file mode 100644 index f61cbab..0000000 --- a/src/naviprotocol-lending.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -// NAVI v2 (@naviprotocol/lending) ships ESM `.d.ts` files with extensionless -// relative re-exports, which don't resolve under `moduleResolution: NodeNext` -// (the runtime bundle is a single self-contained file and works fine). Declare -// the one symbol we use so it type-resolves. Remove if NAVI fixes their packaging. -declare module '@naviprotocol/lending' { - export function getUserAvailableLendingRewards( - address: string, - options?: { client: unknown } & Record, - ): Promise>; -} diff --git a/src/strategies/lending.ts b/src/strategies/lending.ts index f5ba32c..60456ae 100644 --- a/src/strategies/lending.ts +++ b/src/strategies/lending.ts @@ -22,13 +22,16 @@ import { GLOBAL_CONFIGS, NAVI_CONFIG, POOLS, - PYTH_STATE_ID, SUI_SYSTEM_STATE, VERSIONS, - WORMHOLE_STATE_ID, } from '../utils/constants.js'; -import { SuiPriceServiceConnection, SuiPythClient } from '@pythnetwork/pyth-sui-js'; -import { getUserAvailableLendingRewards } from '@naviprotocol/lending'; +import { + getConfig, + getPriceFeeds, + getUserAvailableLendingRewards, + updateOraclePricesPTB, + updatePythPriceFeeds, +} from '@naviprotocol/lending'; /** * Lending Strategy for single-asset pools with lending protocol integration @@ -295,11 +298,17 @@ export class LendingStrategy extends BaseStrategy< } private async collectAndClaimRewards(tx: Transaction) { - const claimableRewards = await this.getAvailableRewards( + const naviAccount = NAVI_CONFIG.ACCOUNT_ADDRESSES[ this.poolLabel.asset.name as keyof typeof NAVI_CONFIG.ACCOUNT_ADDRESSES - ], - ); + ]; + if (!naviAccount) { + // Otherwise this reaches NAVI's SDK as tx.pure.address(undefined) and fails as a BCS error. + throw new Error( + `NAVI_CONFIG.ACCOUNT_ADDRESSES has no entry for asset '${this.poolLabel.asset.name}'`, + ); + } + const claimableRewards = await this.getAvailableRewards(naviAccount); const [navxCoin, suiCoin, vsuiCoin, deepCoin, usdcCoin, wusdcCoin] = await this.context.getCoinsBySymbols(['NAVX', 'SUI', 'vSUI', 'DEEP', 'USDC', 'wUSDC']); @@ -793,7 +802,6 @@ export class LendingStrategy extends BaseStrategy< } else if (this.poolLabel.asset.name === 'wBTC') { await this.updateSingleTokenPrice( tx, - NAVI_CONFIG.PRICE_FEED[this.poolLabel.asset.name].pythPriceInfo, NAVI_CONFIG.PRICE_FEED[this.poolLabel.asset.name].feedId, ); @@ -828,8 +836,6 @@ export class LendingStrategy extends BaseStrategy< } else { await this.updateSingleTokenPrice( tx, - NAVI_CONFIG.PRICE_FEED[this.poolLabel.asset.name as keyof typeof NAVI_CONFIG.PRICE_FEED] - .pythPriceInfo, NAVI_CONFIG.PRICE_FEED[this.poolLabel.asset.name as keyof typeof NAVI_CONFIG.PRICE_FEED] .feedId, ); @@ -864,33 +870,43 @@ export class LendingStrategy extends BaseStrategy< } } - private async updateSingleTokenPrice(tx: Transaction, pythPriceInfo: string, feedId: string) { - const pythClient = new SuiPythClient( - this.context.blockchain.pythSuiClient, - PYTH_STATE_ID, - WORMHOLE_STATE_ID, - ); - const pythConnection = new SuiPriceServiceConnection('https://hermes.pyth.network'); - - const priceFeedUpdateData = await pythConnection.getPriceFeedsUpdateData([pythPriceInfo]); - const priceInfoObjectIds = await pythClient.updatePriceFeeds(tx, priceFeedUpdateData, [ - pythPriceInfo, - ]); - + /** + * Overrides this tx's NAVI `lending_core` linkage by calling the latest package directly. + * + * Our pool packages reach `lending_core` through linkage tables frozen at publish time. Sui + * resolves one version per original package per tx, so this direct call pulls those transitive + * calls forward. The package comes from NAVI's config — the same value their own SDK helpers + * use — so it tracks their upgrades and can't drift or collide. `version_verification` asserts + * `storage.version == constants::version()`, so a wrong version fails loudly. + */ + private async overrideNaviLendingCoreLinkage(tx: Transaction) { + const { package: lendingCore } = await getConfig(); tx.moveCall({ - target: `${NAVI_CONFIG.ORACLE_PRO_PACKAGE_ID}::oracle_pro::update_single_price_v2`, - arguments: [ - tx.object(CLOCK_PACKAGE_ID), - tx.object(NAVI_CONFIG.ORACLE_CONFIG), - tx.object(NAVI_CONFIG.PRICE_ORACLE_ID), - tx.object(NAVI_CONFIG.SUPRA_ORACLE_HOLDER), - tx.object(priceInfoObjectIds[0]), - tx.object(NAVI_CONFIG.NAVI_AGGREGATOR), - tx.pure.address(feedId), - ], + target: `${lendingCore}::storage::version_verification`, + arguments: [tx.object(NAVI_CONFIG.NAVI_STORAGE_ID)], }); } + private async updateSingleTokenPrice(tx: Transaction, feedId: string) { + const feed = (await getPriceFeeds()).find((f) => f.feedId === feedId); + if (!feed) { + throw new Error(`NAVI oracle config has no price feed for feedId ${feedId}`); + } + // NAVI treats both as optional; a supra/switchboard-only feed would otherwise surface as + // an opaque Hermes error or `tx.object('')` inside updateOraclePricesPTB. + if (!feed.pythPriceFeedId || !feed.pythPriceInfoObject) { + throw new Error(`NAVI price feed ${feedId} has no Pyth feed configured`); + } + await this.overrideNaviLendingCoreLinkage(tx); + // Pass our client so the SuiPythClient object reads use the configured endpoint rather + // than NAVI's module-level default (the public mainnet fullnode). + const naviOptions = { client: this.context.blockchain.suiGrpcClient }; + // Post unconditionally: updateOraclePricesPTB's own flag gates on a stale check that + // misparses the on-chain price struct, so it never posts. + await updatePythPriceFeeds(tx, [feed.pythPriceFeedId], naviOptions); + await updateOraclePricesPTB(tx, [feed], naviOptions); + } + async withdraw(tx: Transaction, options: WithdrawOptions) { if (this.receiptObjects.length === 0) { throw new Error('No receipt found'); @@ -977,7 +993,9 @@ export class LendingStrategy extends BaseStrategy< ); this.context.blockchain.sendCoinToAddressBalance( tx, - ALPHA_COIN_TYPE, + // ALPHA_COIN_TYPE is stored bare to match on-chain `type_name::get` VecMap keys; + // a type argument needs the 0x prefix or the tx fails to parse. + `0x${ALPHA_COIN_TYPE}`, options.address, alphaCoin, ); @@ -985,7 +1003,6 @@ export class LendingStrategy extends BaseStrategy< } else if (this.poolLabel.asset.name === 'wBTC') { await this.updateSingleTokenPrice( tx, - NAVI_CONFIG.PRICE_FEED[this.poolLabel.asset.name].pythPriceInfo, NAVI_CONFIG.PRICE_FEED[this.poolLabel.asset.name].feedId, ); @@ -1022,8 +1039,6 @@ export class LendingStrategy extends BaseStrategy< } else { await this.updateSingleTokenPrice( tx, - NAVI_CONFIG.PRICE_FEED[this.poolLabel.asset.name as keyof typeof NAVI_CONFIG.PRICE_FEED] - .pythPriceInfo, NAVI_CONFIG.PRICE_FEED[this.poolLabel.asset.name as keyof typeof NAVI_CONFIG.PRICE_FEED] .feedId, ); diff --git a/src/strategies/looping.ts b/src/strategies/looping.ts index 88bad0e..6bed2bb 100644 --- a/src/strategies/looping.ts +++ b/src/strategies/looping.ts @@ -16,15 +16,18 @@ import { GLOBAL_CONFIGS, NAVI_CONFIG, POOLS, - PYTH_STATE_ID, STSUI, SUI_SYSTEM_STATE, VERSIONS, - WORMHOLE_STATE_ID, } from '../utils/constants.js'; import { stSuiExchangeRate, getConf as getStSuiConf } from '@alphafi/stsui-sdk'; -import { SuiPriceServiceConnection, SuiPythClient } from '@pythnetwork/pyth-sui-js'; -import { getUserAvailableLendingRewards } from '@naviprotocol/lending'; +import { + getConfig, + getPriceFeeds, + getUserAvailableLendingRewards, + updateOraclePricesPTB, + updatePythPriceFeeds, +} from '@naviprotocol/lending'; /** * Looping Strategy for leveraged positions with automated compounding @@ -598,33 +601,43 @@ export class LoopingStrategy extends BaseStrategy< } } - private async updateSingleTokenPrice(tx: Transaction, pythPriceInfo: string, feedId: string) { - const pythClient = new SuiPythClient( - this.context.blockchain.pythSuiClient, - PYTH_STATE_ID, - WORMHOLE_STATE_ID, - ); - const pythConnection = new SuiPriceServiceConnection('https://hermes.pyth.network'); - - const priceFeedUpdateData = await pythConnection.getPriceFeedsUpdateData([pythPriceInfo]); - const priceInfoObjectIds = await pythClient.updatePriceFeeds(tx, priceFeedUpdateData, [ - pythPriceInfo, - ]); - + /** + * Overrides this tx's NAVI `lending_core` linkage by calling the latest package directly. + * + * Our pool packages reach `lending_core` through linkage tables frozen at publish time. Sui + * resolves one version per original package per tx, so this direct call pulls those transitive + * calls forward. The package comes from NAVI's config — the same value their own SDK helpers + * use — so it tracks their upgrades and can't drift or collide. `version_verification` asserts + * `storage.version == constants::version()`, so a wrong version fails loudly. + */ + private async overrideNaviLendingCoreLinkage(tx: Transaction) { + const { package: lendingCore } = await getConfig(); tx.moveCall({ - target: `${NAVI_CONFIG.ORACLE_PRO_PACKAGE_ID}::oracle_pro::update_single_price_v2`, - arguments: [ - tx.object(CLOCK_PACKAGE_ID), - tx.object(NAVI_CONFIG.ORACLE_CONFIG), - tx.object(NAVI_CONFIG.PRICE_ORACLE_ID), - tx.object(NAVI_CONFIG.SUPRA_ORACLE_HOLDER), - tx.object(priceInfoObjectIds[0]), - tx.object(NAVI_CONFIG.NAVI_AGGREGATOR), - tx.pure.address(feedId), - ], + target: `${lendingCore}::storage::version_verification`, + arguments: [tx.object(NAVI_CONFIG.NAVI_STORAGE_ID)], }); } + private async updateSingleTokenPrice(tx: Transaction, feedId: string) { + const feed = (await getPriceFeeds()).find((f) => f.feedId === feedId); + if (!feed) { + throw new Error(`NAVI oracle config has no price feed for feedId ${feedId}`); + } + // NAVI treats both as optional; a supra/switchboard-only feed would otherwise surface as + // an opaque Hermes error or `tx.object('')` inside updateOraclePricesPTB. + if (!feed.pythPriceFeedId || !feed.pythPriceInfoObject) { + throw new Error(`NAVI price feed ${feedId} has no Pyth feed configured`); + } + await this.overrideNaviLendingCoreLinkage(tx); + // Pass our client so the SuiPythClient object reads use the configured endpoint rather + // than NAVI's module-level default (the public mainnet fullnode). + const naviOptions = { client: this.context.blockchain.suiGrpcClient }; + // Post unconditionally: updateOraclePricesPTB's own flag gates on a stale check that + // misparses the on-chain price struct, so it never posts. + await updatePythPriceFeeds(tx, [feed.pythPriceFeedId], naviOptions); + await updateOraclePricesPTB(tx, [feed], naviOptions); + } + async deposit(tx: Transaction, options: DepositOptions) { // get Coin Object const depositCoin = this.context.blockchain.getCoinObject( @@ -666,15 +679,11 @@ export class LoopingStrategy extends BaseStrategy< await this.updateSingleTokenPrice( tx, - NAVI_CONFIG.PRICE_FEED[this.poolLabel.supplyAsset.name as keyof typeof NAVI_CONFIG.PRICE_FEED] - .pythPriceInfo, NAVI_CONFIG.PRICE_FEED[this.poolLabel.supplyAsset.name as keyof typeof NAVI_CONFIG.PRICE_FEED] .feedId, ); await this.updateSingleTokenPrice( tx, - NAVI_CONFIG.PRICE_FEED[this.poolLabel.borrowAsset.name as keyof typeof NAVI_CONFIG.PRICE_FEED] - .pythPriceInfo, NAVI_CONFIG.PRICE_FEED[this.poolLabel.borrowAsset.name as keyof typeof NAVI_CONFIG.PRICE_FEED] .feedId, ); @@ -895,15 +904,11 @@ export class LoopingStrategy extends BaseStrategy< await this.updateSingleTokenPrice( tx, - NAVI_CONFIG.PRICE_FEED[this.poolLabel.supplyAsset.name as keyof typeof NAVI_CONFIG.PRICE_FEED] - .pythPriceInfo, NAVI_CONFIG.PRICE_FEED[this.poolLabel.supplyAsset.name as keyof typeof NAVI_CONFIG.PRICE_FEED] .feedId, ); await this.updateSingleTokenPrice( tx, - NAVI_CONFIG.PRICE_FEED[this.poolLabel.borrowAsset.name as keyof typeof NAVI_CONFIG.PRICE_FEED] - .pythPriceInfo, NAVI_CONFIG.PRICE_FEED[this.poolLabel.borrowAsset.name as keyof typeof NAVI_CONFIG.PRICE_FEED] .feedId, ); diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 0db264d..41381da 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -108,7 +108,6 @@ export const DEEPBOOK_CONFIG = { } as Record, }; export const NAVI_CONFIG = { - ORACLE_PRO_PACKAGE_ID: '0x203728f46eb10d19f8f8081db849c86aa8f2a19341b7fd84d7a0e74f053f6242', NAVI_AGGREGATOR: '0x1fa7566f40f93cdbafd5a029a231e06664219444debb59beec2fe3f19ca08b7e', ORACLE_CONFIG: '0x1afe1cb83634f581606cc73c4487ddd8cc39a944b951283af23f7d69d5589478', PRICE_ORACLE_ID: '0x1568865ed9a0b5ec414220e8f79b3d04c77acc82358f6e5ae4635687392ffbef', @@ -161,7 +160,9 @@ export const NAVI_CONFIG = { USDC: '0x02bf11dd1e42865a977b219c031483b3c1eda9b862736953443efe30bfda65bd', vSUI: '0xe8be7259aaa1ec87c72c77098a271508dcfffb2e0b02abe514928d49a276ba9e', WETH: '0xd7565045f34c17890679e28032c5139e09e3a2883a8edb2c45b6ac92e5aabae4', - WUSDC: '0x57b3a18b87a74fbf26ebda9a5670de6740d587b8009d5d9a31ef589c61b050f0', + // Key must match `poolLabel.asset.name`, which is 'wUSDC' — a 'WUSDC' key silently + // resolves to undefined and surfaces as a BCS error inside NAVI's SDK. + wUSDC: '0x57b3a18b87a74fbf26ebda9a5670de6740d587b8009d5d9a31ef589c61b050f0', USDT: '0xa7bcc625ed51fd190b87d945f8399f8b28a728a082d9d80d783075d992397746', DEEP: '0x6cca5232e4e6a6d34c52ed633215b83cad7445720e76620822bf9287c3f0c708', WAL: '0x13bdd7177faa8868bf26090fb67b5f0b1aa4dbd9a021dee9ea20421b496511f9', @@ -189,94 +190,67 @@ export const NAVI_CONFIG = { PRICE_FEED: { SUI: { feedId: '0x2cab9b151ca1721624b09b421cc57d0bb26a1feb5da1f821492204b098ec35c9', - pythPriceInfo: '0x23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744', }, wUSDC: { feedId: '0x70a79226dda5c080378b639d1bb540ddea64761629aa4ad7355d79266d55af61', - pythPriceInfo: '0xeaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a', }, USDC: { feedId: '0xe120611435395f144b4bcc4466a00b6b26d7a27318f96e148648852a9dd6b31c', - pythPriceInfo: '0xeaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a', }, USDT: { feedId: '0xf72d8933873bb4e5bfa1edbfa9ff6443ec5fac25c1d99ba2ef37f50a125826f3', - pythPriceInfo: '0x2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b', }, WETH: { feedId: '0x44d92366eba1f1652ec81f34585406726bef267565a2db1664ffd5ef18e21693', - pythPriceInfo: '0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace', }, CETUS: { feedId: '0x5ac98fc1e6723af2a6d9a68a5d771654a6043f9c4d2b836b2d5fb4832a3be4f2', - pythPriceInfo: '0xe5b274b2611143df055d6e7cd8d93fe1961716bcd4dca1cad87a83bc1e78c1ef', }, NAVX: { feedId: '0x4324c797d2f19eff517c24adec8b92aa2d282e44f3a5cafb36d6c4b30d7f2dca', - pythPriceInfo: '0x88250f854c019ef4f88a5c073d52a18bb1c6ac437033f5932cd017d24917ab46', }, WBTC: { feedId: '0x1bf4727242a61d892feef6616d3e40a3bd24b64b5deb884054e86cb9360556c4', - pythPriceInfo: '0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43', }, AUSD: { feedId: '0x9a0656e1e10a0cdf3f03dce9db9ad931f51dc6eac2e52ebfbf535dfbcf8100ef', - pythPriceInfo: '0xd9912df360b5b7f21a122f15bdd5e27f62ce5e72bd316c291f7c86620e07fb2a', }, ETH: { feedId: '0x9a6ffc707270286e98e8d0f654ce38f69efbc302ac98e2deb11fbad2211600f0', - pythPriceInfo: '0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace', }, USDY: { feedId: '0x11ddf2ac1868d493e2487deeb2a0c2791bb7ca69632c8c5fefe85e09390be093', - pythPriceInfo: '0xe393449f6aff8a4b6d3e1165a7c9ebec103685f3b41e60db4277b5b6d10e7326', }, NS: { feedId: '0xc771ec0ca245857f30195ce05197a7b3ab41c58c1e8abe0661919d90675ad63d', - pythPriceInfo: '0xbb5ff26e47a3a6cc7ec2fce1db996c2a145300edc5acaabe43bf9ff7c5dd5d32', }, DEEP: { feedId: '0x4558092b08ad1b33b0eb536f91a4655693c2390ac568f06de6f6fad827888600', - pythPriceInfo: '0x29bdd5248234e33bd93d3b81100b5fa32eaa5997843847e2c2cb16d7c6d9f7ff', }, BLUE: { feedId: '0xd8286c11df7e49496ee75622ae4132c56385c30b4bedb392e36c0699a52a1d52', - pythPriceInfo: '0x04cfeb7b143eb9c48e9b074125c1a3447b85f59c31164dc20c1beaa6f21f2b6b', }, BUCK: { feedId: '0x93c1b815f64ef7c4311d74ff7c0ca1e47739c3ac31fdee0068c30887633ba2fb', - pythPriceInfo: '0xfdf28a46570252b25fd31cb257973f865afc5ca2f320439e45d95e0394bc7382', }, suiUSDT: { feedId: '0xdeba21105ff41300f8829aaeba45fdec25d1533a64d504ef0348ff005da3fbe5', - pythPriceInfo: '0x2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b', }, stSUI: { feedId: '0xd7a8c920db9f8b5c3c300307d88fca53684fd15b760977dbf8f0adc6e55783bd', - pythPriceInfo: '0x23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744', }, wBTC: { feedId: '0x4e4666c82c476f0b51b27c5ed8c77ab960aa5e4c3a48796e179d721b471e3b7e', - pythPriceInfo: '0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43', }, vSUI: { feedId: '0x086bb5540047b3c77ae5e2f9b811c7ef085517a73510f776753c8ee83d19e62c', - pythPriceInfo: '0x23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744', }, HASUI: { feedId: '0xac934a2a2d406085e7f73b460221fe1b11935864605ba58cdbb8e21c15f12acd', - pythPriceInfo: '0x23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744', - }, - DMC: { - feedId: '0x8abfa63ae82ca2fbc271861375e497166d8792580fb7c2ffcf014d2a131433f0', - pythPriceInfo: '0x5c0be5cc32bdf53fd3b5a567744dd1145c4f82b269906ceda03dbb6f06d9371b', }, }, }; -export const PYTH_STATE_ID = '0x1f9310238ee9298fb703c3419030b35b22bb1cc37113e3bb5007c99aec79e5b8'; -export const WORMHOLE_STATE_ID = - '0xaeab97f96cf9877fee2883315d459552b2b921edc16d7ceac6eab944dd88919c'; export const BLUEFIN_STRATEGY_PACKAGE_ID = '0xd075338d105482f1527cbfd363d6413558f184dec36d9138a70261e87f486e9c';