Skip to main content

ICCIPTokenPoolConfigProposalChecker

Git Source

Title: ICCIPTokenPoolConfigProposalChecker

The interface of the read-only checker that the CCIP bridge activation proposal calls as its first action. The checker is bound at construction to the contracts the proposal acts on and asserts, at execution time, that the live state still matches the state the proposal was built against: the precondition of every handover action the proposal includes, the end state of every handover action it does not include, the absence of every route it opens, and the minimum backing of the pool. It holds no role and changes no state; the first expectation that does not hold reverts with a named error, which fails the whole proposal before any handover action runs.

The pool is an Ownable2Step without a getter of its pending owner, so the precondition of the ownership acceptance is narrowed to the current owner: a pending owner repointed after the build is not detected here and surfaces at the acceptance action instead.

Functions​

check​

Asserts the expectations against the live state and returns normally when every one of them holds. Intended to be the first action of the CCIP bridge activation proposal, so that a precondition that no longer holds at execution fails the proposal with a named error before any handover action runs; callable by anyone at any time, since it reads only.

The checks run in the order of the proposal actions, after the bindings that every action relies on (both policies active in the Kernel, the Kernel reporting the bound ROLES module, the bound pool registered for OHM, the OCG timelock holding admin), and the first failing one reverts. The pool owner is compared with the expected one only: the pool exposes no read of its pending owner.

function check(Expectations calldata expectations_) external view;

Parameters

NameTypeDescription
expectations_ExpectationsThe expectations of the proposal build.

Errors​

CCIPTokenPoolConfigProposalChecker_ZeroAddress​

Thrown when a constructor argument is the zero address.

error CCIPTokenPoolConfigProposalChecker_ZeroAddress(string parameter);

Parameters

NameTypeDescription
parameterstringThe name of the argument.

CCIPTokenPoolConfigProposalChecker_BindingMismatch​

Thrown when a constructor argument is not bound to another one the way the proposal requires, or when the Kernel no longer reports the bound ROLES module at check time.

error CCIPTokenPoolConfigProposalChecker_BindingMismatch(
string binding,
address actual,
address expected
);

Parameters

NameTypeDescription
bindingstringThe name of the binding.
actualaddressThe value the bound contract reports.
expectedaddressThe bound value it was compared with.

CCIPTokenPoolConfigProposalChecker_NotLiquidityContainer​

Thrown when the config policy reports that the pool is not a liquidity container, so the pool has no rebalancer to check.

error CCIPTokenPoolConfigProposalChecker_NotLiquidityContainer(address pool);

Parameters

NameTypeDescription
pooladdressThe pool.

CCIPTokenPoolConfigProposalChecker_PolicyNotActive​

Thrown when a policy is not active in the Kernel.

error CCIPTokenPoolConfigProposalChecker_PolicyNotActive(address policy);

Parameters

NameTypeDescription
policyaddressThe policy.

CCIPTokenPoolConfigProposalChecker_RegisteredPoolMismatch​

Thrown when the pool registered for OHM in the TokenAdminRegistry is not the bound pool.

error CCIPTokenPoolConfigProposalChecker_RegisteredPoolMismatch(
address registered,
address expected
);

Parameters

NameTypeDescription
registeredaddressThe registered pool.
expectedaddressThe bound pool.

CCIPTokenPoolConfigProposalChecker_MissingRole​

Thrown when an account does not hold a required role.

error CCIPTokenPoolConfigProposalChecker_MissingRole(bytes32 role, address account);

Parameters

NameTypeDescription
rolebytes32The role.
accountaddressThe account.

CCIPTokenPoolConfigProposalChecker_OhmAdministratorMismatch​

Thrown when the OHM administrator position in the TokenAdminRegistry does not match the expectation: the OCG timelock is not the pending administrator while the acceptance is included, or is not the administrator while it is not.

error CCIPTokenPoolConfigProposalChecker_OhmAdministratorMismatch(
address administrator,
address pendingAdministrator,
bool acceptIncluded
);

Parameters

NameTypeDescription
administratoraddressThe administrator read.
pendingAdministratoraddressThe pending administrator read.
acceptIncludedboolWhether the acceptance is included in the proposal.

CCIPTokenPoolConfigProposalChecker_BridgeAdminRoleMismatch​

Thrown when the DAO MS holds bridge_admin while the grant is included, or lacks it while the grant is not.

error CCIPTokenPoolConfigProposalChecker_BridgeAdminRoleMismatch(bool held, bool grantIncluded);

Parameters

NameTypeDescription
heldboolWhether the DAO MS holds the role.
grantIncludedboolWhether the grant is included in the proposal.

CCIPTokenPoolConfigProposalChecker_ConfigEnabledMismatch​

Thrown when the config policy is enabled while its enable is included, or disabled while it is not.

error CCIPTokenPoolConfigProposalChecker_ConfigEnabledMismatch(
bool enabled,
bool enableIncluded
);

Parameters

