11// SPDX-License-Identifier: MIT
22pragma solidity 0.8.25 ;
3+ import {console} from "forge-std/console.sol " ;
34
45import {ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol " ;
6+ import {IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol " ;
57import {Create2} from "@openzeppelin/contracts/utils/Create2.sol " ;
68
79import {IL2ToL2CrossDomainMessenger} from "@contracts-bedrock-interfaces/L2/IL2ToL2CrossDomainMessenger.sol " ;
@@ -15,7 +17,7 @@ contract PhantomSuperchainERC20 is ERC20 {
1517 uint256 public homeChainId;
1618
1719 /// @notice the ERC20 token of this phantom representation
18- ERC20 public erc20;
20+ IERC20 public erc20;
1921
2022 /// @dev The messenger predeploy to handle message passing
2123 IL2ToL2CrossDomainMessenger internal messenger =
@@ -24,7 +26,7 @@ contract PhantomSuperchainERC20 is ERC20 {
2426 /// @notice The constructor
2527 /// @param _homeChainId The chain the ERC20 lives on
2628 /// @param _erc20 The ERC20 token this phantom representation is based on
27- constructor (uint256 _homeChainId , ERC20 _erc20 ) ERC20 (_erc20. name (), _erc20. symbol () ) {
29+ constructor (uint256 _homeChainId , IERC20 _erc20 ) ERC20 ("" , "" ) {
2830
2931 // By asserting the deployer is used, we obtain safety that
3032 // 1. This contract was deterministically created based on the constructor args
@@ -35,13 +37,6 @@ contract PhantomSuperchainERC20 is ERC20 {
3537 erc20 = _erc20;
3638 }
3739
38- /// @notice Get the decimals of the ERC20. Defined since decimal specification requires
39- /// overloading as a non-constructor argument.
40- /// @return The decimals of the ERC20
41- function decimals () public view override returns (uint8 ) {
42- return erc20.decimals ();
43- }
44-
4540 /// @notice Transfer the Phantom ERC20
4641 /// @param _to The recipient
4742 /// @param _amount The amount
0 commit comments