Code
Course: Bridges - chapter 7
BridgeBase.sol
Section titled “BridgeBase.sol”$1bBridgeETH.sol
Section titled “BridgeETH.sol”$1dBUSDT.sol
Section titled “BUSDT.sol”// SPDX-License-Identifier: UNLICENSEDpragma solidity ^0.8.13;
import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";import { console } from "forge-std/console.sol";import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
contract BUSDT is ERC20, Ownable { constructor() ERC20("USDT", "USDT") Ownable(msg.sender) {
}
function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); }
function burn(address _from, uint256 _amount) public onlyOwner { _burn(_from, _amount); }
}USDT.sol
Section titled “USDT.sol”// SPDX-License-Identifier: UNLICENSEDpragma solidity ^0.8.13;
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";import { console } from "forge-std/console.sol";import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
contract USDT is ERC20, Ownable { constructor() ERC20("USDT", "USDT") Ownable(msg.sender) {
}
function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); }}Assignment
Section titled “Assignment”Find the vulnerability in here