The wallpaper and baseplate objects are designed to prevent multiple deposits in a map contract in order to save on gas fees. You can see behavior of Baseplate from changeWallpaper method.
/* * @title checkBasePlate * @notice Functions for check BasePlate status * @param name : ens name * @dev Check BasePlate information * @return contractAddress,tokenId */functioncheckBasePlate(stringmemory name) externalviewreturns (BasePlatememory) {return basePlate[name]; }/* * @title changeBasePlate * @notice Receive changeBasePlate * @param name : ens name * @param contractAddress : Address of BasePlate * @param tokenId : tokenId */function_changeBasePlate(stringmemory name,address contractAddress,uint256 tokenId ) internal {address lastBasePlateContractAddress = basePlate[name].contractAddress;uint256 lastBasePlateTokenId = basePlate[name].tokenId;// Withdraw the deposited BasePlate OBJECT at the same time if it has already been depositedif (lastBasePlateContractAddress !=address(0)) { IObject _lastBasePlate =IObject(lastBasePlateContractAddress); _lastBasePlate.safeTransferFrom(address(this), msg.sender, lastBasePlateTokenId,1,"0x00"); }// Check condition_checkConditon(name, contractAddress, tokenId); basePlate[name] =BasePlate(contractAddress, tokenId);// Deposit BasePlate object to be set in map contract IObject _object =IObject(contractAddress); _object.safeTransferFrom(msg.sender,address(this), tokenId,1,"0x00");emitChangeBasePlate(name, contractAddress, tokenId); }function_checkConditon(stringmemory name,address contractAddress,uint256 tokenId ) internalview {// Check that contractAddress is whitelisted.if (!_whitelist[contractAddress]) revertInvalidWhitelist(); IObject _object =IObject(contractAddress); IObject.Size memory size = _object.getSize(tokenId);// Check that the size of the wall object matches the size of the current map contractif ((size.x != mapSettings.maxX) || (size.y != mapSettings.maxY)) {revertNotFit(msg.sender, size.x, size.y, mapSettings.maxX, mapSettings.maxY); }// Check if user has a wall objectuint256 userBalance = _object.balanceOf(msg.sender, tokenId);if (userBalance <1) {revertNotBalance({ name: name, sender: msg.sender, contractAddress: contractAddress, tokenId: tokenId }); } }
CheckConditon methods check whether the owner has a baseplate or not, and whether the map size is 8*8 and the baseplate size is consistent.