Skip to content

Commit

Permalink
Update mock lbtc token pool contract to mint token
Browse files Browse the repository at this point in the history
  • Loading branch information
b-gopalswami committed Dec 9, 2024
1 parent af828af commit e248ec4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions contracts/src/v0.8/ccip/test/mocks/MockLBTCTokenPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit e248ec4

Please sign in to comment.