mirror of
https://github.com/vacp2p/minime.git
synced 2026-01-08 21:17:56 -05:00
* chore: add missing trailing slash in remapping This was not causing any compilation issues, but the solidity language server gets confused by this and complains about incorrect import statements otherwise. * TokenController interactions after balance updates This test demonstrates that all transfer methods are vulnerable to callback reentrancy attacks if the controller of the `MiniMeToken` is malicious. --------- Co-authored-by: r4bbit <445106+0x-r4bbit@users.noreply.github.com>
18 lines
422 B
Solidity
18 lines
422 B
Solidity
// SPDX-License-Identifier: GPL-3.0
|
|
pragma solidity ^0.8.0;
|
|
|
|
import { MiniMeToken } from "../../contracts/MiniMeToken.sol";
|
|
|
|
contract AttackAccount {
|
|
address public owner = msg.sender;
|
|
MiniMeToken public token;
|
|
|
|
constructor(MiniMeToken _token) {
|
|
token = _token;
|
|
}
|
|
|
|
function attack(address _from, address _to, uint256 _amount) external {
|
|
token.transferFrom(_from, _to, _amount);
|
|
}
|
|
}
|