function addOperationalEventListners(contract){

    // Read app operational status
    const appIsOperational = contract.isOperationalApp()
    console.log(`dapp app contract is ${appIsOperational ? "" : "not"} operational`)
    try {
        DOM.elid('app-operational-status-message').innerHTML = appIsOperational ? "Ready to deploy with all functions available" : "Not ready to deploy";

    // Read data operational status
    const dataIsOperational = contract.isOperationalData()
    console.log(`dapp data contract is ${dataIsOperational ? "" : "not"} operational`)
    DOM.elid('data-operational-status-message').innerHTML = dataIsOperational ? "Ready to deploy with all functions available" : "Not ready to deploy";

    // Handle turning on app operational status request
    DOM.elid('app-operational-status-on').addEventListener('click', async _ => {
        await contract.setOperationalApp(true);
        let setAppOperationalResultOn = await contract.isOperationalApp();
        console.log(setAppOperationalResultOn)
         // This result returns whatever the return value is in the contract for this function
        console.log(`dapp app contract is ${setAppOperationalResultOn ? "" : "not"} operational`)
        DOM.elid('app-operational-status-message').innerHTML = setAppOperationalResultOn ? "Ready to deploy with all functions available" : "Not ready to deploy";  
    })
    
    // Handle turning off app operational status request
    DOM.elid('app-operational-status-off').addEventListener('click', async _ => {
        
        let setAppOperationalResultOff = await contract.setOperationalApp(false);
        console.log(setAppOperationalResultOff)

        console.log(`dapp app contract is ${setAppOperationalResultOff ? "" : "not"} operational`)
        DOM.elid('app-operational-status-message').innerHTML = setAppOperationalResultOff ? "Ready to deploy with all functions available" : "Not ready to deploy";
    })

    //Handle turning on data operational status request
    DOM.elid('data-operational-status-on').addEventListener('click', async _ => {
        await contract.setOperationalData(true);
        let setDataOperationalResultOn = await contract.isOperationalData()
        console.log(`dapp data contract is ${setDataOperationalResultOn ? "" : "not"} operational`)
        DOM.elid('data-operational-status-message').innerHTML = setDataOperationalResultOn ? "Ready to deploy with all functions available" : "Not ready to deploy";
    })
    //Handle turning on data operational status request
    DOM.elid('data-operational-status-off').addEventListener('click', async _ => {
        let setDataOperationalResultOff = await contract.setOperationalData(false);
        console.log(`dapp data contract is ${setDataOperationalResultOff ? "" : "not"} operational`)
        DOM.elid('data-operational-status-message').innerHTML = setDataOperationalResultOff ? "Ready to deploy with all functions available" : "Not ready to deploy";
    })
    } catch {}
}
/**
 * Operational Events: 
 * This is to stop the contract when necessary.
 */
