Function: assertPoolRebalancer()
assertPoolRebalancer(
operation:string,chain:EVMChain,poolAddress:string,sender:string):Promise<void>
Defined in: cct/evm/token-pool/contracts.ts:656
Pre-flights sender against the pool's on-chain getRebalancer() for a liquidity write, the
rebalancer-gated counterpart of assertPoolOwner.
Parameters
| Parameter | Type | Description |
|---|---|---|
operation | string | Operation name, for the error's operation field. |
chain | EVMChain | Chain to read the rebalancer from. |
poolAddress | string | Token pool being written to. |
sender | string | The address the tx will be sent from; compared checksummed. |
Returns
Promise<void>
Remarks
Deliberately not the owner: provideLiquidity and withdrawLiquidity compare
msg.sender to s_rebalancer and revert Unauthorized for everyone else, the owner included.
The owner's role is to appoint the rebalancer, not to move liquidity itself.
Throws
CCTParamsInvalidError if sender is not the pool's rebalancer, or no
rebalancer is configured