/
LegacyERC20MNT.sol
96 lines (87 loc) · 3.06 KB
/
LegacyERC20MNT.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// SPDX-License-Identifier: MIT
pragma solidity 0.8.15;
import { Predeploys } from "../libraries/Predeploys.sol";
import { OptimismMintableERC20 } from "../universal/OptimismMintableERC20.sol";
/**
* @custom:legacy
* @custom:proxied
* @custom:predeploy 0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000
* @title LegacyERC20MNT
* @notice LegacyERC20MNT is a legacy contract that held MNT balances before the Bedrock upgrade.
* All MNT balances held within this contract were migrated to the state trie as part of
* the Bedrock upgrade. Functions within this contract that mutate state were already
* disabled as part of the EVM equivalence upgrade.
*/
contract LegacyERC20MNT is OptimismMintableERC20 {
/**
* @notice Initializes the contract as an Optimism Mintable ERC20.
*/
constructor(address _l1mnt)
OptimismMintableERC20(Predeploys.L2_STANDARD_BRIDGE, _l1mnt, "Mantle Token", "MNT")
{}
/**
* @notice Returns the ETH balance of the target account. Overrides the base behavior of the
* contract to preserve the invariant that the balance within this contract always
* matches the balance in the state trie.
*
* @param _who Address of the account to query.
*
* @return The ETH balance of the target account.
*/
function balanceOf(address _who) public view virtual override returns (uint256) {
return address(_who).balance;
}
/**
* @custom:blocked
* @notice Mints some amount of ETH.
*/
function mint(address, uint256) public virtual override {
revert("LegacyERC20MNT: mint is disabled");
}
/**
* @custom:blocked
* @notice Burns some amount of ETH.
*/
function burn(address, uint256) public virtual override {
revert("LegacyERC20MNT: burn is disabled");
}
/**
* @custom:blocked
* @notice Transfers some amount of ETH.
*/
function transfer(address, uint256) public virtual override returns (bool) {
revert("LegacyERC20MNT: transfer is disabled");
}
/**
* @custom:blocked
* @notice Approves a spender to spend some amount of ETH.
*/
function approve(address, uint256) public virtual override returns (bool) {
revert("LegacyERC20MNT: approve is disabled");
}
/**
* @custom:blocked
* @notice Transfers funds from some sender account.
*/
function transferFrom(
address,
address,
uint256
) public virtual override returns (bool) {
revert("LegacyERC20MNT: transferFrom is disabled");
}
/**
* @custom:blocked
* @notice Increases the allowance of a spender.
*/
function increaseAllowance(address, uint256) public virtual override returns (bool) {
revert("LegacyERC20MNT: increaseAllowance is disabled");
}
/**
* @custom:blocked
* @notice Decreases the allowance of a spender.
*/
function decreaseAllowance(address, uint256) public virtual override returns (bool) {
revert("LegacyERC20MNT: decreaseAllowance is disabled");
}
}