How does smartcontract state command handle ContractRevision

Does the smartcontract (CLI) “state” operation filter on the highest ContractRevision?
What about for Asset Version?

Does the “state” operation internally use BitDB for the Query operation?
If so,
What would the query condition in BitDB to filter on the highest Revision / Version look like?

For a given Contract bitcoin address, how can I get the list of all transactions?
I can use that to find revisions the hard way if necessary.

The smart contract CLI simply uses the same storage as the smart contract daemon. It just pulls current state directly from the daemon’s storage. You can’t use it for anything other than a contract you are hosting. Other services will be provided to query data about contracts.