Skip to content

Commit

Permalink
Merge pull request #56 from immutable/fix/typo
Browse files Browse the repository at this point in the history
Fix typo
  • Loading branch information
ermyas authored Nov 24, 2023
2 parents 7b0e82f + fcb01ed commit 1e81ee7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/child/ChildERC20Bridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ contract ChildERC20Bridge is
mapping(address => address) public rootTokenToChildToken;

/// @dev Role identifier for those who can directly deposit native IMX to the bridge.
bytes32 public constant PREVILEGED_DEPOSITOR_ROLE = keccak256("PREVILEGED_DEPOSITOR");
bytes32 public constant PRIVILEGED_DEPOSITOR_ROLE = keccak256("PRIVILEGED_DEPOSITOR");

bytes32 public constant MAP_TOKEN_SIG = keccak256("MAP_TOKEN");
bytes32 public constant DEPOSIT_SIG = keccak256("DEPOSIT");
Expand Down Expand Up @@ -114,8 +114,8 @@ contract ChildERC20Bridge is
_grantRole(PAUSER_ROLE, newRoles.pauser);
_grantRole(UNPAUSER_ROLE, newRoles.unpauser);
_grantRole(ADAPTOR_MANAGER_ROLE, newRoles.adaptorManager);
_grantRole(PREVILEGED_DEPOSITOR_ROLE, newRoles.initialDepositor);
_grantRole(PREVILEGED_DEPOSITOR_ROLE, newRoles.treasuryManager);
_grantRole(PRIVILEGED_DEPOSITOR_ROLE, newRoles.initialDepositor);
_grantRole(PRIVILEGED_DEPOSITOR_ROLE, newRoles.treasuryManager);

childTokenTemplate = newChildTokenTemplate;
childBridgeAdaptor = IChildBridgeAdaptor(newBridgeAdaptor);
Expand Down Expand Up @@ -152,7 +152,7 @@ contract ChildERC20Bridge is
/**
* @inheritdoc IChildERC20Bridge
*/
function privilegedDeposit() external payable onlyRole(PREVILEGED_DEPOSITOR_ROLE) {
function privilegedDeposit() external payable onlyRole(PRIVILEGED_DEPOSITOR_ROLE) {
if (msg.value == 0) {
revert ZeroValue();
}
Expand Down
6 changes: 3 additions & 3 deletions src/interfaces/child/IChildERC20Bridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ interface IChildERC20Bridge {
address pauser; // The address which will inherit `PAUSER_ROLE`.
address unpauser; // The address which will inherit `UNPAUSER_ROLE`.
address adaptorManager; // The address which will inherit `ADAPTOR_MANAGER_ROLE`.
address initialDepositor; // The address which will inherit `PREVILEGED_DEPOSITOR_ROLE`.
address treasuryManager; // The address which will inherit `PREVILEGED_DEPOSITOR_ROLE`.
address initialDepositor; // The address which will inherit `PRIVILEGED_DEPOSITOR_ROLE`.
address treasuryManager; // The address which will inherit `PRIVILEGED_DEPOSITOR_ROLE`.
}

/**
* @notice Deposit native IMX to the child chain bridge contract.
* @dev This function can only be called by callers who have the PREVILEGED_DEPOSITOR_ROLE.
* @dev This function can only be called by callers who have the PRIVILEGED_DEPOSITOR_ROLE.
*/
function privilegedDeposit() external payable;

Expand Down
2 changes: 1 addition & 1 deletion test/unit/child/ChildERC20Bridge.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ contract ChildERC20BridgeUnitTest is Test, IChildERC20BridgeEvents, IChildERC20B
}

function test_RevertsIf_privilegedDepositCalledFromNonTreasuryManager() public {
bytes32 role = childBridge.PREVILEGED_DEPOSITOR_ROLE();
bytes32 role = childBridge.PRIVILEGED_DEPOSITOR_ROLE();
vm.expectRevert(
abi.encodePacked(
"AccessControl: account ",
Expand Down

0 comments on commit 1e81ee7

Please sign in to comment.