Skip to main content

MoxiePassVerifier.sol

This contract allows developers to verify ownership of Moxie Pass. Access to set the ERC721 contract address of Moxie Pass is only allowed by the owner.

Functions

setErc721ContractAddress

Sets the address of the ERC-721 contract. This function can only be called by the contract owner.

function setErc721ContractAddress(
address _erc721ContractAddress
) public onlyOwner

Parameters

NameTypeDescription
_erc721ContractAddressaddressThe address of the ERC-721 contract to be set.

isMoxiePassHolder

Checks if the caller is a Moxie Pass holder.

function isMoxiePassHolder(address _address) external view returns (bool)

Parameters

NameTypeDescription
_addressaddressThe address to check if it is a Moxie Pass holder.

Return Values

NameTypeDescription
isMoxiePassHolderboolA boolean indicating whether the address is a Moxie Pass holder.

isAllowed

Checks if the specified user is allowed to perform an action in the given auction. The function is a view function and does not modify state. It returns a bytes4 selector indicating whether the action is allowed.

function isAllowed(
address user,
uint256 auctionId,
bytes calldata /*callData*/
) external view returns (bytes4)

Parameters

NameTypeDescription
useraddressThe address of the user whose permission is being checked.
auctionIduint256The ID of the auction in which the action is to be performed.
callDatabytesThe calldata of the function that the user is trying to call in the auction.

Return Values

NameTypeDescription
retbytesA bytes4 selector indicating whether the user is allowed to perform the action in the auction.

Errors

MoxiePassVerifier_NotaMoxiePassHolder

The operation failed because the address does not hold the moxie pass

error MoxiePassVerifier_NotaMoxiePassHolder();