Add name() method to view contract.