Skip to content

Auction4reputation #491

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

Merged
merged 6 commits into from
Jul 12, 2018
Merged

Auction4reputation #491

merged 6 commits into from
Jul 12, 2018

Conversation

orenyodfat
Copy link
Contributor

scheme to conduct auction on reputation using erc20 tokens.

@orenyodfat orenyodfat changed the title Add auction4reputation Auction4reputation Jul 11, 2018
@orenyodfat orenyodfat force-pushed the auction4reputation branch from fa135be to ea8d3d6 Compare July 11, 2018 07:56
require(now >= auctionsStartTime,"bidding is enable only after bidding auctionsStartTime");
require(token.transferFrom(msg.sender, wallet, _amount),"transferFrom should success");
// solium-disable-next-line security/no-block-members
auctionId = ((now - auctionsStartTime)/numberOfAuctions);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this calculation is not correct

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 fixed at ed733dc

// solium-disable-next-line security/no-block-members
auctionId = (now - auctionsStartTime)/auctionPeriod;
Auction storage auction = auctions[auctionId];
auction.totalBid += _amount;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use safeMath

@orenyodfat orenyodfat merged commit ca914ce into master Jul 12, 2018
@orenyodfat orenyodfat deleted the auction4reputation branch July 12, 2018 11:30
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

Successfully merging this pull request may close these issues.

2 participants