Using poolId
To interface with a pool, you will need its poolId, which is its unique identifier in BEX (32 bytes in length).
Example:
- A pool might have an id
0x5c6ee304399dbdb9c8ef030ab642b10820db8f56000200000000000000000014 - The first 20-bytes of the
poolIdrepresent the pool’s address0x5c6ee304399dbdb9c8ef030ab642b10820db8f56
Obtaining poolId
You can get a poolId from:
- The pool details page on Bera Hub:
/pools/<poolId>/details/ - The SDK
- Calling
getPoolId()on the pool contract itself if you already have it
Common pool interfaces
Pool balances (Vault)
The Vault can be queried for a particular pool’s token balances usinggetPoolTokens.
For example, calling: