diff --git a/contracts/FluidGrants.sol b/contracts/FluidGrants.sol index a5900b7..7da60a7 100644 --- a/contracts/FluidGrants.sol +++ b/contracts/FluidGrants.sol @@ -173,7 +173,6 @@ contract FluidGrants { }); hasSubmittedToGrant[_grantId][msg.sender] = true; isProjectInGrant[_grantId][projectId] = true; - token.connectPool(pool); emit ProjectSubmitted( projectId, _grantId, @@ -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); + } }