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

Dutch auction #78

Closed
wants to merge 164 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
7d7bbbe
Copy pasted my dutch auction program
SwayStar123 Jun 8, 2022
cab7f47
Added logic to cap the price to the ending price
SwayStar123 Jun 8, 2022
11d3048
fixed comment
SwayStar123 Jun 8, 2022
d032145
Update dutch-auction/Cargo.toml
SwayStar123 Jun 8, 2022
03bdb05
Added missing semi colons and a `storage.`
SwayStar123 Jun 8, 2022
4d59187
Merge branch '69-dutch-auction' of https://github.com/FuelLabs/sway-a…
SwayStar123 Jun 8, 2022
c8aa432
Update dutch-auction/Cargo.toml
SwayStar123 Jun 8, 2022
6a54b58
Update dutch-auction/Forc.toml
SwayStar123 Jun 8, 2022
a7ce7b0
Removed unused function
SwayStar123 Jun 8, 2022
3b8d3f3
Added comments
SwayStar123 Jun 8, 2022
a9c075a
Made uses alphabetical, and changed abi name
SwayStar123 Jun 8, 2022
cd78934
Added enum errors and replaced assert with require
SwayStar123 Jun 8, 2022
03bf17e
Missing semicolon
SwayStar123 Jun 8, 2022
dc32a85
Seperated abi from main file
SwayStar123 Jun 8, 2022
6baaa49
Allowing admin to change the asset id via the setup_auction function
SwayStar123 Jun 8, 2022
924b008
Added some comments and end_auction function
SwayStar123 Jun 8, 2022
8e55d9d
Added a constructor function
SwayStar123 Jun 8, 2022
8e279c1
Added some comments and disallowed bidding before start time
SwayStar123 Jun 8, 2022
5667d46
Added a semi colon and the end_auction function in the abi
SwayStar123 Jun 8, 2022
b5ee469
Added explanation to the win function
SwayStar123 Jun 8, 2022
c4338cb
Changed it to be an implicit return
SwayStar123 Jun 8, 2022
c119c73
Removed abbreviations, and put the constructor at the top
SwayStar123 Jun 8, 2022
c049da2
Allow auction to start in the current block
SwayStar123 Jun 8, 2022
c28e0a8
fixed variable name error
SwayStar123 Jun 8, 2022
c5111a4
renamed the price function
SwayStar123 Jun 9, 2022
315c95b
More comments for calculate_price
SwayStar123 Jun 9, 2022
ff8b26d
Better explanation for now
SwayStar123 Jun 9, 2022
b4e615d
Renamed storage variables to fit style guide and auction naming conve…
SwayStar123 Jun 9, 2022
7647e1b
Fixed up the get_sender() function
SwayStar123 Jun 9, 2022
4fa4985
Moved the dutch auction into a auctions folder instead of letting it …
SwayStar123 Jun 9, 2022
6dcc69a
Using a StorageMap to allow for multiple auctions simultaneously. DOE…
SwayStar123 Jun 9, 2022
790b493
Fixed storagemap's struct field setting
SwayStar123 Jun 9, 2022
a294a1a
Loading in the auction once instead of repeatedly
SwayStar123 Jun 9, 2022
39f622e
Update auctions/dutch-auction/src/main.sw
SwayStar123 Jun 9, 2022
f8df912
Update auctions/dutch-auction/src/main.sw
SwayStar123 Jun 9, 2022
9137d4c
Update auctions/dutch-auction/src/main.sw
SwayStar123 Jun 9, 2022
e310f3a
alphabetical order
SwayStar123 Jun 9, 2022
dd6b8f5
constructed -> initialized
SwayStar123 Jun 9, 2022
dc101ed
Comment change
SwayStar123 Jun 9, 2022
3a850be
Comment change
SwayStar123 Jun 9, 2022
d5218a5
merge changes made on github
SwayStar123 Jun 9, 2022
8a98067
added cannot reinitialize and made asset id auction specific, removed…
SwayStar123 Jun 9, 2022
d1d2901
Address -> Identity in abi
SwayStar123 Jun 9, 2022
157285e
nvm ill change it to identity later
SwayStar123 Jun 9, 2022
2bec7f4
Update auctions/dutch-auction/src/main.sw
SwayStar123 Jun 9, 2022
02c34e1
Update auctions/dutch-auction/Cargo.toml
SwayStar123 Jun 9, 2022
844e6af
Switching some comparisons around for formatting
SwayStar123 Jun 9, 2022
c48e65d
Merge branch '69-dutch-auction' of https://github.com/FuelLabs/sway-a…
SwayStar123 Jun 9, 2022
32111cd
Update auctions/dutch-auction/src/main.sw
SwayStar123 Jun 9, 2022
aa7aba4
changed latest_auction_id to auction_count
SwayStar123 Jun 9, 2022
74c4c8e
Update auctions/dutch-auction/src/main.sw
SwayStar123 Jun 9, 2022
653e305
Update auctions/dutch-auction/src/abi.sw
SwayStar123 Jun 9, 2022
7ee1584
added check for valid auction id
SwayStar123 Jun 9, 2022
dc22f8a
Merge branch '69-dutch-auction' of https://github.com/FuelLabs/sway-a…
SwayStar123 Jun 9, 2022
c1d14ab
Minor stylization
SwayStar123 Jun 9, 2022
97db208
Assigned price to a variable instead of recalculating everytime, and …
SwayStar123 Jun 10, 2022
50ef57e
Moved errors enum and auction struct into seperate files
SwayStar123 Jun 10, 2022
c5ff265
Made admin and beneficiary generic over identity
SwayStar123 Jun 10, 2022
b0d7b57
Added logging
SwayStar123 Jun 10, 2022
6f300ea
forc fmt
SwayStar123 Jun 10, 2022
cdc9103
removed a comment
SwayStar123 Jun 10, 2022
2ebacdf
Create README.md
SwayStar123 Jun 10, 2022
9ccfc0e
Merge branch '69-dutch-auction' of https://github.com/FuelLabs/sway-a…
SwayStar123 Jun 10, 2022
de933d1
Update ci.yml
SwayStar123 Jun 10, 2022
95d3851
forc fmt
SwayStar123 Jun 10, 2022
e7d0e5c
Merge branch '69-dutch-auction' of https://github.com/FuelLabs/sway-a…
SwayStar123 Jun 10, 2022
9dd404e
cargo fmt
SwayStar123 Jun 10, 2022
a111b42
Update ci.yml
SwayStar123 Jun 10, 2022
2a13c9e
Update auctions/dutch-auction/src/data_structures.sw
SwayStar123 Jun 10, 2022
e40dc9e
Update auctions/dutch-auction/src/data_structures.sw
SwayStar123 Jun 10, 2022
ea02241
Update auctions/dutch-auction/src/main.sw
SwayStar123 Jun 10, 2022
a6a1ad7
Update auctions/dutch-auction/src/main.sw
SwayStar123 Jun 10, 2022
ff9d95a
Update auctions/dutch-auction/src/main.sw
SwayStar123 Jun 10, 2022
fea8551
Update auctions/dutch-auction/src/main.sw
SwayStar123 Jun 10, 2022
2eebdeb
Update auctions/dutch-auction/src/main.sw
SwayStar123 Jun 10, 2022
bb37186
Update auctions/dutch-auction/src/main.sw
SwayStar123 Jun 10, 2022
64de14d
Update auctions/dutch-auction/src/main.sw
SwayStar123 Jun 10, 2022
3af0084
Renamed an event and some minor stylization
SwayStar123 Jun 11, 2022
0d5d835
Merge branch '69-dutch-auction' of https://github.com/FuelLabs/sway-a…
SwayStar123 Jun 11, 2022
4f2fcb5
forc fmt
SwayStar123 Jun 11, 2022
93771ea
validate id function added
SwayStar123 Jun 11, 2022
45432cc
changed documentation into comments
SwayStar123 Jun 11, 2022
0a98876
changed more documentation into comments
SwayStar123 Jun 11, 2022
e029ce4
Reformatted the order of function calls and assignments in bid function
SwayStar123 Jun 11, 2022
bf6153d
renamed get_sender_identity
SwayStar123 Jun 11, 2022
23d55f0
added a check to see if auction already ended in cancel_auction
SwayStar123 Jun 11, 2022
ee659a7
Changed position of auction ended check
SwayStar123 Jun 11, 2022
5383bb7
Added documentation for every function
SwayStar123 Jun 11, 2022
0f8900d
Seperated errors into seperate enums
SwayStar123 Jun 11, 2022
b6e9e07
Create README.md
SwayStar123 Jun 11, 2022
bcc3141
auction() function returns auction from an id
SwayStar123 Jun 11, 2022
9e3c79c
Merge branch '69-dutch-auction' of https://github.com/FuelLabs/sway-a…
SwayStar123 Jun 11, 2022
031a96f
documentation
SwayStar123 Jun 11, 2022
4e8a27f
Merge branch 'master' into 69-dutch-auction
Braqzen Jun 12, 2022
4952de4
Removed the concept of an admin, anyone can make an auction and only …
SwayStar123 Jun 13, 2022
2a362e5
data_structures alphabetical order
SwayStar123 Jun 13, 2022
6908379
Reworked the classification of some errors
SwayStar123 Jun 13, 2022
4904a8a
missed the word "error"
SwayStar123 Jun 13, 2022
94c7a53
Minor changes and added a check in bid to not allow bids after auctio…
SwayStar123 Jun 13, 2022
74207ff
comment changes, changed the position of some statements
SwayStar123 Jun 13, 2022
c05f3d3
added change_asset and change_beneficiary functions, and made abi alp…
SwayStar123 Jun 13, 2022
8a01b0a
added a check to see if auction has ended
SwayStar123 Jun 13, 2022
a92aea3
removed unncessary comment
SwayStar123 Jun 14, 2022
849ef05
Added a "active_auctions_by_identity" storage variable
SwayStar123 Jun 14, 2022
0b3fef6
added panic comments
SwayStar123 Jun 14, 2022
c6aaabb
Update README.md
SwayStar123 Jun 14, 2022
f8a679c
Update README.md
SwayStar123 Jun 14, 2022
0b0047b
Merge branch 'master' into 69-dutch-auction
Braqzen Jun 14, 2022
50757c0
Update .github/workflows/ci.yml
SwayStar123 Jun 15, 2022
302c559
Update build.sh
SwayStar123 Jun 15, 2022
634bbf4
changed order of fields in auction struct
SwayStar123 Jun 15, 2022
6f668fd
changed order of errors
SwayStar123 Jun 15, 2022
40ffde0
changed documentation
SwayStar123 Jun 15, 2022
9b81255
Updated documentation and comments
SwayStar123 Jun 15, 2022
e203352
moved most private functions to utils.sw
SwayStar123 Jun 15, 2022
03e6b73
replaced beneficiary with author for authorization of some functions
SwayStar123 Jun 16, 2022
11fcdcf
added a auctions_won function
SwayStar123 Jun 16, 2022
e637108
Added a winner option field to the auction struct
SwayStar123 Jun 16, 2022
0276ccd
addded a new log for changed asset
SwayStar123 Jun 16, 2022
b9b964d
fixed breaking changes
SwayStar123 Jul 30, 2022
4efbad8
Merge branch 'master' into 69-dutch-auction
SwayStar123 Jul 30, 2022
5e9b347
Update build.sh
SwayStar123 Jul 30, 2022
c2836f0
Update build.sh
SwayStar123 Jul 30, 2022
26e011e
updated std use
SwayStar123 Jul 31, 2022
efe5dd4
Merge branch '69-dutch-auction' of https://github.com/FuelLabs/sway-a…
SwayStar123 Jul 31, 2022
f4245a1
forc fmt
SwayStar123 Jul 31, 2022
7fbe7e5
started tests and realized im blocked on vec
SwayStar123 Aug 10, 2022
7834fa1
resolved merge conflict
SwayStar123 Nov 21, 2022
aeb8c50
forc fmt
SwayStar123 Nov 21, 2022
cd132bf
Created a storagemapvec and used it
SwayStar123 Nov 25, 2022
0d3b3e7
Updated documentation and moved it
SwayStar123 Dec 2, 2022
fa72e08
Merge branch 'master' into 69-dutch-auction
SwayStar123 Dec 2, 2022
bb92532
Merge branch 'master' into 69-dutch-auction
SwayStar123 Dec 4, 2022
362d8de
froc fmt
SwayStar123 Dec 6, 2022
63132c4
simplified the view functions
SwayStar123 Dec 6, 2022
2798f0f
Merge branch 'master' into 69-dutch-auction
SwayStar123 Jan 18, 2023
ac6dca4
switched to swaylibs storagemapvec
SwayStar123 Jan 18, 2023
0bf1801
changed some of the documentation
SwayStar123 Jan 18, 2023
d9cb7e0
changed auction documentation
SwayStar123 Jan 18, 2023
455e8f4
changed documentation of auctions won
SwayStar123 Jan 18, 2023
fc23650
forc fmt
SwayStar123 Jan 18, 2023
bef11ca
added dutch auction to workspace
SwayStar123 Jan 18, 2023
b8ce884
Updating dutch auction
SwayStar123 Mar 3, 2023
125d3de
Merge branch 'master' into 69-dutch-auction
SwayStar123 Apr 1, 2023
b979d71
Updated and cleaned up dutch action
SwayStar123 Apr 1, 2023
eda567f
test for price
SwayStar123 Apr 3, 2023
9cd81b5
failed transfer to address error
SwayStar123 Apr 11, 2023
aabb90e
debugging
SwayStar123 Apr 11, 2023
cdf2f7e
fuel-toolchain added
SwayStar123 Apr 11, 2023
fddbde5
changed forc version
SwayStar123 Apr 11, 2023
c1bef5a
changing versions
SwayStar123 Apr 11, 2023
6ac913f
updating forc and adding create_auction tests
SwayStar123 Apr 15, 2023
e44922c
failing tets for create_auction
SwayStar123 Apr 15, 2023
4877099
cargo fmt and add incorrect asset test
SwayStar123 Apr 15, 2023
c826081
active_auctions_of_author is not updated correctly
SwayStar123 Apr 15, 2023
331edda
added fix for removing correct auction_id from active_auctions
SwayStar123 Apr 16, 2023
665f596
fmt
SwayStar123 Apr 16, 2023
e622f9b
added auction tests
SwayStar123 Apr 16, 2023
ab795ab
change_asset tests
SwayStar123 Apr 16, 2023
cc5e7c4
change_beneficiary tests
SwayStar123 Apr 16, 2023
e4582aa
all tests done
SwayStar123 Apr 16, 2023
d6ae33b
move everything into project folder
SwayStar123 Apr 16, 2023
5deed75
ci typo
SwayStar123 Apr 16, 2023
274de37
Merge branch 'master' into 69-dutch-auction
SwayStar123 Apr 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
"airdrop",
"AMM",
"auctions/english-auction",
"auctions/dutch-auction",
Comment on lines 43 to +44
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"auctions/english-auction",
"auctions/dutch-auction",
"auctions/dutch-auction",
"auctions/english-auction",

"DAO",
"escrow",
"fractional-NFT",
Expand Down
9 changes: 9 additions & 0 deletions auctions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Overview
SwayStar123 marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest looking at the other README files and adjusting this one to contain a higher level structure / scope / content of the auctions as this only has a few lines / bullet points. It's too barebones.

This is a repository of auction contracts maintained by the Fuel application developer team. They will support auctioning of NFTs but can be edited for other purposes

There are 3 seperate auctions in this folder
- English Auction
- Dutch Auction
- Blind Auction

# How to run
2 changes: 2 additions & 0 deletions auctions/dutch-auction/project/.gitignore
Copy link
Contributor

Choose a reason for hiding this comment

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

I would check the repo to see if this is even needed or if a repo level gitignore already contains there

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
out
target
Loading