Skip to content

Commit

Permalink
fix broken integration tests from removing critical setup function
Browse files Browse the repository at this point in the history
  • Loading branch information
jhweintraub committed Nov 25, 2024
1 parent 9088cfa commit 687746d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions contracts/src/v0.8/ccip/pools/TokenPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
}

Expand Down
7 changes: 6 additions & 1 deletion integration-tests/ccip-tests/contracts/contract_models.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 687746d

Please sign in to comment.