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

Add Auction4Reputation.getCurrentAuction #548

Open
dkent600 opened this issue Oct 6, 2018 · 3 comments
Open

Add Auction4Reputation.getCurrentAuction #548

dkent600 opened this issue Oct 6, 2018 · 3 comments

Comments

@dkent600
Copy link
Contributor

dkent600 commented Oct 6, 2018

Would be good to add a function Auction4Reputation.getCurrentAuction that looks like the following:

function currentAuction() public view returns(uint)
{
  return (now - auctionsStartTime)/auctionPeriod;
}
@dkent600
Copy link
Contributor Author

dkent600 commented Oct 6, 2018

This isn't the reason for requesting this, but bid should use the function, to avoid duplicating logic.

@orenyodfat
Copy link
Contributor

This can be calculated off chain

@dkent600
Copy link
Contributor Author

dkent600 commented Oct 7, 2018

Yes, it can be calculated off chain, but requiring that of users has two bad implications:

  1. it requires that users discover the inner logic of the contract by digging into the public Arc documentation, finding nothing there, then digging into the Arc solidity source code (remember, not everyone is using arc.js, by a long shot, not everyone would know where to look, and not everyone is comfortable with solidity). Digging into source code is not how Arc should have to be used.

  2. Even if this logic were documented in the public Arc documentation, duplication of the inner logic outside of the contract means that if ever the logic changes, eveyone who has duplicated that logic will suddenly find their code broken and requiring change.

This is a super easy change. Why not do it? The additional cost of deploying the contract is trivial.

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

No branches or pull requests

2 participants