Skip to content

Commit

Permalink
MockLBTCTokenPool takes destPoolData as an arg
Browse files Browse the repository at this point in the history
  • Loading branch information
rstout committed Dec 10, 2024
1 parent 45163de commit d7051cf
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 13 deletions.
15 changes: 9 additions & 6 deletions contracts/src/v0.8/ccip/test/mocks/MockLBTCTokenPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ contract MockLBTCTokenPool is TokenPool, ITypeAndVersion {

string public constant override typeAndVersion = "MockLBTCTokenPool 1.5.1";

bytes public destPoolData;

constructor(
IERC20 token,
address[] memory allowlist,
address rmnProxy,
address router
address router,
bytes memory _data
) TokenPool(token, 8, allowlist, rmnProxy, router) {

destPoolData = _data;
}

/// @notice Burn the token in the pool
Expand All @@ -32,10 +35,10 @@ contract MockLBTCTokenPool is TokenPool, ITypeAndVersion {
function lockOrBurn(
Pool.LockOrBurnInV1 calldata lockOrBurnIn
) public virtual override returns (Pool.LockOrBurnOutV1 memory) {
bytes memory payload;
bytes memory destPoolData;
payload = abi.encodePacked(hex"1234abcd");
destPoolData = abi.encode(sha256(payload));
// bytes memory payload;
// bytes memory destPoolData;
// payload = abi.encodePacked(hex"1234abcd");
// destPoolData = abi.encode(sha256(payload));

IBurnMintERC20(address(i_token)).burn(lockOrBurnIn.amount);
emit Burned(msg.sender, lockOrBurnIn.amount);
Expand Down
Loading

0 comments on commit d7051cf

Please sign in to comment.