Skip to content

Build a contract that lets me lock my erc-20 tokens somewhere.

Course: Bridges - chapter 2

Call the function BridgeETH (BridgeETH.sol)

$1b

Also create an ERC20 token that you create that you need to lock (USDT.sol)

// SPDX-License-Identifier: UNLICENSED
pragma 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);
}
}

Write tests for it (BridgeETH.t.sol)

$1d