Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
moved sanity check
Browse files Browse the repository at this point in the history
  • Loading branch information
dd0sxx committed Dec 5, 2023
1 parent 257f7cf commit 5802509
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/token-voting/ERC721TokenholderActionCreator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ contract ERC721TokenholderActionCreator is TokenholderActionCreator {
TokenholderActionCreator(llamaCore, _creationThreshold)
{
TOKEN = token;
if (!TOKEN.supportsInterface(type(IERC721).interfaceId)) revert InvalidTokenAddress();
uint256 totalSupply = TOKEN.getPastTotalSupply(block.timestamp - 1);
if (totalSupply == 0) revert InvalidTokenAddress();
if (_creationThreshold > totalSupply) revert InvalidCreationThreshold();
if (!TOKEN.supportsInterface(type(IERC721).interfaceId)) revert InvalidTokenAddress();
}

function _getPastVotes(address account, uint256 timestamp) internal view virtual override returns (uint256) {
Expand Down

0 comments on commit 5802509

Please sign in to comment.