Skip to content

Commit 02af9de

Browse files
committed
chore: pass portal as an argument
1 parent 31426f4 commit 02af9de

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/MToken.sol

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,15 @@ contract MToken is IMToken, ContinuousIndexing, ERC20Extended, Migratable {
6767
/**
6868
* @notice Constructs the M Token contract.
6969
* @dev Sets immutable storage.
70-
* @param registrar_ The address of the Registrar contract.
70+
* @param registrar_ The address of the Registrar contract.
71+
* @param portal_ The address of the Portal contract.
7172
* @param migrationAdmin_ The address of a migration admin.
7273
*/
73-
constructor(address registrar_, address migrationAdmin_) ContinuousIndexing() ERC20Extended("M by M^0", "M", 6) {
74+
constructor(address registrar_, address portal_, address migrationAdmin_) ContinuousIndexing() ERC20Extended("M by M^0", "M", 6) {
7475
_disableInitializers();
7576

7677
if ((registrar = registrar_) == address(0)) revert ZeroRegistrar();
77-
if ((portal = RegistrarReader.getPortal(registrar_)) == address(0)) revert ZeroPortal();
78+
if ((portal = portal_) == address(0)) revert ZeroPortal();
7879
if ((migrationAdmin = migrationAdmin_) == address(0)) revert ZeroMigrationAdmin();
7980
}
8081

0 commit comments

Comments
 (0)