Unified the contract interface and tx interface. Fixes #62