ApprovalLinkModule4Character

Git Source

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

NameTypeDescription
characterIduint256The character ID to approve/disapprove.
addressesaddress[]The addresses to approve/disapprove for linking the character.
toApprovebool[]Whether to approve or disapprove the addresses for linking the character.
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);