mirror of
https://github.com/lens-protocol/core.git
synced 2026-01-09 14:18:04 -05:00
misc: Some TODOs solved
This commit is contained in:
@@ -478,7 +478,6 @@ contract FollowNFT is HubRestricted, LensBaseERC721, ERC2981CollectionRoyalties,
|
||||
return 0; // Already following
|
||||
}
|
||||
|
||||
// TODO: try storage and see if it optimizes better (with via-IR probably not)
|
||||
Types.TokenData memory tokenData = StorageLib.getTokenData(followTokenId);
|
||||
|
||||
address followTokenOwner = tokenData.owner;
|
||||
|
||||
@@ -351,19 +351,6 @@ library Types {
|
||||
bytes actionModuleData;
|
||||
}
|
||||
|
||||
// TODO: Shouldn't this be in the modules Types?
|
||||
struct ProcessCollectParams {
|
||||
uint256 publicationCollectedProfileId;
|
||||
uint256 publicationCollectedId;
|
||||
uint256 collectorProfileId;
|
||||
address collectorProfileOwner;
|
||||
address transactionExecutor;
|
||||
uint256[] referrerProfileIds;
|
||||
uint256[] referrerPubIds;
|
||||
Types.PublicationType[] referrerPubTypes;
|
||||
bytes data;
|
||||
}
|
||||
|
||||
struct ProcessCommentParams {
|
||||
uint256 profileId;
|
||||
uint256 pubId;
|
||||
|
||||
@@ -33,23 +33,20 @@ contract ProfileCreationProxy is ImmutableOwnable {
|
||||
TOKEN_HANDLE_REGISTRY = ITokenHandleRegistry(tokenHandleRegistry);
|
||||
}
|
||||
|
||||
function proxyCreateProfile(Types.CreateProfileParams calldata createProfileParams)
|
||||
external
|
||||
onlyOwner
|
||||
returns (uint256)
|
||||
{
|
||||
function proxyCreateProfile(
|
||||
Types.CreateProfileParams calldata createProfileParams
|
||||
) external onlyOwner returns (uint256) {
|
||||
return ILensHub(LENS_HUB).createProfile(createProfileParams);
|
||||
}
|
||||
|
||||
function proxyCreateProfileWithHandle(Types.CreateProfileParams memory createProfileParams, string calldata handle)
|
||||
external
|
||||
onlyOwner
|
||||
returns (uint256, uint256)
|
||||
{
|
||||
function proxyCreateProfileWithHandle(
|
||||
Types.CreateProfileParams memory createProfileParams,
|
||||
string calldata handle
|
||||
) external onlyOwner returns (uint256, uint256) {
|
||||
// Check if LensHubV1 already has a profile with this handle that was not migrated yet:
|
||||
bytes32 handleHash = keccak256(bytes(string.concat(handle, '.lens')));
|
||||
if (LensV2Migration(LENS_HUB).getProfileIdByHandleHash(handleHash) != 0) {
|
||||
revert ProfileAlreadyExists(); // TODO: Should we move this to some Errors library? so we can test it easier
|
||||
revert ProfileAlreadyExists();
|
||||
}
|
||||
|
||||
// We mint the handle & profile to this contract first, then link it to the profile
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
pragma solidity ^0.8.18;
|
||||
|
||||
import {IPublicationActionModule} from 'contracts/interfaces/IPublicationActionModule.sol';
|
||||
import {ICollectModule} from 'contracts/interfaces/ICollectModule.sol';
|
||||
import {ICollectModule} from 'contracts/modules/interfaces/ICollectModule.sol';
|
||||
import {ICollectNFT} from 'contracts/interfaces/ICollectNFT.sol';
|
||||
import {Types} from 'contracts/libraries/constants/Types.sol';
|
||||
import {ModuleTypes} from 'contracts/modules/libraries/constants/ModuleTypes.sol';
|
||||
import {Clones} from '@openzeppelin/contracts/proxy/Clones.sol';
|
||||
import {Errors} from 'contracts/modules/constants/Errors.sol';
|
||||
import {HubRestricted} from 'contracts/base/HubRestricted.sol';
|
||||
@@ -190,7 +191,7 @@ contract CollectPublicationAction is LensModule, HubRestricted, IPublicationActi
|
||||
) private returns (bytes memory) {
|
||||
return
|
||||
ICollectModule(collectModule).processCollect(
|
||||
Types.ProcessCollectParams({
|
||||
ModuleTypes.ProcessCollectParams({
|
||||
publicationCollectedProfileId: processActionParams.publicationActedProfileId,
|
||||
publicationCollectedId: processActionParams.publicationActedId,
|
||||
collectorProfileId: processActionParams.actorProfileId,
|
||||
|
||||
@@ -7,8 +7,8 @@ import {BaseFeeCollectModule} from 'contracts/modules/act/collect/base/BaseFeeCo
|
||||
import {BaseProfilePublicationData, BaseFeeCollectModuleInitData} from 'contracts/modules/interfaces/IBaseFeeCollectModule.sol';
|
||||
import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';
|
||||
import {SafeERC20} from '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
|
||||
import {ICollectModule} from 'contracts/interfaces/ICollectModule.sol';
|
||||
import {Types} from 'contracts/libraries/constants/Types.sol';
|
||||
import {ICollectModule} from 'contracts/modules/interfaces/ICollectModule.sol';
|
||||
import {ModuleTypes} from 'contracts/modules/libraries/constants/ModuleTypes.sol';
|
||||
|
||||
struct RecipientData {
|
||||
address recipient;
|
||||
@@ -158,7 +158,7 @@ contract MultirecipientFeeCollectModule is BaseFeeCollectModule {
|
||||
* @inheritdoc BaseFeeCollectModule
|
||||
*/
|
||||
function _transferToRecipients(
|
||||
Types.ProcessCollectParams calldata processCollectParams,
|
||||
ModuleTypes.ProcessCollectParams calldata processCollectParams,
|
||||
address currency,
|
||||
uint256 amount
|
||||
) internal override {
|
||||
|
||||
@@ -3,7 +3,7 @@ pragma solidity ^0.8.10;
|
||||
|
||||
import {BaseFeeCollectModule} from 'contracts/modules/act/collect/base/BaseFeeCollectModule.sol';
|
||||
import {BaseFeeCollectModuleInitData, BaseProfilePublicationData} from 'contracts/modules/interfaces/IBaseFeeCollectModule.sol';
|
||||
import {ICollectModule} from 'contracts/interfaces/ICollectModule.sol';
|
||||
import {ICollectModule} from 'contracts/modules/interfaces/ICollectModule.sol';
|
||||
|
||||
/**
|
||||
* @title SimpleFeeCollectModule
|
||||
|
||||
@@ -4,10 +4,10 @@ pragma solidity ^0.8.10;
|
||||
|
||||
import {Errors} from 'contracts/modules/constants/Errors.sol';
|
||||
import {FeeModuleBase} from 'contracts/modules/FeeModuleBase.sol';
|
||||
import {ICollectModule} from 'contracts/interfaces/ICollectModule.sol';
|
||||
import {ICollectModule} from 'contracts/modules/interfaces/ICollectModule.sol';
|
||||
import {ActionRestricted} from 'contracts/modules/ActionRestricted.sol';
|
||||
|
||||
import {Types} from 'contracts/libraries/constants/Types.sol';
|
||||
import {ModuleTypes} from 'contracts/modules/libraries/constants/ModuleTypes.sol';
|
||||
|
||||
import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';
|
||||
import {IERC721} from '@openzeppelin/contracts/token/ERC721/IERC721.sol';
|
||||
@@ -49,10 +49,10 @@ abstract contract BaseFeeCollectModule is FeeModuleBase, ActionRestricted, IBase
|
||||
* 1. Validating that collect action meets all needed criteria
|
||||
* 2. Processing the collect action either with or without referral
|
||||
*
|
||||
* @param processCollectParams Collect action parameters (see Types.ProcessCollectParams struct)
|
||||
* @param processCollectParams Collect action parameters (see ModuleTypes.ProcessCollectParams struct)
|
||||
*/
|
||||
function processCollect(
|
||||
Types.ProcessCollectParams calldata processCollectParams
|
||||
ModuleTypes.ProcessCollectParams calldata processCollectParams
|
||||
) external virtual onlyActionModule returns (bytes memory) {
|
||||
_validateAndStoreCollect(processCollectParams);
|
||||
|
||||
@@ -74,7 +74,7 @@ abstract contract BaseFeeCollectModule is FeeModuleBase, ActionRestricted, IBase
|
||||
|
||||
/// @inheritdoc IBaseFeeCollectModule
|
||||
function calculateFee(
|
||||
Types.ProcessCollectParams calldata processCollectParams
|
||||
ModuleTypes.ProcessCollectParams calldata processCollectParams
|
||||
) public view virtual returns (uint160) {
|
||||
return
|
||||
_dataByPublicationByProfile[processCollectParams.publicationCollectedProfileId][
|
||||
@@ -135,7 +135,7 @@ abstract contract BaseFeeCollectModule is FeeModuleBase, ActionRestricted, IBase
|
||||
*
|
||||
* This should be called during processCollect()
|
||||
*/
|
||||
function _validateAndStoreCollect(Types.ProcessCollectParams calldata processCollectParams) internal virtual {
|
||||
function _validateAndStoreCollect(ModuleTypes.ProcessCollectParams calldata processCollectParams) internal virtual {
|
||||
uint96 collectsAfter = ++_dataByPublicationByProfile[processCollectParams.publicationCollectedProfileId][
|
||||
processCollectParams.publicationCollectedId
|
||||
].currentCollects;
|
||||
@@ -175,7 +175,7 @@ abstract contract BaseFeeCollectModule is FeeModuleBase, ActionRestricted, IBase
|
||||
*
|
||||
* @param processCollectParams Parameters of the collect
|
||||
*/
|
||||
function _processCollect(Types.ProcessCollectParams calldata processCollectParams) internal virtual {
|
||||
function _processCollect(ModuleTypes.ProcessCollectParams calldata processCollectParams) internal virtual {
|
||||
uint256 amount = calculateFee(processCollectParams);
|
||||
address currency = _dataByPublicationByProfile[processCollectParams.publicationCollectedProfileId][
|
||||
processCollectParams.publicationCollectedId
|
||||
@@ -203,7 +203,9 @@ abstract contract BaseFeeCollectModule is FeeModuleBase, ActionRestricted, IBase
|
||||
*
|
||||
* @param processCollectParams Parameters of the collect
|
||||
*/
|
||||
function _processCollectWithReferral(Types.ProcessCollectParams calldata processCollectParams) internal virtual {
|
||||
function _processCollectWithReferral(
|
||||
ModuleTypes.ProcessCollectParams calldata processCollectParams
|
||||
) internal virtual {
|
||||
uint256 amount = calculateFee(processCollectParams);
|
||||
address currency = _dataByPublicationByProfile[processCollectParams.publicationCollectedProfileId][
|
||||
processCollectParams.publicationCollectedId
|
||||
@@ -233,7 +235,7 @@ abstract contract BaseFeeCollectModule is FeeModuleBase, ActionRestricted, IBase
|
||||
* @param amount Amount to transfer to recipient(-s)
|
||||
*/
|
||||
function _transferToRecipients(
|
||||
Types.ProcessCollectParams calldata processCollectParams,
|
||||
ModuleTypes.ProcessCollectParams calldata processCollectParams,
|
||||
address currency,
|
||||
uint256 amount
|
||||
) internal virtual {
|
||||
@@ -256,7 +258,7 @@ abstract contract BaseFeeCollectModule is FeeModuleBase, ActionRestricted, IBase
|
||||
* @param amount Amount of the fee after subtracting the Treasury part.
|
||||
*/
|
||||
function _transferToReferrals(
|
||||
Types.ProcessCollectParams calldata processCollectParams,
|
||||
ModuleTypes.ProcessCollectParams calldata processCollectParams,
|
||||
address currency,
|
||||
uint256 amount
|
||||
) internal virtual returns (uint256) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity >=0.6.0;
|
||||
|
||||
import {ICollectModule} from 'contracts/interfaces/ICollectModule.sol';
|
||||
import {Types} from 'contracts/libraries/constants/Types.sol';
|
||||
import {ICollectModule} from 'contracts/modules/interfaces/ICollectModule.sol';
|
||||
import {ModuleTypes} from 'contracts/modules/libraries/constants/ModuleTypes.sol';
|
||||
|
||||
/**
|
||||
* @notice A struct containing the necessary data to execute collect actions on a publication.
|
||||
@@ -58,10 +58,10 @@ interface IBaseFeeCollectModule is ICollectModule {
|
||||
*
|
||||
* @return The BaseProfilePublicationData struct mapped to that publication.
|
||||
*/
|
||||
function getBasePublicationData(uint256 profileId, uint256 pubId)
|
||||
external
|
||||
view
|
||||
returns (BaseProfilePublicationData memory);
|
||||
function getBasePublicationData(
|
||||
uint256 profileId,
|
||||
uint256 pubId
|
||||
) external view returns (BaseProfilePublicationData memory);
|
||||
|
||||
/**
|
||||
* @notice Calculates and returns the collect fee of a publication.
|
||||
@@ -69,5 +69,7 @@ interface IBaseFeeCollectModule is ICollectModule {
|
||||
*
|
||||
* @return The collect fee of the specified publication.
|
||||
*/
|
||||
function calculateFee(Types.ProcessCollectParams calldata processCollectParams) external view returns (uint160);
|
||||
function calculateFee(
|
||||
ModuleTypes.ProcessCollectParams calldata processCollectParams
|
||||
) external view returns (uint160);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
pragma solidity >=0.6.0;
|
||||
|
||||
import {Types} from 'contracts/libraries/constants/Types.sol';
|
||||
import {ModuleTypes} from 'contracts/modules/libraries/constants/ModuleTypes.sol';
|
||||
|
||||
/**
|
||||
* @title ICollectModule
|
||||
@@ -44,5 +44,7 @@ interface ICollectModule {
|
||||
* @return bytes Any custom ABI-encoded data. This will be a LensHub event params that can be used by
|
||||
* indexers or UIs.
|
||||
*/
|
||||
function processCollect(Types.ProcessCollectParams calldata processCollectParams) external returns (bytes memory);
|
||||
function processCollect(
|
||||
ModuleTypes.ProcessCollectParams calldata processCollectParams
|
||||
) external returns (bytes memory);
|
||||
}
|
||||
25
contracts/modules/libraries/constants/ModuleTypes.sol
Normal file
25
contracts/modules/libraries/constants/ModuleTypes.sol
Normal file
@@ -0,0 +1,25 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
pragma solidity >=0.6.0;
|
||||
|
||||
import {Types} from 'contracts/libraries/constants/Types.sol';
|
||||
|
||||
/**
|
||||
* @title Types
|
||||
* @author Lens Protocol
|
||||
*
|
||||
* @notice A standard library of data types used throughout the Lens Protocol modules.
|
||||
*/
|
||||
library ModuleTypes {
|
||||
struct ProcessCollectParams {
|
||||
uint256 publicationCollectedProfileId;
|
||||
uint256 publicationCollectedId;
|
||||
uint256 collectorProfileId;
|
||||
address collectorProfileOwner;
|
||||
address transactionExecutor;
|
||||
uint256[] referrerProfileIds;
|
||||
uint256[] referrerPubIds;
|
||||
Types.PublicationType[] referrerPubTypes;
|
||||
bytes data;
|
||||
}
|
||||
}
|
||||
@@ -294,7 +294,6 @@ contract LensHandles is ERC721, ERC2981CollectionRoyalties, ImmutableOwnable, IL
|
||||
|
||||
function _beforeRoyaltiesSet(uint256 /* royaltiesInBasisPoints */) internal view override {
|
||||
if (msg.sender != OWNER) {
|
||||
// TODO: test this - and decide if we want a separate/shared governance here instead
|
||||
revert OnlyOwner();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,26 +24,6 @@ contract TokenHandleRegistry is ITokenHandleRegistry {
|
||||
bytes32 constant EIP712_DOMAIN_VERSION_HASH = keccak256(bytes(EIP712_DOMAIN_VERSION));
|
||||
bytes4 internal constant EIP1271_MAGIC_VALUE = 0x1626ba7e;
|
||||
|
||||
/**
|
||||
* @dev We store the domain separator and TokenHandleRegistry Proxy address as constants to save gas.
|
||||
*
|
||||
* keccak256(
|
||||
* abi.encode(
|
||||
* keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'),
|
||||
* keccak256('TokenHandleRegistry'), // Contract Name
|
||||
* keccak256('1'), // Version Hash
|
||||
* 137, // Polygon Chain ID
|
||||
* address(0) // TODO: Verifying Contract Address - TokenHandleRegistry proxy Address
|
||||
* )
|
||||
* );
|
||||
*/
|
||||
bytes32 constant TOKEN_HANDLE_REGISTRY_CACHED_POLYGON_DOMAIN_SEPARATOR =
|
||||
0xbf9544cf7d7a0338fc4f071be35409a61e51e9caef559305410ad74e16a05f2d; // TODO: Find out the deployment address
|
||||
|
||||
address constant TOKEN_HANDLE_REGISTRY_ADDRESS = address(0); // TODO: Find out the deployment address
|
||||
|
||||
uint256 constant POLYGON_CHAIN_ID = 137;
|
||||
|
||||
// First version of TokenHandleRegistry only works with Lens Profiles and .lens namespace.
|
||||
address immutable LENS_HUB;
|
||||
address immutable LENS_HANDLES;
|
||||
@@ -186,9 +166,6 @@ contract TokenHandleRegistry is ITokenHandleRegistry {
|
||||
}
|
||||
|
||||
function calculateDomainSeparator() internal view returns (bytes32) {
|
||||
if (address(this) == TOKEN_HANDLE_REGISTRY_ADDRESS && block.chainid == POLYGON_CHAIN_ID) {
|
||||
return TOKEN_HANDLE_REGISTRY_CACHED_POLYGON_DOMAIN_SEPARATOR;
|
||||
}
|
||||
return
|
||||
keccak256(
|
||||
abi.encode(
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
pragma solidity ^0.8.15;
|
||||
|
||||
import {ICollectModule} from 'contracts/interfaces/ICollectModule.sol';
|
||||
import {Types} from 'contracts/libraries/constants/Types.sol';
|
||||
import {ICollectModule} from 'contracts/modules/interfaces/ICollectModule.sol';
|
||||
import {ModuleTypes} from 'contracts/modules/libraries/constants/ModuleTypes.sol';
|
||||
import {MockModule} from 'test/mocks/MockModule.sol';
|
||||
|
||||
/**
|
||||
@@ -36,7 +36,7 @@ contract MockCollectModule is MockModule, ICollectModule {
|
||||
* 1. Ensuring the collector is a follower, if needed
|
||||
*/
|
||||
function processCollect(
|
||||
Types.ProcessCollectParams calldata processCollectParams
|
||||
ModuleTypes.ProcessCollectParams calldata processCollectParams
|
||||
) external pure override returns (bytes memory) {
|
||||
return _decodeFlagAndRevertIfFalse(processCollectParams.data);
|
||||
}
|
||||
|
||||
@@ -2,11 +2,10 @@
|
||||
pragma solidity ^0.8.19;
|
||||
|
||||
import 'test/base/BaseTest.t.sol';
|
||||
import {ICollectModule} from 'contracts/interfaces/ICollectModule.sol';
|
||||
import {ICollectModule} from 'contracts/modules/interfaces/ICollectModule.sol';
|
||||
import {CollectPublicationAction} from 'contracts/modules/act/collect/CollectPublicationAction.sol';
|
||||
import {CollectNFT} from 'contracts/modules/act/collect/CollectNFT.sol';
|
||||
import {MockCollectModule} from 'test/mocks/MockCollectModule.sol';
|
||||
import {Events} from 'contracts/libraries/constants/Events.sol';
|
||||
import {Strings} from '@openzeppelin/contracts/utils/Strings.sol';
|
||||
|
||||
contract CollectPublicationActionTest is BaseTest {
|
||||
|
||||
@@ -4,6 +4,7 @@ pragma solidity ^0.8.10;
|
||||
import {BaseFeeCollectModuleBase} from 'test/modules/act/collect/BaseFeeCollectModule.base.t.sol';
|
||||
import {IBaseFeeCollectModule, BaseProfilePublicationData} from 'contracts/modules/interfaces/IBaseFeeCollectModule.sol';
|
||||
import {Types} from 'contracts/libraries/constants/Types.sol';
|
||||
import {ModuleTypes} from 'contracts/modules/libraries/constants/ModuleTypes.sol';
|
||||
import {Errors as ModuleErrors} from 'contracts/modules/constants/Errors.sol';
|
||||
import {Errors} from 'contracts/libraries/constants/Errors.sol';
|
||||
import {MockCurrency} from 'test/mocks/MockCurrency.sol';
|
||||
@@ -188,7 +189,7 @@ contract BaseFeeCollectModule_ProcessCollect is BaseFeeCollectModuleBase {
|
||||
|
||||
vm.prank(nonActionModule);
|
||||
IBaseFeeCollectModule(baseFeeCollectModule).processCollect(
|
||||
Types.ProcessCollectParams({
|
||||
ModuleTypes.ProcessCollectParams({
|
||||
publicationCollectedProfileId: publicationCollectedProfileId,
|
||||
publicationCollectedId: publicationCollectedId,
|
||||
collectorProfileId: collectorProfileId,
|
||||
@@ -233,7 +234,7 @@ contract BaseFeeCollectModule_ProcessCollect is BaseFeeCollectModuleBase {
|
||||
|
||||
vm.prank(address(collectPublicationAction));
|
||||
IBaseFeeCollectModule(baseFeeCollectModule).processCollect(
|
||||
Types.ProcessCollectParams({
|
||||
ModuleTypes.ProcessCollectParams({
|
||||
publicationCollectedProfileId: profileId,
|
||||
publicationCollectedId: pubId,
|
||||
collectorProfileId: collectorProfileId,
|
||||
@@ -279,7 +280,7 @@ contract BaseFeeCollectModule_ProcessCollect is BaseFeeCollectModuleBase {
|
||||
|
||||
vm.prank(address(collectPublicationAction));
|
||||
IBaseFeeCollectModule(baseFeeCollectModule).processCollect(
|
||||
Types.ProcessCollectParams({
|
||||
ModuleTypes.ProcessCollectParams({
|
||||
publicationCollectedProfileId: profileId,
|
||||
publicationCollectedId: pubId,
|
||||
collectorProfileId: collectorProfileId,
|
||||
@@ -322,7 +323,7 @@ contract BaseFeeCollectModule_ProcessCollect is BaseFeeCollectModuleBase {
|
||||
|
||||
vm.prank(address(collectPublicationAction));
|
||||
IBaseFeeCollectModule(baseFeeCollectModule).processCollect(
|
||||
Types.ProcessCollectParams({
|
||||
ModuleTypes.ProcessCollectParams({
|
||||
publicationCollectedProfileId: profileId,
|
||||
publicationCollectedId: pubId,
|
||||
collectorProfileId: notFollowerProfileId,
|
||||
@@ -366,7 +367,7 @@ contract BaseFeeCollectModule_ProcessCollect is BaseFeeCollectModuleBase {
|
||||
vm.startPrank(collectPublicationAction);
|
||||
vm.expectRevert(ModuleErrors.CollectExpired.selector);
|
||||
IBaseFeeCollectModule(baseFeeCollectModule).processCollect(
|
||||
Types.ProcessCollectParams({
|
||||
ModuleTypes.ProcessCollectParams({
|
||||
publicationCollectedProfileId: profileId,
|
||||
publicationCollectedId: pubId,
|
||||
collectorProfileId: collectorProfileId,
|
||||
@@ -410,7 +411,7 @@ contract BaseFeeCollectModule_ProcessCollect is BaseFeeCollectModuleBase {
|
||||
for (uint256 i = 0; i < exampleInitData.collectLimit; i++) {
|
||||
vm.prank(collectPublicationAction);
|
||||
IBaseFeeCollectModule(baseFeeCollectModule).processCollect(
|
||||
Types.ProcessCollectParams({
|
||||
ModuleTypes.ProcessCollectParams({
|
||||
publicationCollectedProfileId: profileId,
|
||||
publicationCollectedId: pubId,
|
||||
collectorProfileId: collectorProfileId,
|
||||
@@ -427,7 +428,7 @@ contract BaseFeeCollectModule_ProcessCollect is BaseFeeCollectModuleBase {
|
||||
vm.expectRevert(ModuleErrors.MintLimitExceeded.selector);
|
||||
vm.prank(collectPublicationAction);
|
||||
IBaseFeeCollectModule(baseFeeCollectModule).processCollect(
|
||||
Types.ProcessCollectParams({
|
||||
ModuleTypes.ProcessCollectParams({
|
||||
publicationCollectedProfileId: profileId,
|
||||
publicationCollectedId: pubId,
|
||||
collectorProfileId: collectorProfileId,
|
||||
@@ -505,7 +506,7 @@ contract BaseFeeCollectModule_ProcessCollect is BaseFeeCollectModuleBase {
|
||||
|
||||
vm.prank(collectPublicationAction);
|
||||
IBaseFeeCollectModule(baseFeeCollectModule).processCollect(
|
||||
Types.ProcessCollectParams({
|
||||
ModuleTypes.ProcessCollectParams({
|
||||
publicationCollectedProfileId: profileId,
|
||||
publicationCollectedId: pubId,
|
||||
collectorProfileId: collectorProfileId,
|
||||
@@ -551,7 +552,7 @@ contract BaseFeeCollectModule_ProcessCollect is BaseFeeCollectModuleBase {
|
||||
for (uint256 collects = 1; collects < 5; collects++) {
|
||||
vm.prank(collectPublicationAction);
|
||||
IBaseFeeCollectModule(baseFeeCollectModule).processCollect(
|
||||
Types.ProcessCollectParams({
|
||||
ModuleTypes.ProcessCollectParams({
|
||||
publicationCollectedProfileId: profileId,
|
||||
publicationCollectedId: pubId,
|
||||
collectorProfileId: collectorProfileId,
|
||||
@@ -656,7 +657,7 @@ contract BaseFeeCollectModule_FeeDistribution is BaseFeeCollectModuleBase {
|
||||
|
||||
vm.prank(collectPublicationAction);
|
||||
IBaseFeeCollectModule(baseFeeCollectModule).processCollect(
|
||||
Types.ProcessCollectParams({
|
||||
ModuleTypes.ProcessCollectParams({
|
||||
publicationCollectedProfileId: profileId,
|
||||
publicationCollectedId: pubId,
|
||||
collectorProfileId: collectorProfileId,
|
||||
|
||||
@@ -8,6 +8,7 @@ import {BaseFeeCollectModule_Initialization, BaseFeeCollectModule_ProcessCollect
|
||||
import {BaseFeeCollectModuleBase} from 'test/modules/act/collect/BaseFeeCollectModule.base.t.sol';
|
||||
import {Errors as ModuleErrors} from 'contracts/modules/constants/Errors.sol';
|
||||
import {Types} from 'contracts/libraries/constants/Types.sol';
|
||||
import {ModuleTypes} from 'contracts/modules/libraries/constants/ModuleTypes.sol';
|
||||
|
||||
/////////
|
||||
// Publication Creation with InheritedFeeCollectModule
|
||||
@@ -519,7 +520,7 @@ contract MultirecipientCollectModule_FeeDistribution is MultirecipientCollectMod
|
||||
balancesBefore.collector = currency.balanceOf(collectorProfileOwner);
|
||||
vm.prank(collectPublicationAction);
|
||||
IBaseFeeCollectModule(baseFeeCollectModule).processCollect(
|
||||
Types.ProcessCollectParams({
|
||||
ModuleTypes.ProcessCollectParams({
|
||||
publicationCollectedProfileId: 1,
|
||||
publicationCollectedId: 1,
|
||||
collectorProfileId: collectorProfileId,
|
||||
|
||||
Reference in New Issue
Block a user