Skip to content

Commit

Permalink
Address 236 notes (#344)
Browse files Browse the repository at this point in the history
  • Loading branch information
arr00 authored Nov 29, 2023
1 parent 7ce8ad6 commit 200ea6f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
5 changes: 2 additions & 3 deletions contracts/crowdfund/ETHCrowdfundBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "../utils/LibSafeCast.sol";
import "../party/Party.sol";
import "../gatekeepers/IGateKeeper.sol";

contract ETHCrowdfundBase is Implementation {
abstract contract ETHCrowdfundBase is Implementation {
using LibRawResult for bytes;
using LibSafeCast for uint256;
using LibAddress for address payable;
Expand Down Expand Up @@ -135,8 +135,7 @@ contract ETHCrowdfundBase is Implementation {
_GLOBALS = globals;
}

// Initialize storage for proxy contracts, credit initial contribution (if
// any), and setup gatekeeper.
// Initialize storage for proxy contract
function _initialize(ETHCrowdfundOptions memory opts) internal {
// Set the minimum and maximum contribution amounts.
if (opts.minContribution > opts.maxContribution) {
Expand Down
12 changes: 6 additions & 6 deletions contracts/signature-validators/OffChainSignatureValidator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ contract OffChainSignatureValidator is IERC1271 {
error InsufficientVotingPower();
error MessageHashMismatch();

/// @notice Event emmitted when signing threshold updated
/// @notice Event emitted when signing threshold updated
event SigningThresholdBpsSet(
Party indexed party,
uint96 oldThresholdBps,
uint96 newThresholdBps
);

/// @notice Mapping of party to signing threshold BPS
mapping(Party party => uint96 thresholdBps) public signingThersholdBps;
mapping(Party party => uint96 thresholdBps) public signingThresholdBps;

/// @notice Validate an off-chain signature
/// @dev This function requires `signature` to be a valid EOA signature from a member in the
Expand Down Expand Up @@ -63,12 +63,12 @@ contract OffChainSignatureValidator is IERC1271 {
) * 10000;

if (signerVotingPowerBps == 0 && party.balanceOf(signer) == 0) {
// Must own a party card or be delegatated voting power
// Must own a party card or be delegated voting power
revert NotMemberOfParty();
}

uint96 totalVotingPower = party.getGovernanceValues().totalVotingPower;
uint96 thresholdBps = signingThersholdBps[party];
uint96 thresholdBps = signingThresholdBps[party];

// Either threshold is 0 or signer votes above threshold
if (
Expand All @@ -86,7 +86,7 @@ contract OffChainSignatureValidator is IERC1271 {
/// @param thresholdBps The new threshold BPS
function setSigningThresholdBps(uint96 thresholdBps) external {
Party party = Party(payable(msg.sender));
emit SigningThresholdBpsSet(party, signingThersholdBps[party], thresholdBps);
signingThersholdBps[party] = thresholdBps;
emit SigningThresholdBpsSet(party, signingThresholdBps[party], thresholdBps);
signingThresholdBps[party] = thresholdBps;
}
}

0 comments on commit 200ea6f

Please sign in to comment.