Getting the State
The state of the Merkle tree: relayer and contract
Get Pool Contract State
async getPoolState(index?: bigint): Promise<TreeState>Parameters
Returns
Example
const poolState = await zkClient.getPoolState();
console.log(`The pool contract actual state: ${poolState.root} @ ${poolState.index}`);
// output: The pool contract actual state:
// 20259123668790783065614334268308370728058669663334716067122266810210516357394 @ 533760Get Relayer State
Returns
Example
Get Relayer Optimistic State
Returns
Example
Last updated
Was this helpful?