NameTypeDescription
enabledboolWhether the config policy is enabled.
enableIncludedboolWhether the enable is included in the proposal.

CCIPTokenPoolConfigProposalChecker_PoolOwnerMismatch​

Thrown when the pool owner is not the expected one: the DAO MS while the ownership acceptance is included, the config policy while it is not.

error CCIPTokenPoolConfigProposalChecker_PoolOwnerMismatch(address owner, address expected);

Parameters

NameTypeDescription
owneraddressThe pool owner read.
expectedaddressThe expected owner.

CCIPTokenPoolConfigProposalChecker_ConfigOperatorMismatch​

Thrown when the config operator of the config policy is the config timelock while the rotation is included, or is not while the rotation is not.

error CCIPTokenPoolConfigProposalChecker_ConfigOperatorMismatch(
address configOperator,
address desired,
bool setIncluded
);

Parameters

NameTypeDescription
configOperatoraddressThe config operator read.
desiredaddressThe config timelock.
setIncludedboolWhether the rotation is included in the proposal.

CCIPTokenPoolConfigProposalChecker_RebalancerMismatch​

Thrown when the pool rebalancer equals the desired one while the setter is included, or differs from it while the setter is not.

error CCIPTokenPoolConfigProposalChecker_RebalancerMismatch(
address rebalancer,
address desired,
bool setIncluded
);

Parameters

NameTypeDescription
rebalanceraddressThe rebalancer read.
desiredaddressThe desired rebalancer.
setIncludedboolWhether the setter is included in the proposal.

CCIPTokenPoolConfigProposalChecker_RateLimitAdminMismatch​

Thrown when the native rate limit admin of the pool equals the desired one while the setter is included, or differs from it while the setter is not.

error CCIPTokenPoolConfigProposalChecker_RateLimitAdminMismatch(
address rateLimitAdmin,
address desired,
bool setIncluded
);

Parameters

NameTypeDescription
rateLimitAdminaddressThe rate limit admin read.
desiredaddressThe desired rate limit admin.
setIncludedboolWhether the setter is included in the proposal.

CCIPTokenPoolConfigProposalChecker_TimelockEnabledMismatch​

Thrown when the config timelock is enabled while its enable is included, or disabled while it is not.

error CCIPTokenPoolConfigProposalChecker_TimelockEnabledMismatch(
bool enabled,
bool enableIncluded
);

Parameters

NameTypeDescription
enabledboolWhether the config timelock is enabled.
enableIncludedboolWhether the enable is included in the proposal.

CCIPTokenPoolConfigProposalChecker_RouteAlreadyExists​

Thrown when the pool already supports a route the proposal opens.

error CCIPTokenPoolConfigProposalChecker_RouteAlreadyExists(uint64 chainSelector);

Parameters

NameTypeDescription
chainSelectoruint64The chain selector of the route.

CCIPTokenPoolConfigProposalChecker_BackingTooLow​

Thrown when the pool holds less OHM than the minimum backing.

error CCIPTokenPoolConfigProposalChecker_BackingTooLow(uint256 balance, uint256 minimum);

Parameters

NameTypeDescription
balanceuint256The OHM balance of the pool, in OHM base units.
minimumuint256The minimum backing, in OHM base units.

Structs​

Expectations​

The expectations of one proposal build. Each bool says whether the proposal includes the handover action of the same name; the checker asserts the precondition the action needs when it is included and the end state the action leaves when it is not.

struct Expectations {
bool acceptAdminRole;
bool grantBridgeAdmin;
bool enableConfig;
bool acceptPoolOwnership;
bool setConfigOperator;
bool setRebalancer;
bool setRateLimitAdmin;
bool enableTimelock;
address rebalancer;
address rateLimitAdmin;
uint64[] routesToAdd;
uint256 minimumPoolBacking;
}

Properties

NameTypeDescription
acceptAdminRoleboolThe OCG timelock is the pending OHM administrator in the
TokenAdminRegistry when true, the OHM administrator otherwise.
grantBridgeAdminboolThe DAO MS does not hold bridge_admin when true, holds it
otherwise.
enableConfigboolThe config policy is disabled when true, enabled otherwise.
acceptPoolOwnershipboolThe DAO MS owns the pool when true, the config policy
otherwise.
setConfigOperatorboolThe config operator of the config policy differs from the
config timelock when true, is the config timelock otherwise.
setRebalancerboolThe pool rebalancer differs from rebalancer when true,
equals it otherwise.
setRateLimitAdminboolThe native rate limit admin of the pool differs from
rateLimitAdmin when true, equals it otherwise.
enableTimelockboolThe config timelock is disabled when true, enabled otherwise.
rebalanceraddressThe desired pool rebalancer.
rateLimitAdminaddressThe desired native rate limit admin of the pool.
routesToAdduint64[]The chain selectors of the routes the proposal opens, none of
which the pool supports.
minimumPoolBackinguint256The OHM balance the pool holds at least, in OHM base units.