(connection: Connection, marketId: PublicKey)
| 59 | } |
| 60 | |
| 61 | static async fetchMarketInfo(connection: Connection, marketId: PublicKey) { |
| 62 | const marketAccountInfo = await connection.getAccountInfo(marketId, "processed"); |
| 63 | if (!marketAccountInfo) { |
| 64 | throw new Error('Failed to fetch market info for market id ' + marketId.toBase58()); |
| 65 | } |
| 66 | |
| 67 | return MARKET_STATE_LAYOUT_V3.decode(marketAccountInfo.data); |
| 68 | } |
| 69 | |
| 70 | static async generateV4PoolInfo(baseMint: PublicKey, quoteMint: PublicKey, marketID: PublicKey) { |
| 71 | const poolInfo = Liquidity.getAssociatedPoolKeys({ |
nothing calls this directly
no outgoing calls
no test coverage detected