Operational Events:
This is to stop the contract when necessary.
Operational Events : This is to stop the contract when necessary .
function addOperationalEventListners(contract){
    const appIsOperational = contract.isOperationalApp()
    console.log(`dapp app contract is ${appIsOperational ? "" : "not"} operational`)
    try {
        DOM.elid('app-operational-status-message').innerHTML = appIsOperational ? "Ready to deploy with all functions available" : "Not ready to deploy";
    const dataIsOperational = contract.isOperationalData()
    console.log(`dapp data contract is ${dataIsOperational ? "" : "not"} operational`)
    DOM.elid('data-operational-status-message').innerHTML = dataIsOperational ? "Ready to deploy with all functions available" : "Not ready to deploy";
    DOM.elid('app-operational-status-on').addEventListener('click', async _ => {
        await contract.setOperationalApp(true);
        let setAppOperationalResultOn = await contract.isOperationalApp();
        console.log(setAppOperationalResultOn)
        console.log(`dapp app contract is ${setAppOperationalResultOn ? "" : "not"} operational`)
        DOM.elid('app-operational-status-message').innerHTML = setAppOperationalResultOn ? "Ready to deploy with all functions available" : "Not ready to deploy";  
    })
    DOM.elid('app-operational-status-off').addEventListener('click', async _ => {
        let setAppOperationalResultOff = await contract.setOperationalApp(false);
        console.log(setAppOperationalResultOff)
        console.log(`dapp app contract is ${setAppOperationalResultOff ? "" : "not"} operational`)
        DOM.elid('app-operational-status-message').innerHTML = setAppOperationalResultOff ? "Ready to deploy with all functions available" : "Not ready to deploy";
    })
    DOM.elid('data-operational-status-on').addEventListener('click', async _ => {
        await contract.setOperationalData(true);
        let setDataOperationalResultOn = await contract.isOperationalData()
        console.log(`dapp data contract is ${setDataOperationalResultOn ? "" : "not"} operational`)
        DOM.elid('data-operational-status-message').innerHTML = setDataOperationalResultOn ? "Ready to deploy with all functions available" : "Not ready to deploy";
    })
    DOM.elid('data-operational-status-off').addEventListener('click', async _ => {
        let setDataOperationalResultOff = await contract.setOperationalData(false);
        console.log(`dapp data contract is ${setDataOperationalResultOff ? "" : "not"} operational`)
        DOM.elid('data-operational-status-message').innerHTML = setDataOperationalResultOff ? "Ready to deploy with all functions available" : "Not ready to deploy";
    })
    } catch {}
}
function addOperationalEventListners ( contract ) { const appIsOperational = contract . isOperationalApp ( ) console . log ( ` ${ appIsOperational ? "" : "not" } ` ) try { DOM . elid ( 'app-operational-status-message' ) . innerHTML = appIsOperational ? "Ready to deploy with all functions available" : "Not ready to deploy" ; const dataIsOperational = contract . isOperationalData ( ) console . log ( ` ${ dataIsOperational ? "" : "not" } ` ) DOM . elid ( 'data-operational-status-message' ) . innerHTML = dataIsOperational ? "Ready to deploy with all functions available" : "Not ready to deploy" ; DOM . elid ( 'app-operational-status-on' ) . addEventListener ( 'click' , async _ => { await contract . setOperationalApp ( true ) ; let setAppOperationalResultOn = await contract . isOperationalApp ( ) ; console . log ( setAppOperationalResultOn ) console . log ( ` ${ setAppOperationalResultOn ? "" : "not" } ` ) DOM . elid ( 'app-operational-status-message' ) . innerHTML = setAppOperationalResultOn ? "Ready to deploy with all functions available" : "Not ready to deploy" ; } ) DOM . elid ( 'app-operational-status-off' ) . addEventListener ( 'click' , async _ => { let setAppOperationalResultOff = await contract . setOperationalApp ( false ) ; console . log ( setAppOperationalResultOff ) console . log ( ` ${ setAppOperationalResultOff ? "" : "not" } ` ) DOM . elid ( 'app-operational-status-message' ) . innerHTML = setAppOperationalResultOff ? "Ready to deploy with all functions available" : "Not ready to deploy" ; } ) DOM . elid ( 'data-operational-status-on' ) . addEventListener ( 'click' , async _ => { await contract . setOperationalData ( true ) ; let setDataOperationalResultOn = await contract . isOperationalData ( ) console . log ( ` ${ setDataOperationalResultOn ? "" : "not" } ` ) DOM . elid ( 'data-operational-status-message' ) . innerHTML = setDataOperationalResultOn ? "Ready to deploy with all functions available" : "Not ready to deploy" ; } ) DOM . elid ( 'data-operational-status-off' ) . addEventListener ( 'click' , async _ => { let setDataOperationalResultOff = await contract . setOperationalData ( false ) ; console . log ( ` ${ setDataOperationalResultOff ? "" : "not" } ` ) DOM . elid ( 'data-operational-status-message' ) . innerHTML = setDataOperationalResultOff ? "Ready to deploy with all functions available" : "Not ready to deploy" ; } ) } catch { } }
Operational Events:
 This is to stop the contract when necessary.
Operational Events : This is to stop the contract when necessary .
// Read app operational status // Read data operational status // Handle turning on app operational status request // This result returns whatever the return value is in the contract for this function // Handle turning off app operational status request //Handle turning on data operational status request //Handle turning on data operational status request