Metal electrode perovskite battery