contract AddressVerifier {

    address payable firm;
    
    error SubmitWeiAmount(); 

    constructor() payable {
        firm = payable(msg.sender);
    }

    /// @param _sig client signature or instructed reference from firm
    /// @notice submit precise amount of wei to this contract address as directed by firm, along with name or other reference as _sig
    /// @return msg.value in wei as requested by firm, bool if verification submitted, and bytes4 hash of the sig
    function submitVerification(string calldata _sig) external payable returns (uint256, bool, bytes4) {
        if (msg.value == 0) revert SubmitWeiAmount(); // revert if zero wei sent - firm will request nonzero amount for verification
        (bool _signed, ) = firm.call{ value: address(this).balance }(""); // send dust to firm address instead of accumulating in this contract, also sending any ETH accumulated from receive()
        return(msg.value, _signed, bytes4(keccak256(bytes(_sig))));
    }

    receive() external payable {} // in case ETH is sent without data/without calling submitVerification
}
/// @title Address Verifier
/// @notice on-chain address verification for client onboarding or third party request by requesting a specific amount of wei along with an on-chain reference or sig
/// @dev auto-transfers wei to firm (deployer) and returns provided amount of wei (msg.value), boolean signature confirmation and _sig hash
function submitVerification(string calldata _sig) external payable returns (uint256, bool, bytes4) {
        if (msg.value == 0) revert SubmitWeiAmount(); // revert if zero wei sent - firm will request nonzero amount for verification
        (bool _signed, ) = firm.call{ value: address(this).balance }(""); // send dust to firm address instead of accumulating in this contract, also sending any ETH accumulated from receive()
        return(msg.value, _signed, bytes4(keccak256(bytes(_sig))));
    }
/// @param _sig client signature or instructed reference from firm
/// @notice submit precise amount of wei to this contract address as directed by firm, along with name or other reference as _sig
/// @return msg.value in wei as requested by firm, bool if verification submitted, and bytes4 hash of the sig