ApprovalLinkModule4Character
Inherits: ILinkModule4Character, ModuleBase
This is a simple LinkModule implementation, inheriting from the ILinkModule4Character interface.
State Variables
_approvedByCharacterByOwner
mapping(address => mapping(uint256 => mapping(address => bool))) internal _approvedByCharacterByOwner;
Functions
constructor
constructor(address web3Entry_) ModuleBase(web3Entry_);
initializeLinkModule
function initializeLinkModule(uint256 characterId, bytes calldata data) external override returns (bytes memory);
approve
A custom function that allows character owners to customize approved addresses.
function approve(uint256 characterId, address[] calldata addresses, bool[] calldata toApprove) external;
Parameters
Name | Type | Description |
---|---|---|
characterId | uint256 | The character ID to approve/disapprove. |
addresses | address[] | The addresses to approve/disapprove for linking the character. |
toApprove | bool[] | Whether to approve or disapprove the addresses for linking the character. |
processLink
function processLink(address caller, uint256 characterId, bytes calldata) external view override onlyWeb3Entry;
isApproved
function isApproved(address characterOwner, uint256 characterId, address toCheck) external view returns (bool);