SeaDropMintPublicationAction

Git Source

Inherits: HubRestricted, IPublicationActionModule

State Variables

MAX_BPS

uint256 constant MAX_BPS = 10_000;

SEADROP

ISeaDrop public immutable SEADROP;

WMATIC

IWMATIC public immutable WMATIC;

MODULE_REGISTRY

IModuleRegistry public immutable MODULE_REGISTRY;

_collectionDataByPub

mapping(uint256 profileId => mapping(uint256 pubId => CollectionData collectionData)) internal _collectionDataByPub;

lensSeaDropCollectionImpl

address public lensSeaDropCollectionImpl;

Functions

constructor

constructor(address hub, address moduleRegistry, address seaDrop, address wmatic) HubRestricted(hub);

deploySeaDropCollection

function deploySeaDropCollection(
    address owner,
    string memory name,
    string memory symbol,
    ERC721SeaDropStructsErrorsAndEvents.MultiConfigureStruct calldata config
) external returns (address);

setLensSeaDropCollectionImpl

function setLensSeaDropCollectionImpl(address newLensSeaDropCollectionImpl) external;

initializePublicationAction

function initializePublicationAction(uint256 profileId, uint256 pubId, address, bytes calldata data)
    external
    override
    onlyHub
    returns (bytes memory);

receive

receive() external payable;

withdrawToTreasury

function withdrawToTreasury(address currency) external;

processPublicationAction

function processPublicationAction(Types.ProcessActionParams calldata processActionParams)
    external
    override
    onlyHub
    returns (bytes memory);

rescaleFees

function rescaleFees(uint256 profileId, uint256 pubId) public;

_rescaleFees

function _rescaleFees(uint256 profileId, uint256 pubId, uint16 lensTreasuryFeeBps, PublicDrop memory publicDrop)
    internal;

_distributeFees

function _distributeFees(
    uint256 feesToDistribute,
    uint256 mintPaymentAmount,
    address lensTreasuryAddress,
    CollectionData memory collectionData,
    Types.ProcessActionParams calldata processActionParams
) internal;

_validateFees

function _validateFees(PublicDrop memory publicDrop, uint16 lensTreasuryFeeBps, uint16 referrersFeeBps) internal pure;

_validateFeesAndRescaleThemIfNecessary

function _validateFeesAndRescaleThemIfNecessary(
    uint256 profileId,
    uint256 pubId,
    PublicDrop memory publicDrop,
    uint16 lensTreasuryFeeBps,
    uint16 referrersFeeBps
) internal;

Events

SeaDropPublicationFeesRescaled

event SeaDropPublicationFeesRescaled(uint256 profileId, uint256 pubId, uint16 referrersFeeBps);

LensSeaDropCollectionDeployed

event LensSeaDropCollectionDeployed(
    address collectionAddress,
    address owner,
    string name,
    string symbol,
    ERC721SeaDropStructsErrorsAndEvents.MultiConfigureStruct config
);

Errors

WrongMintPaymentAmount

error WrongMintPaymentAmount();

SeaDropFeesNotReceived

error SeaDropFeesNotReceived();

ActionModuleNotAllowedAsPayer

error ActionModuleNotAllowedAsPayer();

ActionModuleNotAllowedAsFeeRecipient

error ActionModuleNotAllowedAsFeeRecipient();

MintPriceExceedsExpectedOne

error MintPriceExceedsExpectedOne();

NotEnoughFeesSet

error NotEnoughFeesSet();

Unauthorized

error Unauthorized();

Structs

CollectionData

struct CollectionData {
    address nftCollectionAddress;
    uint16 referrersFeeBps;
}