Skip to content

Commit

Permalink
gda pool permission check
Browse files Browse the repository at this point in the history
  • Loading branch information
hellwolf committed Aug 19, 2024
1 parent 0ed2d5c commit 0ae00ad
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,8 @@ contract GeneralDistributionAgreementV1 is AgreementBase, TokenMonad, IGeneralDi

newCtx = ctx;

if (_isPool(token, address(pool)) == false) {
if (pool.superToken() != token ||
_isPool(token, address(pool)) == false) {
revert GDA_ONLY_SUPER_TOKEN_POOL();
}

Expand Down Expand Up @@ -485,7 +486,8 @@ contract GeneralDistributionAgreementV1 is AgreementBase, TokenMonad, IGeneralDi
int96 requestedFlowRate,
bytes calldata ctx
) external override returns (bytes memory newCtx) {
if (_isPool(token, address(pool)) == false) {
if (pool.superToken() != token ||
_isPool(token, address(pool)) == false) {
revert GDA_ONLY_SUPER_TOKEN_POOL();
}
if (requestedFlowRate < 0) {
Expand Down

0 comments on commit 0ae00ad

Please sign in to comment.