Skip to content

Commit c2b87d7

Browse files
committed
fix: TokenOptionAllocation payment should come from grantee instead of recipient
1 parent 9bee73f commit c2b87d7

2 files changed

Lines changed: 427 additions & 4 deletions

File tree

src/TokenOptionAllocation.sol

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ contract TokenOptionAllocation is BaseAllocation {
1212
uint256 public shortStopDuration;
1313
uint256 public shortStopTime;
1414

15-
event MetaVesT_TokenOptionExercised(address indexed _grantee, address indexed _recipient, uint256 _tokensToExercise, uint256 _paymentAmount);
15+
event MetaVesT_TokenOptionExercised(address indexed _grantee, uint256 _tokensToExercise, uint256 _paymentAmount);
1616

1717
/// @notice Constructor to create a TokenOptionAllocation
1818
/// @param _grantee - address of the grantee
@@ -143,10 +143,9 @@ contract TokenOptionAllocation is BaseAllocation {
143143
uint256 paymentAmount = getPaymentAmount(_tokensToExercise);
144144
if(paymentAmount == 0) revert MetaVesT_TooSmallAmount();
145145

146-
address recipient = getRecipient();
147-
safeTransferFrom(paymentToken, recipient, getAuthority(), paymentAmount);
146+
safeTransferFrom(paymentToken, grantee, getAuthority(), paymentAmount);
148147
tokensExercised += _tokensToExercise;
149-
emit MetaVesT_TokenOptionExercised(grantee, recipient, _tokensToExercise, paymentAmount);
148+
emit MetaVesT_TokenOptionExercised(grantee, _tokensToExercise, paymentAmount);
150149
}
151150

152151
/// @notice Allows the controller to terminate the TokenOptionAllocation

0 commit comments

Comments
 (0)