function contractIDFromString(contract) {
    let contractSplit = contract.split('.')
    let contractID = new ContractID()

    if (
        isNaN(parseInt(contractSplit[0])) ||
        isNaN(parseInt(contractSplit[1])) ||
        isNaN(parseInt(contractSplit[2]))
    ) {
        throw new Error('ContractID contains invalid character(s)')
    }

    if (contractSplit.length !== 3) {
        throw new Error('ContractID is invalid')
    }
    contractID.setShardnum(parseInt(contractSplit[0]))
    contractID.setRealmnum(parseInt(contractSplit[1]))
    contractID.setContractnum(parseInt(contractSplit[2]))
    return contractID
}
/**
 * contractIDFromString converts a string type ContractID into a Hedera ContractID object.
 * @param {string} contract is a string delimited by dot, of the format 'shardNum.realmNum.contractNum'.
 * @returns {Object} returns a Hedera ContractID.
 */
contractIDFromString converts a string type ContractID into a Hedera ContractID object.
@param {string} contract is a string delimited by dot, of the format 'shardNum.realmNum.contractNum'.
@returns {Object} returns a Hedera ContractID.
contractIDFromString converts a string type ContractID into a Hedera ContractID object . @param { string } contract is a string delimited by dot of the format ' shardNum . realmNum . contractNum ' . @returns { Object } returns a Hedera ContractID .
function contractIDFromString(contract) {
    let contractSplit = contract.split('.')
    let contractID = new ContractID()
    if (
        isNaN(parseInt(contractSplit[0])) ||
        isNaN(parseInt(contractSplit[1])) ||
        isNaN(parseInt(contractSplit[2]))
    ) {
        throw new Error('ContractID contains invalid character(s)')
    }
    if (contractSplit.length !== 3) {
        throw new Error('ContractID is invalid')
    }
    contractID.setShardnum(parseInt(contractSplit[0]))
    contractID.setRealmnum(parseInt(contractSplit[1]))
    contractID.setContractnum(parseInt(contractSplit[2]))
    return contractID
}
function contractIDFromString ( contract ) { let contractSplit = contract . split ( '.' ) let contractID = new ContractID ( ) if ( isNaN ( parseInt ( contractSplit [ 0 ] ) ) || isNaN ( parseInt ( contractSplit [ 1 ] ) ) || isNaN ( parseInt ( contractSplit [ 2 ] ) ) ) { throw new Error ( 'ContractID contains invalid character(s)' ) } if ( contractSplit . length !== 3 ) { throw new Error ( 'ContractID is invalid' ) } contractID . setShardnum ( parseInt ( contractSplit [ 0 ] ) ) contractID . setRealmnum ( parseInt ( contractSplit [ 1 ] ) ) contractID . setContractnum ( parseInt ( contractSplit [ 2 ] ) ) return contractID }
contractIDFromString converts a string type ContractID into a Hedera ContractID object.
contractIDFromString converts a string type ContractID into a Hedera ContractID object .