Example…​

LockV1_2_0

Modifiers
Events

onlyEscrow() modifier

supportsInterface(bytes4 _interfaceId) → bool public

constructor() public

initialize(address _escrow, string _name, string _symbol, address _dao) external

setWhitelisted(address _account, bool _isWhitelisted) external

Transfers disabled by default, whitelisted addresses are allowed to be involved in transfers

enableTransfers() external

Enable transfers to any address without whitelisting

_transfer(address _from, address _to, uint256 _tokenId) internal

Override the transfer to check if the recipient is whitelisted This avoids needing to check for mint/burn but is less idomatic than beforeTokenTransfer

isApprovedOrOwner(address _spender, uint256 _tokenId) → bool external

mint(address _to, uint256 _tokenId) external

Minting and burning functions that can only be called by the escrow contract

Safe mint ensures contract addresses are ERC721 Receiver contracts

burn(uint256 _tokenId) external

Minting and burning functions that can only be called by the escrow contract

implementation() → address public

Returns the address of the implementation contract in the [proxy storage slot](https://eips.ethereum.org/EIPS/eip-1967) slot the [UUPS proxy](https://eips.ethereum.org/EIPS/eip-1822) is pointing to.

_authorizeUpgrade(address) internal

Internal method authorizing the upgrade of the contract via the [upgradeability mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).

WHITELIST_ANY_ADDRESS() → address public

enables transfers without whitelisting

LOCK_ADMIN_ROLE() → bytes32 public

role to upgrade this contract

escrow() → address public

Address of the escrow contract that holds underyling assets

whitelisted() → mapping(address => bool) public

Whitelisted contracts that are allowed to transfer