Source mirror · commit 369512f · 2026-10-26 · MIT · canonical repo: gitlab.com/jiapunk/upgrade-airlock
git clone https://upgrade-airlock.pages.dev/source/upgrade-airlock.git
upgrade-airlock / src / attack / EvilMintImpl.sol
src/attack/EvilMintImpl.sol13 lines · 446 bytes
1// SPDX-License-Identifier: MIT
2pragma solidity 0.8.37;
3
4import {DemoBTC} from "../DemoBTC.sol";
5
6/// @title EvilMintImpl (demo attack, threat T1)
7/// @notice Same selectors as DemoBTC v1, but `mint` has no access control: anyone can mint.
8/// @dev Deliberately malicious demo code. Never deploy outside a demo.
9contract EvilMintImpl is DemoBTC {
10 function mint(address to, uint256 amount) public override {
11 _mint(to, amount);
12 }
13}