Smart contract calling using wagmi's useWriteContract hook