es/channel/index.js
async function getContractState (contract) {
  const result = await call(this, 'channels.get.contract', { pubkey: contract })
  return snakeToPascalObjKeys({
    ...result,
    contract: snakeToPascalObjKeys(result.contract)
  })
}
async function getContractState (contract) {
  const result = await call(this, 'channels.get.contract', { pubkey: contract })
  return snakeToPascalObjKeys({
    ...result,
    contract: snakeToPascalObjKeys(result.contract)
  })
}
async function getContractState ( contract ) { const result = await call ( this , 'channels.get.contract' , { pubkey : contract } ) return snakeToPascalObjKeys ( { ... result , contract : snakeToPascalObjKeys ( result . contract ) } ) }
Get contract latest state

@param {String} contract - Address of the contract
@return {Promise<Object>}
@example channel.getContractState(
'ct_9sRA9AVE4BYTAkh5RNfJYmwQe1NZ4MErasQLXZkFWG43TPBqa'
).then(({ contract }) => {
console.log('deposit:', contract.deposit)
})
Get contract latest state