Contract state introspection.