Skip to content

Commit

Permalink
Move MockArbSys to test/util/mock/
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongeric committed Oct 3, 2024
1 parent 518f4aa commit 8d03b1b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
19 changes: 1 addition & 18 deletions test/base/BlockNumberish.t.sol
Original file line number Diff line number Diff line change
@@ -1,24 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.0;

import {Test} from "forge-std/Test.sol";
import {MockArbSys} from "../util/mock/MockArbSys.sol";
import {BlockNumberish} from "../../src/base/BlockNumberish.sol";

/// Mock Arbitrum syscall contract
contract MockArbSys {
uint256 _blockNumber;

/// @dev helper function to set the block number
function setBlockNumber(uint256 blockNumber) external {
_blockNumber = blockNumber;
}

/// @notice returns the block number
function arbBlockNumber() external view returns (uint256) {
return _blockNumber;
}
}

contract MockBlockNumberish is BlockNumberish {
function getBlockNumberish() external view returns (uint256) {
return _getBlockNumberish();
Expand Down
17 changes: 17 additions & 0 deletions test/util/mock/MockArbSys.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.0;

/// Mock Arbitrum syscall contract
contract MockArbSys {
uint256 _blockNumber;

/// @dev helper function to set the block number
function setBlockNumber(uint256 blockNumber) external {
_blockNumber = blockNumber;
}

/// @notice returns the block number
function arbBlockNumber() external view returns (uint256) {
return _blockNumber;
}
}

0 comments on commit 8d03b1b

Please sign in to comment.