Skip to content

Commit d0d9d7f

Browse files
committed
eoa cant subscribe
1 parent ea5f9ec commit d0d9d7f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/position-managers/PositionManager.notifier.t.sol

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,20 @@ contract PositionManagerNotifierTest is Test, PosmTestSetup, GasSnapshot {
292292
lpm.unsubscribe(tokenId, config, ZERO_BYTES);
293293
}
294294

295+
function test_subscribe_revertsOnEOA() public {
296+
uint256 tokenId = lpm.nextTokenId();
297+
address subEOA = makeAddr("SUBSCRIBER");
298+
mint(config, 100e18, alice, ZERO_BYTES);
299+
300+
// approve this contract to operate on alices liq
301+
vm.startPrank(alice);
302+
lpm.approve(address(this), tokenId);
303+
vm.stopPrank();
304+
305+
vm.expectRevert();
306+
lpm.subscribe(tokenId, config, subEOA, ZERO_BYTES);
307+
}
308+
295309
function test_subscribe_withData() public {
296310
uint256 tokenId = lpm.nextTokenId();
297311
mint(config, 100e18, alice, ZERO_BYTES);

0 commit comments

Comments
 (0)