Documentation Index
Fetch the complete documentation index at: https://docs.gtfo.vc/llms.txt
Use this file to discover all available pages before exploring further.
The chain ID, relevant contract addresses, and subgraph URLs are provided separately to integrators and testers. Please refer to the information provided to you directly.
If you need access to these addresses for testing or integration purposes, please contact 1st.
Dynamic Address Lookups
Looking up vault addresses
You can query vault addresses dynamically using the BookManager:
import { publicClient, BOOK_MANAGER } from './config';
// Get vault for any currency
const vaultAddress = await publicClient.readContract({
address: BOOK_MANAGER,
abi: bookManagerAbi,
functionName: 'getVault',
args: [currencyAddress], // Currency as address
});
BookIds
BookIds are deterministically computed from a BookKey. Use the subgraph or BookManager to query active books:
// Query BookId from BookManager
const bookId = await publicClient.readContract({
address: BOOK_MANAGER,
abi: bookManagerAbi,
functionName: 'getBookId',
args: [bookKey],
});
See Query subgraph for how to fetch books and their IDs via GraphQL.