Skip to content

Commit

Permalink
fix natspec
Browse files Browse the repository at this point in the history
  • Loading branch information
dcbuild3r committed Sep 7, 2023
1 parent 5a1f325 commit 52f2c77
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
6 changes: 4 additions & 2 deletions src/PolygonStateBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@ contract PolygonStateBridge is FxBaseRootTunnel, Ownable2Step {
/// @notice Emitted when an attempt is made to renounce ownership.
error CannotRenounceOwnership();

/// @notice Emitted when an attempt is made to set the FxChildTunnel to the zero address.
/// @notice Emitted when an attempt is made to set the FxBaseRootTunnel,
/// FxChildTunnel, CheckpointManager or WorldIDIdentityManager addresses to the zero address.
error AddressZero();

/// @notice Emitted when an attempt is made to set the FxChildTunnel when it has already been set.
/// @notice Emitted when an attempt is made to set the FxBaseRootTunnel's
/// fxChildTunnel when it has already been set.
error FxBaseRootChildTunnelAlreadySet();

///////////////////////////////////////////////////////////////////
Expand Down
6 changes: 4 additions & 2 deletions src/PolygonWorldID.sol
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ contract PolygonWorldID is WorldIDBridge, FxBaseChildTunnel, Ownable2Step {
/// @notice Emitted when an attempt is made to renounce ownership.
error CannotRenounceOwnership();

/// @notice Emitted when an attempt is made to set the FxChildTunnel to the zero address.
/// @notice Emitted when an attempt is made to set the FxBaseChildTunnel or
/// the FxRoot Tunnel to the zero address.
error AddressZero();

/// @notice Emitted when an attempt is made to set the FxChildTunnel when it has already been set.
/// @notice Emitted when an attempt is made to set the FxBaseChildTunnel's
/// fxRootTunnel when it has already been set.
error FxBaseChildRootTunnelAlreadySet();

///////////////////////////////////////////////////////////////////////////////
Expand Down
5 changes: 3 additions & 2 deletions src/test/PolygonStateBridge.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ contract PolygonStateBridgeTest is PRBTest, StdCheats {
/// @notice Emitted when an attempt is made to set the FxChildTunnel to the zero address.
error AddressZero();

/// @notice Emitted when an attempt is made to set the FxChildTunnel when it has already been set.
/// @notice Emitted when an attempt is made to set the FxBaseRootTunnel's
/// fxChildTunnel when it has already been set.
error FxBaseRootChildTunnelAlreadySet();

function setUp() public {
Expand Down Expand Up @@ -196,7 +197,7 @@ contract PolygonStateBridgeTest is PRBTest, StdCheats {
polygonStateBridge.setFxChildTunnel(address(0));
}

/// @notice tests that the FxChildTunnel can't be set once it has already been set
/// @notice tests that the FxBaseRootTunnel's fxChildTunnel can't be set once it has already been set
function test_cannotSetFxChildTunnelMoreThanOnce_reverts(address _fxChildTunnel) public {
vm.assume(_fxChildTunnel != address(0));

Expand Down
5 changes: 3 additions & 2 deletions src/test/PolygonWorldID.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ contract PolygonWorldIDTest is PRBTest, StdCheats {
/// @notice Thrown when setFxRootTunnel is called for the first time
event SetFxRootTunnel(address fxRootTunnel);

/// @notice Emitted when an attempt is made to set the FxChildTunnel when it has already been set.
/// @notice Emitted when an attempt is made to set the FxBaseChildTunnel's
/// fxRootTunnel when it has already been set.
error FxBaseChildRootTunnelAlreadySet();

function setUp() public {
Expand Down Expand Up @@ -111,7 +112,7 @@ contract PolygonWorldIDTest is PRBTest, StdCheats {
new PolygonWorldID(treeDepth, address(0));
}

/// @notice tests that the FxRootTunnel can't be set once it has already been set
/// @notice tests that the FxBaseChildTunnel's fxRootTunnel can't be set once it has already been set
function test_cannotSetFxRootTunnelMoreThanOnce_reverts(address _fxRootTunnel) public {
vm.assume(_fxRootTunnel != address(0));

Expand Down

0 comments on commit 52f2c77

Please sign in to comment.