From 687746dd8f80de8eb517b66b9afa491d785890be Mon Sep 17 00:00:00 2001 From: Josh Date: Mon, 25 Nov 2024 11:41:25 -0500 Subject: [PATCH] fix broken integration tests from removing critical setup function --- contracts/src/v0.8/ccip/pools/TokenPool.sol | 4 ++-- integration-tests/ccip-tests/contracts/contract_models.go | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/contracts/src/v0.8/ccip/pools/TokenPool.sol b/contracts/src/v0.8/ccip/pools/TokenPool.sol index bf0ba4bfc57..c79aef2f323 100644 --- a/contracts/src/v0.8/ccip/pools/TokenPool.sol +++ b/contracts/src/v0.8/ccip/pools/TokenPool.sol @@ -517,8 +517,8 @@ abstract contract TokenPool is IPoolV1, Ownable2StepMsgSender { ) external { if (msg.sender != s_rateLimitAdmin && msg.sender != owner()) revert Unauthorized(msg.sender); - for (uint256 x = 0; x < remoteChainSelectors.length; x++) { - _setRateLimitConfig(remoteChainSelectors[x], outboundConfigs[x], inboundConfigs[x]); + for (uint256 i = 0; i < remoteChainSelectors.length; ++i) { + _setRateLimitConfig(remoteChainSelectors[i], outboundConfigs[i], inboundConfigs[i]); } } diff --git a/integration-tests/ccip-tests/contracts/contract_models.go b/integration-tests/ccip-tests/contracts/contract_models.go index 376f70192d2..257670dbaa1 100644 --- a/integration-tests/ccip-tests/contracts/contract_models.go +++ b/integration-tests/ccip-tests/contracts/contract_models.go @@ -503,8 +503,13 @@ func (w TokenPoolWrapper) ApplyChainUpdates(opts *bind.TransactOpts, update []to } func (w TokenPoolWrapper) SetChainRateLimiterConfig(opts *bind.TransactOpts, selector uint64, out token_pool.RateLimiterConfig, in token_pool.RateLimiterConfig) (*types.Transaction, error) { + if w.Latest != nil && w.Latest.PoolInterface != nil { - return w.Latest.PoolInterface.SetChainRateLimiterConfig(opts, selector, out, in) + selectors := []uint64{selector} + out := []token_pool.RateLimiterConfig{out} + in := []token_pool.RateLimiterConfig{in} + + return w.Latest.PoolInterface.SetChainRateLimiterConfigs(opts, selectors, out, in) } if w.V1_4_0 != nil && w.V1_4_0.PoolInterface != nil { return w.V1_4_0.PoolInterface.SetChainRateLimiterConfig(opts, selector,