// Contract: LexLocker
// Target function: function deposit(
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.8.0 <0.9.0;

/// @notice Bilateral escrow for ETH and ERC-20/721 tokens.
/// @author LexDAO LLC.
contract LexLocker {
    uint256 lockerCount;
    mapping(uint256 => Locker) public lockers;
    mapping(address => Resolver) public resolvers;
    
    /// @dev Events to assist web3 applications.
    event Deposit(
        bool nft,
        address indexed depositor, 
        address indexed receiver, 
        address resolver,
        address token, 
        uint256 value, 
        uint256 indexed registration,
        string details);
    event Release(uint256 indexed registration);
    event Lock(uint256 indexed registration);
    event Resolve(uint256 indexed registration, uint256 indexed depositorAward, uint256 indexed receiverAward, string details);
    event RegisterResolver(address indexed resolver, bool indexed active, uint256 indexed fee);
    
    /// @dev Tracks registered escrow status.
    struct Locker {  
        bool nft; 
        bool locked;
        address depositor;
        address receiver;
        address resolver;
        address token;
        uint256 value;
    }
    
    /// @dev Tracks registered resolver status.
    struct Resolver {
        bool active;
        uint8 fee;
    }