Skip to content
This repository was archived by the owner on Aug 4, 2023. It is now read-only.

Comments

Eli/consolation auction#214

Open
EGuenz wants to merge 34 commits intomainfrom
eli/consolation-auction
Open

Eli/consolation auction#214
EGuenz wants to merge 34 commits intomainfrom
eli/consolation-auction

Conversation

@EGuenz
Copy link
Collaborator

@EGuenz EGuenz commented Jan 18, 2022

This PR adds both the consolation auction as well as positional auction variants of the english auction contract

@EGuenz EGuenz requested a review from michaeljklein February 16, 2022 20:55
initAuctionStorage as = AuctionStorage
{ pausableAdmin = as
, currentId = 0
, maxAuctionTime = 99999999999999999999
Copy link
Contributor

Choose a reason for hiding this comment

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

are maxAuctionTime and maxConfigToStartTime ever tested?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

maxConfigToStartTime was already tested and I just added tests for maxAuctionTime. These tests are in the base tez auction contract tests, since the macro logic will not affect their behavior and these variables apply to all variants.

deriving anyclass instance IsoValue ConfigureParam
deriving anyclass instance HasAnnotation ConfigureParam

consolationTokenId :: Natural
Copy link
Contributor

Choose a reason for hiding this comment

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

this doesn't appear to be tested with a non-zero ID

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in a new commit

, testMinRaisePercent :: Natural

, testTokenBatches :: [[Common.FA2Token]]
, testMaxConsolationWinners :: Natural
Copy link
Contributor

Choose a reason for hiding this comment

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

how is this tested? e.g. I couldn't find a test to ensure that there are only this many winners or what happens when there are fewer participants than this max

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is tested in the sense that genConsolationWinners generates a list of bid indices that ought to receive a consolation token, and that function takes into account maxConsolationWinners and the number of bidders which ranges from less than to greater than maxConsolationsWinners. The individual tests check that the consolation tokens were correctly distributed using the list returned by genConsolationWinners.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants