Skip to content

Commit

Permalink
fix: PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JGcarv committed Jun 6, 2024
1 parent b30ccce commit 89bc643
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions contracts/Migrator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ contract Migrator is IMigrator {
bool public override active;

constructor(address globals_, address oldToken_, address newToken_, uint256 scalar_) {
require(IERC20Like(newToken_).decimals() == IERC20Like(oldToken_).decimals(), "M:C:DECIMAL_MISMATCH");
require(scalar_ > 0, "M:C:ZERO_SCALAR");

globals = globals_;
require(IERC20Like(newToken_).decimals() == IERC20Like(oldToken_).decimals(), "M:C:DECIMAL_MISMATCH");

globals = globals_;
oldToken = oldToken_;
newToken = newToken_;

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IMigrator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface IMigrator {
function active() external view returns (bool active_);

/**
* @dev Gets the Maple Globals address
* @dev Gets the Maple Globals address.
* @param globals_ The address of the Maple globals.
*/
function globals() external view returns (address globals_);
Expand Down
6 changes: 3 additions & 3 deletions tests/Migrator.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ contract MigratorConstructorTest is Test {

function test_constructor_zeroScalar() external {
vm.expectRevert("M:C:ZERO_SCALAR");
new Migrator(address(0), address(0), 0);
new Migrator(address(0), address(0), address(0), 0);
}

function test_constructor_mismatch_decimals() external {
Expand Down Expand Up @@ -43,7 +43,7 @@ contract MigratorConstructorTest is Test {
contract SetActiveTests is Test {

uint256 internal constant SCALAR = 10;
uint256 internal constant OLD_SUPPLY = 10_000_000 ether;
uint256 internal constant OLD_SUPPLY = 10_000_000e18;

address operationalAdmin = makeAddr("operationalAdmin");
address governor = makeAddr("governor");
Expand Down Expand Up @@ -342,7 +342,7 @@ contract MigratorTest is Test {

contract TokenSplitScalars is Test {

uint256 internal constant OLD_SUPPLY = 10_000_000 ether;
uint256 internal constant OLD_SUPPLY = 10_000_000e18;

address operationalAdmin = makeAddr("operationalAdmin");
address account = makeAddr("account");
Expand Down

0 comments on commit 89bc643

Please sign in to comment.