As reading the public state doesn't change any information in the blockchain, it can be performed locally using a call. For example, to read the auction's highestbid variable, you can use auction.highestBid.call();.
Reading state variables
Get Blockchain By Example now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.