Skip to content

Commit

Permalink
added: claim grant manually, since connect is not possible via contract
Browse files Browse the repository at this point in the history
  • Loading branch information
Salmandabbakuti committed Sep 23, 2024
1 parent 340a0bb commit 26806e3
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion contracts/FluidGrants.sol
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ contract FluidGrants {
});
hasSubmittedToGrant[_grantId][msg.sender] = true;
isProjectInGrant[_grantId][projectId] = true;
token.connectPool(pool);
emit ProjectSubmitted(
projectId,
_grantId,
Expand Down Expand Up @@ -209,4 +208,19 @@ contract FluidGrants {
token.updateMemberUnits(pool, project.walletAddress, _votes);
emit ProjectVoted(_projectId, _grantId, _votes, msg.sender);
}

function claimGrant(uint256 _grantId) external {
Grant memory grant = grants[_grantId];
require(
hasSubmittedToGrant[_grantId][msg.sender],
"You have not submitted a project to this grant"
);
require(
block.timestamp >= grant.judgingEndsAt,
"Grant projects judging is not over"
);
ISuperToken token = grant.distributionToken;
ISuperfluidPool pool = grant.pool;
token.claimAll(pool, msg.sender);
}
}

0 comments on commit 26806e3

Please sign in to comment.