Skip to content

Commit

Permalink
eoa cant subscribe
Browse files Browse the repository at this point in the history
  • Loading branch information
snreynolds committed Aug 5, 2024
1 parent ea5f9ec commit d0d9d7f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/position-managers/PositionManager.notifier.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,20 @@ contract PositionManagerNotifierTest is Test, PosmTestSetup, GasSnapshot {
lpm.unsubscribe(tokenId, config, ZERO_BYTES);
}

function test_subscribe_revertsOnEOA() public {
uint256 tokenId = lpm.nextTokenId();
address subEOA = makeAddr("SUBSCRIBER");
mint(config, 100e18, alice, ZERO_BYTES);

// approve this contract to operate on alices liq
vm.startPrank(alice);
lpm.approve(address(this), tokenId);
vm.stopPrank();

vm.expectRevert();
lpm.subscribe(tokenId, config, subEOA, ZERO_BYTES);
}

function test_subscribe_withData() public {
uint256 tokenId = lpm.nextTokenId();
mint(config, 100e18, alice, ZERO_BYTES);
Expand Down

0 comments on commit d0d9d7f

Please sign in to comment.