fix: Updated mock modules and reverted unnecessary variable silencing change.

This commit is contained in:
Peter Michael
2022-09-02 16:04:32 +01:00
parent 8fc8c5037a
commit b124b621df
8 changed files with 36 additions and 32 deletions

View File

@@ -94,7 +94,8 @@ contract FollowNFT is LensNFTBase, IFollowNFT {
)
),
delegator,
sig
sig,
false // TODO: Use a different implementation.
);
}
_delegate(delegator, delegatee);

View File

@@ -74,7 +74,7 @@ abstract contract LensNFTBase is ERC721Enumerable, ILensNFTBase {
),
owner,
sig,
false
false // TODO: Use a different implementation.
);
}
_approve(spender, tokenId);
@@ -104,7 +104,7 @@ abstract contract LensNFTBase is ERC721Enumerable, ILensNFTBase {
),
owner,
sig,
false
false // TODO: Use a different implementation.
);
}
_setOperatorApproval(owner, operator, approved);
@@ -142,7 +142,7 @@ abstract contract LensNFTBase is ERC721Enumerable, ILensNFTBase {
),
owner,
sig,
false
false // TODO: Use a different implementation.
);
}
_burn(tokenId);

View File

@@ -98,10 +98,10 @@ contract ApprovalFollowModule is FollowValidatorFollowModuleBase {
* @dev We don't need to execute any additional logic on transfers in this follow module.
*/
function followModuleTransferHook(
uint256,
address,
address,
uint256
uint256 profileId,
address from,
address to,
uint256 followNFTTokenId
) external override {}
/**

View File

@@ -96,10 +96,10 @@ contract FeeFollowModule is FeeModuleBase, FollowValidatorFollowModuleBase {
* @dev We don't need to execute any additional logic on transfers in this follow module.
*/
function followModuleTransferHook(
uint256,
address,
address,
uint256
uint256 profileId,
address from,
address to,
uint256 followNFTTokenId
) external override {}
/**

View File

@@ -62,9 +62,9 @@ contract ProfileFollowModule is FollowValidatorFollowModuleBase {
* @dev We don't need to execute any additional logic on transfers in this follow module.
*/
function followModuleTransferHook(
uint256,
address,
address,
uint256
uint256 profileId,
address from,
address to,
uint256 followNFTTokenId
) external override {}
}

View File

@@ -44,9 +44,9 @@ contract RevertFollowModule is FollowValidatorFollowModuleBase {
* @dev We don't need to execute any additional logic on transfers in this follow module.
*/
function followModuleTransferHook(
uint256,
address,
address,
uint256
uint256 profileId,
address from,
address to,
uint256 followNFTTokenId
) external override {}
}

View File

@@ -8,12 +8,11 @@ import {IFollowModule} from '../interfaces/IFollowModule.sol';
* @dev This is a simple mock follow module to be used for testing.
*/
contract MockFollowModule is IFollowModule {
function initializeFollowModule(uint256 profileId, bytes calldata data)
external
pure
override
returns (bytes memory)
{
function initializeFollowModule(
uint256,
address,
bytes calldata data
) external pure override returns (bytes memory) {
uint256 number = abi.decode(data, (uint256));
require(number == 1, 'MockFollowModule: invalid');
return new bytes(0);
@@ -21,15 +20,16 @@ contract MockFollowModule is IFollowModule {
function processFollow(
address follower,
address executor,
uint256 profileId,
bytes calldata data
) external override {}
function isFollowing(
uint256 profileId,
address follower,
uint256 followNFTTokenId
) external view override returns (bool) {
uint256,
address,
uint256
) external pure override returns (bool) {
return true;
}

View File

@@ -9,8 +9,9 @@ import {IReferenceModule} from '../interfaces/IReferenceModule.sol';
*/
contract MockReferenceModule is IReferenceModule {
function initializeReferenceModule(
uint256 profileId,
uint256 pubId,
uint256,
address,
uint256,
bytes calldata data
) external pure override returns (bytes memory) {
uint256 number = abi.decode(data, (uint256));
@@ -20,6 +21,7 @@ contract MockReferenceModule is IReferenceModule {
function processComment(
uint256 profileId,
address executor,
uint256 profileIdPointed,
uint256 pubIdPointed,
bytes calldata data
@@ -27,6 +29,7 @@ contract MockReferenceModule is IReferenceModule {
function processMirror(
uint256 profileId,
address executor,
uint256 profileIdPointed,
uint256 pubIdPointed,
bytes calldata data