Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make readonly functions constant #35

Open
dob opened this issue Nov 9, 2016 · 1 comment
Open

Make readonly functions constant #35

dob opened this issue Nov 9, 2016 · 1 comment

Comments

@dob
Copy link
Owner

dob commented Nov 9, 2016

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
Copy link

ramene commented Nov 9, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants