dob / auctionhouse

Ethereum based auction platform for non fungible on chain goods
MIT License
117 stars 46 forks source link

Make readonly functions constant #35

Open dob opened 7 years ago

dob commented 7 years ago

I have to do a little more research, but I believe if you add the constant keyword to a function it makes it so that it can only be executed via a readonly call instead of a writeable transaction. This is important, since some of these currently call out to the external Asset contract, and if we make the getOwner() function constant as well in the interface, then users can trust this function regardless of the implementation since they won't be able to update any state.

ramene commented 4 years ago

While recognizing I'm a bit late here, in the latest release of solidity >= 0.5.xx, this is achieved via the pure and view function modifiers.

I've since updated AuctionHouse.sol utilizing these modifiers and sucessfully migrating, however I've been itching to play with Trinity and Web3.py vs geth ahead of Ethereum 2.0 and ERC 1155

I'm noticing a bit of overlap with a few of the issues. I'll submit my PR here shortly.