From e248ec44c1b01fe4a050658704bd96da9e749b58 Mon Sep 17 00:00:00 2001 From: Balamurali Gopalswami Date: Mon, 9 Dec 2024 10:41:41 -0500 Subject: [PATCH] Update mock lbtc token pool contract to mint token --- contracts/src/v0.8/ccip/test/mocks/MockLBTCTokenPool.sol | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/contracts/src/v0.8/ccip/test/mocks/MockLBTCTokenPool.sol b/contracts/src/v0.8/ccip/test/mocks/MockLBTCTokenPool.sol index dd0f5ae826..86a676cf0a 100644 --- a/contracts/src/v0.8/ccip/test/mocks/MockLBTCTokenPool.sol +++ b/contracts/src/v0.8/ccip/test/mocks/MockLBTCTokenPool.sol @@ -2,6 +2,7 @@ pragma solidity 0.8.24; import {ITypeAndVersion} from "../../../shared/interfaces/ITypeAndVersion.sol"; +import {IBurnMintERC20} from "../../../shared/token/ERC20/IBurnMintERC20.sol"; import {Pool} from "../../libraries/Pool.sol"; import {TokenPool} from "../../pools/TokenPool.sol"; @@ -51,6 +52,12 @@ contract MockLBTCTokenPool is TokenPool, ITypeAndVersion { // TODO: validate releaseOrMintIn.offchainTokenData? + // Calculate the local amount + uint256 localAmount = + _calculateLocalAmount(releaseOrMintIn.amount, _parseRemoteDecimals(releaseOrMintIn.sourcePoolData)); + // Mint to the receiver + IBurnMintERC20(address(i_token)).mint(releaseOrMintIn.receiver, localAmount); + emit Minted( msg.sender, releaseOrMintIn.receiver,