updated the contract api
implemented contract management in the app ui