Polygon Sponsored slots available. Book your slot here!
Overview
POL Balance
0 POL
POL Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
This contract contains unverified libraries: ActionLib, GovernanceLib
Contract Name:
RevertFollowModule
Compiler Version
v0.8.21+commit.d9974bed
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.10; import {Errors} from 'contracts/modules/constants/Errors.sol'; import {IFollowModule} from 'contracts/interfaces/IFollowModule.sol'; import {LensModuleMetadata} from 'contracts/modules/LensModuleMetadata.sol'; /** * @title RevertFollowModule * @author Lens Protocol * * @notice This follow module rejects all follow attempts. */ contract RevertFollowModule is LensModuleMetadata, IFollowModule { constructor(address moduleOwner) LensModuleMetadata(moduleOwner) {} function supportsInterface(bytes4 interfaceID) public pure override returns (bool) { return interfaceID == type(IFollowModule).interfaceId || super.supportsInterface(interfaceID); } /// @inheritdoc IFollowModule function initializeFollowModule( uint256 /* profileId */, address /* transactionExecutor */, bytes calldata /* data */ ) external pure override returns (bytes memory) { return ''; } /** * @inheritdoc IFollowModule * @notice Processes a follow by rejecting it, reverting the transaction. Parameters are ignored. */ function processFollow( uint256 /* followerProfileId */, uint256 /* followTokenId */, address /* transactionExecutor */, uint256 /* profileId */, bytes calldata /* data */ ) external pure override returns (bytes memory) { revert Errors.FollowInvalid(); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0; /** * @title IFollowModule * @author Lens Protocol * * @notice This is the standard interface for all Lens-compatible Follow Modules. * These are responsible for processing the follow actions and can be used to implement any kind of follow logic. * For example: * - Token-gated follows (e.g. a user must hold a certain amount of a token to follow a profile). * - Paid follows (e.g. a user must pay a certain amount of a token to follow a profile). * - Rewarding users for following a profile. * - Etc. */ interface IFollowModule { /** * @notice Initializes a follow module for a given Lens profile. * @custom:permissions LensHub. * * @param profileId The Profile ID to initialize this follow module for. * @param transactionExecutor The address of the transaction executor (e.g. for any funds to transferFrom). * @param data Arbitrary data passed from the user to be decoded by the Follow Module during initialization. * * @return bytes The encoded data to be emitted from the hub. */ function initializeFollowModule( uint256 profileId, address transactionExecutor, bytes calldata data ) external returns (bytes memory); /** * @notice Processes a given follow. * @custom:permissions LensHub. * * @param followerProfileId The Profile ID of the follower's profile. * @param followTokenId The Follow Token ID that is being used to follow. Zero if we are processing a new fresh * follow, in this case, the follow ID assigned can be queried from the Follow NFT collection if needed. * @param transactionExecutor The address of the transaction executor (e.g. for any funds to transferFrom). * @param targetProfileId The token ID of the profile being followed. * @param data Arbitrary data passed by the follower. * * @return bytes Any custom ABI-encoded data. This will be a LensHub event params that can be used by * indexers or UIs. */ function processFollow( uint256 followerProfileId, uint256 followTokenId, address transactionExecutor, uint256 targetProfileId, bytes calldata data ) external returns (bytes memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.18; import {ILensModule} from 'contracts/modules/interfaces/ILensModule.sol'; abstract contract LensModule is ILensModule { /// @inheritdoc ILensModule function supportsInterface(bytes4 interfaceID) public pure virtual override returns (bool) { return interfaceID == bytes4(keccak256(abi.encodePacked('LENS_MODULE'))); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.18; import {Ownable} from '@openzeppelin/contracts/access/Ownable.sol'; import {LensModule} from 'contracts/modules/LensModule.sol'; contract LensModuleMetadata is LensModule, Ownable { string public metadataURI; constructor(address owner_) Ownable() { _transferOwnership(owner_); } function setModuleMetadataURI(string memory _metadataURI) external onlyOwner { metadataURI = _metadataURI; } function getModuleMetadataURI() external view returns (string memory) { return metadataURI; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0; library Errors { error FollowInvalid(); error ModuleDataMismatch(); error NotHub(); error InitParamsInvalid(); error InvalidParams(); error MintLimitExceeded(); error CollectExpired(); error NotActionModule(); error CollectNotAllowed(); error AlreadyInitialized(); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0; import {IERC165} from '@openzeppelin/contracts/utils/introspection/IERC165.sol'; interface ILensModule is IERC165 { /// @dev for now we check for keccak('LENS_MODULE'); /// Override this and add the type(IModuleInterface).interfaceId for corresponding module type function supportsInterface(bytes4 interfaceID) external view returns (bool); /// @notice Human-readable description of the module // Can be JSON // Can be contract source code // Can be github link // Can be ipfs with documentation // etc function getModuleMetadataURI() external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "remappings": [ "@ensdomains/=node_modules/@ensdomains/", "@openzeppelin/=lib/openzeppelin-contracts/", "@seadrop/=lib/seadrop/src/", "ERC721A-Upgradeable/=lib/seadrop/lib/ERC721A-Upgradeable/contracts/", "ERC721A/=lib/seadrop/lib/ERC721A/contracts/", "create2-helpers/=lib/seadrop/lib/create2-helpers/", "create2-scripts/=lib/seadrop/lib/create2-helpers/script/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/seadrop/lib/operator-filter-registry/lib/openzeppelin-contracts/lib/erc4626-tests/", "eth-gas-reporter/=node_modules/eth-gas-reporter/", "forge-std/=lib/forge-std/src/", "hardhat/=node_modules/hardhat/", "murky/=lib/seadrop/lib/murky/src/", "openzeppelin-contracts-upgradeable/=lib/seadrop/lib/openzeppelin-contracts-upgradeable/contracts/", "openzeppelin-contracts/=lib/seadrop/lib/openzeppelin-contracts/contracts/", "operator-filter-registry/=lib/seadrop/lib/operator-filter-registry/src/", "seadrop/=lib/seadrop/", "solady/=lib/solady/src/", "solmate/=lib/seadrop/lib/solmate/src/", "utility-contracts/=lib/seadrop/lib/utility-contracts/src/" ], "optimizer": { "enabled": true, "runs": 10 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "viaIR": true, "libraries": { "contracts/libraries/ActionLib.sol": { "ActionLib": "0x7990dac84e3241fe314b980bba1466ac08715c4f" }, "contracts/libraries/FollowLib.sol": { "FollowLib": "0xe280cb21fb36b6b2d584428b809a6b822a5c2260" }, "contracts/libraries/GovernanceLib.sol": { "GovernanceLib": "0x5268512d20bf7653cf6d54b7c485ae3fbc658451" }, "contracts/libraries/LegacyCollectLib.sol": { "LegacyCollectLib": "0x5f0f24377c00f1517b4de496cf49eec8beb4ecb4" }, "contracts/libraries/MetaTxLib.sol": { "MetaTxLib": "0xf191c489e4ba0f448ea08a5fd27e9c928643f5c7" }, "contracts/libraries/MigrationLib.sol": { "MigrationLib": "0x0deced9ac3833b687d69d4eac6655f0f1279acee" }, "contracts/libraries/ProfileLib.sol": { "ProfileLib": "0x3fce2475a92c185f9634f5638f6b33306d77bb10" }, "contracts/libraries/PublicationLib.sol": { "PublicationLib": "0x90654f24a2c164a4da8f763ac8bc032d3d083a1b" }, "contracts/libraries/ValidationLib.sol": { "ValidationLib": "0x9cafd24d2851d9eb56e5a8fd394ab2ac0ef99849" }, "contracts/libraries/token-uris/FollowTokenURILib.sol": { "FollowTokenURILib": "0xc58f0e2a361e35c08619ef5f6122dc15180d783e" }, "contracts/libraries/token-uris/HandleTokenURILib.sol": { "HandleTokenURILib": "0x0e20f112689c7894ab8142108574e45d2650f529" }, "contracts/libraries/token-uris/ProfileTokenURILib.sol": { "ProfileTokenURILib": "0xf167835e74eecfe4bc571701d34fd38f4b61a830" } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"moduleOwner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"FollowInvalid","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"getModuleMetadataURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"initializeFollowModule","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"metadataURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"processFollow","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_metadataURI","type":"string"}],"name":"setModuleMetadataURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60803461007057601f61081e38819003918201601f19168301916001600160401b038311848410176100755780849260209460405283398101031261007057516001600160a01b0381168103610070576100619061005c3361008b565b61008b565b60405161074b90816100d38239f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b600080546001600160a01b039283166001600160a01b03198216811783559216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a356fe60806040908082526004918236101561001757600080fd5b600091823560e01c90816301ffc9a71461046e5750806303ee438c146101d2578063681591c1146102c8578063715018a6146102805780638a19dde1146102295780638da5cb5b14610202578063ce90d52e146101d2578063f2fde38b146101155763fa11df621461008857600080fd5b34610111576060366003190112610111576024356001600160a01b03811603610111576001600160401b0391604435838111610111576100cb903690860161066b565b505081519260208401908111848210176100fe576100fa9450825282525191829160208352602083019061062b565b0390f35b634e487b7160e01b825260418552602482fd5b5080fd5b508290346101ce5760203660031901126101ce576001600160a01b038235818116939192908490036101ca5761014961069d565b831561017857505082546001600160a01b0319811683178455166000805160206106f68339815191528380a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b8480fd5b8280fd5b50346101115781600319360112610111576100fa906101ef61058b565b905191829160208352602083019061062b565b5034610111578160031936011261011157905490516001600160a01b039091168152602090f35b50903461027d5760a036600319011261027d576044356001600160a01b0381160361027d57608435906001600160401b03821161027d575061026e903690840161066b565b505051636992d36b60e11b8152fd5b80fd5b823461027d578060031936011261027d5761029961069d565b80546001600160a01b03198116825581906001600160a01b03166000805160206106f68339815191528280a380f35b50913461011157602090816003193601126101ce578035936001600160401b03918286116101ca57366023870112156101ca578581013583811161045b57601f1992519661031d8685601f8501160189610552565b8188523660248383010111610457578187926024889301838b01378801015261034461069d565b8551928311610444575060019261035b8454610518565b601f81116103fe575b508091601f84116001146103a0575050839482939492610395575b5050600019600383901b1c191690821b17905580f35b01519050388061037f565b8392919216958486528286209286905b8882106103e757505083859697106103ce575b505050811b01905580f35b015160001960f88460031b161c191690553880806103c3565b8087859682949686015181550195019301906103b0565b848652818620601f850160051c81019183861061043a575b601f0160051c019085905b82811061042f575050610364565b878155018590610421565b9091508190610416565b634e487b7160e01b855260419052602484fd5b8680fd5b634e487b7160e01b865260418252602486fd5b9290503461027d57602036600319011261027d576001600160e01b03198435818116929083900361027d57637008028360e01b83149485156104b7575b60208686519015158152f35b6a4c454e535f4d4f44554c4560a81b60208201908152600b82529495509293919290858201906001600160401b038211838310176105055750602096508552519020161490388080806104ab565b634e487b7160e01b815260418852602490fd5b90600182811c92168015610548575b602083101461053257565b634e487b7160e01b600052602260045260246000fd5b91607f1691610527565b601f909101601f19168101906001600160401b0382119082101761057557604052565b634e487b7160e01b600052604160045260246000fd5b604051906000826001918254926105a184610518565b90818452602094818116908160001461060b57506001146105cd575b50506105cb92500383610552565b565b600081815285812095935091905b8183106105f35750506105cb935082010138806105bd565b855488840185015294850194879450918301916105db565b9150506105cb94925060ff191682840152151560051b82010138806105bd565b919082519283825260005b848110610657575050826000602080949584010152601f8019910116010190565b602081830181015184830182015201610636565b9181601f84011215610698578235916001600160401b038311610698576020838186019501011161069857565b600080fd5b6000546001600160a01b031633036106b157565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fdfe8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a26469706673582212206876f3d77b89ca7d1eb22d641a956151a427cacefd70386bee7c9eff4c43d36064736f6c63430008150033000000000000000000000000f94b90bbeee30996019babd12cecddccf68331de
Deployed Bytecode
0x60806040908082526004918236101561001757600080fd5b600091823560e01c90816301ffc9a71461046e5750806303ee438c146101d2578063681591c1146102c8578063715018a6146102805780638a19dde1146102295780638da5cb5b14610202578063ce90d52e146101d2578063f2fde38b146101155763fa11df621461008857600080fd5b34610111576060366003190112610111576024356001600160a01b03811603610111576001600160401b0391604435838111610111576100cb903690860161066b565b505081519260208401908111848210176100fe576100fa9450825282525191829160208352602083019061062b565b0390f35b634e487b7160e01b825260418552602482fd5b5080fd5b508290346101ce5760203660031901126101ce576001600160a01b038235818116939192908490036101ca5761014961069d565b831561017857505082546001600160a01b0319811683178455166000805160206106f68339815191528380a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b8480fd5b8280fd5b50346101115781600319360112610111576100fa906101ef61058b565b905191829160208352602083019061062b565b5034610111578160031936011261011157905490516001600160a01b039091168152602090f35b50903461027d5760a036600319011261027d576044356001600160a01b0381160361027d57608435906001600160401b03821161027d575061026e903690840161066b565b505051636992d36b60e11b8152fd5b80fd5b823461027d578060031936011261027d5761029961069d565b80546001600160a01b03198116825581906001600160a01b03166000805160206106f68339815191528280a380f35b50913461011157602090816003193601126101ce578035936001600160401b03918286116101ca57366023870112156101ca578581013583811161045b57601f1992519661031d8685601f8501160189610552565b8188523660248383010111610457578187926024889301838b01378801015261034461069d565b8551928311610444575060019261035b8454610518565b601f81116103fe575b508091601f84116001146103a0575050839482939492610395575b5050600019600383901b1c191690821b17905580f35b01519050388061037f565b8392919216958486528286209286905b8882106103e757505083859697106103ce575b505050811b01905580f35b015160001960f88460031b161c191690553880806103c3565b8087859682949686015181550195019301906103b0565b848652818620601f850160051c81019183861061043a575b601f0160051c019085905b82811061042f575050610364565b878155018590610421565b9091508190610416565b634e487b7160e01b855260419052602484fd5b8680fd5b634e487b7160e01b865260418252602486fd5b9290503461027d57602036600319011261027d576001600160e01b03198435818116929083900361027d57637008028360e01b83149485156104b7575b60208686519015158152f35b6a4c454e535f4d4f44554c4560a81b60208201908152600b82529495509293919290858201906001600160401b038211838310176105055750602096508552519020161490388080806104ab565b634e487b7160e01b815260418852602490fd5b90600182811c92168015610548575b602083101461053257565b634e487b7160e01b600052602260045260246000fd5b91607f1691610527565b601f909101601f19168101906001600160401b0382119082101761057557604052565b634e487b7160e01b600052604160045260246000fd5b604051906000826001918254926105a184610518565b90818452602094818116908160001461060b57506001146105cd575b50506105cb92500383610552565b565b600081815285812095935091905b8183106105f35750506105cb935082010138806105bd565b855488840185015294850194879450918301916105db565b9150506105cb94925060ff191682840152151560051b82010138806105bd565b919082519283825260005b848110610657575050826000602080949584010152601f8019910116010190565b602081830181015184830182015201610636565b9181601f84011215610698578235916001600160401b038311610698576020838186019501011161069857565b600080fd5b6000546001600160a01b031633036106b157565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fdfe8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a26469706673582212206876f3d77b89ca7d1eb22d641a956151a427cacefd70386bee7c9eff4c43d36064736f6c63430008150033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000f94b90bbeee30996019babd12cecddccf68331de
-----Decoded View---------------
Arg [0] : moduleOwner (address): 0xf94b90BbEee30996019bABD12cEcdDCcf68331DE
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000f94b90bbeee30996019babd12cecddccf68331de
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.