From c433b367c80387e08899193a98082c7905336bfa Mon Sep 17 00:00:00 2001 From: Balamurali Gopalswami Date: Thu, 12 Dec 2024 11:21:27 -0500 Subject: [PATCH] Rens review comment --- .../src/v0.8/ccip/test/mocks/MockLBTCTokenPool.sol | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/contracts/src/v0.8/ccip/test/mocks/MockLBTCTokenPool.sol b/contracts/src/v0.8/ccip/test/mocks/MockLBTCTokenPool.sol index 57df72e224..11a48a7c6f 100644 --- a/contracts/src/v0.8/ccip/test/mocks/MockLBTCTokenPool.sol +++ b/contracts/src/v0.8/ccip/test/mocks/MockLBTCTokenPool.sol @@ -10,23 +10,25 @@ import {TokenPool} from "../../pools/TokenPool.sol"; import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; import {SafeERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/utils/SafeERC20.sol"; -/// @notice This pool mints and burns LBTC tokens through the Cross Chain Transfer -/// Protocol (CCTP). +/// @notice This mock contract facilitates testing of LBTC token transfers by burning and minting tokens. contract MockLBTCTokenPool is TokenPool, ITypeAndVersion { using SafeERC20 for IERC20; string public constant override typeAndVersion = "MockLBTCTokenPool 1.5.1"; - bytes public destPoolData; + // This variable i_destPoolData will have either a 32-byte or non-32-byte value, which will change the off-chain behavior. + // If it is 32 bytes, the off-chain will consider it as attestation enabled and call the attestation API. + // If it is non-32 bytes, the off-chain will consider it as attestation disabled. + bytes public immutable i_destPoolData; constructor( IERC20 token, address[] memory allowlist, address rmnProxy, address router, - bytes memory _data + bytes memory destPoolData ) TokenPool(token, 8, allowlist, rmnProxy, router) { - destPoolData = _data; + i_destPoolData = destPoolData; } function lockOrBurn( @@ -40,7 +42,7 @@ contract MockLBTCTokenPool is TokenPool, ITypeAndVersion { destTokenAddress: getRemoteToken( lockOrBurnIn.remoteChainSelector ), - destPoolData: destPoolData + destPoolData: i_destPoolData }); }